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 OAA02816; Thu, 29 May 2003 14:11:44 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA02864 for ; Thu, 29 May 2003 14:11:43 +0200 (MET DST) Received: from avalon.ens-lsh.fr (mailhost.ens-lsh.fr [193.51.131.2]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h4TCBhH27189 for ; Thu, 29 May 2003 14:11:43 +0200 (MET DST) Received: from avalon.ens-lsh.fr (localhost [127.0.0.1]) by avalon.ens-lsh.fr (8.12.8/8.12.8) with ESMTP id h4TDAknW026180 for ; Thu, 29 May 2003 14:10:46 +0100 (WEST) Received: from ens-notes1.ens-lsh.fr (ens-notes1.ens-lsh.fr [10.2.1.44]) by avalon.ens-lsh.fr (8.12.8/8.12.8) with ESMTP id h4TDAjV9026177 for ; Thu, 29 May 2003 14:10:45 +0100 (WEST) Received: from mostha ([10.3.20.3]) by ens-notes1.ens-lsh.fr (Lotus Domino Release 5.0.10) with SMTP id 2003052914114020:1521 ; Thu, 29 May 2003 14:11:40 +0200 Date: Thu, 29 May 2003 14:03:40 +0200 From: Damien Cc: Ocaml Mailing List Subject: Re: [Caml-list] Ocamllex/Ocamlyacc feature request Message-Id: <20030529140340.035b8586.Damien.Pous@ens-lyon.fr> In-Reply-To: <941EB0B0-91BE-11D7-B411-000393B9096C@is.titech.ac.jp> References: <941EB0B0-91BE-11D7-B411-000393B9096C@is.titech.ac.jp> Organization: mosthagloups X-Mailer: Sylpheed version 0.8.11claws175 (GTK+ 1.2.10; i386-debian-linux-gnu) Mime-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on ens-notes1/ENS-LSH(Release 5.0.10 |March 22, 2002) at 29/05/2003 14:11:40, Serialize by Router on ens-notes1/ENS-LSH(Release 5.0.10 |March 22, 2002) at 29/05/2003 14:11:41, Serialize complete at 29/05/2003 14:11:41 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Spam: no; 0.00; damien:01 ens-lyon:01 caml-list:01 debugging:01 end-user:01 toto:01 failwith:01 arf:01 ocaml:01 int:01 token:01 parser:02 string:03 parse:04 ocamlyacc:05 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, OCAMLRUNPARAM seems pretty fine for debugging purposes, what about "end-user error reporting" : could the special terminal 'error' have some useful parameters ? >type token_error_t = { >chars: int*int; >lexeme: string; >token: token; >expected: token list; >} >"%token error" would allow >toto: >| ... | ... >| error { failwith (arf $1) } >; then, is there a "nice method" to insert error terminals in a grammar, in order to get a parser : - without s/r or r/r conflicts - that never raise "Parsing.parse_error" : all error cases are identified and raise "My_informative_parse_error" ? till now, I've always used the "try until no conflict" method, which isn't really "nice" could ocamlyacc decide whether a grammar is "exhaustive", like ocaml does for pattern-matching ? thanks, damien ------------------- 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