Contents
Page-10
Prev
Next
Page+10
Index
Parser Overview
The Parser is a central part of a compiler.
- The input to the parser is the output of the lexical
analyzer ( gettoken() or yylex()).
- The parser analyzes whole statements of the program:
if expression then statement else statement
- Since the language constructs may be recursive, a
context-free grammar must be used.
- The parser builds complex tables, such as the symbol table, in
response to declaration statements. These tables are used later in the
generation of code.
- The output of the parser is
intermediate code.