Alessio Giovanni Baroni
2013-03-04 14:34:04 UTC
Hi to all,
I have the following definitions:
%%{
machine oolang_lexer;
alphtype unsigned char;
main := |*
(0x01 .. 0x20)+ => { cout << "foo" << endl; };
[a-zA-Z_][a-zA-Z0-9_]* => {
tok = IDENTIFIER;
yylval = string (ts, te - ts).c_str ();
fbreak;
};
*|;
}%%
If the input contains "abc def", the readed token is "abcdef" without
space, but it never print
"foo" on terminal. Why? I don't know .....
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.complang.org/pipermail/ragel-users/attachments/20130304/5aea69ff/attachment.html>
I have the following definitions:
%%{
machine oolang_lexer;
alphtype unsigned char;
main := |*
(0x01 .. 0x20)+ => { cout << "foo" << endl; };
[a-zA-Z_][a-zA-Z0-9_]* => {
tok = IDENTIFIER;
yylval = string (ts, te - ts).c_str ();
fbreak;
};
*|;
}%%
If the input contains "abc def", the readed token is "abcdef" without
space, but it never print
"foo" on terminal. Why? I don't know .....
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.complang.org/pipermail/ragel-users/attachments/20130304/5aea69ff/attachment.html>