Related articles |
---|
Question about yacc to EBNF program uiucdcs!uunet!mcvax!csaran.cs.tcd.ie!phrrngtn (Paul Harrington) (1988-10-11) |
From: | Paul Harrington <phrrngtn@cs.tcd.ie> |
Newsgroups: | comp.compilers |
Date: | 11 Oct 88 16:39:54 GMT |
From: | Paul Harrington <uiucdcs!uunet!mcvax!csaran.cs.tcd.ie!phrrngtn> |
Organization: | Computer Science Department, Trinity College, Dublin |
I want a yacc source that parses a yacc input grammar and produces the
kind of syntax diagrams found in the appendices of most books on high
level languages i.e. curly braces to indicate zero or more repetitions
of a construct.
I have already written a yacc specification of a yacc parser but the
details of pretty printing the grammar were too demanding e.g. if a
furmulation contains an empty option or a list then write the whole
formulation as " element {',' element} ". Some semantic processing of
the grammar is required.
I got most of the yacc source for yacc from documentation supplied with
a SUN workstation. This is almost the same as the paper by Johnson
describing yacc. This yacc contains many small bugs and omissions and is
really only useful as a guide.
The yacc to EBNF pretty printer was not that important in the project I was
working on (It would have been useful to maintain consistancy between the yacc
grammar and the EBNF of the compiler that was being developed). The EBNF had
to maintained by hand so, not surprisingly, it was often out of date and
people had to go to the yacc for the syntax.
[From Paul Harrington <uiucdcs!uunet!mcvax!csaran.cs.tcd.ie!phrrngtn>]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.