Yes, but the first call consume ALL input! I will want consuming only 1 token.<br>This code not run:<br><br>%%{<br>main := |* ...... *|;<br>}%%<br><br>lexer *lexer_new(...)<br>{<br> %% write init;<br>}<br><br>token *lexer_next(....)<br>
{<br> %% write exec;<br>}<br><br>Regards.<br><br><br><div class="gmail_quote">2009/8/22 Adrian Thurston <span dir="ltr"><<a href="mailto:thurston@complang.org">thurston@complang.org</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Yes, you can do that.<br>
<br>
Adrian<br>
<div><div></div><div class="h5"><br>
Alessio Giovanni Baroni wrote:<br>
> Hello,<br>
> if I use the scanner (|* ..... *|), a call to %% write exec consume all<br>
> input. And if I want inserting %%write init in,<br>
> for example, a constructor and %%write exec in a method, to retrieve one<br>
> token at every call?<br>
><br>
> Thanks!<br>
><br>
><br>
</div></div>> ------------------------------------------------------------------------<br>
><br>
> _______________________________________________<br>
> ragel-users mailing list<br>
> <a href="mailto:ragel-users@complang.org">ragel-users@complang.org</a><br>
> <a href="http://www.complang.org/mailman/listinfo/ragel-users" target="_blank">http://www.complang.org/mailman/listinfo/ragel-users</a><br>
<br>
_______________________________________________<br>
ragel-users mailing list<br>
<a href="mailto:ragel-users@complang.org">ragel-users@complang.org</a><br>
<a href="http://www.complang.org/mailman/listinfo/ragel-users" target="_blank">http://www.complang.org/mailman/listinfo/ragel-users</a><br>
</blockquote></div><br>