Why You Need to Know Regular Expressions
A Complete Cb Compilation Example
| Phase | Language Class | Compelling Feature | Machine | Grammar | Described By | Software Tool |
|---|---|---|---|---|---|---|
| Scanning (aka tokenizing aka lexical analysis) | Regular Language | Just states | Finite State Machine (FSM) | Regular Grammar | Regular Expression | lex |
| Parsing | Context-Free Language | States plus a stack | Push-Down Automaton (PDA) | Context-Free Grammar | yacc |
Coding Examples
Coding a table-driven FSM
Lex Example
Yacc Example
Hashtable Example
Error Processing
Argc-argv Example
Code Generation
The Program Body
Activation Record Construction
Arithmetic
Branches
Error Handling and Recovery in Yacc
Last modified: Tue Apr 24 14:12:50 MDT 2007