DSL Basics - Midterm Flashcards

1
Q

Single Symbol Lookahead

A

first token in grammar unambiguously tells you which node you’re at

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

5 steps to Tokenizing

A
  1. Read input as a single string
  2. kill all the newlines
  3. Replace all reserved words with RESERVEDWORDRESERVEDWORD
  4. Replace all RESERVEDWORDRESERVEDWORD with just RESERVEDWORD
  5. Split on RESERVEDWORD
How well did you know this?
1
Not at all
2
3
4
5
Perfectly