Requires two files - if I place the grammar into the test file the bug goes away. You can also comment out the <?before> alternation and the parse will complete. The complete error text is at the bottom of the file. I think something isn't correctly initializing $!state{'indent'} in the source, but I haven't figured out how to correctly initialize it.
-- Perl6/Parser/Pure/Grammar.pm6 --
{use Grammar::Debugger;
grammar Perl6::Parser::Pure::Grammar
{
proto rule statement_control { <...> }
token statement_control:sym { }
rule statementlist
{
| <?before <.[)]}]>> # Commenting this out unbreaks the debugger
| <statement_control>*
}
rule TOP { }
}
}
-- t/01-single-token.t --
use v6;
use Test;
use Perl6::Parser::Pure::Grammar;
plan 1;
my $g = Perl6::Parser::Pure::Grammar.new;
ok $g.parse( Q{} ), Q{runs};
-- cut --
-- the error --
6 t/01-single-tokens.t
1..1
TOP
r
| statementlist
Cannot invoke this object (REPR: Null; VMNull)
in block at /home/jgoff/.rakudobrew/moar-master/install/share/perl6/site/sources/0915E37B99013FE906246809B378838A8288E251 (Grammar::Debugger) line 116
in regex statementlist at /home/jgoff/breaks-grammar-debugger/lib/Perl6/Parser/Pure/Grammar.pm6 (Perl6::Parser::Pure::Grammar) line 9
in block at /home/jgoff/.rakudobrew/moar-master/install/share/perl6/site/sources/0915E37B99013FE906246809B378838A8288E251 (Grammar::Debugger) line 123
in regex TOP at /home/jgoff/breaks-grammar-debugger/lib/Perl6/Parser/Pure/Grammar.pm6 (Perl6::Parser::Pure::Grammar) line 14
in block at /home/jgoff/.rakudobrew/moar-master/install/share/perl6/site/sources/0915E37B99013FE906246809B378838A8288E251 (Grammar::Debugger) line 123
in block at t/01-single-tokens.t line 10
-- cut here --
Requires two files - if I place the grammar into the test file the bug goes away. You can also comment out the <?before> alternation and the parse will complete. The complete error text is at the bottom of the file. I think something isn't correctly initializing $!state{'indent'} in the source, but I haven't figured out how to correctly initialize it.
-- Perl6/Parser/Pure/Grammar.pm6 --
{use Grammar::Debugger;
grammar Perl6::Parser::Pure::Grammar
{
proto rule statement_control { <...> }
token statement_control:sym { }
rule statementlist
{
| <?before <.[)]}]>> # Commenting this out unbreaks the debugger
| <statement_control>*
}
rule TOP { }
}
}
-- t/01-single-token.t --
use v6;
use Test;
use Perl6::Parser::Pure::Grammar;
plan 1;
my $g = Perl6::Parser::Pure::Grammar.new;
ok $g.parse( Q{} ), Q{runs};
-- cut --
-- the error --
6 t/01-single-tokens.t
1..1
TOP