Lec 1 2
Lec 1 2
LECTURE 1
Preliminaries Required
■ Basic knowledge of programming languages.
■ Basic knowledge of FSA and CFG.
■ Knowledge of a high programming language for
the programming assignments.
Textbook:
Alfred V. Aho, Ravi Sethi, and Jeffrey D. Ullman,
“Compilers: Principles, Techniques, and Tools”
Addison-Wesley, 1986.
Lex & Yacc. John R. Levine, Tony Mason, Doug
Brown. O'Reilly & Associates
102046704 1992.
Compiler
ISBN:1565920007
Design 2
Examination Scheme
error
messages
identifier number
oldval 12
■The lexical102046704
analyzer Compiler
simplifies the job of the
syntax analyzer.
Design 15
Parsing Techniques
■Depending on how the parse tree is
created, there are different parsing
techniques.
■ Ex:
MULT id2,id3,temp1
ADD temp1,#1,id1
■ Ex:
( assume that we have an architecture with instructions whose at
least one of its operands is
a machine register)
MOVE id2,R1
MULT id3,R1
ADD #1,R1
MOVE102046704
R1,id1 Compiler Design 24