Browse thread
[Caml-list] .mdb access in OCaml
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2004-09-02 (14:40) |
From: | Hendrik Tews <tews@t...> |
Subject: | Re: [Caml-list] automatic documentation of ocamlyacc grammars |
Hi, shaddin <shaddin@mitre.org> writes: Does anybody know of a tool that, given a .mly file, parses the file and produces documentation of the BNF of the grammar in latex (or html, or anything...). This would be very useful for those of us who I just saw your question now. I use a self written emacs lisp script. From this input http://wwwtcs.inf.tu-dresden.de/~tews/ccsl/viewcvs.cgi/Ccslc/Ccsl/grammar.mly?annotate=1.29 I produce a raw grammar http://wwwtcs.inf.tu-dresden.de/~tews/ccsl/compiler.html and a user friendly version http://wwwtcs.inf.tu-dresden.de/~tews/ccsl/grammar.html The latter exists also as txt file http://wwwtcs.inf.tu-dresden.de/~tews/ccsl/grammar.txt For the user friendly version I apply some transformation that introduce [ ] and { } for optional occurence and repetition. For these transformations I also have emacs lisp functions. However, they are not very robust: Whenever I change the grammar I have to adopt the script for the user friendly version. You can download all scripts from the CCSL repository: http://wwwtcs.inf.tu-dresden.de/~tews/ccsl/viewcvs.cgi/Ccslc/ To see what you need and how it is working look for the grammar.html and compiler.html goals in Doc/GNUmakefile. Bye, Hendrik ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners