From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA22330; Mon, 6 Sep 2004 18:08:29 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA21104 for ; Mon, 6 Sep 2004 18:08:28 +0200 (MET DST) Received: from smtp-ft3.fr.colt.net (smtp-ft3.fr.colt.net [213.41.78.206]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id i86G8RgQ013854 for ; Mon, 6 Sep 2004 18:08:28 +0200 Received: from tahiti2.miriad.fr (host.194.193.23.62.rev.coltfrance.com [62.23.193.194]) by smtp-ft3.fr.colt.net with ESMTP id i86G8R114085 for ; Mon, 6 Sep 2004 18:08:27 +0200 Date: Mon, 06 Sep 2004 18:08:26 +0200 To: caml-list@inria.fr Subject: [Caml-list] ocamllex parametrized parse regexp Reply-To: charles.lehalle@miriadtech.com References: <20040906155041.GG7964@alan-schm1p> From: "lehalle@miriad" Organization: MIRIAD Technologies Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: In-Reply-To: <20040906155041.GG7964@alan-schm1p> User-Agent: Opera M2/7.51 (Win32, build 3798) X-Miltered: at concorde with ID 413C8B7B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; lehalle:01 lehalle:01 miriadtech:01 printf:01 printf:01 unk:99 fprintf:01 miriadtech:01 regexp:01 regexp:01 pgp:02 eof:02 external:03 lexbuf:03 lexbuf:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, I try to use ocamllex like this (I want to have one of the parsing regexp to be read from an external file) : { open Printf;; } let digit = ['0'-'9'] let mark = ...read in a file... rule oaddress outcan = parse | mark as bemark { printf "MARK(%s)" bemark; oaddress outcan lexbuf } | _ as d { printf "Unk[%c]\n" d; oaddress outcan lexbuf } | eof { fprintf outcan "END"; } Is it possible or useless to try somethink like that ? -- Charles-Albert Lehalle --- MIRIAD Technologies Responsable Développements Algorithmiques et Applications mailto:charles.lehalle@miriadtech.com keyserver: http://pgp.mit.edu/ tel : 0156431816 - fax: 0156431828 8 av Hoche - 75008 PARIS - FRANCE ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners