Related articles |
---|
Railroad diagrams from BNF or yacc-input rfg@netcom.com (1993-08-28) |
Re: Railroad diagrams from BNF or yacc-input horst@techfak.uni-bielefeld.de (1993-08-30) |
Newsgroups: | comp.compilers |
From: | horst@techfak.uni-bielefeld.de (Horst Hogenkamp) |
Keywords: | tools |
Organization: | Universitaet Bielefeld, Technische Fakultaet. |
References: | 93-08-110 |
Date: | Mon, 30 Aug 1993 14:34:10 GMT |
rfg@netcom.com (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 nic.funet.fi:/pub/amiga/applications/TeX/misc,
but I never tried it myself. The corresponding readme is listed below.
Horst.
=== nic.funet.fi:/pub/amiga/applications/TeX/misc/Rail-1.0.readme
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
E-mail: lwj@cs.kun.nl
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.