caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Hendrik Tews <tews@tcs.inf.tu-dresden.de>
To: shaddin <shaddin@mitre.org>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] automatic documentation of ocamlyacc grammars
Date: 02 Sep 2004 16:40:36 +0200	[thread overview]
Message-ID: <rl7jrchgyj.fsf@ithif59.inf.tu-dresden.de> (raw)
In-Reply-To: <41116E1A.8080902@mitre.org>

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


  parent reply	other threads:[~2004-09-02 14:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-04 16:15 [Caml-list] .mdb access in OCaml John Carr
2004-08-04 23:15 ` [Caml-list] automatic documentation of ocamlyacc grammars shaddin
2004-08-05 17:23   ` Brock
2004-09-02 14:40   ` Hendrik Tews [this message]
2004-08-05  7:01 ` [Caml-list] .mdb access in OCaml Florian Hars
2004-08-05 21:45   ` John Carr
2004-08-25  2:06     ` John Carr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=rl7jrchgyj.fsf@ithif59.inf.tu-dresden.de \
    --to=tews@tcs.inf.tu-dresden.de \
    --cc=caml-list@inria.fr \
    --cc=shaddin@mitre.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).