Toy Compiler Example

makefile
A makefile, illustrating how to combine Flex, Bison, and other C code.
tp
An executable machine code program for a tiny subset of Pascal
tp.c
The main function, opens
tinypas.l
A flex specification, derived from an example on the Flex man page
lex.yy.c, lex.yy.o
Generated code, produced by flex from tinypas.l
example input file input.pas
It is supposed to be Pascal-ish (it isn't yet)
tpgram.y
A bison specification, not yet reflecting a subset of Pascal syntax
tpgram.tab.c, tpgram.tab.h, tpgram.tab.o
Generated code, produced by bison from tpgram.y tp.o