[ragel-users] Scanner and distributing the code.

Alessio Giovanni Baroni alessiogiovanni.baroni at gmail.com
Sun Aug 23 08:46:25 UTC 2009


Yes, but the first call consume ALL input! I will want consuming only 1
token.
This code not run:

%%{
main := |* ...... *|;
}%%

lexer *lexer_new(...)
{
       %% write init;
}

token *lexer_next(....)
{
     %% write exec;
}

Regards.


2009/8/22 Adrian Thurston <thurston at complang.org>

> Yes, you can do that.
>
> Adrian
>
> Alessio Giovanni Baroni wrote:
> > Hello,
> > if I use the scanner (|* ..... *|), a call to %% write exec consume all
> > input. And if I want inserting %%write init in,
> > for example, a constructor and %%write exec in a method, to retrieve one
> > token at every call?
> >
> > Thanks!
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > ragel-users mailing list
> > ragel-users at complang.org
> > http://www.complang.org/mailman/listinfo/ragel-users
>
> _______________________________________________
> ragel-users mailing list
> ragel-users at complang.org
> http://www.complang.org/mailman/listinfo/ragel-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.colm.net/pipermail/ragel-users/attachments/20090823/110b80b7/attachment-0001.html>


More information about the ragel-users mailing list