Lexical Analysis Flashcards
1
Q
What does lexical analysis do?
A
Reads characters and produces sequences of tokens
2
Q
How are lexical analysers automatically generated from regular expressions?
A
- Construct RE
- Convert RE to NFA
- Build DFA from NFA
- Minimise DFA
- Convert DFA to Transition Table
3
Q
What kind of Language can a Regular Expression describe?
A
A Regular Language
4
Q
How might we represent a DFA in memory?
A
Using a Transition Table
This contains all the states and their transitions