|
File Lectures.html Author McKeeman Copyright © 2007 index A Short Course in CompilersCourse MaterialsThese lectures are designed for a 10-session class. It is assumed that the students know MATLAB and introductory level college mathematics. The planned course format is an hour of lecture followed by an hour of in-class lab work. There is not enough time to go into everything in a 10 meeting format. Much of the material is designed for home study. The student is encouraged to read the rest of the material after each class. The overheads (links below) are designed for a classroom setting. They are useful mostly as bullets which show the order of classroom lecture subtopics. The overheads can be ignored during home study. If a project is going to be attempted, it should be done simultaneously. Order of PresentationMost compilers, including xcom, have a front end and a back end corresponding the analysis and synthesis. This presentation of the front end follows the data flow in the compiler, lex to parse to tree to symbols. The presentation of the back end is in reverse order, assember to emitter to generator. This order is just one example of the old Polish proverb When crossing a swamp, keep one foot on solid ground. At each end of the compiler we have simplicity: ASCII text in, hardware instructions out. The data at each end can be understood on its own. The further we move towards the middle, the more new knowledge is in play. Both ends to the middle is appropriate for xcom for another reason; the front end components transform inputs into explicit outputs, but the back end does not. In the front end there is a lex pass, a parse pass, a tree building pass, and a symbol table pass. Each front end component leaves behind an intermediate data structure. The back end components run simultaneously, each calling for services in the next component on the fly. This is not fundamental -- intermediate forms could have been invented and the back end could also have proceeded in passes. But it does not. Lecture 1 (overheads)
Lab 1
Lecture 2 (overheads)Lab 2
Lecture 3 (overheads)
Lab 3
Lecture 4 (overheads)Lab 4
Lecture 5 (overheads)
Lab 5
Lecture 6 (overheads)
Lab 6
Lecture 7 (overheads)
Lab 7
Lecture 8 (overheads)
Lab 8
Lecture 9 (overheads)
Lab 9
Lecture 10
Lab 10Final Exam |