Lesson 14: Grammars and Tokenization

Outline:

  1. Recap: compilers and interpreters
  2. Interpreter project roadmap
  3. Tokenization overview
  4. Grammars
    • regular expressions
    • Backus-Naur form
  5. Wrap-up

After class

Try to write a grammar for the Echo language!

What’s next

Upcoming events/assessments:

  • CS Bits and Bytes tomorrow at 3:30pm in Anderson 329: Reflections on GitTogether
  • Assignments 6–9 (all C assignments) cannot be resubmitted after Friday at 5pm

What you should do now:

  • Read the assigned readings (see below)
  • Work on Interpreter Part 2: Talloc
  • Work on resubmitting Assignments 6–9 with more complete functionality, style fixes, etc.
  • Look at CS Courses on Workday and fill out your Match form

Reading assignment (to be completed by the next class):

Grammars (from today):

Useful BNF visualizers:

Parsing (for next time):

  • Parsing – you can access this full textbook through the library