Parser generator in Pascal (Re: Parser and scanner generators)
L.M.McLoughlin
lmcl at ukc.UUCP
Mon May 21 01:33:23 AEST 1984
About 4 years ago I extend the old V6 yacc to cope with pascal as well as
C and Ratfor. A year later I added the pascal extensions onto the V7 yacc.
It's been used both at my own college (Westfield College, London) and by one
of the groups at Imperial College. It allows the user to specify where the
following code should go in an action (global variables, types, procedures...)
all of which get copied into there individual files. Then at the end these
files plus the basic parser file are all concatenated together to form a
complete program. Most of the trouble with the pascal version comes with
the large tables that are needed. For small grammars you can ask for the
tables to be initialised by assignments, larger programs require the tables to
be read in. The generated table file is normally text but if your system
allows binary files then yacc can arrange to convert the text file into binary
by "system()"ing another program.
If anyone is interested in getting a copy please mail me.
Lee McLoughlin.
More information about the Comp.unix.wizards
mailing list