Discussion:
[ragel-users] Rule skipped.
Alessio Giovanni Baroni
2013-03-04 14:34:04 UTC
Permalink
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>
Adrian Thurston
2013-03-08 03:20:16 UTC
Permalink
I'm not sure why that might be happening. I'm not able to reproduce the
behaviour. Can you post the complete program?

-Adrian
Post by Alessio Giovanni Baroni
Hi to all,
%%{
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.
_______________________________________________
ragel-users mailing list
ragel-users at complang.org
http://www.complang.org/mailman/listinfo/ragel-users
Loading...