* ocamllex and yyless, putting back chars in lexbuf
@ 2009-11-12 18:47 yoann padioleau
2009-11-12 20:32 ` [Caml-list] " Dario Teixeira
0 siblings, 1 reply; 2+ messages in thread
From: yoann padioleau @ 2009-11-12 18:47 UTC (permalink / raw)
To: caml-list
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 ?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-11-12 20:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-12 18:47 ocamllex and yyless, putting back chars in lexbuf yoann padioleau
2009-11-12 20:32 ` [Caml-list] " Dario Teixeira
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox