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

Grammar rules aren't inherited in Rakduo #484

Closed
p6rt opened this issue Dec 13, 2008 · 4 comments
Closed

Grammar rules aren't inherited in Rakduo #484

p6rt opened this issue Dec 13, 2008 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Dec 13, 2008

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

Searchable as RT61338$

@p6rt
Copy link
Author

p6rt commented Dec 13, 2008

From @masak

<peters> rakudo​: grammar Foo { token foo { 'foo' } }; grammar Bar is
Foo { token bar { <foo> | 'bar' } }; if 'foo' ~~ Bar​::bar {
'matched'.say; }
<polyglotbot> OUTPUT[Unable to find regex 'foo'␤Null PMC access in
invoke() [...]
<peters> looks like grammar rules isn't inherited
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Dec 15, 2008

From @pmichaud

If the rule is called correctly it appears to work fine​:

$ cat x
grammar Foo {
  token foo { 'foo' }
};

grammar Bar is Foo {
  token bar { <foo> | 'bar' }
};

if 'foo' ~~ /<Bar​::bar>/ { 'matched'.say; }

$ ./parrot perl6.pbc x
matched
$

Closing ticket.

Pm

1 similar comment
@p6rt
Copy link
Author

p6rt commented Dec 15, 2008

From @pmichaud

If the rule is called correctly it appears to work fine​:

$ cat x
grammar Foo {
  token foo { 'foo' }
};

grammar Bar is Foo {
  token bar { <foo> | 'bar' }
};

if 'foo' ~~ /<Bar​::bar>/ { 'matched'.say; }

$ ./parrot perl6.pbc x
matched
$

Closing ticket.

Pm

@p6rt
Copy link
Author

p6rt commented Dec 15, 2008

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

@p6rt p6rt closed this as completed Dec 15, 2008
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