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 <[email protected]>

> 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
> > [email protected]
> > http://www.complang.org/mailman/listinfo/ragel-users
>
> _______________________________________________
> ragel-users mailing list
> [email protected]
> http://www.complang.org/mailman/listinfo/ragel-users
>
_______________________________________________
ragel-users mailing list
[email protected]
http://www.complang.org/mailman/listinfo/ragel-users

Reply via email to