From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 5AF18D45F for ; Mon, 24 Oct 2005 21:50:35 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j9OJoY5c024344 for ; Mon, 24 Oct 2005 21:50:35 +0200 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 VAA25859 for ; Mon, 24 Oct 2005 21:50:34 +0200 (MET DST) Received: from mz3.forethought.net (mzpi5.forethought.net [216.241.36.14]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j9OJoW8X024339 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Mon, 24 Oct 2005 21:50:34 +0200 Received: from [216.241.35.41] (helo=[10.0.0.2]) by mz3.forethought.net with esmtp (Exim 4.51) id 1EU8L1-0005Uu-Nn for caml-list@inria.fr; Mon, 24 Oct 2005 13:50:31 -0600 Message-ID: <435D3B09.3030108@gushee.net> Date: Mon, 24 Oct 2005 13:50:33 -0600 From: Matt Gushee User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051002) X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: Another problem (was Re: [Caml-list] Ocamllex question) References: <435BD045.1000305@gushee.net> <435BFCD4.8040009@gushee.net> <200510232337.59207.micha-1@fantasymail.de> In-Reply-To: <200510232337.59207.micha-1@fantasymail.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 435D3B0B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 435D3B08.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocamllex:01 buffer:01 backslash:01 ocamllex:01 ....:98 ...:98 wrote:01 strings:01 append:02 string:03 character:03 problem:05 practical:06 examples:07 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Michael Wohlwend wrote: >>Not essential, but it would be nice to allow escaped quotes within such >>strings: > you write a extra lexer-rule which gets called when a " is seen; in this rule > you read single chars and append them to a string buffer. If you see a > backslash you handle the next character special; example: > .... Thank you! That was just the sort of example I needed ... and I understand ocamllex a little better now. Maybe you should post something like this on the Web. There's not much in the way of practical examples for ocamllex. -- Matt Gushee Englewood, CO, USA