compilers-sender@ima.ima.isc.com (10/11/88)
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>] -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.EDU Plausible paths are { decvax | harvard | yale | bbn}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request