Next: , Previous: , Up: PTHL (TC-0)   [Contents][Index]


4.2.3 PTHL Code to Write

We don’t need several directories, you can program in the top level of the package.

You must write:

src/scantiger.ll

The scanner.

lval supports strings, integers and even symbols. Nevertheless, symbols (i.e., identifiers) are returned as plain C++ strings for the time being: the class misc::symbol is introduced in TC-1.

If the environment variable SCAN is defined (to whatever value) Flex scanner debugging traces are enabled, i.e., set the variable yy_flex_debug to 1.

src/parsetiger.yy

The parser, and maybe main if you wish. Bison advanced features will be used in TC-1.

Makefile

This file is mandatory. Running make must build an executable tc in the root directory. The GNU Build System is not mandatory: TC-1 introduces Autoconf, Automake etc. You may use it, in which case we will run configure before make.


Next: , Previous: , Up: PTHL (TC-0)   [Contents][Index]