[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2009-11-12 (18:47) |
From: | yoann padioleau <pad.aryx@g...> |
Subject: | ocamllex and yyless, putting back chars in lexbuf |
Hi, Is there a way in ocamllex to put back certain characters in the buffer. In flex you can do that <LOOKING_FOR_XXX>[a-z]+ { yy_pop_state(); yy_push_state(ST_TOP); return T_STRING_VARNAME; } <LOOKING_FOR_XXX>{ANY_CHAR} { yyless(0); yy_pop_state(); yy_push_state(ST_TOP); } Should I play with fields like lexbuf_lex_curr_pos ?