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

symbolic indirect subrules #3089

Closed
p6rt opened this issue Mar 29, 2013 · 3 comments
Closed

symbolic indirect subrules #3089

p6rt opened this issue Mar 29, 2013 · 3 comments

Comments

@p6rt
Copy link

p6rt commented Mar 29, 2013

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

Searchable as RT117397$

@p6rt
Copy link
Author

p6rt commented Mar 29, 2013

From andjrob@gmail.com

The spec says you should be able to use <​::($name)>, but rakudo doesn't work.

me>
n​: grammar G { rule TOP {^ <A>+ $}; regex B($what) { <​::($what)> };
regex C { 'test' }; regex A { <B('C')> }; }; say G.parse('testtest')

p6eval>
niecza v24-35-g5c06e28​: OUTPUT«「testtest」␤ A => 「test」␤ B => 「test」␤
:​:($what) => 「test」␤ A => 「test」␤ B => 「test」␤ :​:($what) =>
「test」␤␤»

me>
r​: grammar G { rule TOP {^ <A>+ $}; regex B($what) { <​::($what)> };
regex C { 'test' }; regex A { <B('C')> }; }; say G.parse('testtest')

p6eval>
rakudo 25a9d6​: OUTPUT«No such method 'QAST​::Var<1988309812>' for
invocant of type 'G'␤ in regex B at /tmp/RtzoutigI0​:1␤ in regex A at
/tmp/RtzoutigI0​:1␤ in regex TOP at /tmp/RtzoutigI0​:1␤ in method
parse at src/gen/CORE.setting​:10941␤ in block at
/tmp/RtzoutigI0​:1␤␤»

@p6rt
Copy link
Author

p6rt commented Apr 7, 2016

From @diakopter

14​:17 <diakopter> m​: grammar G { rule TOP {^ <A>+ $}; regex B($what) { <​::($what)> }; regex C { 'test' }; regex A {
  <B('C')> }; }; say G.parse('testtest')
14​:17 <camelia> rakudo-moar 61d231​: OUTPUT«「testtest」␤ A => 「test」␤ B => 「test」␤ A => 「test」␤ B => 「test」␤»

@p6rt
Copy link
Author

p6rt commented Apr 7, 2016

@diakopter - Status changed from 'new' to 'resolved'

@p6rt p6rt closed this as completed Apr 7, 2016
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