English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Suggestions for OcamlDoc & CamlP4
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-03-02 (12:25)
From: Correnson_Loïc <Loic.Correnson@t...>
Subject: [Caml-list] Suggestions for OcamlDoc & CamlP4
I have two little queries about these *beautiful* tools:

 + In ocamldoc, -stars option should also remove the starts at end of
comments, like in:
     * {1 Documentation}
     * Blablabla...

 +In camlp4, location of terminals are lost inside rule's actions. Actually,
this is a draw back of the
   token pattern-matching design, where the data returned from the lexer to
the parser is a string.
   The solution which consists in encapsulating a terminal inside a specific
rule (for which the
   location in known through [loc]) does work properly! This solution would
  the parser from factorizing  terminals inside rules, which drawn the
parsed language
  down to LL(0), if not worse.
  According to my point of view, a lexer should be able to define the result
of its matching function,
  while preserving the design of matching a couple of strings. More

type 'a Token.glexer should be replaced by ('a,'b) glexer, where the pattern
function could be :
tok_match : pattern -> 'a -> 'b

then, the GLexerType could have the following signature:
type te (* input token *)
type td (* token's data for parser *)
val lexer : (te,td) Token.glexer

Of course, these are only suggestions.

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