Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: -- (:)
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@{,,} -%-
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. -!-