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

.parse doesn't set $/ anymore in Rakudo #2591

Closed
p6rt opened this issue Dec 28, 2011 · 5 comments
Closed

.parse doesn't set $/ anymore in Rakudo #2591

p6rt opened this issue Dec 28, 2011 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Dec 28, 2011

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

Searchable as RT107236$

@p6rt
Copy link
Author

p6rt commented Dec 28, 2011

From @masak

<thou> are grammars known broken in current nom? e.g. this works in
rakudo-ng and not in rakudo-nom, for me​:
https://gist.github.com/1529700
<benabik> It seems to work if I set $/ to the return value of parse
<benabik> Perhaps there's a bug with $/ ?
<masak> yes, seems that way.
<masak> all the .parse calls come out as True in nom.
<masak> nom​: grammar G { rule TOP { a } }; say so G.parse("a"); say so
$/; say $/.perl
<p6eval> nom a9bead​: OUTPUT«Bool​::True␤Bool​::False␤Any␤»
* masak submits rakudobug
<masak> benabik++
<masak> b​: grammar G { rule TOP { a } }; say so G.parse("a"); say so
$/; say $/.perl
<p6eval> b 1b7dd1​: OUTPUT«Bool​::True␤Bool​::True␤Match.new(␤ from =>
0,␤ orig => "a",␤ to => 1,␤)␤»

@p6rt
Copy link
Author

p6rt commented Jan 5, 2012

From @jnthn

On Wed Dec 28 13​:34​:28 2011, masak wrote​:

<thou> are grammars known broken in current nom? e.g. this works in
rakudo-ng and not in rakudo-nom, for me​:
https://gist.github.com/1529700
<benabik> It seems to work if I set $/ to the return value of parse
<benabik> Perhaps there's a bug with $/ ?
<masak> yes, seems that way.
<masak> all the .parse calls come out as True in nom.
<masak> nom​: grammar G { rule TOP { a } }; say so G.parse("a"); say so
$/; say $/.perl
<p6eval> nom a9bead​: OUTPUT«Bool​::True␤Bool​::False␤Any␤»
* masak submits rakudobug
<masak> benabik++
<masak> b​: grammar G { rule TOP { a } }; say so G.parse("a"); say so
$/; say $/.perl
<p6eval> b 1b7dd1​: OUTPUT«Bool​::True␤Bool​::True␤Match.new(␤ from =>
0,␤ orig => "a",␤ to => 1,␤)␤»

Fixed​:

grammar G { rule TOP { a } }; say so G.parse("a"); say so $/; say $/.perl
Bool​::True
Bool​::True
Match.new(orig => "a", from => 0, to => 1, ast => Any, list => ().list,
hash => EnumMap.new())

Tagging testneeded.

/jnthn

@p6rt
Copy link
Author

p6rt commented Jan 5, 2012

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

@p6rt
Copy link
Author

p6rt commented Jan 8, 2012

From @moritz

This fixed allowed us to run advent2009-day10.t, which serves as a test
for this ticket now.

@p6rt
Copy link
Author

p6rt commented Jan 8, 2012

@moritz - 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