Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: -- (:)
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 Archives:
Bug reports: FAQ:
Beginner's list: