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 MAA28048; Mon, 16 Sep 2002 12:11:46 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA28121 for caml-list@pauillac.inria.fr; Mon, 16 Sep 2002 12:11:46 +0200 (MET DST) 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 UAA17840 for ; Fri, 13 Sep 2002 20:13:01 +0200 (MET DST) 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 g8DID0117818; Fri, 13 Sep 2002 20:13:00 +0200 (MET DST) Received: from stapleton.peterlink.ru (stapleton.peterlink.ru [195.242.2.5]) by holmes.infopro.spb.su (8.9.1/8.9.1) with ESMTP id WAA04724; Fri, 13 Sep 2002 22:12:57 +0400 (MSD) Received: from spb-2-92.dialup.peterlink.ru (IDENT:mitya@spb-2-92.dialup.peterlink.ru [195.242.17.92]) by stapleton.peterlink.ru (8.12.3/8.12.3) with ESMTP id g8DICgQV055341; Fri, 13 Sep 2002 22:12:48 +0400 (MSD) X-Mozilla-Status: 8019 X-Mozilla-Status2: 00000000 FCC: /home/mitya/nsmail/Sent Message-ID: <3C847C3A.79E0FE8@tepkom.ru> From: Mitya Lomov Reply-To: dsl@tepkom.ru Organization: SPbSU X-Mozilla-Draft-Info: internal/draft; vcard=0; receipt=0; uuencode=0; html=0; linewidth=0 X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i586) X-Accept-Language: en MIME-Version: 1.0 To: Daniel de Rauglaudre CC: caml-list@inria.fr Subject: Re: [Caml-list] Documenting CamlP4 syntax extensions References: <3C80A289.D5B49C88@tepkom.ru> <20020302123549.H23423@verdot.inria.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.3 Date: 13 Sep 2002 22:15:45 +0400 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Daniel de Rauglaudre wrote: > > Hi, > > On Sat, Mar 02, 2002 at 01:59:37PM +0400, Mitya Lomov wrote: > > > 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). > > The function Grammar.Entry.print prints the rules of a grammar > entry. For example, the code: > Grammar.Entry.print Pcaml.expr > prints the rules for expressions. This function is great for development purposes. But for documenting syntax extensions its output is not quite acceptable, and coverting its output to more readable form essentialy involves parsing camlp4 grammar definitions (a la pa_extend.cmo). Moreover, one have to build a transitive closure of all grammar entries referenced from an entry to get a complete doc... > > Perhaps a complete program displaying all entries (by scanning the > main grammar entries "interf" and "implem") could be useful. It is > possible to scan entries using the (undocumented) module Gramext. > -- > Daniel de RAUGLAUDRE > daniel.de_rauglaudre@inria.fr > http://cristal.inria.fr/~ddr/ > ------------------- > 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 ------------------- 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