[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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 |
Hye!
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
prevent
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
precisely:
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.
L.
-------------------
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