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 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id C1C99BC0A for ; Fri, 18 May 2007 09:20:12 +0200 (CEST) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.188]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4I7KCJk000787 for ; Fri, 18 May 2007 09:20:12 +0200 Received: by mu-out-0910.google.com with SMTP id i10so478397mue for ; Fri, 18 May 2007 00:20:12 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=meMsujI85BNFMuIa/u8VDtjPFNMIhue0O1VJ1UyLp067QuYgtlMAFGaIC8no85F7GRyao2/ZvAMnbQnrrvDiIpeyUIaZzrXl1z1Jdnf2T5RC1q7zejzf8tQR0qQKNbqhaHND171y9csalfGWF4T1lbrNhykkBEcyUEZq3QhkjEc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=uVDLJqZMDKxP3ikPor/XXkwN8ToekhC7n2CHOXpuECX2YRJM9E9KcTpHyfZvz0sJSt288jzWUPEcfWrgeXL7Xa0SwKq0YPsf0LrXtwhRsdA4avLmqO3XnznXtbzRRXZHYTN3sJ/dRnZ8MZEw/PKuz3QYE7RbhOyxkyZ4FmeHx/E= Received: by 10.82.180.17 with SMTP id c17mr2160087buf.1179472812144; Fri, 18 May 2007 00:20:12 -0700 (PDT) Received: from ?192.168.1.33? ( [83.52.58.94]) by mx.google.com with ESMTP id z40sm2692411ikz.2007.05.18.00.20.09; Fri, 18 May 2007 00:20:11 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: <66D9A385-E61C-4AA2-81AA-B352FB941A57@gmail.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: OCaml List From: Joel Reymont Subject: Error messages with dypgen Date: Fri, 18 May 2007 08:20:19 +0100 X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 464D53AC.000 on concorde : j-chkmail score : XXX : 5/20 1 0.000 -> 3 X-Miltered: at concorde with ID 464D53AC.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; syntax:01 rhs:01 rhs:01 syntax:01 exception:01 exception:01 raise:03 throws:03 function:08 rather:08 end:12 end:12 happens:12 error:12 error:12 I understand that dypgen throws an exception when a syntax error is found. How do I get it to produce line/column numbers when that happens? It would be rather groovy if the the exception carried symbol_start_pos, symbol_end_pos, rhs_start_pos, rhs_end_pos from the dyp record since this information is available at the time that the exception is raised. A placeholder for a textual message would also be very helpful. A simple error function built into dypgen could then take a message and raise the syntax error exception with all the required info. Thanks, Joel -- http://wagerlabs.com/