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 nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id F2882BB81 for ; Sun, 23 Oct 2005 23:12:41 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j9NLCfMs014784 for ; Sun, 23 Oct 2005 23:12:41 +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 XAA14052 for ; Sun, 23 Oct 2005 23:12:40 +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 j9NLCcGl001493 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sun, 23 Oct 2005 23:12:40 +0200 Received: from [216.241.35.41] (helo=[10.0.0.2]) by mz3.forethought.net with esmtp (Exim 4.51) id 1ETn8v-0006CS-Bo for caml-list@inria.fr; Sun, 23 Oct 2005 15:12:37 -0600 Message-ID: <435BFCD4.8040009@gushee.net> Date: Sun, 23 Oct 2005 15:12:52 -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: Another problem (was Re: [Caml-list] Ocamllex question) References: <435BD045.1000305@gushee.net> In-Reply-To: <435BD045.1000305@gushee.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 435BFCC9.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 435BFCC6.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocamllex:01 ocamllex:01 lexer:01 lazy:01 lexer:01 sequences:01 dog:98 strings:01 strings:01 seems:03 complex:04 jumped:95 problem:05 implement:05 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 While we're on the subject of Ocamllex, there's another issue I'm wondering about. My lexer needs to handle quoted strings, something like: | '"' [^ '"'] * as word '"' { WORD word } Not essential, but it would be nice to allow escaped quotes within such strings: "The quick brown fox jumped over the \"lazy\" dog." I've haven't actually tried to implement this yet, but thinking about it it seems like it would make the lexer hugely more complex. Can anyone suggest a reasonably simple way to deal with escape sequences? -- Matt Gushee Englewood, CO, USA