TC-1/2-Lexer Goals
Things to learn during this sub-stage that you should remember:
- Basic C++ classes
The classes
Location
(i.e.,parse::position
,parse::location
, etc.) and theiroperator
s provide a good start to study foreign C++ classes.- Writing and debugging a scanner
Learn to use RE/flex, see RE/flex & Bison.
- Location Tracking
Understand how to track the location and update it, within the scanner.
- Implementation of a few simple C++ classes
The code for
misc::symbol
andmisc::unique
is incomplete.- A first standard container:
std::set
The implementation of the
misc::unique
class relies onstd::set
.- The Flyweight design pattern
The
misc::unique
class is an implementation of the Flyweight design pattern.