CS 370: Lecture Notes

Why You Need to Know Regular Expressions

The Cb Specification

A Complete Cb Compilation Example

Language Class Hierarchy

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

Tokenizers

Lists in 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

Tracing a Yacc Parser

Error Handling

Error Handling and Recovery in Yacc


Last modified: Tue Apr 24 14:12:50 MDT 2007

Valid XHTML 1.0 Strict Valid CSS!