New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Grammar waterbed-style issue #3767
Comments
From @drforrOS: Ubuntu 14.04 LTS on VirtualBox This is a simple parser for function argument syntax. With this there are two surprising behaviors for the price of one. The token <term> expands to either a <compound-term> or an <integer>, and of --cut here-- The commented-out line should simply bypass expanding <term> into The other waterbed-style issue is in the second set of commented-out Just like above, the uncommented line works correctly, and expands to Anyway, thoughts for consideration. I'm not certain why the behavior --cut here-- #token TOP { <compound-term>* % \n } token term { token atom { <[a..z]>+ } token argument-list { <integer>* % ',' } token compound-term { use Test; |
From @skidsOn Tue, 31 Mar 2015 13:17:41 -0700, drforr@pobox.com wrote:
Update: I was only able to replicate this when keeping the first comment The failing case golfs down to: $ perl6 -e 'grammar Bug { token TOP { f "(" 1* % "," ")" | 1 } }; Bug.parse("f(1)"); $/.say;' A sequence point will "work around" the bug: $ perl6 -e 'grammar Bug { token TOP { f "(" 1* % "," {} ")" | 1 } }; Bug.parse("f(1)"); $/.say;' ...so will using 1+ instead of 1*. This would make me suspect that this was merely a However, I tried changing <b> to a regex instead of a token to remove the ratchet, |
The RT System itself - Status changed from 'new' to 'open' |
Migrated from rt.perl.org#124220 (status was 'open')
Searchable as RT124220$
The text was updated successfully, but these errors were encountered: