Lexical Analysis vs Parsing
Lexical analysis
- determines the individual tokens in a program
- by examining the structure of the character sequence making up the program
- token structure can be described by regular expressions
Parsing
- determines the phrases of a program
- phrase structure must be described using a context-free grammar