From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA22517; Sat, 2 Mar 2002 11:58:32 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA23310 for ; Sat, 2 Mar 2002 11:58:31 +0100 (MET) Received: from holmes.infopro.spb.su (holmes.infopro.spb.su [195.242.2.2]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g22AwU919476 for ; Sat, 2 Mar 2002 11:58:30 +0100 (MET) Received: from barrymore.peterlink.ru (barrymore.peterlink.ru [195.242.2.8]) by holmes.infopro.spb.su (8.9.1/8.9.1) with ESMTP id NAA23017 for ; Sat, 2 Mar 2002 13:58:29 +0300 (MSK) Received: from tepkom.ru (IDENT:mitya@spb-3-204.dialup.peterlink.ru [195.242.18.204]) by barrymore.peterlink.ru (8.9.1/8.9.1) with ESMTP id NAA20261 for ; Sat, 2 Mar 2002 13:58:28 +0300 (MSK) Message-ID: <3C80A289.D5B49C88@tepkom.ru> Date: Sat, 02 Mar 2002 13:59:37 +0400 From: Mitya Lomov Reply-To: dsl@tepkom.ru Organization: SPbSU X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i586) X-Accept-Language: en MIME-Version: 1.0 To: caml-list@inria.fr Subject: [Caml-list] Documenting CamlP4 syntax extensions Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, As I am heading to the release of Dynamic Caml 0.2, it occurred to me that syntax extensions included there grew quite complex, and will certainly require some good deal of documenting to be released to the public. It will be nice to be able to document camlp4 syntax extensions in the same way as one documents his .mli file... The first step to that will be, I guess, some kind of tool that is able to extract plain grammar definitions (like BNF) from CamlP4 sources (just rules, without semantics). I see two ways to write such a tool: either reimplement pa_extend.ml extensions so that they will output grammar entries in readable form instead of adding them into CamlP4 internals, or some kind of "dummy syntax extension" module which will dump internal CamlP4 grammar entries in readable form. The latter way is, to some extent, more clean - one does not reimplement parsing (and do not need to reinvent internal representation for grammars...). However, it is possible that the first way is more extensible (say, if one wants to add some fancy comments to syntax extensions, so that the whole documentation is generated from source, then it is easier to do that while parsing). Any opinions? Probably such a beast already exists? Regards, Dmitry ------------------- 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