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

$*ACTIONS is set when it should not, resulting in spurious calls. #2576

Closed
p6rt opened this issue Dec 10, 2011 · 7 comments
Closed

$*ACTIONS is set when it should not, resulting in spurious calls. #2576

p6rt opened this issue Dec 10, 2011 · 7 comments

Comments

@p6rt
Copy link

p6rt commented Dec 10, 2011

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

Searchable as RT105848$

@p6rt
Copy link
Author

p6rt commented Dec 10, 2011

From @cognominal

[18​:05] <cognominal> nom​: grammar A { token list { a } };
A.parse('a', :rule<list> )
[18​:05]  <p6eval> nom 1f9310​: OUTPUT«Too many positional parameters
passed; got 2 but expected 1␤  in method list at
src/gen/CORE.setting​:1012␤  in !reduce at src/stage2/QRegex.nqp​:909␤
in !cursor_pass at
...
[18​:10] <jnthn> cognominal​: Look at the stack trace more carefully.
It reached your list regex just fine.
[18​:11] <jnthn> cognominal​: Yeah...it's probably setting $*ACTIONS to
Any or some such.

--
cognominal stef

@p6rt
Copy link
Author

p6rt commented Nov 21, 2012

From @FROGGS

probably fixed​:

<FROGGS> r​: grammar A { token list { a } }; A.parse('a', :rule<list> )
<p6eval> rakudo bf472b​: ( no output )
<FROGGS> r​: grammar A { token list { a } }; say A.parse('a', :rule<list> )
<p6eval> rakudo bf472b​: OUTPUT«「a」␤␤»

@p6rt
Copy link
Author

p6rt commented Nov 21, 2012

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

@p6rt
Copy link
Author

p6rt commented Nov 23, 2012

From @cognominal

On Wed Nov 21 13​:15​:50 2012, FROGGS.de wrote​:

probably fixed​:

<FROGGS> r​: grammar A { token list { a } }; A.parse('a', :rule<list> )
<p6eval> rakudo bf472b​: ( no output )
<FROGGS> r​: grammar A { token list { a } }; say A.parse('a', :rule<list> )
<p6eval> rakudo bf472b​: OUTPUT«「a」␤␤»

nope​: it has been hidden by a partial fix ( see patch 7dd6f in NQP) that test for $*ACTIONS
which is set when a class action is declared.
Add an empty class action as parameter to Actions.parse and the bug shows its ugly face again.

grammar A { token list { a } }; class Actions {}; A.parse('a', :rule<list>, :actions(Actions ))
Too many positional parameters passed; got 2 but expected 1

grammar A { token list { a } }; class Actions {}; A.parse('a', :rule<list>, :actions(Actions ))

@p6rt
Copy link
Author

p6rt commented May 12, 2015

From @jdv

This looks like its a dup of #​77350.

@p6rt
Copy link
Author

p6rt commented May 15, 2015

From @jdv

Closing as tests created for RT #​77350 cover.

@p6rt
Copy link
Author

p6rt commented May 15, 2015

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

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

No branches or pull requests

1 participant