Next: , Previous: , Up: TC-1   [Contents][Index]


4.3.4 TC-1 Code to Write

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

configure.ac
Makefile.am

Include your own test suite in the tests directory, and hook it to make check.

src/parse/scantiger.ll

The scanner must be completed to read strings, identifiers etc. and track locations.

src/parse/parsetiger.yy
src/parse/tiger-parser.cc

The class TigerParser drives the lexing and parsing of input file. Its implementation in src/parse/tiger-parser.cc is incomplete.

lib/misc/symbol.*
lib/misc/unique.*

The class misc::symbol keeps a single copy of identifiers, see lib/misc. Its implementation in lib/misc/symbol.hxx and lib/misc/symbol.cc is incomplete. Note that running ‘make check’ in lib/misc exercises lib/misc/test-symbol.cc: having this unit test pass should be a goal by itself. As a matter of fact, unit tests were left to help you: once they pass successfully you may proceed to the rest of the compiler. misc::symbol’s implementation is based on misc::unique, a generic class implementing the Flyweight design pattern. The definition of this class, lib/misc/unique.hxx, is also to be completed.

lib/misc/variant.*

The implementation of the class template misc::variant<T0, Ts...> lacks a couple of conversion operators that you have to supply.


Next: , Previous: , Up: TC-1   [Contents][Index]