Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Pegex bootstrapping from TestML
- Loading branch information
1 parent
bf3545a
commit 4b8b716
Showing
3 changed files
with
11 additions
and
14 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,15 @@ | ||
# XXX This code currently depends on too much bootstrapping stuffs. | ||
use Pegex::Compiler; | ||
|
||
use lib "../../pegex-pm/lib"; | ||
# use Pegex::Compiler; | ||
use Pegex::Compiler::Bootstrap; | ||
|
||
open IN, shift or die; | ||
my $testml = do {local $/; <IN>}; | ||
# my $pegex = Pegex::Compiler->new; | ||
my $pegex = Pegex::Compiler::Bootstrap->new; | ||
$pegex->compile($testml); | ||
my $perl = $pegex->to_perl; | ||
my $perl = Pegex::Compiler->compile_file(shift)->to_perl; | ||
chomp($perl); | ||
|
||
print <<"..."; | ||
package TestML::Grammar; | ||
use base 'Pegex::Grammar'; | ||
# use base 'Pegex::Grammar::Bootstrap'; | ||
sub build_tree { | ||
return +$perl; | ||
} | ||
1; | ||
... | ||
|