[plt-scheme] How to "unput" characters to a port during lexing?

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Wed Mar 1 15:31:35 EST 2006

The parser for CSS2.1 is now almost finished. The grammar
used is the flex/yacc one from


There is just one rule left, that I can't figure out
how to port.

It is the line

   {s}+\/\*[^*]*\*+([^/*][^*]*\*+)*\/	{unput(' ');

which puts a space back in the input stream.

How do I "unput" a space in the parser-tools lexer?

Jens Axel Søgaard

Posted on the users mailing list.