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.010; | |
use strict; | |
use warnings; | |
use Benchmark qw(timeit countit timestr); | |
use Regexp::Common qw /balanced/; | |
use Getopt::Long; | |
my $example; | |
my $length = 1000; | |
my $string; |
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 strict; | |
use warnings; | |
use 5.010; | |
use Marpa::XS; | |
use Data::Dumper; | |
# An SQL INSERT statement for testing | |
my $text = q{ | |
INSERT INTO `tehtable` ( `field00`, `field01` ) VALUES ( 123, `abcd\'e | |
+fgh` ); |
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
#!/usr/bin/perl | |
use 5.010; | |
use strict; | |
use warnings; | |
use Scalar::Util; | |
use English qw( -no_match_vars ); | |
# Code to demonstrate factoring of regex min,max | |
# counts into BNF rules |
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.010; | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use Scalar::Util; | |
use Marpa::XS; | |
# A Marpa::XS parser for the Dyck-Hollerith language | |
my $repeat; |
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
#!perl | |
use 5.010; | |
use strict; | |
use warnings; | |
use English qw( -no_match_vars ); | |
use Marpa::R2; | |
use MarpaX::Simple::Rules '0.2.6', 'parse_rules'; | |
my $catalan_rules = parse_rules(<<"RULES"); |
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
#!perl | |
use 5.010; | |
use strict; | |
use warnings; | |
use English qw( -no_match_vars ); | |
use Marpa::R2; | |
use MarpaX::Simple::Rules '0.2.6', 'parse_rules'; | |
my $basic_pascal_rules = parse_rules(<<"RULES"); |
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
#!perl | |
use 5.010; | |
use strict; | |
use warnings; | |
use English qw( -no_match_vars ); | |
use Marpa::R2; | |
use MarpaX::Simple::Rules '0.2.6', 'parse_rules'; | |
my $wall_rules = parse_rules(<<"RULES"); |
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
#!perl | |
# Copyright 2012 Jeffrey Kegler | |
# This file is part of Marpa::R2. Marpa::R2 is free software: you can | |
# redistribute it and/or modify it under the terms of the GNU Lesser | |
# General Public License as published by the Free Software Foundation, | |
# either version 3 of the License, or (at your option) any later version. | |
# | |
# Marpa::R2 is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
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
#!perl | |
use 5.010; | |
use strict; | |
use warnings; | |
use autodie; | |
use Benchmark qw(timethis); | |
use List::Util qw(min); | |
use Regexp::Common qw /balanced/; |
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
#!perl | |
use 5.010; | |
use strict; | |
use warnings; | |
use autodie; | |
use Benchmark qw(timethis); | |
use List::Util qw(min); | |
use Regexp::Common qw /balanced/; |
OlderNewer