Noeud « Next »: , Noeud « Previous »: T1 Given Code, Noeud « Up »: T1



4.3.4 T1 Code to Write

Be sure to read Flex and Bison documentations and tutorials, see Flex & Bison.

src/parse/scantiger.ll
The scanner must be completed to read strings, identifiers etc. and track locations.
src/parse/parsetiger.yy

src/symbol/symbol.hxx
The class symbol::Symbol keeps a single copy of identifiers, see src/symbol. Its implementation in src/symbol/symbol.hxx is incomplete.

The most delicate part is the constructor symbol::Symbol::Symbol (const std::string &s): just bare in mind that (i) you must make sure that the string s is inserted in the set, and (ii) save in this new symbol::Symbol object a reference to this inserted string. Carefully read the documentation of std::set::insert.