Next:
Part III: Lexical Analysis
Part III: Lexical Analysis (Scanner)
Regular Languages
Lexical Analysis / Syntactic Analysis
Exercise
From a Regular Language to Program Code
Straightforward Generation
Optimized Version
Possible Problem
The Task of the Lexical Analyzer
White Space and Comments
The Longest Match Rule
Example
Using a Scanner Generator
Regular Expressions in JLex
Regular Expressions in JLex (2)
JLex Example: Expressions
Tokens
Symbol
ScannerTest
How does generation work?
Finite State Automata
(Non)Deterministic Finite State Automata
From a Regular Expression to an NFA
From an NFA to a DFA
Algorithm
Algorithm (2)
Simulating a DFA
DFA Construction
DFA Construction (2)
Executing a DFA
Executing a DFA
Summary: Lexical Analysis
Exercise
About this document ...
Christoph Zenger
3/23/2000