1 / 10

CS 423 Compiler project notes

CS 423 Compiler project notes. Dept. of Comp. Sci. & Eng. Geunbae Lee. Definition of C- language and Tiny Machine. Step by Step Assignments. problem description algorithm source code execution results. Assgn#1. Due 4th week

Télécharger la présentation

CS 423 Compiler project notes

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 423 Compiler project notes Dept. of Comp. Sci. & Eng. Geunbae Lee

  2. Definition of C- language and Tiny Machine

  3. Step by Step Assignments • problem description • algorithm • source code • execution results

  4. Assgn#1 • Due 4th week • Implement a symbol tableutility suitable for the C- language. This will require a table structure that incoporate scope information, either as separate tables linked together or with a delete mechanism that operates in a stack-based fashion (attachment)

  5. Assgn#2 • Due 6th week • Implement a C- scanner using Lex (attachment)

  6. Assgn#3 • Due 7th week • Design a syntax tree structure for C- suitable for generation by a parser (attachment)

  7. Assgn#4 • Due 9th week • Implement a C- parser using Yacc. The parser should generate a suitable syntax tree (attachment)

  8. Assgm#5 • Due 12th week • Implement a semantic analyzer for C-. The major requirement of the analyzer, aside from gathering information in the symbol table, is to perform type checking on the use of variables and functions. Since there are no pointers or structures, and the only basic type is integer, the types that need to be treated by the type checker are void, integer, array, and function. (attachment)

  9. Assgn#6 & final demo • Due 16th • Implement a code generator for C-, according to the runtime environment described in the attachment followed. • Demo a full compilation process for the example two C- programs in attachment (pp 496-497) and one of your favorite program in C-

  10. Demo program • A full compiler for tinier language than C- • A Tiny Machine simulator to execute generated object code (test your own results)

More Related