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=0.3 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id D9A77BBAF for ; Tue, 24 Jun 2008 16:32:50 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAAOiYEjAXQIn/2dsb2JhbACLNqdF X-IronPort-AV: E=Sophos;i="4.27,696,1204498800"; d="asc'?scan'208";a="14367876" Received: from concorde.inria.fr ([192.93.2.39]) by mail1-smtp-roc.national.inria.fr with ESMTP; 24 Jun 2008 16:32:50 +0200 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m5OEWnxE019302 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 24 Jun 2008 16:32:50 +0200 X-IronPort-AV: E=Sophos;i="4.27,696,1204498800"; d="asc'?scan'208";a="14477145" Received: from peray.inria.fr (HELO ausone.inria.fr) ([128.93.8.98]) by mail3-relais-sop.national.inria.fr with SMTP; 24 Jun 2008 16:32:50 +0200 Received: by ausone.inria.fr (sSMTP sendmail emulation); Tue, _d Jun 2008 16:32:25 +0200 From: "Nicolas Pouillard" Cc: caml-list Subject: Re: [Caml-list] Custom lexer in Camlp4 To: Jeremy Yallop References: <4860F097.1000701@ed.ac.uk> In-Reply-To: <4860F097.1000701@ed.ac.uk> Date: Tue, 24 Jun 2008 16:32:25 +0200 Message-Id: <1214317779-sup-8964@port-ext16.ensta.fr> User-Agent: Sup/git Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=-1214317945-545374-99775-8196-5-="; micalg="pgp-sha1" MIME-Version: 1.0 X-Miltered: at concorde with ID 48610591.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; lexer:01 camlp:01 lexer:01 camlp:01 ocaml:01 grammars:01 functor:01 struct:01 caml-list:01 short:01 rebuild:03 module:03 module:03 aka:04 tue:06 X-Attachments: cset="UTF-8" type="application/pgp-signature" name="signature.asc" name="signature.asc" --=-1214317945-545374-99775-8196-5-= Content-Type: text/plain; charset=UTF-8 Excerpts from Jeremy Yallop's message of Tue Jun 24 15:03:19 +0200 2008: > Is there a way to replace the default lexer in Camlp4? I'd like to use > (an extended version of) one of the OCaml grammars, but with a different > lexer. You can rebuild (I mean functor application), your own camlp4 by giving another Lexer module. Basically you will have to copy/paste the short Camlp4.PreCast module (or a part of), by substituting Camlp4.Struct.Lexer by your Lexer implementation. That's fairly heavy but works. Regards, -- Nicolas Pouillard aka Ertai --=-1214317945-545374-99775-8196-5-= Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkhhBXkACgkQj+FCNw9dwLlhzgCfVTt/w72L+KZWx4h0l8BPSlz3 AtUAnRyJ8gtsLPE6TPZfjds8zt63I6tH =CbXY -----END PGP SIGNATURE----- --=-1214317945-545374-99775-8196-5-=--