Next: PTHL FAQ, Previous: PTHL Samples, Up: PTHL (TC-0) [Contents][Index]
We don’t need several directories, you can program in the top level of the package.
You must write:
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.
The parser, and maybe main
if you wish. Bison advanced features
will be used in TC-1.
union
,
which can be used to store objects (just Plain Old Data), hence pointers
and dynamic allocation must be used.
PARSE
to enable parser traces, i.e.,
to set yydebug
to 1, run:
PARSE=1 tc foo.tig
%printer
to improve the tracing of semantic values. For
instance,
%define api.value.type variant %token <int> INT "integer" %printer { yyo << $$; } <int>
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: PTHL FAQ, Previous: PTHL Samples, Up: PTHL (TC-0) [Contents][Index]