English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
ocamllex -- ungetting a character?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-07-16 (08:12)
From: Stefano Zacchiroli <zack@b...>
Subject: Re: [Caml-list] ocamllex -- ungetting a character?
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.


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. -!-