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 NAA11421; Tue, 2 Mar 2004 13:25:47 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id NAA11419 for ; Tue, 2 Mar 2004 13:25:46 +0100 (MET) Received: from mailhost.trusted-logic.fr (mailhost.trusted-logic.fr [194.250.150.5]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i22CPsIq016027 for ; Tue, 2 Mar 2004 13:25:55 +0100 Received: from wight.trusted-logic.fr (wight.trusted-logic.fr [192.168.1.210]) by mailhost.trusted-logic.fr (Postfix) with ESMTP id 0E4041C9 for ; Tue, 2 Mar 2004 13:25:45 +0100 (CET) Received: from hoedic (hoedic.trusted-logic.fr [192.168.3.2]) by wight.trusted-logic.fr (Postfix) with SMTP id 06410713C0 for ; Tue, 2 Mar 2004 13:25:45 +0100 (CET) Message-ID: <002301c40052$2f739a00$0203a8c0@hoedic> From: =?iso-8859-1?Q?Correnson_Lo=EFc?= To: Subject: [Caml-list] Suggestions for OcamlDoc & CamlP4 Date: Tue, 2 Mar 2004 13:30:45 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; ocamldoc:01 camlp:01 ocamldoc:01 blablabla:01 camlp:01 preserving:01 tok:99 val:01 token:01 token:01 match:02 parser:02 parser:02 precisely:02 worse:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk X-Keywords: X-UID: 19 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