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

CS 423 Compiler project notes

Embed Size (px)

DESCRIPTION

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 - PowerPoint PPT Presentation

Citation preview

Page 1: CS 423 Compiler  project notes

CS 423 Compiler project notes

Dept. of Comp. Sci. & Eng.Geunbae Lee

Page 2: CS 423 Compiler  project notes

Definition of C- language and Tiny Machine

Page 3: CS 423 Compiler  project notes

Step by Step Assignments

problem description algorithm source code execution results

Page 4: CS 423 Compiler  project notes

Assgn#1

Due 4th week Implement a symbol table utility 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)

Page 5: CS 423 Compiler  project notes

Assgn#2

Due 6th week Implement a C- scanner using Lex (attac

hment)

Page 6: CS 423 Compiler  project notes

Assgn#3

Due 7th week Design a syntax tree structure for

C- suitable for generation by a parser (attachment)

Page 7: CS 423 Compiler  project notes

Assgn#4

Due 9th week Implement a C- parser using Yacc. The p

arser should generate a suitable syntax tree (attachment)

Page 8: CS 423 Compiler  project notes

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)

Page 9: CS 423 Compiler  project notes

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-

Page 10: CS 423 Compiler  project notes

Demo program

A full compiler for tinier language than C-

A Tiny Machine simulator to execute generated object code (test your own results)