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 CD695BB83 for ; Sun, 16 Jul 2006 10:12:55 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k6G8CtnQ004340 for ; Sun, 16 Jul 2006 10:12:55 +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 KAA16732 for ; Sun, 16 Jul 2006 10:12:54 +0200 (MET DST) Received: from fiton.bononia.it (fiton.bononia.it [130.186.88.105]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k6G8Cptq004320 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Sun, 16 Jul 2006 10:12:54 +0200 Received: from muletto.takhisis.invalid (fiton.bononia.it [130.186.88.105]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Stefano Zacchiroli", Issuer "sockmel.bononia.it" (not verified)) by fiton.bononia.it (Postfix) with ESMTP id 0F77014B41 for ; Sun, 16 Jul 2006 10:12:43 +0200 (CEST) Received: by muletto.takhisis.invalid (Postfix, from userid 1000) id 90D1F44064; Sun, 16 Jul 2006 10:12:03 +0200 (CEST) Date: Sun, 16 Jul 2006 10:12:03 +0200 From: Stefano Zacchiroli To: caml-list@inria.fr Subject: Re: [Caml-list] ocamllex -- ungetting a character? Message-ID: <20060716081203.GA25792@aquarium.takhisis.invalid> Mail-Followup-To: caml-list@inria.fr References: <44B9B93F.4010309@cs.caltech.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <44B9B93F.4010309@cs.caltech.edu> User-Agent: Mutt/1.5.11+cvs20060403 X-Miltered: at concorde with ID 44B9F507.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 44B9F503.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; zacchiroli:01 ocamllex:01 mvanier:01 ocamllex:01 lexing:01 buffer:01 lexeme:01 cheers:01 zacchiroli:01 unibo:01 15,:98 2006:98 zack:01 zack:01 wrote:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 On Sat, Jul 15, 2006 at 08:57:51PM -0700, mvanier wrote: > I'm writing a simple program using ocamllex to do some text processing, and > one feature I would really like is to be able to put a matched character > back onto the front of the lexing buffer. I can't figure out a way to do > this from the documentation (if it's possible, it's not in the manual). > Does anyone know of a way to do this? I don't think it is possible with ocamllex. Using ulex however you can put back all the characters corresponding to the last matched lexeme with Ulexing.rollback. Cheers. -- Stefano Zacchiroli -*- Computer Science PhD student @ Uny Bologna, Italy zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/ If there's any real truth it's that the entire multidimensional infinity of the Universe is almost certainly being run by a bunch of maniacs. -!-