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.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id B31A8BC69 for ; Mon, 19 Nov 2007 22:24:50 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CALqLQUdQRFuw/2dsb2JhbAA X-IronPort-AV: E=Sophos;i="4.21,438,1188770400"; d="scan'208";a="19475398" Received: from furbychan.cocan.org ([80.68.91.176]) by mail4-smtp-sop.national.inria.fr with ESMTP; 19 Nov 2007 22:24:50 +0100 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1IuE6k-0002vB-00; Mon, 19 Nov 2007 21:24:42 +0000 Date: Mon, 19 Nov 2007 21:24:42 +0000 To: Sam Steingold Cc: caml-list Subject: Re: [Caml-list] lex: including regex definitions from a separate file Message-ID: <20071119212442.GA22191@furbychan.cocan.org> References: <4741F21C.4090806@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4741F21C.4090806@gnu.org> User-Agent: Mutt/1.5.13 (2006-08-11) From: Richard Jones X-Spam: no; 0.00; lexers:01 regexp:01 regexp:01 foo:01 mll:01 mll:01 preprocess:01 makefile:01 cpp:01 wrote:01 regex:01 caml-list:01 lex:01 probably:07 red:92 On Mon, Nov 19, 2007 at 03:29:16PM -0500, Sam Steingold wrote: > I have several lexers in the same directory and I want them to share the > regexp definitions. > is there a way to put the regexp definitions in foo.mll and include them > in bar.mll? Probably your best bet is to preprocess bar.mll in a Makefile -- eg. using cpp or m4 to generate the file from an input 'bar.mll.in'. Rich. -- Richard Jones Red Hat