Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Documenting CamlP4 syntax extensions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Mitya Lomov <dsl@t...>
Subject: Re: [Caml-list] Documenting CamlP4 syntax extensions
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