From: yoann padioleau <pad.aryx@gmail.com>
To: caml-list@inria.fr
Subject: ocamllex and yyless, putting back chars in lexbuf
Date: Thu, 12 Nov 2009 10:47:41 -0800 [thread overview]
Message-ID: <c55bbbbc0911121047w74b91d24g3db030a4884bebed@mail.gmail.com> (raw)
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 ?
next reply other threads:[~2009-11-12 18:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-12 18:47 yoann padioleau [this message]
2009-11-12 20:32 ` [Caml-list] " Dario Teixeira
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c55bbbbc0911121047w74b91d24g3db030a4884bebed@mail.gmail.com \
--to=pad.aryx@gmail.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox