OpenBSD Journal

Syntax-Diagrams

Contributed by jose on from the pretty-pf-syntax dept.

Maik writes: "sent to pf@benzedrine.cx

Graphical syntax diagrams for pf.conf (pdf): http://pfsyntax.maik.li/pfsyntax.pdf (71k)

I have made a smal shell-script that creats a tex file with the syntax from "man pf.conf".

The tex file produced by pf2syn: http://pfsyntax.maik.li/syn.tex (11k)

The script, a sed commands file and a sample main_pdf.tex file (tgz): http://pfsyntax.maik.li/PF2Syn.tgz (2k)

How to create the pdf file:

  $  pf2syn > syn.tex
  $  pdflatex main_pdf.tex
  $  rail main_pdf
  $  makeindex main_pdf
  $  pdflatex main_pdf.tex
You need the program rail: http://www.ctan.org/tex-archive/support/rail/?action=/tex-archive/support/

ToDo:

  • "-" in non-terminal, at the moment replaced by "."
  • links non-terminal -> definition
Does someone else know programs to prodcue "rail way diagrams" in LaTeX? I found "rail" and "syngen", but I only get "rail" to work..."

(Comments are closed)


Comments
  1. By Anonymous Coward () on

    Screw pf.conf. Why not make it follow the parser (.y) source ?

    Comments
    1. By m () on

      like this?

      http://www.alchar.org/~aedil/Projects/y2l.html

  2. By marklar () marklar_@hotmail.com on mailto:marklar_@hotmail.com

    Nice work! I guess my procrastination on learning pf paid off, this should make things easier now.

  3. By Anonymous Coward () on

    Nice, I'll probably start carrying this around in stead of a printout of the manpage :)

Latest Articles

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]