Created
April 15, 2013 08:07
-
-
Save pstuifzand/5386527 to your computer and use it in GitHub Desktop.
If I call show_progress then lexeme_read doesn't work anymore.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
P0 @0-0 [:start] -> . test | |
P1 @0-0 test -> . marker end | |
Can't locate object method "lexeme_read" via package "Marpa::R2::Recognizer" at t/show_progress.t line 20. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use 5.10.0; | |
use Marpa::R2 '2.051_009'; | |
use Test::More; | |
my $g = Marpa::R2::Scanless::G->new({ | |
default_action => '::array', | |
source => \<<'GRAMMAR', | |
:start ::= test | |
test ::= marker end | |
marker ~ '<<' | |
end ~ 'END' | |
GRAMMAR | |
}); | |
my $re = Marpa::R2::Scanless::R->new({grammar => $g }); | |
my $input = "<<END"; | |
$re->read(\$input, 0, 0); | |
say $re->show_progress; | |
$re->lexeme_read('marker', 0, 2, '<<') // die; | |
$re->lexeme_read('end', 2, 3, 'END') // die; | |
ok(1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment