Pages tagged [latex]

Install YACC2LATEX

Introduction yacc2latex translates a yacc or ocamlyacc (mly) file into an hopefully pretty EBNF grammar, and then in Latex. For language developers, it’s rather tedious and error-prone to write and maintain a reference (printable and readable) grammar of their language. Indeed, the “actual” grammar independent from the “actual” one, often written in yacc or mlyacc. yacc2latex allows to “compile” a yacc/mly source into a latex file that can be easily integrated into the reference manual of the language (supposing that latex is used for document processing).

yacc2latex

Yacc2latex generates human-readable EBNF grammars from yacc files. Output format is in Latex and fairly customizable. Distribution yacc2latex is available under LGLP licence Dowload How to install Short Manual Goal As a language designer, I often faced the problem of writing and maintaining a reference (readable) grammar of my language. This is particularly annoying since the reference grammar actually exists as a yacc (or ocamlyacc) file, so why not use a “compiler” that will derived automaticaly the reference grammar from the yacc file ?

YACC2LATEX MANUAL

Short Manual Version: 3.0-r4dcb390 Pascal Raymond (Home Page) Usage yacc2latex version 3.0-r4dcb390 usage: yacc2latex <option> | yacc2latex -help -m : print a short manual -md : same in markdow format -t <file>: load token def file -o <file>: set out file (default infile.tex) -os : write output to stdout -- : read input from stdin -main : gen a sample main latex file) -testl : dump the yacc tokens and stop -testy : dump the yacc grammar and stop -testg : dump the ebnf grammar and stop -version : print version and stop -v : set verbose mode -dbg {main}: set debug flag -help Display this list of options --help Display this list of options Tokens file Must contain one token definition per line: