next up previous
Next: Usage Up: Rail Syntax Diagrams Previous: Rail Syntax Diagrams


The Rail package allows you to include syntax diagrams (also known as railroad diagrams) in a LaTeX document. Such a diagram looks like this:  

The idea is that any sequence of terminals and nonterminals that can be produced by starting at the left and following the lines is a valid sentence of some language. As such, these diagrams are analogous to BNF with embedded regular expressions for each right-hand side. Actually, the input language looks like that, except that production rules need not be named and there is some extra annotation. This document describes version 1.0 #1 of the Rail package.

Snorri Agnarsson
Föstudagur, 13. október 1995 15:26:49