Understanding sentence structure

Here, we diagram sentences using a tree, where we assign:

  • Relations
  • Assignments
  • Etc…

Recursive Descent

  • We always build a recognizer before a parser, and we systematically derive code from a spec
  • The Lexer breaks inputs into tokens.

Based on a grammar feature, we implement a code equivalent…

Info

The Parser implements the grammar and constructs the AST. The Recognizer should always be made first because its easier and then we modify the recognizer into the parser.