From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.7 required=5.0 tests=AWL,RCVD_IN_SORBS_WEB, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id CA2E2BC0A for ; Fri, 18 May 2007 13:36:17 +0200 (CEST) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.227]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4IBaGOk026973 for ; Fri, 18 May 2007 13:36:17 +0200 Received: by wr-out-0506.google.com with SMTP id l58so868271wrl for ; Fri, 18 May 2007 04:36:16 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=tg5Q3dVC8i26VuXJOcSPkBFMGGRyn2Em4SpjJXG+4VBcB8lVgQa/sqX+/VL9y3tE0bzCWb0ds5Ac/0jiz0gw5DlCpfh9UBJS+v5wfdadgR2JjrnduC/ESXo2pPT0D1hH54Km+IQJyi70PA23FaWPfxiKvL/SiL2UbS26D6fKUNw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=pfCOVLRIHHs7n+inG146pe3UWKycbM5vYhgTntDs064Xq2YGfU2yIfHgcbCIg+qQ1mvcZWJJ/Uel+0JKweIF+HzIsz/df9dB8YqOKj7lT79zVYRY1bOOBCGU3H3PSzAFZTn0dDUXDia/P4GeG8/mQMmPQgdC/cFUzxFmcXITSG8= Received: by 10.78.83.15 with SMTP id g15mr417942hub.1179488176063; Fri, 18 May 2007 04:36:16 -0700 (PDT) Received: from ?192.168.1.33? ( [83.52.58.94]) by mx.google.com with ESMTP id 24sm2112564ugf.2007.05.18.04.36.12; Fri, 18 May 2007 04:36:13 -0700 (PDT) In-Reply-To: <1179477743.17322.10.camel@rosella.wigram> References: <66D9A385-E61C-4AA2-81AA-B352FB941A57@gmail.com> <1179477743.17322.10.camel@rosella.wigram> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: OCaml List , Emmanuel Onzon Content-Transfer-Encoding: 7bit From: Joel Reymont Subject: Re: [Caml-list] Error messages with dypgen Date: Fri, 18 May 2007 12:36:10 +0100 To: skaller X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 464D8FB1.001 on concorde : j-chkmail score : XXX : 5/20 1 0.000 -> 3 X-Miltered: at concorde with ID 464D8FB1.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; parser:01 semicolon:01 parser:01 ocamlyacc:01 lexer:01 polluted:01 2007,:98 wrote:01 rewrite:01 exception:01 caml-list:01 declarations:04 interface:06 uses:06 missing:07 John, There should at least be a textual message embedded in the exception. This is what I have right now: input_declarations: | INPUT COLON input_decs { `InputDecls (List.rev $3) } | INPUT COLON input_decs error { parser_error "Missing semicolon" $startpos($4) $endpos($4) } | INPUT COLON error { parser_error "Error after INPUT:" $startpos($3) $endpos($3) } | INPUT error { parser_error "Missing ':' after INPUT" $startpos($2) $endpos($2) } I clearly know why the error is happening here. Positions notwithstanding, wow do I rewrite this for dypgen? Thanks, Joel On May 18, 2007, at 9:42 AM, skaller wrote: > No it isn't. Dypgen uses lexbufs for compatibility with the > broken Ocamlyacc interface. Dypgen lets you use ulex or > other lexer as well. The type of the error thrown by the > automaton should not be polluted by positional information > that has no reasonable standard specification. -- http://wagerlabs.com/