Re: Railroad diagrams from BNF or yacc-input (Horst Hogenkamp)
Mon, 30 Aug 1993 14:34:10 GMT

          From comp.compilers

Related articles
Railroad diagrams from BNF or yacc-input (1993-08-28)
Re: Railroad diagrams from BNF or yacc-input (1993-08-30)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Horst Hogenkamp)
Keywords: tools
Organization: Universitaet Bielefeld, Technische Fakultaet.
References: 93-08-110
Date: Mon, 30 Aug 1993 14:34:10 GMT (Ronald F. Guilmette) writes:

> I have a small grammar (for a small language) which I'd like to have a
> railroad diagram for.
> Does anyone here happen to know where I might be able to lay hands on
> a tool which would accept either yacc input or straight BNF and which
> would produce a cutsey looking railroad diagram that I could output to
> my PostScript printer?

LaTeX with the proper style file should do.
I found one in directory,
but I never tried it myself. The corresponding readme is listed below.



Short: Include syntax diagrams in LaTeX documents

README file for the Rail package, version 1.0 #1

The Rail package allows you to include syntax diagrams (also known as
railroad diagrams) in a LaTeX document. A UNIX manual page and LaTeX
documentation are included. The package consists of a LaTeX style file
(rail.sty) and a C program (rail) and works in two passes not unlike
BibTeX. Diagrams are specified in a regular-expression like format
between \begin{rail} and \end{rail} brackets, and are formatted using
the standard LaTeX picture environment.

To use the package, you need a UNIX system with LaTeX. Actually, the
rail program should be portable to non-UNIX systems, but you need lex
and yacc (or compatible programs such as flex and bison) and a C
compiler. No fancy ANSI C constructions are used, and the program
passes lint quite silently.

L.W.J. Rooijakkers
University of Nijmegen
The Netherlands

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.