• Input: String of tokens
• Output: Parse tree
 
• Method:
• Parser verifies that the string of tokens
   represents a syntactically well-formed program
• If it finds a parse tree for the string, it is
   correct; otherwise, it is not
• Construction of tree is based on grammatical
   rules
• Two approach: top-down and bottom-up
Syntax analyzer (Parser)
8/17