From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 0484B7ED45 for ; Fri, 22 Jun 2012 20:01:55 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhgDAMOy5E9QW+UDgWdsb2JhbABFpSuDKo0QIgEBFiYnghgBAQU4JC0LGC4QEzQTCAEBh3gBDgSoEod3ChmBC4h3jhSDHAOVLJJ8 X-IronPort-AV: E=Sophos;i="4.77,459,1336341600"; d="scan'208";a="148496454" Received: from plane.gmane.org ([80.91.229.3]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 22 Jun 2012 20:01:54 +0200 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Si8B3-0004FL-Aj for caml-list@inria.fr; Fri, 22 Jun 2012 20:01:49 +0200 Received: from seas1116.wireless-pennnet.upenn.edu ([158.130.108.94]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Jun 2012 20:01:49 +0200 Received: from bobzhang1988 by seas1116.wireless-pennnet.upenn.edu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Jun 2012 20:01:49 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Hongbo Zhang Date: Fri, 22 Jun 2012 14:01:35 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: seas1116.wireless-pennnet.upenn.edu User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 In-Reply-To: Subject: [Caml-list] Re: Compiling with camlp4 extensions On 6/22/12 11:53 AM, Aaron Bohannon wrote: > Hi, Hi, If you are writing code generator, write a rule making use of myocamlbuild, for every file, compiling file_pp.cmo(the preprocessed output). and if it's correct, go ahead compiling file.cmo. For syntax extension, it's your repsonsibility to make it correct. > > I have been trying to use the new camlp4 to write an OCaml syntax > extension. All the examples I have seen so far suggest that I use the > extension by passing ocamlc the "-pp" option. But it seems that all the > location info for error messages gets lost when I do this unless I catch > and report the parse error myself within the extension. Is there some > way to get ocamlc to report the parse error at the correct location > automatically? > > - Aaron >