[ragel-users] Possible bug in scanner
Adrian Thurston
thurs... at cs.queensu.ca
Sat Apr 19 16:36:38 UTC 2008
Hi David,
I'm finding something wrong with the code generated using -T0 and -T1.
The wrong eof actions are being executed. I haven't tracked it down
completely but it seems to be related to the changes in 6.0. I'll fix it
asap.
Thanks,
Adrian
David Balmain wrote:
> Hey folks,
>
> I think I may have found a bug in the scanner. Not sure if this is the
> best place to post bug reports but I couldn't find anywhere else on
> the website.
>
> Here's my machine definition. I've simplified it as much as possible;
>
> %%{
> machine Word;
>
> main := |*
> 'a' {PUTS("a: ");};
> [ab]+ . 'c' {PUTS("abc: ");};
> any;
> *|;
> }%%
>
> To run it, get the full code here;
> http://pastie.caboo.se/183409
>
> Basically I'm running this with the string "ba a". What I'd expect to
> happen is that the "[ab]+ . 'c'" expression would match 'ba' then fail
> and then the "any" rule would consume the 'b' then 'a' would match
> twice. Unfortunately, only the second 'a' matches.
>
> If I run this with the string "ba" I get a segfault which also seems
> to indicate a bug. Perhaps I'm just doing something wrong?
>
> Cheers,
> Dave
> >
>
More information about the ragel-users
mailing list