Skip to content
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

Certain noncapturing subrules fail to advance Cursor pos #4304

Closed
p6rt opened this issue Jun 7, 2015 · 5 comments
Closed

Certain noncapturing subrules fail to advance Cursor pos #4304

p6rt opened this issue Jun 7, 2015 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jun 7, 2015

Migrated from rt.perl.org#125345 (status was 'resolved')

Searchable as RT125345$

@p6rt
Copy link
Author

p6rt commented Jun 7, 2015

From @skids

This is a relatively recent regression probably sometime in May 2015​:

20​:44 skids m​: my $*guard = 0; grammar Foo { regex TOP { [a | [ "[" &lt;R&gt; b? "]" ]]+ % b { die if $*guard++ > 500 } }; regex b { b }; regex R { <TOP>+ % [ <.b>? "/" ] } }; Foo.parse("[aba]").say; Foo.parse("[abab]").say;
20​:44 camelia rakudo-moar 869306​: OUTPUT«「[aba]」␤ R => 「aba」␤ TOP => 「aba」␤Died␤ in regex TOP at /tmp/8iN9r23p25​:1␤ in regex R at /tmp/8iN9r23p25​:1␤ in regex TOP at /tmp/8iN9r23p25​:1␤ in block <unit> at /tmp/8iN9r23p25​:1␤ in any <unit-outer> at /tmp/8iN9r23p25​:1…»
20​:44 skids star​: my $*guard = 0; grammar Foo { regex TOP { [a | [ "[" &lt;R&gt; b? "]" ]]+ % b { die if $*guard++ > 500 } }; regex b { b }; regex R { <TOP>+ % [ <.b>? "/" ] } }; Foo.parse("[aba]").say; Foo.parse("[abab]").say;
20​:44 camelia star-m 2015.03​: OUTPUT«「[aba]」␤ R => 「aba」␤ TOP => 「aba」␤「[abab]」␤ R => 「aba」␤ TOP => 「aba」␤»
20​:44 skids m​: my $*guard = 0; grammar Foo { regex TOP { [a | [ "[" &lt;R&gt; b? "]" ]]+ % b { die if $*guard++ > 500 } }; regex b { b }; regex R { <TOP>+ % [ <b>? "/" ] } }; Foo.parse("[aba]").say; Foo.parse("[abab]").say;
20​:44 camelia rakudo-moar 869306​: OUTPUT«「[aba]」␤ R => 「aba」␤ TOP => 「aba」␤「[abab]」␤ R => 「aba」␤ TOP => 「aba」␤»

The only difference in the last (successful) expression is the use of <b> instead of <.b>

@p6rt
Copy link
Author

p6rt commented Jun 7, 2015

From @FROGGS

This is the cause​: Raku/nqp@ab80bb3

@p6rt
Copy link
Author

p6rt commented Jun 7, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jun 27, 2015

From @FROGGS

Patch​: Raku/nqp@5865829
Tests​: Raku/roast@14607d62fe

@p6rt p6rt closed this as completed Jun 27, 2015
@p6rt
Copy link
Author

p6rt commented Jun 27, 2015

@FROGGS - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant