/usr/local/CPAN/XML-XSH2/XML/XSH2/Parser.pm
package XML::XSH2::Parser;
use Parse::RecDescent;
{ my $ERRORS;
package Parse::RecDescent::XML::XSH2::Parser;
use strict;
use vars qw($skip $AUTOLOAD );
@Parse::RecDescent::XML::XSH2::Parser::ISA = ();
$skip = '(\s|\n|#[^\n]*)*';
{
local $SIG{__WARN__} = sub {0};
# PRETEND TO BE IN Parse::RecDescent NAMESPACE
*Parse::RecDescent::XML::XSH2::Parser::AUTOLOAD = sub
{
no strict 'refs';
$AUTOLOAD =~ s/^Parse::RecDescent::XML::XSH2::Parser/Parse::RecDescent/;
goto &{$AUTOLOAD};
}
}
push @Parse::RecDescent::XML::XSH2::Parser::ISA, 'Parse::RecDescent';
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::xps
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"xps"};
Parse::RecDescent::_trace(q{Trying rule: [xps]},
Parse::RecDescent::_tracefirst($_[1]),
q{xps},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/(?: [^\\$\\[\\]()'"\};]+ |
\\$(?!\\\{) |
\\$\\\{ (?:\\$?[a-zA-Z_][a-zA-Z0-9_]* |
\\\{.*?\\\} |
\\(.+?\\)
)
\\\} |
'(?:\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\)) \\\} |
\\$(?!\\\{) | [^\\$']
)*' |
"(?:\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\)) \\\} |
\\$(?!\\\{) | [^\\$"]
)*"
)*/x});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(?: [^\\$\\[\\]()'"\};]+ |
\\$(?!\\\{) |
\\$\\\{ (?:\\$?[a-zA-Z_][a-zA-Z0-9_]* |
\\\{.*?\\\} |
\\(.+?\\)
)
\\\} |
'(?:\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\)) \\\} |
\\$(?!\\\{) | [^\\$']
)*' |
"(?:\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\)) \\\} |
\\$(?!\\\{) | [^\\$"]
)*"
)*/x]},
Parse::RecDescent::_tracefirst($_[1]),
q{xps},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{xps});
%item = (__RULE__ => q{xps});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(?: [^\\$\\[\\]()'"\};]+ |
\\$(?!\\\{) |
\\$\\\{ (?:\\$?[a-zA-Z_][a-zA-Z0-9_]* |
\\\{.*?\\\} |
\\(.+?\\)
)
\\\} |
'(?:\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\)) \\\} |
\\$(?!\\\{) | [^\\$']
)*' |
"(?:\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\)) \\\} |
\\$(?!\\\{) | [^\\$"]
)*"
)*/x]}, Parse::RecDescent::_tracefirst($text),
q{xps},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?: [^\$\[\]()'"};]+ |
\$(?!\{) |
\$\{ (?:\$?[a-zA-Z_][a-zA-Z0-9_]* |
\{.*?\} |
\(.+?\)
)
\} |
'(?:\$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\)) \} |
\$(?!\{) | [^\$']
)*' |
"(?:\$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\)) \} |
\$(?!\{) | [^\$"]
)*"
)*)/x)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{>>Matched production: [/(?: [^\\$\\[\\]()'"\};]+ |
\\$(?!\\\{) |
\\$\\\{ (?:\\$?[a-zA-Z_][a-zA-Z0-9_]* |
\\\{.*?\\\} |
\\(.+?\\)
)
\\\} |
'(?:\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\)) \\\} |
\\$(?!\\\{) | [^\\$']
)*' |
"(?:\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\)) \\\} |
\\$(?!\\\{) | [^\\$"]
)*"
)*/x]<<},
Parse::RecDescent::_tracefirst($text),
q{xps},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{xps},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{xps},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{xps},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{xps},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command"};
Parse::RecDescent::_trace(q{Trying rule: [_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/--input-file|:f/ filename]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
%item = (__RULE__ => q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/--input-file|:f/]}, Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:--input-file|:f)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [filename]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{filename})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::filename($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [filename]>>},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [filename]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{filename}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [ 'string/input-file' => $item[2] ] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/--input-file|:f/ filename]<<},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/--input-pipe|:p/ filename]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
%item = (__RULE__ => q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/--input-pipe|:p/]}, Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:--input-pipe|:p)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [filename]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{filename})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::filename($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [filename]>>},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [filename]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{filename}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [ 'string/input-pipe' => $item[2] ] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/--input-pipe|:p/ filename]<<},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/--input-string|:s/ exp]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[2];
$text = $_[1];
my $_savetext;
@item = (q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
%item = (__RULE__ => q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/--input-string|:s/]}, Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:--input-string|:s)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [exp]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{exp})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [exp]>>},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [exp]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{exp}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [ 'exp/input-string' => $item[2] ] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/--input-string|:s/ exp]<<},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/--output-file|:F/ filename]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[3];
$text = $_[1];
my $_savetext;
@item = (q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
%item = (__RULE__ => q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/--output-file|:F/]}, Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:--output-file|:F)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [filename]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{filename})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::filename($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [filename]>>},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [filename]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{filename}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [ 'string/output-file' => $item[2] ] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/--output-file|:F/ filename]<<},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/--output-encoding|:E/ enc_string]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[4];
$text = $_[1];
my $_savetext;
@item = (q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
%item = (__RULE__ => q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/--output-encoding|:E/]}, Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:--output-encoding|:E)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [enc_string]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{enc_string})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::enc_string($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [enc_string]>>},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [enc_string]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{enc_string}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [ 'string/output-encoding' => $item[2] ] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/--output-encoding|:E/ enc_string]<<},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/--output-pipe|:P/ filename]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[5];
$text = $_[1];
my $_savetext;
@item = (q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
%item = (__RULE__ => q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/--output-pipe|:P/]}, Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:--output-pipe|:P)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [filename]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{filename})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::filename($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [filename]>>},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [filename]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{filename}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [ 'string/output-pipe' => $item[2] ] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/--output-pipe|:P/ filename]<<},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/--output-string|:S/]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[6];
$text = $_[1];
my $_savetext;
@item = (q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
%item = (__RULE__ => q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/--output-string|:S/]}, Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:--output-string|:S)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [ '/output-string' => 1 ] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/--output-string|:S/]<<},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::loose_exp
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"loose_exp"};
Parse::RecDescent::_trace(q{Trying rule: [loose_exp]},
Parse::RecDescent::_tracefirst($_[1]),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/^(?=\{)/, or '&', or /^(?=<<)/, or xpinter});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/^(?=\{)/ perl_block]},
Parse::RecDescent::_tracefirst($_[1]),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{loose_exp});
%item = (__RULE__ => q{loose_exp});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/^(?=\{)/]}, Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^(?={))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [perl_block]},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{perl_block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::perl_block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [perl_block]>>},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [perl_block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$item{q{perl_block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { $item[2] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/^(?=\{)/ perl_block]<<},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: ['&' block]},
Parse::RecDescent::_tracefirst($_[1]),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{loose_exp});
%item = (__RULE__ => q{loose_exp});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: ['&']},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\&/)
{
$expectation->failed();
Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__STRING1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [block]},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [block]>>},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$item{q{block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { $item[2] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: ['&' block]<<},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/^(?=<<)/ inline_doc]},
Parse::RecDescent::_tracefirst($_[1]),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[2];
$text = $_[1];
my $_savetext;
@item = (q{loose_exp});
%item = (__RULE__ => q{loose_exp});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/^(?=<<)/]}, Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^(?=<<))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [inline_doc]},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{inline_doc})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::inline_doc($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [inline_doc]>>},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [inline_doc]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$item{q{inline_doc}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { $item[2] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/^(?=<<)/ inline_doc]<<},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [xpinter]},
Parse::RecDescent::_tracefirst($_[1]),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[3];
$text = $_[1];
my $_savetext;
@item = (q{loose_exp});
%item = (__RULE__ => q{loose_exp});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [xpinter]},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::xpinter($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [xpinter]>>},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [xpinter]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpinter}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{>>Matched production: [xpinter]<<},
Parse::RecDescent::_tracefirst($text),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{loose_exp},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{loose_exp},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{loose_exp},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::trail
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"trail"};
Parse::RecDescent::_trace(q{Trying rule: [trail]},
Parse::RecDescent::_tracefirst($_[1]),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/(?=\\s*[\};]|\\s*\\Z)/, or '|>', or '|'});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(?=\\s*[\};]|\\s*\\Z)/ <commit> <reject>]},
Parse::RecDescent::_tracefirst($_[1]),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{trail});
%item = (__RULE__ => q{trail});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(?=\\s*[\};]|\\s*\\Z)/]}, Parse::RecDescent::_tracefirst($text),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?=\s*[};]|\s*\Z))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{>>Rejecting production<< (found <reject>)},
Parse::RecDescent::_tracefirst($text),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
undef $return;
$_tok = undef;
last unless defined $_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(?=\\s*[\};]|\\s*\\Z)/ <commit> <reject>]<<},
Parse::RecDescent::_tracefirst($text),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: ['|>' <commit> variable]},
Parse::RecDescent::_tracefirst($_[1]),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{trail});
%item = (__RULE__ => q{trail});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: ['|>']},
Parse::RecDescent::_tracefirst($text),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\|\>/)
{
$expectation->failed();
Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__STRING1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [variable]},
Parse::RecDescent::_tracefirst($text),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{variable})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::variable($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [variable]>>},
Parse::RecDescent::_tracefirst($text),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [variable]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
$item{q{variable}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { ['var',$item[3]] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: ['|>' <commit> variable]<<},
Parse::RecDescent::_tracefirst($text),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: ['|' <commit> shline]},
Parse::RecDescent::_tracefirst($_[1]),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[2];
$text = $_[1];
my $_savetext;
@item = (q{trail});
%item = (__RULE__ => q{trail});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: ['|']},
Parse::RecDescent::_tracefirst($text),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\|/)
{
$expectation->failed();
Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__STRING1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [shline]},
Parse::RecDescent::_tracefirst($text),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{shline})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::shline($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [shline]>>},
Parse::RecDescent::_tracefirst($text),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [shline]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
$item{q{shline}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { ['pipe',$item[3]] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: ['|' <commit> shline]<<},
Parse::RecDescent::_tracefirst($text),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{trail},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{trail},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{trail},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{trail},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::xpbrackets
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"xpbrackets"};
Parse::RecDescent::_trace(q{Trying rule: [xpbrackets]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpbrackets},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/(?=\\()/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
local $skip = defined($skip) ? $skip : $Parse::RecDescent::skip;
Parse::RecDescent::_trace(q{Trying production: [/(?=\\()/ xpbracket <skip:""> xpfilters]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpbrackets},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{xpbrackets});
%item = (__RULE__ => q{xpbrackets});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(?=\\()/]}, Parse::RecDescent::_tracefirst($text),
q{xpbrackets},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?=\())/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [xpbracket]},
Parse::RecDescent::_tracefirst($text),
q{xpbrackets},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{xpbracket})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::xpbracket($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [xpbracket]>>},
Parse::RecDescent::_tracefirst($text),
q{xpbrackets},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [xpbracket]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{xpbrackets},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpbracket}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying directive: [<skip:"">]},
Parse::RecDescent::_tracefirst($text),
q{xpbrackets},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { my $oldskip = $skip; $skip=""; $oldskip };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying repeated subrule: [xpfilters]},
Parse::RecDescent::_tracefirst($text),
q{xpbrackets},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{xpfilters})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::xpfilters, 0, 1, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [xpfilters]>>},
Parse::RecDescent::_tracefirst($text),
q{xpbrackets},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [xpfilters]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{xpbrackets},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpfilters(?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{xpbrackets},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { join "",$item[2],@{$item[4]} };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(?=\\()/ xpbracket <skip:""> xpfilters]<<},
Parse::RecDescent::_tracefirst($text),
q{xpbrackets},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{xpbrackets},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{xpbrackets},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{xpbrackets},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{xpbrackets},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::xpintercont
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"xpintercont"};
Parse::RecDescent::_trace(q{Trying rule: [xpintercont]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpintercont},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{xpfilters, or xpbrackets});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
local $skip = defined($skip) ? $skip : $Parse::RecDescent::skip;
Parse::RecDescent::_trace(q{Trying production: [xpfilters, or xpbrackets <skip:""> xpinter]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpintercont},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{xpintercont});
%item = (__RULE__ => q{xpintercont});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [_alternation_1_of_production_1_of_rule_xpintercont]},
Parse::RecDescent::_tracefirst($text),
q{xpintercont},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::_alternation_1_of_production_1_of_rule_xpintercont($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [_alternation_1_of_production_1_of_rule_xpintercont]>>},
Parse::RecDescent::_tracefirst($text),
q{xpintercont},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [_alternation_1_of_production_1_of_rule_xpintercont]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{xpintercont},
$tracelevel)
if defined $::RD_TRACE;
$item{q{_alternation_1_of_production_1_of_rule_xpintercont}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying directive: [<skip:"">]},
Parse::RecDescent::_tracefirst($text),
q{xpintercont},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { my $oldskip = $skip; $skip=""; $oldskip };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying repeated subrule: [xpinter]},
Parse::RecDescent::_tracefirst($text),
q{xpintercont},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{xpinter})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::xpinter, 0, 1, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [xpinter]>>},
Parse::RecDescent::_tracefirst($text),
q{xpintercont},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [xpinter]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{xpintercont},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpinter(?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{xpintercont},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { join("",$item[1],@{$item[3]}) };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [xpfilters, or xpbrackets <skip:""> xpinter]<<},
Parse::RecDescent::_tracefirst($text),
q{xpintercont},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{xpintercont},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{xpintercont},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{xpintercont},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{xpintercont},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::inline_doc_string
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"inline_doc_string"};
Parse::RecDescent::_trace(q{Trying rule: [inline_doc_string]},
Parse::RecDescent::_tracefirst($_[1]),
q{inline_doc_string},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/'[a-zA-Z_][a-zA-Z0-9_]*'|"[a-zA-Z_][a-zA-Z0-9_]*"|\\([a-zA-Z_][a-zA-Z0-9_]*\\)|\\\{[a-zA-Z_][a-zA-Z0-9_]*\\\}|[a-zA-Z_][a-zA-Z0-9_]*/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/'[a-zA-Z_][a-zA-Z0-9_]*'|"[a-zA-Z_][a-zA-Z0-9_]*"|\\([a-zA-Z_][a-zA-Z0-9_]*\\)|\\\{[a-zA-Z_][a-zA-Z0-9_]*\\\}|[a-zA-Z_][a-zA-Z0-9_]*/]},
Parse::RecDescent::_tracefirst($_[1]),
q{inline_doc_string},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{inline_doc_string});
%item = (__RULE__ => q{inline_doc_string});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/'[a-zA-Z_][a-zA-Z0-9_]*'|"[a-zA-Z_][a-zA-Z0-9_]*"|\\([a-zA-Z_][a-zA-Z0-9_]*\\)|\\\{[a-zA-Z_][a-zA-Z0-9_]*\\\}|[a-zA-Z_][a-zA-Z0-9_]*/]}, Parse::RecDescent::_tracefirst($text),
q{inline_doc_string},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:'[a-zA-Z_][a-zA-Z0-9_]*'|"[a-zA-Z_][a-zA-Z0-9_]*"|\([a-zA-Z_][a-zA-Z0-9_]*\)|\{[a-zA-Z_][a-zA-Z0-9_]*\}|[a-zA-Z_][a-zA-Z0-9_]*)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{inline_doc_string},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [($item[1]=~/^(['"({])?(.*?)(['")}])?$/)] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/'[a-zA-Z_][a-zA-Z0-9_]*'|"[a-zA-Z_][a-zA-Z0-9_]*"|\\([a-zA-Z_][a-zA-Z0-9_]*\\)|\\\{[a-zA-Z_][a-zA-Z0-9_]*\\\}|[a-zA-Z_][a-zA-Z0-9_]*/]<<},
Parse::RecDescent::_tracefirst($text),
q{inline_doc_string},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{inline_doc_string},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{inline_doc_string},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{inline_doc_string},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{inline_doc_string},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::shline_nosc
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"shline_nosc"};
Parse::RecDescent::_trace(q{Trying rule: [shline_nosc]},
Parse::RecDescent::_tracefirst($_[1]),
q{shline_nosc},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/([^;()\\\\"'\\|]|\\|[^>]|\\\\.|\\"([^\\"\\\\]|\\\\.)*\\"|\\'([^\\'\\\\]|\\\\\\'|\\\\\\\\|\\\\[^\\'\\\\])*\\')*/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/([^;()\\\\"'\\|]|\\|[^>]|\\\\.|\\"([^\\"\\\\]|\\\\.)*\\"|\\'([^\\'\\\\]|\\\\\\'|\\\\\\\\|\\\\[^\\'\\\\])*\\')*/]},
Parse::RecDescent::_tracefirst($_[1]),
q{shline_nosc},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{shline_nosc});
%item = (__RULE__ => q{shline_nosc});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/([^;()\\\\"'\\|]|\\|[^>]|\\\\.|\\"([^\\"\\\\]|\\\\.)*\\"|\\'([^\\'\\\\]|\\\\\\'|\\\\\\\\|\\\\[^\\'\\\\])*\\')*/]}, Parse::RecDescent::_tracefirst($text),
q{shline_nosc},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:([^;()\\"'\|]|\|[^>]|\\.|\"([^\"\\]|\\.)*\"|\'([^\'\\]|\\\'|\\\\|\\[^\'\\])*\')*)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{>>Matched production: [/([^;()\\\\"'\\|]|\\|[^>]|\\\\.|\\"([^\\"\\\\]|\\\\.)*\\"|\\'([^\\'\\\\]|\\\\\\'|\\\\\\\\|\\\\[^\\'\\\\])*\\')*/]<<},
Parse::RecDescent::_tracefirst($text),
q{shline_nosc},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{shline_nosc},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{shline_nosc},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{shline_nosc},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{shline_nosc},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::xpinter
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"xpinter"};
Parse::RecDescent::_trace(q{Trying rule: [xpinter]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpinter},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{xps});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
local $skip = defined($skip) ? $skip : $Parse::RecDescent::skip;
Parse::RecDescent::_trace(q{Trying production: [xps <skip:""> xpintercont]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpinter},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{xpinter});
%item = (__RULE__ => q{xpinter});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [xps]},
Parse::RecDescent::_tracefirst($text),
q{xpinter},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::xps($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [xps]>>},
Parse::RecDescent::_tracefirst($text),
q{xpinter},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [xps]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{xpinter},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xps}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying directive: [<skip:"">]},
Parse::RecDescent::_tracefirst($text),
q{xpinter},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { my $oldskip = $skip; $skip=""; $oldskip };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying repeated subrule: [xpintercont]},
Parse::RecDescent::_tracefirst($text),
q{xpinter},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{xpintercont})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::xpintercont, 0, 1, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [xpintercont]>>},
Parse::RecDescent::_tracefirst($text),
q{xpinter},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [xpintercont]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{xpinter},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpintercont(?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{xpinter},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { join("",$item[1],@{$item[3]}) };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [xps <skip:""> xpintercont]<<},
Parse::RecDescent::_tracefirst($text),
q{xpinter},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{xpinter},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{xpinter},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{xpinter},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{xpinter},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::inline_doc
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"inline_doc"};
Parse::RecDescent::_trace(q{Trying rule: [inline_doc]},
Parse::RecDescent::_tracefirst($_[1]),
q{inline_doc},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/<</});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
local $skip = defined($skip) ? $skip : $Parse::RecDescent::skip;
Parse::RecDescent::_trace(q{Trying production: [/<</ inline_doc_string <skip:""> /.*\\n/ /(.|\\n)*?\\n$item[2][1]\\s*(\\n|$)/]},
Parse::RecDescent::_tracefirst($_[1]),
q{inline_doc},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{inline_doc});
%item = (__RULE__ => q{inline_doc});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/<</]}, Parse::RecDescent::_tracefirst($text),
q{inline_doc},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:<<)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [inline_doc_string]},
Parse::RecDescent::_tracefirst($text),
q{inline_doc},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{inline_doc_string})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::inline_doc_string($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [inline_doc_string]>>},
Parse::RecDescent::_tracefirst($text),
q{inline_doc},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [inline_doc_string]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{inline_doc},
$tracelevel)
if defined $::RD_TRACE;
$item{q{inline_doc_string}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying directive: [<skip:"">]},
Parse::RecDescent::_tracefirst($text),
q{inline_doc},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { my $oldskip = $skip; $skip=""; $oldskip };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying terminal: [/.*\\n/]}, Parse::RecDescent::_tracefirst($text),
q{inline_doc},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{/.*\\n/})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:.*\n)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN2__}=$current_match;
Parse::RecDescent::_trace(q{Trying terminal: [/(.|\\n)*?\\n$item[2][1]\\s*(\\n|$)/]}, Parse::RecDescent::_tracefirst($text),
q{inline_doc},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{/(.|\\n)*?\\n$item[2][1]\\s*(\\n|$)/})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(.|\n)*?\n$item[2][1]\s*(\n|$))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN3__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{inline_doc},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do {
$text=$item[4].$text;
local $_=$item[5]; s/\n$item[2][1]\s*$//;
my $paren = $item[2][0];
$paren = '"' if $paren eq "";
if ($paren eq "'") {
$paren = '"';
s{(\\)(.|\n)|(\$)}{ (defined($3) and $3 eq '$') ? "\\\$"
: ((defined($2) and $2 eq "\\")
? "\\\\" : ((defined($2) and $2 eq "'") ? "'" : (
(defined($2) and $2 eq '$') ? "\\\\\\$2" :
"\\\\$2"))) }eg;
} "<<".$paren.$_;
};
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/<</ inline_doc_string <skip:""> /.*\\n/ /(.|\\n)*?\\n$item[2][1]\\s*(\\n|$)/]<<},
Parse::RecDescent::_tracefirst($text),
q{inline_doc},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{inline_doc},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{inline_doc},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{inline_doc},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{inline_doc},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::statement
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"statement"};
Parse::RecDescent::_trace(q{Trying rule: [statement]},
Parse::RecDescent::_tracefirst($_[1]),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/(?=\\s*[\}\{;])/, or /(if)\\b/, or /(unless)\\b/, or /(while)\\b/, or /(foreach|for)\\b/, or /(try)\\b/, or /(iterate)\\b/, or /(def|define)\\b/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(?=\\s*[\}\{;])/ <commit> <reject>]},
Parse::RecDescent::_tracefirst($_[1]),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{statement});
%item = (__RULE__ => q{statement});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(?=\\s*[\}\{;])/]}, Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?=\s*[}{;]))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{>>Rejecting production<< (found <reject>)},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
undef $return;
$_tok = undef;
last unless defined $_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(?=\\s*[\}\{;])/ <commit> <reject>]<<},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(if)\\b/ <commit> exp block elsif_block else_block]},
Parse::RecDescent::_tracefirst($_[1]),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{statement});
%item = (__RULE__ => q{statement});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(if)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(if)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [exp]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{exp})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [exp]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [exp]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{exp}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying subrule: [block]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [block]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying subrule: [elsif_block]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{elsif_block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::elsif_block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [elsif_block]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [elsif_block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{elsif_block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying subrule: [else_block]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{else_block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::else_block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [else_block]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [else_block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{else_block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'if_statement',[$item[3],$item[4]],@{$item[5]},@{$item[6]}] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(if)\\b/ <commit> exp block elsif_block else_block]<<},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(unless)\\b/ <commit> exp block else_block]},
Parse::RecDescent::_tracefirst($_[1]),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[2];
$text = $_[1];
my $_savetext;
@item = (q{statement});
%item = (__RULE__ => q{statement});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(unless)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(unless)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [exp]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{exp})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [exp]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [exp]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{exp}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying subrule: [block]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [block]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying repeated subrule: [else_block]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{else_block})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::else_block, 0, 1, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [else_block]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [else_block]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{else_block(?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'unless_statement',$item[3],$item[4],@{$item[5]}] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(unless)\\b/ <commit> exp block else_block]<<},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(while)\\b/ <commit> exp block]},
Parse::RecDescent::_tracefirst($_[1]),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[3];
$text = $_[1];
my $_savetext;
@item = (q{statement});
%item = (__RULE__ => q{statement});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(while)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(while)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [exp]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{exp})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [exp]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [exp]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{exp}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying subrule: [block]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [block]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'while_statement',$item[3],$item[4]] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(while)\\b/ <commit> exp block]<<},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(foreach|for)\\b/ <commit> local_var_in exp block]},
Parse::RecDescent::_tracefirst($_[1]),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[4];
$text = $_[1];
my $_savetext;
@item = (q{statement});
%item = (__RULE__ => q{statement});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(foreach|for)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(foreach|for)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying repeated subrule: [local_var_in]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{local_var_in})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::local_var_in, 0, 1, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [local_var_in]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [local_var_in]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{local_var_in(?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying subrule: [exp]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{exp})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [exp]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [exp]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{exp}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying subrule: [block]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [block]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'foreach_statement',@item[4,5],@{$item[3]}] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(foreach|for)\\b/ <commit> local_var_in exp block]<<},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(try)\\b/ <commit> block 'catch' local_var block]},
Parse::RecDescent::_tracefirst($_[1]),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[5];
$text = $_[1];
my $_savetext;
@item = (q{statement});
%item = (__RULE__ => q{statement});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(try)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(try)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [block]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [block]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying terminal: ['catch']},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{'catch'})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\Acatch/)
{
$expectation->failed();
Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__STRING1__}=$current_match;
Parse::RecDescent::_trace(q{Trying repeated subrule: [local_var]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{local_var})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::local_var, 0, 1, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [local_var]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [local_var]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{local_var(?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying subrule: [block]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [block]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'try_catch',$item[3],$item[6],@{$item[5]}] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(try)\\b/ <commit> block 'catch' local_var block]<<},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(iterate)\\b/ <commit> xpstep block]},
Parse::RecDescent::_tracefirst($_[1]),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[6];
$text = $_[1];
my $_savetext;
@item = (q{statement});
%item = (__RULE__ => q{statement});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(iterate)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(iterate)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [xpstep]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{xpstep})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::xpstep($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [xpstep]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [xpstep]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpstep}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying subrule: [block]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [block]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'iterate',$item[4],@{$item[3]}] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(iterate)\\b/ <commit> xpstep block]<<},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(def|define)\\b/ <commit> ID variable block]},
Parse::RecDescent::_tracefirst($_[1]),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[7];
$text = $_[1];
my $_savetext;
@item = (q{statement});
%item = (__RULE__ => q{statement});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(def|define)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(def|define)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [ID]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{ID})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::ID($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [ID]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [ID]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{ID}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { XML::XSH2::Functions::is_command($item[3])?undef:1 };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{Trying repeated subrule: [variable]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{variable})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::variable, 0, 100000000, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [variable]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [variable]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{variable(s?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying subrule: [block]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [block]>>},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$item{q{block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do {
[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'def',$item[3],$item[6],$item[5]]
};
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION2__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(def|define)\\b/ <commit> ID variable block]<<},
Parse::RecDescent::_tracefirst($text),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{statement},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{statement},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{statement},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{statement},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::_alternation_1_of_production_1_of_rule_xpintercont
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"_alternation_1_of_production_1_of_rule_xpintercont"};
Parse::RecDescent::_trace(q{Trying rule: [_alternation_1_of_production_1_of_rule_xpintercont]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule_xpintercont},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{xpfilters, or xpbrackets});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [xpfilters]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule_xpintercont},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{_alternation_1_of_production_1_of_rule_xpintercont});
%item = (__RULE__ => q{_alternation_1_of_production_1_of_rule_xpintercont});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [xpfilters]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_xpintercont},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::xpfilters($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [xpfilters]>>},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_xpintercont},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [xpfilters]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_xpintercont},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpfilters}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{>>Matched production: [xpfilters]<<},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_xpintercont},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [xpbrackets]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule_xpintercont},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{_alternation_1_of_production_1_of_rule_xpintercont});
%item = (__RULE__ => q{_alternation_1_of_production_1_of_rule_xpintercont});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [xpbrackets]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_xpintercont},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::xpbrackets($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [xpbrackets]>>},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_xpintercont},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [xpbrackets]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_xpintercont},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpbrackets}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{>>Matched production: [xpbrackets]<<},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_xpintercont},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule_xpintercont},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{_alternation_1_of_production_1_of_rule_xpintercont},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{_alternation_1_of_production_1_of_rule_xpintercont},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{_alternation_1_of_production_1_of_rule_xpintercont},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::xplocationstep
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"xplocationstep"};
Parse::RecDescent::_trace(q{Trying rule: [xplocationstep]},
Parse::RecDescent::_tracefirst($_[1]),
q{xplocationstep},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{xpaxis});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [xpaxis xpnodetest]},
Parse::RecDescent::_tracefirst($_[1]),
q{xplocationstep},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{xplocationstep});
%item = (__RULE__ => q{xplocationstep});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying repeated subrule: [xpaxis]},
Parse::RecDescent::_tracefirst($text),
q{xplocationstep},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::xpaxis, 0, 1, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [xpaxis]>>},
Parse::RecDescent::_tracefirst($text),
q{xplocationstep},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [xpaxis]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{xplocationstep},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpaxis(?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying subrule: [xpnodetest]},
Parse::RecDescent::_tracefirst($text),
q{xplocationstep},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{xpnodetest})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::xpnodetest($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [xpnodetest]>>},
Parse::RecDescent::_tracefirst($text),
q{xplocationstep},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [xpnodetest]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{xplocationstep},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpnodetest}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{xplocationstep},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [ (@{$item[1]} ? $item[1][0] : 'child::'),$item[3] ] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [xpaxis xpnodetest]<<},
Parse::RecDescent::_tracefirst($text),
q{xplocationstep},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{xplocationstep},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{xplocationstep},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{xplocationstep},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{xplocationstep},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::local_var_in
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"local_var_in"};
Parse::RecDescent::_trace(q{Trying rule: [local_var_in]},
Parse::RecDescent::_tracefirst($_[1]),
q{local_var_in},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{local_var});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [local_var 'in']},
Parse::RecDescent::_tracefirst($_[1]),
q{local_var_in},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{local_var_in});
%item = (__RULE__ => q{local_var_in});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [local_var]},
Parse::RecDescent::_tracefirst($text),
q{local_var_in},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::local_var($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [local_var]>>},
Parse::RecDescent::_tracefirst($text),
q{local_var_in},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [local_var]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{local_var_in},
$tracelevel)
if defined $::RD_TRACE;
$item{q{local_var}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying terminal: ['in']},
Parse::RecDescent::_tracefirst($text),
q{local_var_in},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{'in'})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\Ain/)
{
$expectation->failed();
Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__STRING1__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{local_var_in},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { $item[1] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [local_var 'in']<<},
Parse::RecDescent::_tracefirst($text),
q{local_var_in},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{local_var_in},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{local_var_in},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{local_var_in},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{local_var_in},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::param
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"param"};
Parse::RecDescent::_trace(q{Trying rule: [param]},
Parse::RecDescent::_tracefirst($_[1]),
q{param},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/[^=\\s]+/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/[^=\\s]+/ '=' exp]},
Parse::RecDescent::_tracefirst($_[1]),
q{param},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{param});
%item = (__RULE__ => q{param});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/[^=\\s]+/]}, Parse::RecDescent::_tracefirst($text),
q{param},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[^=\s]+)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying terminal: ['=']},
Parse::RecDescent::_tracefirst($text),
q{param},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{'='})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\=/)
{
$expectation->failed();
Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__STRING1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [exp]},
Parse::RecDescent::_tracefirst($text),
q{param},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{exp})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [exp]>>},
Parse::RecDescent::_tracefirst($text),
q{param},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [exp]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{param},
$tracelevel)
if defined $::RD_TRACE;
$item{q{exp}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{param},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$item[1],$item[3]] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/[^=\\s]+/ '=' exp]<<},
Parse::RecDescent::_tracefirst($text),
q{param},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{param},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{param},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{param},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{param},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::startrule
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"startrule"};
Parse::RecDescent::_trace(q{Trying rule: [startrule]},
Parse::RecDescent::_tracefirst($_[1]),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{shell, or complex_command});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [shell <commit> eof]},
Parse::RecDescent::_tracefirst($_[1]),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{startrule});
%item = (__RULE__ => q{startrule});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [shell]},
Parse::RecDescent::_tracefirst($text),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::shell($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [shell]>>},
Parse::RecDescent::_tracefirst($text),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [shell]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
$item{q{shell}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [eof]},
Parse::RecDescent::_tracefirst($text),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{eof})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::eof($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [eof]>>},
Parse::RecDescent::_tracefirst($text),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [eof]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
$item{q{eof}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { $item[1] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [shell <commit> eof]<<},
Parse::RecDescent::_tracefirst($text),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [complex_command <commit> eof]},
Parse::RecDescent::_tracefirst($_[1]),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{startrule});
%item = (__RULE__ => q{startrule});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying repeated subrule: [complex_command]},
Parse::RecDescent::_tracefirst($text),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::complex_command, 1, 100000000, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [complex_command]>>},
Parse::RecDescent::_tracefirst($text),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [complex_command]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
$item{q{complex_command(s)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [eof]},
Parse::RecDescent::_tracefirst($text),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{eof})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::eof($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [eof]>>},
Parse::RecDescent::_tracefirst($text),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [eof]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
$item{q{eof}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { $item[1] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [complex_command <commit> eof]<<},
Parse::RecDescent::_tracefirst($text),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{startrule},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{startrule},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{startrule},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::exp
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"exp"};
Parse::RecDescent::_trace(q{Trying rule: [exp]},
Parse::RecDescent::_tracefirst($_[1]),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/^(?=\{)/, or '&', or /^(?=<<)/, or xpath});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/^(?=\{)/ perl_block]},
Parse::RecDescent::_tracefirst($_[1]),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{exp});
%item = (__RULE__ => q{exp});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/^(?=\{)/]}, Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^(?={))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [perl_block]},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{perl_block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::perl_block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [perl_block]>>},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [perl_block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$item{q{perl_block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { $item[2] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/^(?=\{)/ perl_block]<<},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: ['&' block]},
Parse::RecDescent::_tracefirst($_[1]),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{exp});
%item = (__RULE__ => q{exp});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: ['&']},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\&/)
{
$expectation->failed();
Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__STRING1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [block]},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [block]>>},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$item{q{block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { $item[2] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: ['&' block]<<},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/^(?=<<)/ inline_doc]},
Parse::RecDescent::_tracefirst($_[1]),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[2];
$text = $_[1];
my $_savetext;
@item = (q{exp});
%item = (__RULE__ => q{exp});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/^(?=<<)/]}, Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^(?=<<))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [inline_doc]},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{inline_doc})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::inline_doc($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [inline_doc]>>},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [inline_doc]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$item{q{inline_doc}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { $item[2] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/^(?=<<)/ inline_doc]<<},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [xpath]},
Parse::RecDescent::_tracefirst($_[1]),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[3];
$text = $_[1];
my $_savetext;
@item = (q{exp});
%item = (__RULE__ => q{exp});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [xpath]},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::xpath($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [xpath]>>},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [xpath]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpath}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{>>Matched production: [xpath]<<},
Parse::RecDescent::_tracefirst($text),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{exp},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{exp},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{exp},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{exp},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::xpstring
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"xpstring"};
Parse::RecDescent::_trace(q{Trying rule: [xpstring]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpstring},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/'(?:\\$\\\{(?:\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\\{.*?\\\}|\\(.+?\\))\\\}|\\$(?!\\\{)|[^\\$'])*' |
"(?:\\$\\\{(?:\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\\{.*?\\\}|\\(.+?\\))\\\}|\\$(?!\\\{)|[^\\$"])*"/x});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/'(?:\\$\\\{(?:\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\\{.*?\\\}|\\(.+?\\))\\\}|\\$(?!\\\{)|[^\\$'])*' |
"(?:\\$\\\{(?:\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\\{.*?\\\}|\\(.+?\\))\\\}|\\$(?!\\\{)|[^\\$"])*"/x]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpstring},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{xpstring});
%item = (__RULE__ => q{xpstring});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/'(?:\\$\\\{(?:\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\\{.*?\\\}|\\(.+?\\))\\\}|\\$(?!\\\{)|[^\\$'])*' |
"(?:\\$\\\{(?:\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\\{.*?\\\}|\\(.+?\\))\\\}|\\$(?!\\\{)|[^\\$"])*"/x]}, Parse::RecDescent::_tracefirst($text),
q{xpstring},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:'(?:\$\{(?:\$?[a-zA-Z_][a-zA-Z0-9_]*|\{.*?\}|\(.+?\))\}|\$(?!\{)|[^\$'])*' |
"(?:\$\{(?:\$?[a-zA-Z_][a-zA-Z0-9_]*|\{.*?\}|\(.+?\))\}|\$(?!\{)|[^\$"])*")/x)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{>>Matched production: [/'(?:\\$\\\{(?:\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\\{.*?\\\}|\\(.+?\\))\\\}|\\$(?!\\\{)|[^\\$'])*' |
"(?:\\$\\\{(?:\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\\{.*?\\\}|\\(.+?\\))\\\}|\\$(?!\\\{)|[^\\$"])*"/x]<<},
Parse::RecDescent::_tracefirst($text),
q{xpstring},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{xpstring},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{xpstring},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{xpstring},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{xpstring},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::nodename
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"nodename"};
Parse::RecDescent::_trace(q{Trying rule: [nodename]},
Parse::RecDescent::_tracefirst($_[1]),
q{nodename},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{exp});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [exp]},
Parse::RecDescent::_tracefirst($_[1]),
q{nodename},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{nodename});
%item = (__RULE__ => q{nodename});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [exp]},
Parse::RecDescent::_tracefirst($text),
q{nodename},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [exp]>>},
Parse::RecDescent::_tracefirst($text),
q{nodename},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [exp]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{nodename},
$tracelevel)
if defined $::RD_TRACE;
$item{q{exp}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{>>Matched production: [exp]<<},
Parse::RecDescent::_tracefirst($text),
q{nodename},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{nodename},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{nodename},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{nodename},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{nodename},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::undef
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"undef"};
Parse::RecDescent::_trace(q{Trying rule: [undef]},
Parse::RecDescent::_tracefirst($_[1]),
q{undef},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/(undef|undefine)\\b/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(undef|undefine)\\b/ <commit> /\\$?[a-zA-Z_][a-zA-Z0-9_]*/]},
Parse::RecDescent::_tracefirst($_[1]),
q{undef},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{undef});
%item = (__RULE__ => q{undef});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(undef|undefine)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{undef},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(undef|undefine)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{undef},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying terminal: [/\\$?[a-zA-Z_][a-zA-Z0-9_]*/]}, Parse::RecDescent::_tracefirst($text),
q{undef},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{/\\$?[a-zA-Z_][a-zA-Z0-9_]*/})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\$?[a-zA-Z_][a-zA-Z0-9_]*)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN2__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{undef},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do {
[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'undefine',$item[3]];
};
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(undef|undefine)\\b/ <commit> /\\$?[a-zA-Z_][a-zA-Z0-9_]*/]<<},
Parse::RecDescent::_tracefirst($text),
q{undef},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{undef},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{undef},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{undef},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{undef},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::xpfilters
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"xpfilters"};
Parse::RecDescent::_trace(q{Trying rule: [xpfilters]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpfilters},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/(?=\\[)/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(?=\\[)/ xpfilter]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpfilters},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{xpfilters});
%item = (__RULE__ => q{xpfilters});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(?=\\[)/]}, Parse::RecDescent::_tracefirst($text),
q{xpfilters},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?=\[))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying repeated subrule: [xpfilter]},
Parse::RecDescent::_tracefirst($text),
q{xpfilters},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{xpfilter})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::xpfilter, 1, 100000000, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [xpfilter]>>},
Parse::RecDescent::_tracefirst($text),
q{xpfilters},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [xpfilter]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{xpfilters},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpfilter(s)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{xpfilters},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { join("",@{$item[2]}) };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(?=\\[)/ xpfilter]<<},
Parse::RecDescent::_tracefirst($text),
q{xpfilters},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{xpfilters},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{xpfilters},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{xpfilters},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{xpfilters},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::_alternation_1_of_production_1_of_rule_local_var
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"_alternation_1_of_production_1_of_rule_local_var"};
Parse::RecDescent::_trace(q{Trying rule: [_alternation_1_of_production_1_of_rule_local_var]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule_local_var},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/(local|my)\\s/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(local|my)\\s/]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule_local_var},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{_alternation_1_of_production_1_of_rule_local_var});
%item = (__RULE__ => q{_alternation_1_of_production_1_of_rule_local_var});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(local|my)\\s/]}, Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_local_var},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(local|my)\s)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{>>Matched production: [/(local|my)\\s/]<<},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_local_var},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule_local_var},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{_alternation_1_of_production_1_of_rule_local_var},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{_alternation_1_of_production_1_of_rule_local_var},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{_alternation_1_of_production_1_of_rule_local_var},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::loc
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"loc"};
Parse::RecDescent::_trace(q{Trying rule: [loc]},
Parse::RecDescent::_tracefirst($_[1]),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/after\\s/, or /before\\s/, or /(in)?to\\s/, or /(append(ing)?|as\\s+(a\\s+)child(\\s+of)?)\\s/, or /(prepend(ing)?|(as\\s+)(the\\s+)first(\\s+child(\\s+of)?)?)\\s/, or /(replace|instead( of)?)\\s/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/after\\s/]},
Parse::RecDescent::_tracefirst($_[1]),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{loc});
%item = (__RULE__ => q{loc});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/after\\s/]}, Parse::RecDescent::_tracefirst($text),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:after\s)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { "after" };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/after\\s/]<<},
Parse::RecDescent::_tracefirst($text),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/before\\s/]},
Parse::RecDescent::_tracefirst($_[1]),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{loc});
%item = (__RULE__ => q{loc});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/before\\s/]}, Parse::RecDescent::_tracefirst($text),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:before\s)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { "before" };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/before\\s/]<<},
Parse::RecDescent::_tracefirst($text),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(in)?to\\s/]},
Parse::RecDescent::_tracefirst($_[1]),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[2];
$text = $_[1];
my $_savetext;
@item = (q{loc});
%item = (__RULE__ => q{loc});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(in)?to\\s/]}, Parse::RecDescent::_tracefirst($text),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(in)?to\s)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { "into" };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(in)?to\\s/]<<},
Parse::RecDescent::_tracefirst($text),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(append(ing)?|as\\s+(a\\s+)child(\\s+of)?)\\s/]},
Parse::RecDescent::_tracefirst($_[1]),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[3];
$text = $_[1];
my $_savetext;
@item = (q{loc});
%item = (__RULE__ => q{loc});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(append(ing)?|as\\s+(a\\s+)child(\\s+of)?)\\s/]}, Parse::RecDescent::_tracefirst($text),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(append(ing)?|as\s+(a\s+)child(\s+of)?)\s)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { "append" };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(append(ing)?|as\\s+(a\\s+)child(\\s+of)?)\\s/]<<},
Parse::RecDescent::_tracefirst($text),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(prepend(ing)?|(as\\s+)(the\\s+)first(\\s+child(\\s+of)?)?)\\s/]},
Parse::RecDescent::_tracefirst($_[1]),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[4];
$text = $_[1];
my $_savetext;
@item = (q{loc});
%item = (__RULE__ => q{loc});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(prepend(ing)?|(as\\s+)(the\\s+)first(\\s+child(\\s+of)?)?)\\s/]}, Parse::RecDescent::_tracefirst($text),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(prepend(ing)?|(as\s+)(the\s+)first(\s+child(\s+of)?)?)\s)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { "prepend" };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(prepend(ing)?|(as\\s+)(the\\s+)first(\\s+child(\\s+of)?)?)\\s/]<<},
Parse::RecDescent::_tracefirst($text),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(replace|instead( of)?)\\s/]},
Parse::RecDescent::_tracefirst($_[1]),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[5];
$text = $_[1];
my $_savetext;
@item = (q{loc});
%item = (__RULE__ => q{loc});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(replace|instead( of)?)\\s/]}, Parse::RecDescent::_tracefirst($text),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(replace|instead( of)?)\s)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { "replace" };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(replace|instead( of)?)\\s/]<<},
Parse::RecDescent::_tracefirst($text),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{loc},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{loc},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{loc},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{loc},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::eof
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"eof"};
Parse::RecDescent::_trace(q{Trying rule: [eof]},
Parse::RecDescent::_tracefirst($_[1]),
q{eof},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/\\Z/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/\\Z/]},
Parse::RecDescent::_tracefirst($_[1]),
q{eof},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{eof});
%item = (__RULE__ => q{eof});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/\\Z/]}, Parse::RecDescent::_tracefirst($text),
q{eof},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\Z)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{eof},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { 1; };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/\\Z/]<<},
Parse::RecDescent::_tracefirst($text),
q{eof},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{eof},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{eof},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{eof},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{eof},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::nodetype
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"nodetype"};
Parse::RecDescent::_trace(q{Trying rule: [nodetype]},
Parse::RecDescent::_tracefirst($_[1]),
q{nodetype},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/element|attribute|attributes|text|cdata|pi|comment|chunk|entity_reference/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/element|attribute|attributes|text|cdata|pi|comment|chunk|entity_reference/]},
Parse::RecDescent::_tracefirst($_[1]),
q{nodetype},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{nodetype});
%item = (__RULE__ => q{nodetype});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/element|attribute|attributes|text|cdata|pi|comment|chunk|entity_reference/]}, Parse::RecDescent::_tracefirst($text),
q{nodetype},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:element|attribute|attributes|text|cdata|pi|comment|chunk|entity_reference)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{>>Matched production: [/element|attribute|attributes|text|cdata|pi|comment|chunk|entity_reference/]<<},
Parse::RecDescent::_tracefirst($text),
q{nodetype},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{nodetype},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{nodetype},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{nodetype},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{nodetype},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::xpcont
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"xpcont"};
Parse::RecDescent::_trace(q{Trying rule: [xpcont]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{xpfilters, or xpbrackets, or xpath});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
local $skip = defined($skip) ? $skip : $Parse::RecDescent::skip;
Parse::RecDescent::_trace(q{Trying production: [xpfilters, or xpbrackets <skip:""> xpath]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{xpcont});
%item = (__RULE__ => q{xpcont});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [_alternation_1_of_production_1_of_rule_xpcont]},
Parse::RecDescent::_tracefirst($text),
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::_alternation_1_of_production_1_of_rule_xpcont($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [_alternation_1_of_production_1_of_rule_xpcont]>>},
Parse::RecDescent::_tracefirst($text),
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [_alternation_1_of_production_1_of_rule_xpcont]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
$item{q{_alternation_1_of_production_1_of_rule_xpcont}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying directive: [<skip:"">]},
Parse::RecDescent::_tracefirst($text),
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { my $oldskip = $skip; $skip=""; $oldskip };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying repeated subrule: [xpath]},
Parse::RecDescent::_tracefirst($text),
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{xpath})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::xpath, 0, 1, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [xpath]>>},
Parse::RecDescent::_tracefirst($text),
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [xpath]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpath(?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { $item[1].join("",@{$item[3]}) };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [xpfilters, or xpbrackets <skip:""> xpath]<<},
Parse::RecDescent::_tracefirst($text),
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [xpath]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{xpcont});
%item = (__RULE__ => q{xpcont});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [xpath]},
Parse::RecDescent::_tracefirst($text),
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::xpath($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [xpath]>>},
Parse::RecDescent::_tracefirst($text),
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [xpath]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpath}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { $item[1] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [xpath]<<},
Parse::RecDescent::_tracefirst($text),
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{xpcont},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{xpcont},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{xpcont},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::stream_select
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"stream_select"};
Parse::RecDescent::_trace(q{Trying rule: [stream_select]},
Parse::RecDescent::_tracefirst($_[1]),
q{stream_select},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/select\\s/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/select\\s/ xpath block]},
Parse::RecDescent::_tracefirst($_[1]),
q{stream_select},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{stream_select});
%item = (__RULE__ => q{stream_select});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/select\\s/]}, Parse::RecDescent::_tracefirst($text),
q{stream_select},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:select\s)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [xpath]},
Parse::RecDescent::_tracefirst($text),
q{stream_select},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{xpath})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::xpath($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [xpath]>>},
Parse::RecDescent::_tracefirst($text),
q{stream_select},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [xpath]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{stream_select},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpath}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying subrule: [block]},
Parse::RecDescent::_tracefirst($text),
q{stream_select},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [block]>>},
Parse::RecDescent::_tracefirst($text),
q{stream_select},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{stream_select},
$tracelevel)
if defined $::RD_TRACE;
$item{q{block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{stream_select},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$item[2],$item[3]] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/select\\s/ xpath block]<<},
Parse::RecDescent::_tracefirst($text),
q{stream_select},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{stream_select},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{stream_select},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{stream_select},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{stream_select},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::ID
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"ID"};
Parse::RecDescent::_trace(q{Trying rule: [ID]},
Parse::RecDescent::_tracefirst($_[1]),
q{ID},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/[a-zA-Z_][a-zA-Z0-9_]*/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/[a-zA-Z_][a-zA-Z0-9_]*/]},
Parse::RecDescent::_tracefirst($_[1]),
q{ID},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{ID});
%item = (__RULE__ => q{ID});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/[a-zA-Z_][a-zA-Z0-9_]*/]}, Parse::RecDescent::_tracefirst($text),
q{ID},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[a-zA-Z_][a-zA-Z0-9_]*)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{>>Matched production: [/[a-zA-Z_][a-zA-Z0-9_]*/]<<},
Parse::RecDescent::_tracefirst($text),
q{ID},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{ID},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{ID},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{ID},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{ID},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::variable
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"variable"};
Parse::RecDescent::_trace(q{Trying rule: [variable]},
Parse::RecDescent::_tracefirst($_[1]),
q{variable},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/\\$[a-zA-Z_][a-zA-Z0-9_]*/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/\\$[a-zA-Z_][a-zA-Z0-9_]*/]},
Parse::RecDescent::_tracefirst($_[1]),
q{variable},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{variable});
%item = (__RULE__ => q{variable});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/\\$[a-zA-Z_][a-zA-Z0-9_]*/]}, Parse::RecDescent::_tracefirst($text),
q{variable},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\$[a-zA-Z_][a-zA-Z0-9_]*)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{>>Matched production: [/\\$[a-zA-Z_][a-zA-Z0-9_]*/]<<},
Parse::RecDescent::_tracefirst($text),
q{variable},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{variable},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{variable},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{variable},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{variable},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::xpstep
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"xpstep"};
Parse::RecDescent::_trace(q{Trying rule: [xpstep]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpstep},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{xplocationstep});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
local $skip = defined($skip) ? $skip : $Parse::RecDescent::skip;
Parse::RecDescent::_trace(q{Trying production: [xplocationstep <skip:""> xpfilter]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpstep},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{xpstep});
%item = (__RULE__ => q{xpstep});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [xplocationstep]},
Parse::RecDescent::_tracefirst($text),
q{xpstep},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::xplocationstep($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [xplocationstep]>>},
Parse::RecDescent::_tracefirst($text),
q{xpstep},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [xplocationstep]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{xpstep},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xplocationstep}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying directive: [<skip:"">]},
Parse::RecDescent::_tracefirst($text),
q{xpstep},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { my $oldskip = $skip; $skip=""; $oldskip };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying repeated subrule: [xpfilter]},
Parse::RecDescent::_tracefirst($text),
q{xpstep},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{xpfilter})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::xpfilter, 0, 1, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [xpfilter]>>},
Parse::RecDescent::_tracefirst($text),
q{xpstep},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [xpfilter]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{xpstep},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpfilter(?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{xpstep},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [ @{$item[1]}, @{$item[3]}] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [xplocationstep <skip:""> xpfilter]<<},
Parse::RecDescent::_tracefirst($text),
q{xpstep},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{xpstep},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{xpstep},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{xpstep},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{xpstep},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::xpaxis
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"xpaxis"};
Parse::RecDescent::_trace(q{Trying rule: [xpaxis]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpaxis},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/[-a-z]+::/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/[-a-z]+::/]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpaxis},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{xpaxis});
%item = (__RULE__ => q{xpaxis});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/[-a-z]+::/]}, Parse::RecDescent::_tracefirst($text),
q{xpaxis},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[-a-z]+::)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{>>Matched production: [/[-a-z]+::/]<<},
Parse::RecDescent::_tracefirst($text),
q{xpaxis},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{xpaxis},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{xpaxis},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{xpaxis},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{xpaxis},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::local_var
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"local_var"};
Parse::RecDescent::_trace(q{Trying rule: [local_var]},
Parse::RecDescent::_tracefirst($_[1]),
q{local_var},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/(local|my)\\s/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(local|my)\\s/ variable]},
Parse::RecDescent::_tracefirst($_[1]),
q{local_var},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{local_var});
%item = (__RULE__ => q{local_var});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying repeated subrule: [/(local|my)\\s/]},
Parse::RecDescent::_tracefirst($text),
q{local_var},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::_alternation_1_of_production_1_of_rule_local_var, 0, 1, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [/(local|my)\\s/]>>},
Parse::RecDescent::_tracefirst($text),
q{local_var},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [_alternation_1_of_production_1_of_rule_local_var]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{local_var},
$tracelevel)
if defined $::RD_TRACE;
$item{q{_alternation_1_of_production_1_of_rule_local_var(?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying subrule: [variable]},
Parse::RecDescent::_tracefirst($text),
q{local_var},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{variable})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::variable($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [variable]>>},
Parse::RecDescent::_tracefirst($text),
q{local_var},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [variable]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{local_var},
$tracelevel)
if defined $::RD_TRACE;
$item{q{variable}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{local_var},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$item[2],@{$item[1]}] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(local|my)\\s/ variable]<<},
Parse::RecDescent::_tracefirst($text),
q{local_var},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{local_var},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{local_var},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{local_var},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{local_var},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::xpbracket
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"xpbracket"};
Parse::RecDescent::_trace(q{Trying rule: [xpbracket]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpbracket},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{'('});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
local $skip = defined($skip) ? $skip : $Parse::RecDescent::skip;
Parse::RecDescent::_trace(q{Trying production: ['(' <skip:""> xpinter ')']},
Parse::RecDescent::_tracefirst($_[1]),
q{xpbracket},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{xpbracket});
%item = (__RULE__ => q{xpbracket});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: ['(']},
Parse::RecDescent::_tracefirst($text),
q{xpbracket},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\(/)
{
$expectation->failed();
Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__STRING1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<skip:"">]},
Parse::RecDescent::_tracefirst($text),
q{xpbracket},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { my $oldskip = $skip; $skip=""; $oldskip };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [xpinter]},
Parse::RecDescent::_tracefirst($text),
q{xpbracket},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{xpinter})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::xpinter($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [xpinter]>>},
Parse::RecDescent::_tracefirst($text),
q{xpbracket},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [xpinter]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{xpbracket},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpinter}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying terminal: [')']},
Parse::RecDescent::_tracefirst($text),
q{xpbracket},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{')'})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\)/)
{
$expectation->failed();
Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__STRING2__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{xpbracket},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { "($item[3])" };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: ['(' <skip:""> xpinter ')']<<},
Parse::RecDescent::_tracefirst($text),
q{xpbracket},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{xpbracket},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{xpbracket},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{xpbracket},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{xpbracket},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::complex_command
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"complex_command"};
Parse::RecDescent::_trace(q{Trying rule: [complex_command]},
Parse::RecDescent::_tracefirst($_[1]),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/(?=\\s*[\{\}]|\\s*\\Z)/, or /\\s*;/, or /(?=(?:foreach|for|if|unless|iterate|while|try|def|define)\\b)/, or command});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(?=\\s*[\{\}]|\\s*\\Z)/ <commit> <reject>]},
Parse::RecDescent::_tracefirst($_[1]),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{complex_command});
%item = (__RULE__ => q{complex_command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(?=\\s*[\{\}]|\\s*\\Z)/]}, Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?=\s*[{}]|\s*\Z))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{>>Rejecting production<< (found <reject>)},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
undef $return;
$_tok = undef;
last unless defined $_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(?=\\s*[\{\}]|\\s*\\Z)/ <commit> <reject>]<<},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/\\s*;/ <commit>]},
Parse::RecDescent::_tracefirst($_[1]),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{complex_command});
%item = (__RULE__ => q{complex_command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/\\s*;/]}, Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\s*;)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/\\s*;/ <commit>]<<},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(?=(?:foreach|for|if|unless|iterate|while|try|def|define)\\b)/ statement <commit> trail]},
Parse::RecDescent::_tracefirst($_[1]),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[2];
$text = $_[1];
my $_savetext;
@item = (q{complex_command});
%item = (__RULE__ => q{complex_command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(?=(?:foreach|for|if|unless|iterate|while|try|def|define)\\b)/]}, Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?=(?:foreach|for|if|unless|iterate|while|try|def|define)\b))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [statement]},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{statement})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::statement($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [statement]>>},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [statement]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{statement}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying repeated subrule: [trail]},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{trail})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::trail, 0, 1, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [trail]>>},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [trail]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{trail(?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do {
if (scalar(@{$item[4]})) {
if ($item[4][0][0] eq 'pipe') {
$return=[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'pipe_command',[$item[2]],$item[4][0][1]]
} else {
$return=[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'string_pipe_command',[$item[2]],$item[4][0][1]]
}
} else {
$return=$item[2]
}
};
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(?=(?:foreach|for|if|unless|iterate|while|try|def|define)\\b)/ statement <commit> trail]<<},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [command <commit> trail /\\s*;|(?=\\s*\}|\\s*\\Z)/]},
Parse::RecDescent::_tracefirst($_[1]),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[3];
$text = $_[1];
my $_savetext;
@item = (q{complex_command});
%item = (__RULE__ => q{complex_command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [command]},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::command($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [command]>>},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [command]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{command}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying repeated subrule: [trail]},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{trail})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::trail, 0, 1, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [trail]>>},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [trail]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{trail(?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying terminal: [/\\s*;|(?=\\s*\}|\\s*\\Z)/]}, Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{/\\s*;|(?=\\s*\}|\\s*\\Z)/})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\s*;|(?=\s*}|\s*\Z))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do {
if (scalar(@{$item[3]})) {
if ($item[3][0][0] eq 'pipe') {
$return=[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'pipe_command',[$item[1]],$item[3][0][1]]
} else {
$return=[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'string_pipe_command',[$item[1]],$item[3][0][1]]
}
} else {
$return=$item[1]
}
};
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [command <commit> trail /\\s*;|(?=\\s*\}|\\s*\\Z)/]<<},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched)
{
Parse::RecDescent::_trace(q{Trying production: [<error...>]},
Parse::RecDescent::_tracefirst($_[1]),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[4];
my $_savetext;
@item = (q{complex_command});
%item = (__RULE__ => q{complex_command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying directive: [<error...>]},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { if (1) { do {push @{$thisparser->{errors}}, [qq{Parse error near: "}.substr($text,0,40).qq{ ..."},$thisline];} unless $_noactions; undef } else {0} };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [<error...>]<<},
Parse::RecDescent::_tracefirst($text),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{complex_command},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{complex_command},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{complex_command},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::enc_string
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"enc_string"};
Parse::RecDescent::_trace(q{Trying rule: [enc_string]},
Parse::RecDescent::_tracefirst($_[1]),
q{enc_string},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{exp});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [exp]},
Parse::RecDescent::_tracefirst($_[1]),
q{enc_string},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{enc_string});
%item = (__RULE__ => q{enc_string});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [exp]},
Parse::RecDescent::_tracefirst($text),
q{enc_string},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [exp]>>},
Parse::RecDescent::_tracefirst($text),
q{enc_string},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [exp]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{enc_string},
$tracelevel)
if defined $::RD_TRACE;
$item{q{exp}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{>>Matched production: [exp]<<},
Parse::RecDescent::_tracefirst($text),
q{enc_string},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{enc_string},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{enc_string},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{enc_string},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{enc_string},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::xpsimple
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"xpsimple"};
Parse::RecDescent::_trace(q{Trying rule: [xpsimple]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpsimple},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/(?:
\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\) ) \\\} |
\\$(?!\\\{) |
[^-:\\$\\[\\]\{\}|"'\\ \\s();] |
-[^-\\[\\]\{\}|"'\\ \\s();]
)
(?:
\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\) ) \\\} |
\\$(?!\\\{) |
[^\\[\\]\\$\{\}|"'\\ \\s();]
)*/x, or xpbrackets});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(?:
\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\) ) \\\} |
\\$(?!\\\{) |
[^-:\\$\\[\\]\{\}|"'\\ \\s();] |
-[^-\\[\\]\{\}|"'\\ \\s();]
)
(?:
\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\) ) \\\} |
\\$(?!\\\{) |
[^\\[\\]\\$\{\}|"'\\ \\s();]
)*/x]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpsimple},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{xpsimple});
%item = (__RULE__ => q{xpsimple});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(?:
\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\) ) \\\} |
\\$(?!\\\{) |
[^-:\\$\\[\\]\{\}|"'\\ \\s();] |
-[^-\\[\\]\{\}|"'\\ \\s();]
)
(?:
\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\) ) \\\} |
\\$(?!\\\{) |
[^\\[\\]\\$\{\}|"'\\ \\s();]
)*/x]}, Parse::RecDescent::_tracefirst($text),
q{xpsimple},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?:
\$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} |
\$(?!\{) |
[^-:\$\[\]{}|"'\ \s();] |
-[^-\[\]{}|"'\ \s();]
)
(?:
\$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} |
\$(?!\{) |
[^\[\]\${}|"'\ \s();]
)*)/x)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{>>Matched production: [/(?:
\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\) ) \\\} |
\\$(?!\\\{) |
[^-:\\$\\[\\]\{\}|"'\\ \\s();] |
-[^-\\[\\]\{\}|"'\\ \\s();]
)
(?:
\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\) ) \\\} |
\\$(?!\\\{) |
[^\\[\\]\\$\{\}|"'\\ \\s();]
)*/x]<<},
Parse::RecDescent::_tracefirst($text),
q{xpsimple},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [xpbrackets]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpsimple},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{xpsimple});
%item = (__RULE__ => q{xpsimple});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [xpbrackets]},
Parse::RecDescent::_tracefirst($text),
q{xpsimple},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::xpbrackets($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [xpbrackets]>>},
Parse::RecDescent::_tracefirst($text),
q{xpsimple},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [xpbrackets]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{xpsimple},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpbrackets}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{>>Matched production: [xpbrackets]<<},
Parse::RecDescent::_tracefirst($text),
q{xpsimple},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{xpsimple},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{xpsimple},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{xpsimple},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{xpsimple},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::shell
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"shell"};
Parse::RecDescent::_trace(q{Trying rule: [shell]},
Parse::RecDescent::_tracefirst($_[1]),
q{shell},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/!\\s*/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/!\\s*/ <commit> /.*/]},
Parse::RecDescent::_tracefirst($_[1]),
q{shell},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{shell});
%item = (__RULE__ => q{shell});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/!\\s*/]}, Parse::RecDescent::_tracefirst($text),
q{shell},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:!\s*)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{shell},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying terminal: [/.*/]}, Parse::RecDescent::_tracefirst($text),
q{shell},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{/.*/})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:.*)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN2__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{shell},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'sh_noev',$item[3]]] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/!\\s*/ <commit> /.*/]<<},
Parse::RecDescent::_tracefirst($text),
q{shell},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched)
{
Parse::RecDescent::_trace(q{Trying production: [<error?:...> <reject>]},
Parse::RecDescent::_tracefirst($_[1]),
q{shell},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
my $_savetext;
@item = (q{shell});
%item = (__RULE__ => q{shell});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying directive: [<error?:...>]},
Parse::RecDescent::_tracefirst($text),
q{shell},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { if ($commit) { do {push @{$thisparser->{errors}}, [qq{Parse error near: "! }.substr($text,0,40).qq{ ..."},$thisline];} unless $_noactions; undef } else {0} };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{>>Rejecting production<< (found <reject>)},
Parse::RecDescent::_tracefirst($text),
q{shell},
$tracelevel)
if defined $::RD_TRACE;
undef $return;
$_tok = undef;
last unless defined $_tok;
Parse::RecDescent::_trace(q{>>Matched production: [<error?:...> <reject>]<<},
Parse::RecDescent::_tracefirst($text),
q{shell},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{shell},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{shell},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{shell},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{shell},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::_alternation_1_of_production_2_of_rule_command
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"_alternation_1_of_production_2_of_rule_command"};
Parse::RecDescent::_trace(q{Trying rule: [_alternation_1_of_production_2_of_rule_command]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?=/, or /\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:=/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?=/ <commit> loose_exp]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{_alternation_1_of_production_2_of_rule_command});
%item = (__RULE__ => q{_alternation_1_of_production_2_of_rule_command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?=/]}, Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?:[\-\+\*\/%x.]|\|\||\&\&)?=)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [loose_exp]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{loose_exp})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::loose_exp($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [loose_exp]>>},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [loose_exp]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{loose_exp}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { ['xpath_assign',$item[3],$item[1]] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?=/ <commit> loose_exp]<<},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:=/ command]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{_alternation_1_of_production_2_of_rule_command});
%item = (__RULE__ => q{_alternation_1_of_production_2_of_rule_command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:=/]}, Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\s*(?:[\-\+\*\/%x.]|\|\||\&\&)?:=)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [command]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{command})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::command($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [command]>>},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [command]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{command}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { ['command_assign',$item[2],$item[1]] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:=/ command]<<},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{_alternation_1_of_production_2_of_rule_command},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{_alternation_1_of_production_2_of_rule_command},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::option
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"option"};
Parse::RecDescent::_trace(q{Trying rule: [option]},
Parse::RecDescent::_tracefirst($_[1]),
q{option},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/:[[:alnum:]]|--[-_[:alnum:]]+/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/:[[:alnum:]]|--[-_[:alnum:]]+/]},
Parse::RecDescent::_tracefirst($_[1]),
q{option},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{option});
%item = (__RULE__ => q{option});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/:[[:alnum:]]|--[-_[:alnum:]]+/]}, Parse::RecDescent::_tracefirst($text),
q{option},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?::[[:alnum:]]|--[-_[:alnum:]]+)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{>>Matched production: [/:[[:alnum:]]|--[-_[:alnum:]]+/]<<},
Parse::RecDescent::_tracefirst($text),
q{option},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{option},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{option},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{option},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{option},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::shline_inter
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"shline_inter"};
Parse::RecDescent::_trace(q{Trying rule: [shline_inter]},
Parse::RecDescent::_tracefirst($_[1]),
q{shline_inter},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/([^()\\\\"']|\\\\.|\\"([^\\"\\\\]|\\\\.)*\\"|\\'([^\\'\\\\]|\\\\\\'|\\\\\\\\|\\\\[^\\'\\\\])*\\')*/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/([^()\\\\"']|\\\\.|\\"([^\\"\\\\]|\\\\.)*\\"|\\'([^\\'\\\\]|\\\\\\'|\\\\\\\\|\\\\[^\\'\\\\])*\\')*/]},
Parse::RecDescent::_tracefirst($_[1]),
q{shline_inter},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{shline_inter});
%item = (__RULE__ => q{shline_inter});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/([^()\\\\"']|\\\\.|\\"([^\\"\\\\]|\\\\.)*\\"|\\'([^\\'\\\\]|\\\\\\'|\\\\\\\\|\\\\[^\\'\\\\])*\\')*/]}, Parse::RecDescent::_tracefirst($text),
q{shline_inter},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:([^()\\"']|\\.|\"([^\"\\]|\\.)*\"|\'([^\'\\]|\\\'|\\\\|\\[^\'\\])*\')*)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{>>Matched production: [/([^()\\\\"']|\\\\.|\\"([^\\"\\\\]|\\\\.)*\\"|\\'([^\\'\\\\]|\\\\\\'|\\\\\\\\|\\\\[^\\'\\\\])*\\')*/]<<},
Parse::RecDescent::_tracefirst($text),
q{shline_inter},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{shline_inter},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{shline_inter},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{shline_inter},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{shline_inter},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::perl_expression
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"perl_expression"};
Parse::RecDescent::_trace(q{Trying rule: [perl_expression]},
Parse::RecDescent::_tracefirst($_[1]),
q{perl_expression},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{exp});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [<reject>]},
Parse::RecDescent::_tracefirst($_[1]),
q{perl_expression},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{perl_expression});
%item = (__RULE__ => q{perl_expression});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{perl_expression},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { $main::myline = $thisline; };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Rejecting production<< (found <reject>)},
Parse::RecDescent::_tracefirst($text),
q{perl_expression},
$tracelevel)
if defined $::RD_TRACE;
undef $return;
$_tok = undef;
last unless defined $_tok;
Parse::RecDescent::_trace(q{>>Matched production: [<reject>]<<},
Parse::RecDescent::_tracefirst($text),
q{perl_expression},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [exp]},
Parse::RecDescent::_tracefirst($_[1]),
q{perl_expression},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{perl_expression});
%item = (__RULE__ => q{perl_expression});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [exp]},
Parse::RecDescent::_tracefirst($text),
q{perl_expression},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [exp]>>},
Parse::RecDescent::_tracefirst($text),
q{perl_expression},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [exp]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{perl_expression},
$tracelevel)
if defined $::RD_TRACE;
$item{q{exp}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{perl_expression},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { {local $^W=0; "\n# line $main::myline \"$XML::XSH2::Functions::SCRIPT\"\n".$item[1]} };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [exp]<<},
Parse::RecDescent::_tracefirst($text),
q{perl_expression},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{perl_expression},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{perl_expression},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{perl_expression},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{perl_expression},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::command
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"command"};
Parse::RecDescent::_trace(q{Trying rule: [command]},
Parse::RecDescent::_tracefirst($_[1]),
q{command},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/(?=\\s*[\}\{;]|\\s*\\Z)/, or /assign\\b|(?:local\\b|my\\b)?(?=\\s*\\$[a-zA-Z_][a-zA-Z0-9_]*\\s*\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:?=)/, or /(my)\\b/, or /(local)\\b/, or /(do)\\b/, or /(if)\\b/, or /(unless)\\b/, or /(while)\\b/, or /(foreach|for)\\b/, or /(stream)\\b/, or /(undef|undefine)\\b/, or /(use)\\b/, or /(test-mode|test_mode)/, or /(run-mode|run_mode)/, or /(?!(?:iterate|try|def|define)\\b)/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(?=\\s*[\}\{;]|\\s*\\Z)/ <commit> <reject>]},
Parse::RecDescent::_tracefirst($_[1]),
q{command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{command});
%item = (__RULE__ => q{command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(?=\\s*[\}\{;]|\\s*\\Z)/]}, Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?=\s*[}{;]|\s*\Z))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{>>Rejecting production<< (found <reject>)},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
undef $return;
$_tok = undef;
last unless defined $_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(?=\\s*[\}\{;]|\\s*\\Z)/ <commit> <reject>]<<},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/assign\\b|(?:local\\b|my\\b)?(?=\\s*\\$[a-zA-Z_][a-zA-Z0-9_]*\\s*\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:?=)/ <commit> variable /(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?=/, or /\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:=/]},
Parse::RecDescent::_tracefirst($_[1]),
q{command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{command});
%item = (__RULE__ => q{command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/assign\\b|(?:local\\b|my\\b)?(?=\\s*\\$[a-zA-Z_][a-zA-Z0-9_]*\\s*\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:?=)/]}, Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:assign\b|(?:local\b|my\b)?(?=\s*\$[a-zA-Z_][a-zA-Z0-9_]*\s*\s*(?:[\-\+\*\/%x.]|\|\||\&\&)?:?=))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [variable]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{variable})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::variable($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [variable]>>},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [variable]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{variable}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying subrule: [_alternation_1_of_production_2_of_rule_command]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{/(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?=/, or /\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:=/})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::_alternation_1_of_production_2_of_rule_command($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [_alternation_1_of_production_2_of_rule_command]>>},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [_alternation_1_of_production_2_of_rule_command]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{_alternation_1_of_production_2_of_rule_command}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,@{$item[4]},$item[1],$item[3]] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/assign\\b|(?:local\\b|my\\b)?(?=\\s*\\$[a-zA-Z_][a-zA-Z0-9_]*\\s*\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:?=)/ <commit> variable /(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?=/, or /\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:=/]<<},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(my)\\b/ variable]},
Parse::RecDescent::_tracefirst($_[1]),
q{command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[2];
$text = $_[1];
my $_savetext;
@item = (q{command});
%item = (__RULE__ => q{command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(my)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(my)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying repeated subrule: [variable]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{variable})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::variable, 1, 100000000, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [variable]>>},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [variable]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{variable(s)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'store_lex_variables',0,@{$item[2]}] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(my)\\b/ variable]<<},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(local)\\b/ variable]},
Parse::RecDescent::_tracefirst($_[1]),
q{command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[3];
$text = $_[1];
my $_savetext;
@item = (q{command});
%item = (__RULE__ => q{command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(local)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(local)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying repeated subrule: [variable]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{variable})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::variable, 1, 100000000, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [variable]>>},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [variable]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{variable(s)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'make_local',@{$item[2]}] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(local)\\b/ variable]<<},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(do)\\b/ <commit> block]},
Parse::RecDescent::_tracefirst($_[1]),
q{command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[4];
$text = $_[1];
my $_savetext;
@item = (q{command});
%item = (__RULE__ => q{command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(do)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(do)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [block]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [block]>>},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'run_commands',$item[3],0] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(do)\\b/ <commit> block]<<},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(if)\\b/ <commit> exp command]},
Parse::RecDescent::_tracefirst($_[1]),
q{command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[5];
$text = $_[1];
my $_savetext;
@item = (q{command});
%item = (__RULE__ => q{command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(if)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(if)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [exp]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{exp})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [exp]>>},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [exp]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{exp}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying subrule: [command]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{command})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::command($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [command]>>},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [command]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{command}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'if_statement',[$item[3],[$item[4]]]] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(if)\\b/ <commit> exp command]<<},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(unless)\\b/ <commit> exp command]},
Parse::RecDescent::_tracefirst($_[1]),
q{command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[6];
$text = $_[1];
my $_savetext;
@item = (q{command});
%item = (__RULE__ => q{command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(unless)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(unless)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [exp]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{exp})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [exp]>>},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [exp]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{exp}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying subrule: [command]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{command})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::command($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [command]>>},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [command]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{command}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'unless_statement',$item[3],[$item[4]]] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(unless)\\b/ <commit> exp command]<<},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(while)\\b/ <commit> exp command]},
Parse::RecDescent::_tracefirst($_[1]),
q{command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[7];
$text = $_[1];
my $_savetext;
@item = (q{command});
%item = (__RULE__ => q{command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(while)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(while)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [exp]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{exp})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [exp]>>},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [exp]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{exp}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying subrule: [command]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{command})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::command($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [command]>>},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [command]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{command}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'while_statement',$item[3],[$item[4]]] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(while)\\b/ <commit> exp command]<<},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(foreach|for)\\b/ <commit> local_var_in exp command]},
Parse::RecDescent::_tracefirst($_[1]),
q{command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[8];
$text = $_[1];
my $_savetext;
@item = (q{command});
%item = (__RULE__ => q{command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(foreach|for)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(foreach|for)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying repeated subrule: [local_var_in]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{local_var_in})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::local_var_in, 0, 1, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [local_var_in]>>},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [local_var_in]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{local_var_in(?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying subrule: [exp]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{exp})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [exp]>>},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [exp]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{exp}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying subrule: [command]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{command})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::command($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [command]>>},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [command]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{command}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'foreach_statement',$item[4],[$item[5]],@{$item[3]}] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(foreach|for)\\b/ <commit> local_var_in exp command]<<},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(stream)\\b/ <commit> /--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/ stream_select]},
Parse::RecDescent::_tracefirst($_[1]),
q{command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[9];
$text = $_[1];
my $_savetext;
@item = (q{command});
%item = (__RULE__ => q{command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(stream)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(stream)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [_alternation_1_of_production_10_of_rule_command]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{/--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::_alternation_1_of_production_10_of_rule_command($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [_alternation_1_of_production_10_of_rule_command]>>},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [_alternation_1_of_production_10_of_rule_command]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{_alternation_1_of_production_10_of_rule_command}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying repeated subrule: [stream_select]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{stream_select})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::stream_select, 1, 100000000, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [stream_select]>>},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [stream_select]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{stream_select(s)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'stream_process',$item[3],$item[4]] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(stream)\\b/ <commit> /--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/ stream_select]<<},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(undef|undefine)\\b/ <commit> /\\$?[a-zA-Z_][a-zA-Z0-9_]*/]},
Parse::RecDescent::_tracefirst($_[1]),
q{command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[10];
$text = $_[1];
my $_savetext;
@item = (q{command});
%item = (__RULE__ => q{command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(undef|undefine)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(undef|undefine)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying terminal: [/\\$?[a-zA-Z_][a-zA-Z0-9_]*/]}, Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{/\\$?[a-zA-Z_][a-zA-Z0-9_]*/})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\$?[a-zA-Z_][a-zA-Z0-9_]*)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN2__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do {
[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'undefine',$item[3]];
};
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(undef|undefine)\\b/ <commit> /\\$?[a-zA-Z_][a-zA-Z0-9_]*/]<<},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(use)\\b/ <commit> /XML::XSH2::(?:Inline|Compile)/]},
Parse::RecDescent::_tracefirst($_[1]),
q{command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[11];
$text = $_[1];
my $_savetext;
@item = (q{command});
%item = (__RULE__ => q{command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(use)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(use)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying terminal: [/XML::XSH2::(?:Inline|Compile)/]}, Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{/XML::XSH2::(?:Inline|Compile)/})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:XML::XSH2::(?:Inline|Compile))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN2__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { 1 };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(use)\\b/ <commit> /XML::XSH2::(?:Inline|Compile)/]<<},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(test-mode|test_mode)/]},
Parse::RecDescent::_tracefirst($_[1]),
q{command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[12];
$text = $_[1];
my $_savetext;
@item = (q{command});
%item = (__RULE__ => q{command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(test-mode|test_mode)/]}, Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(test-mode|test_mode))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,"test-mode"] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(test-mode|test_mode)/]<<},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(run-mode|run_mode)/]},
Parse::RecDescent::_tracefirst($_[1]),
q{command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[13];
$text = $_[1];
my $_savetext;
@item = (q{command});
%item = (__RULE__ => q{command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(run-mode|run_mode)/]}, Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(run-mode|run_mode))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,"run-mode"] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(run-mode|run_mode)/]<<},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(?!(?:iterate|try|def|define)\\b)/ /\\.|[a-zA-Z_][-a-zA-Z0-9_]*/ exp_or_opt]},
Parse::RecDescent::_tracefirst($_[1]),
q{command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[14];
$text = $_[1];
my $_savetext;
@item = (q{command});
%item = (__RULE__ => q{command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(?!(?:iterate|try|def|define)\\b)/]}, Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?!(?:iterate|try|def|define)\b))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying terminal: [/\\.|[a-zA-Z_][-a-zA-Z0-9_]*/]}, Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{/\\.|[a-zA-Z_][-a-zA-Z0-9_]*/})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\.|[a-zA-Z_][-a-zA-Z0-9_]*)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN2__}=$current_match;
Parse::RecDescent::_trace(q{Trying repeated subrule: [exp_or_opt]},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{exp_or_opt})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::exp_or_opt, 0, 100000000, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [exp_or_opt]>>},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [exp_or_opt]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{exp_or_opt(s?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do {
bless
[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,$item[2],@{$item[3]}],
'XML::XSH2::Command'
};
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(?!(?:iterate|try|def|define)\\b)/ /\\.|[a-zA-Z_][-a-zA-Z0-9_]*/ exp_or_opt]<<},
Parse::RecDescent::_tracefirst($text),
q{command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{command},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{command},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{command},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{command},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::else_block
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"else_block"};
Parse::RecDescent::_trace(q{Trying rule: [else_block]},
Parse::RecDescent::_tracefirst($_[1]),
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/(else)\\b/, or /(?!else)/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(else)\\b/ <commit> block]},
Parse::RecDescent::_tracefirst($_[1]),
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{else_block});
%item = (__RULE__ => q{else_block});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(else)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(else)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [block]},
Parse::RecDescent::_tracefirst($text),
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [block]>>},
Parse::RecDescent::_tracefirst($text),
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
$item{q{block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [[undef,$item[3]]] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(else)\\b/ <commit> block]<<},
Parse::RecDescent::_tracefirst($text),
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(?!else)/]},
Parse::RecDescent::_tracefirst($_[1]),
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{else_block});
%item = (__RULE__ => q{else_block});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(?!else)/]}, Parse::RecDescent::_tracefirst($text),
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?!else))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(?!else)/]<<},
Parse::RecDescent::_tracefirst($text),
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched)
{
Parse::RecDescent::_trace(q{Trying production: [<uncommit> <error...>]},
Parse::RecDescent::_tracefirst($_[1]),
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[2];
$text = $_[1];
my $_savetext;
@item = (q{else_block});
%item = (__RULE__ => q{else_block});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying directive: [<uncommit>]},
Parse::RecDescent::_tracefirst($text),
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit=0;1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying directive: [<error...>]},
Parse::RecDescent::_tracefirst($text),
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { if (1) { do {push @{$thisparser->{errors}}, [qq{Parse error near keyword else: "}.substr($text,0,40).qq{ ..."},$thisline];} unless $_noactions; undef } else {0} };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE2__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [<uncommit> <error...>]<<},
Parse::RecDescent::_tracefirst($text),
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{else_block},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{else_block},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{else_block},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::xpfilter
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"xpfilter"};
Parse::RecDescent::_trace(q{Trying rule: [xpfilter]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpfilter},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{'['});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: ['[' xpinter ']']},
Parse::RecDescent::_tracefirst($_[1]),
q{xpfilter},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{xpfilter});
%item = (__RULE__ => q{xpfilter});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: ['[']},
Parse::RecDescent::_tracefirst($text),
q{xpfilter},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\[/)
{
$expectation->failed();
Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__STRING1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [xpinter]},
Parse::RecDescent::_tracefirst($text),
q{xpfilter},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{xpinter})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::xpinter($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [xpinter]>>},
Parse::RecDescent::_tracefirst($text),
q{xpfilter},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [xpinter]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{xpfilter},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpinter}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying terminal: [']']},
Parse::RecDescent::_tracefirst($text),
q{xpfilter},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{']'})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\]/)
{
$expectation->failed();
Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__STRING2__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{xpfilter},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { "[$item[2]]" };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: ['[' xpinter ']']<<},
Parse::RecDescent::_tracefirst($text),
q{xpfilter},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{xpfilter},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{xpfilter},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{xpfilter},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{xpfilter},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::_alternation_1_of_production_10_of_rule_command
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"_alternation_1_of_production_10_of_rule_command"};
Parse::RecDescent::_trace(q{Trying rule: [_alternation_1_of_production_10_of_rule_command]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{_alternation_1_of_production_10_of_rule_command});
%item = (__RULE__ => q{_alternation_1_of_production_10_of_rule_command});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying repeated subrule: [/--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command, 0, 100000000, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [/--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/]>>},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$item{q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command(s?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [ map { @$_ } @{$item[1]} ] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/]<<},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{_alternation_1_of_production_10_of_rule_command},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{_alternation_1_of_production_10_of_rule_command},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{_alternation_1_of_production_10_of_rule_command},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::xpath
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"xpath"};
Parse::RecDescent::_trace(q{Trying rule: [xpath]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/(?=['"])/, or xpsimple});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(?=['"])/ <commit> xpstring]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{xpath});
%item = (__RULE__ => q{xpath});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(?=['"])/]}, Parse::RecDescent::_tracefirst($text),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?=['"]))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [xpstring]},
Parse::RecDescent::_tracefirst($text),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{xpstring})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::xpstring($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [xpstring]>>},
Parse::RecDescent::_tracefirst($text),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [xpstring]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpstring}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { $item[3] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(?=['"])/ <commit> xpstring]<<},
Parse::RecDescent::_tracefirst($text),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
local $skip = defined($skip) ? $skip : $Parse::RecDescent::skip;
Parse::RecDescent::_trace(q{Trying production: [xpsimple <skip:""> xpcont]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{xpath});
%item = (__RULE__ => q{xpath});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [xpsimple]},
Parse::RecDescent::_tracefirst($text),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::xpsimple($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [xpsimple]>>},
Parse::RecDescent::_tracefirst($text),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [xpsimple]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpsimple}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying directive: [<skip:"">]},
Parse::RecDescent::_tracefirst($text),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { my $oldskip = $skip; $skip=""; $oldskip };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying repeated subrule: [xpcont]},
Parse::RecDescent::_tracefirst($text),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{xpcont})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::xpcont, 0, 1, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [xpcont]>>},
Parse::RecDescent::_tracefirst($text),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [xpcont]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpcont(?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { $item[1].join("",@{$item[3]}) };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [xpsimple <skip:""> xpcont]<<},
Parse::RecDescent::_tracefirst($text),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched)
{
Parse::RecDescent::_trace(q{Trying production: [<error...>]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[2];
my $_savetext;
@item = (q{xpath});
%item = (__RULE__ => q{xpath});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying directive: [<error...>]},
Parse::RecDescent::_tracefirst($text),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { if (1) { do {push @{$thisparser->{errors}}, [qq{expected XPath, but got "}.substr($text,0,40).qq{ ..."},$thisline];} unless $_noactions; undef } else {0} };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [<error...>]<<},
Parse::RecDescent::_tracefirst($text),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{xpath},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{xpath},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{xpath},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::xpnodetest
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"xpnodetest"};
Parse::RecDescent::_trace(q{Trying rule: [xpnodetest]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpnodetest},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/node\\(\\)|text\\(\\)|comment\\(\\)|processing-instruction\\(\\s*(?:"[^"]*"\\s*|'[^'*]'\\s*)?\\)|[^\\(\\[\\/\\"\\'\\&\\;\\s]+/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/node\\(\\)|text\\(\\)|comment\\(\\)|processing-instruction\\(\\s*(?:"[^"]*"\\s*|'[^'*]'\\s*)?\\)|[^\\(\\[\\/\\"\\'\\&\\;\\s]+/]},
Parse::RecDescent::_tracefirst($_[1]),
q{xpnodetest},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{xpnodetest});
%item = (__RULE__ => q{xpnodetest});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/node\\(\\)|text\\(\\)|comment\\(\\)|processing-instruction\\(\\s*(?:"[^"]*"\\s*|'[^'*]'\\s*)?\\)|[^\\(\\[\\/\\"\\'\\&\\;\\s]+/]}, Parse::RecDescent::_tracefirst($text),
q{xpnodetest},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:node\(\)|text\(\)|comment\(\)|processing-instruction\(\s*(?:"[^"]*"\s*|'[^'*]'\s*)?\)|[^\(\[\/\"\'\&\;\s]+)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{>>Matched production: [/node\\(\\)|text\\(\\)|comment\\(\\)|processing-instruction\\(\\s*(?:"[^"]*"\\s*|'[^'*]'\\s*)?\\)|[^\\(\\[\\/\\"\\'\\&\\;\\s]+/]<<},
Parse::RecDescent::_tracefirst($text),
q{xpnodetest},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{xpnodetest},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{xpnodetest},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{xpnodetest},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{xpnodetest},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::filename
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"filename"};
Parse::RecDescent::_trace(q{Trying rule: [filename]},
Parse::RecDescent::_tracefirst($_[1]),
q{filename},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{exp});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [exp]},
Parse::RecDescent::_tracefirst($_[1]),
q{filename},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{filename});
%item = (__RULE__ => q{filename});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [exp]},
Parse::RecDescent::_tracefirst($text),
q{filename},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [exp]>>},
Parse::RecDescent::_tracefirst($text),
q{filename},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [exp]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{filename},
$tracelevel)
if defined $::RD_TRACE;
$item{q{exp}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{>>Matched production: [exp]<<},
Parse::RecDescent::_tracefirst($text),
q{filename},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{filename},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{filename},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{filename},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{filename},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::_alternation_1_of_production_1_of_rule_xpcont
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"_alternation_1_of_production_1_of_rule_xpcont"};
Parse::RecDescent::_trace(q{Trying rule: [_alternation_1_of_production_1_of_rule_xpcont]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule_xpcont},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{xpfilters, or xpbrackets});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [xpfilters]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule_xpcont},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{_alternation_1_of_production_1_of_rule_xpcont});
%item = (__RULE__ => q{_alternation_1_of_production_1_of_rule_xpcont});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [xpfilters]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_xpcont},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::xpfilters($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [xpfilters]>>},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_xpcont},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [xpfilters]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_xpcont},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpfilters}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{>>Matched production: [xpfilters]<<},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_xpcont},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [xpbrackets]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule_xpcont},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{_alternation_1_of_production_1_of_rule_xpcont});
%item = (__RULE__ => q{_alternation_1_of_production_1_of_rule_xpcont});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [xpbrackets]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_xpcont},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::xpbrackets($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [xpbrackets]>>},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_xpcont},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [xpbrackets]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_xpcont},
$tracelevel)
if defined $::RD_TRACE;
$item{q{xpbrackets}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{>>Matched production: [xpbrackets]<<},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_xpcont},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_1_of_rule_xpcont},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{_alternation_1_of_production_1_of_rule_xpcont},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{_alternation_1_of_production_1_of_rule_xpcont},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{_alternation_1_of_production_1_of_rule_xpcont},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::elsif_block
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"elsif_block"};
Parse::RecDescent::_trace(q{Trying rule: [elsif_block]},
Parse::RecDescent::_tracefirst($_[1]),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/(elsif)\\b/, or /(?!elsif)/});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(elsif)\\b/ <commit> exp block elsif_block]},
Parse::RecDescent::_tracefirst($_[1]),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{elsif_block});
%item = (__RULE__ => q{elsif_block});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(elsif)\\b/]}, Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(elsif)\b)/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying subrule: [exp]},
Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{exp})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [exp]>>},
Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [exp]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
$item{q{exp}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying subrule: [block]},
Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [block]>>},
Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
$item{q{block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying subrule: [elsif_block]},
Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{elsif_block})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::elsif_block($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [elsif_block]>>},
Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [elsif_block]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
$item{q{elsif_block}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [[$item[3],$item[4]],@{$item[5]}] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(elsif)\\b/ <commit> exp block elsif_block]<<},
Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(?!elsif)/]},
Parse::RecDescent::_tracefirst($_[1]),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{elsif_block});
%item = (__RULE__ => q{elsif_block});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(?!elsif)/]}, Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?!elsif))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(?!elsif)/]<<},
Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched)
{
Parse::RecDescent::_trace(q{Trying production: [<uncommit> <error...>]},
Parse::RecDescent::_tracefirst($_[1]),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[2];
$text = $_[1];
my $_savetext;
@item = (q{elsif_block});
%item = (__RULE__ => q{elsif_block});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying directive: [<uncommit>]},
Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit=0;1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying directive: [<error...>]},
Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { if (1) { do {push @{$thisparser->{errors}}, [qq{Parse error near keyword elsif: "}.substr($text,0,40).qq{ ..."},$thisline];} unless $_noactions; undef } else {0} };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE2__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [<uncommit> <error...>]<<},
Parse::RecDescent::_tracefirst($text),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{elsif_block},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{elsif_block},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{elsif_block},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::shline
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"shline"};
Parse::RecDescent::_trace(q{Trying rule: [shline]},
Parse::RecDescent::_tracefirst($_[1]),
q{shline},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{shline_nosc});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [shline_nosc shline_bracket shline_nosc]},
Parse::RecDescent::_tracefirst($_[1]),
q{shline},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{shline});
%item = (__RULE__ => q{shline});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [shline_nosc]},
Parse::RecDescent::_tracefirst($text),
q{shline},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::shline_nosc($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [shline_nosc]>>},
Parse::RecDescent::_tracefirst($text),
q{shline},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [shline_nosc]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{shline},
$tracelevel)
if defined $::RD_TRACE;
$item{q{shline_nosc}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying repeated subrule: [shline_bracket]},
Parse::RecDescent::_tracefirst($text),
q{shline},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{shline_bracket})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::shline_bracket, 0, 1, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [shline_bracket]>>},
Parse::RecDescent::_tracefirst($text),
q{shline},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [shline_bracket]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{shline},
$tracelevel)
if defined $::RD_TRACE;
$item{q{shline_bracket(?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying subrule: [shline_nosc]},
Parse::RecDescent::_tracefirst($text),
q{shline},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{shline_nosc})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::shline_nosc($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [shline_nosc]>>},
Parse::RecDescent::_tracefirst($text),
q{shline},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [shline_nosc]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{shline},
$tracelevel)
if defined $::RD_TRACE;
$item{q{shline_nosc}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{shline},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { join("",$item[1],@{$item[2]},$item[3]) };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [shline_nosc shline_bracket shline_nosc]<<},
Parse::RecDescent::_tracefirst($text),
q{shline},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{shline},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{shline},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{shline},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{shline},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::block
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"block"};
Parse::RecDescent::_trace(q{Trying rule: [block]},
Parse::RecDescent::_tracefirst($_[1]),
q{block},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{'\{'});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: ['\{' <commit> complex_command '\}']},
Parse::RecDescent::_tracefirst($_[1]),
q{block},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{block});
%item = (__RULE__ => q{block});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: ['\{']},
Parse::RecDescent::_tracefirst($text),
q{block},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\{/)
{
$expectation->failed();
Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__STRING1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{block},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying repeated subrule: [complex_command]},
Parse::RecDescent::_tracefirst($text),
q{block},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{complex_command})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::complex_command, 1, 100000000, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [complex_command]>>},
Parse::RecDescent::_tracefirst($text),
q{block},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [complex_command]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{block},
$tracelevel)
if defined $::RD_TRACE;
$item{q{complex_command(s)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying terminal: ['\}']},
Parse::RecDescent::_tracefirst($text),
q{block},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{'\}'})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\}/)
{
$expectation->failed();
Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__STRING2__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{block},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { [grep ref,@{$item[3]}] };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: ['\{' <commit> complex_command '\}']<<},
Parse::RecDescent::_tracefirst($text),
q{block},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{block},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{block},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{block},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{block},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::perl_block
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"perl_block"};
Parse::RecDescent::_trace(q{Trying rule: [perl_block]},
Parse::RecDescent::_tracefirst($_[1]),
q{perl_block},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [<reject>]},
Parse::RecDescent::_tracefirst($_[1]),
q{perl_block},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{perl_block});
%item = (__RULE__ => q{perl_block});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{perl_block},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { $main::myline = $thisline; };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Rejecting production<< (found <reject>)},
Parse::RecDescent::_tracefirst($text),
q{perl_block},
$tracelevel)
if defined $::RD_TRACE;
undef $return;
$_tok = undef;
last unless defined $_tok;
Parse::RecDescent::_trace(q{>>Matched production: [<reject>]<<},
Parse::RecDescent::_tracefirst($text),
q{perl_block},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [<reject>]},
Parse::RecDescent::_tracefirst($_[1]),
q{perl_block},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{perl_block});
%item = (__RULE__ => q{perl_block});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{perl_block},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { $main::myline = $thisline; };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Rejecting production<< (found <reject>)},
Parse::RecDescent::_tracefirst($text),
q{perl_block},
$tracelevel)
if defined $::RD_TRACE;
undef $return;
$_tok = undef;
last unless defined $_tok;
Parse::RecDescent::_trace(q{>>Matched production: [<reject>]<<},
Parse::RecDescent::_tracefirst($text),
q{perl_block},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
local $skip = defined($skip) ? $skip : $Parse::RecDescent::skip;
Parse::RecDescent::_trace(q{Trying production: [<perl_codeblock>]},
Parse::RecDescent::_tracefirst($_[1]),
q{perl_block},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[2];
$text = $_[1];
my $_savetext;
@item = (q{perl_block});
%item = (__RULE__ => q{perl_block});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying directive: [<perl_codeblock>]},
Parse::RecDescent::_tracefirst($text),
q{perl_block},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { Text::Balanced::extract_codeblock($text,undef,$skip,'{}');
};
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{perl_block},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { {
$return=$item[1];
{
local $^W = 0; # don't warn about undefined contants
my $pos="# line $main::myline \"$XML::XSH2::Functions::SCRIPT\"\n";
$return=~s/^\{/\{\n$pos/;
}
} };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: [<perl_codeblock>]<<},
Parse::RecDescent::_tracefirst($text),
q{perl_block},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{perl_block},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{perl_block},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{perl_block},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{perl_block},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::shline_bracket
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"shline_bracket"};
Parse::RecDescent::_trace(q{Trying rule: [shline_bracket]},
Parse::RecDescent::_tracefirst($_[1]),
q{shline_bracket},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{'('});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: ['(' shline_inter shline_bracket shline_inter ')']},
Parse::RecDescent::_tracefirst($_[1]),
q{shline_bracket},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{shline_bracket});
%item = (__RULE__ => q{shline_bracket});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: ['(']},
Parse::RecDescent::_tracefirst($text),
q{shline_bracket},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\(/)
{
$expectation->failed();
Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__STRING1__}=$current_match;
Parse::RecDescent::_trace(q{Trying subrule: [shline_inter]},
Parse::RecDescent::_tracefirst($text),
q{shline_bracket},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{shline_inter})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::shline_inter($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [shline_inter]>>},
Parse::RecDescent::_tracefirst($text),
q{shline_bracket},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [shline_inter]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{shline_bracket},
$tracelevel)
if defined $::RD_TRACE;
$item{q{shline_inter}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying repeated subrule: [shline_bracket]},
Parse::RecDescent::_tracefirst($text),
q{shline_bracket},
$tracelevel)
if defined $::RD_TRACE;
$expectation->is(q{shline_bracket})->at($text);
unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::XML::XSH2::Parser::shline_bracket, 0, 1, $_noactions,$expectation,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match repeated subrule: [shline_bracket]>>},
Parse::RecDescent::_tracefirst($text),
q{shline_bracket},
$tracelevel)
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched repeated subrule: [shline_bracket]<< (}
. @$_tok . q{ times)},
Parse::RecDescent::_tracefirst($text),
q{shline_bracket},
$tracelevel)
if defined $::RD_TRACE;
$item{q{shline_bracket(?)}} = $_tok;
push @item, $_tok;
Parse::RecDescent::_trace(q{Trying subrule: [shline_inter]},
Parse::RecDescent::_tracefirst($text),
q{shline_bracket},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{shline_inter})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::shline_inter($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [shline_inter]>>},
Parse::RecDescent::_tracefirst($text),
q{shline_bracket},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [shline_inter]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{shline_bracket},
$tracelevel)
if defined $::RD_TRACE;
$item{q{shline_inter}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying terminal: [')']},
Parse::RecDescent::_tracefirst($text),
q{shline_bracket},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{')'})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\)/)
{
$expectation->failed();
Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__STRING2__}=$current_match;
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{shline_bracket},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do { join("",'(',$item[2],@{$item[3]},$item[4],')') };
unless (defined $_tok)
{
Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
if defined $::RD_TRACE;
last;
}
Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $_tok;
$item{__ACTION1__}=$_tok;
Parse::RecDescent::_trace(q{>>Matched production: ['(' shline_inter shline_bracket shline_inter ')']<<},
Parse::RecDescent::_tracefirst($text),
q{shline_bracket},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{shline_bracket},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{shline_bracket},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{shline_bracket},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{shline_bracket},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::XML::XSH2::Parser::exp_or_opt
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"exp_or_opt"};
Parse::RecDescent::_trace(q{Trying rule: [exp_or_opt]},
Parse::RecDescent::_tracefirst($_[1]),
q{exp_or_opt},
$tracelevel)
if defined $::RD_TRACE;
my $err_at = @{$thisparser->{errors}};
my $score;
my $score_return;
my $_tok;
my $return = undef;
my $_matched=0;
my $commit=0;
my @item = ();
my %item = ();
my $repeating = defined($_[2]) && $_[2];
my $_noactions = defined($_[3]) && $_[3];
my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
my %arg = ($#arg & 01) ? @arg : (@arg, undef);
my $text;
my $lastsep="";
my $current_match;
my $expectation = new Parse::RecDescent::Expectation(q{/(?=\\s*[\};]|\\s*\\Z)/, or option, or exp});
$expectation->at($_[1]);
my $thisoffset;
tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
my $thiscolumn;
tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/(?=\\s*[\};]|\\s*\\Z)/ <commit> <reject>]},
Parse::RecDescent::_tracefirst($_[1]),
q{exp_or_opt},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{exp_or_opt});
%item = (__RULE__ => q{exp_or_opt});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/(?=\\s*[\};]|\\s*\\Z)/]}, Parse::RecDescent::_tracefirst($text),
q{exp_or_opt},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?=\s*[};]|\s*\Z))/)
{
$expectation->failed();
Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
last;
}
$current_match = substr($text, $-[0], $+[0] - $-[0]);
substr($text,0,length($current_match),q{});
Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
. $current_match . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
push @item, $item{__PATTERN1__}=$current_match;
Parse::RecDescent::_trace(q{Trying directive: [<commit>]},
Parse::RecDescent::_tracefirst($text),
q{exp_or_opt},
$tracelevel)
if defined $::RD_TRACE;
$_tok = do { $commit = 1 };
if (defined($_tok))
{
Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
. $_tok . q{])},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
else
{
Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Parse::RecDescent::_tracefirst($text))
if defined $::RD_TRACE;
}
last unless defined $_tok;
push @item, $item{__DIRECTIVE1__}=$_tok;
Parse::RecDescent::_trace(q{>>Rejecting production<< (found <reject>)},
Parse::RecDescent::_tracefirst($text),
q{exp_or_opt},
$tracelevel)
if defined $::RD_TRACE;
undef $return;
$_tok = undef;
last unless defined $_tok;
Parse::RecDescent::_trace(q{>>Matched production: [/(?=\\s*[\};]|\\s*\\Z)/ <commit> <reject>]<<},
Parse::RecDescent::_tracefirst($text),
q{exp_or_opt},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [option]},
Parse::RecDescent::_tracefirst($_[1]),
q{exp_or_opt},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{exp_or_opt});
%item = (__RULE__ => q{exp_or_opt});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [option]},
Parse::RecDescent::_tracefirst($text),
q{exp_or_opt},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::option($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [option]>>},
Parse::RecDescent::_tracefirst($text),
q{exp_or_opt},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [option]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{exp_or_opt},
$tracelevel)
if defined $::RD_TRACE;
$item{q{option}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{>>Matched production: [option]<<},
Parse::RecDescent::_tracefirst($text),
q{exp_or_opt},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [exp]},
Parse::RecDescent::_tracefirst($_[1]),
q{exp_or_opt},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[2];
$text = $_[1];
my $_savetext;
@item = (q{exp_or_opt});
%item = (__RULE__ => q{exp_or_opt});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [exp]},
Parse::RecDescent::_tracefirst($text),
q{exp_or_opt},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [exp]>>},
Parse::RecDescent::_tracefirst($text),
q{exp_or_opt},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [exp]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{exp_or_opt},
$tracelevel)
if defined $::RD_TRACE;
$item{q{exp}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{>>Matched production: [exp]<<},
Parse::RecDescent::_tracefirst($text),
q{exp_or_opt},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
unless ( $_matched || defined($score) )
{
$_[1] = $text; # NOT SURE THIS IS NEEDED
Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Parse::RecDescent::_tracefirst($_[1]),
q{exp_or_opt},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{exp_or_opt},
$tracelevel)
if defined $::RD_TRACE;
$return = $score_return;
}
splice @{$thisparser->{errors}}, $err_at;
$return = $item[$#item] unless defined $return;
if (defined $::RD_TRACE)
{
Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
$return . q{])}, "",
q{exp_or_opt},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{exp_or_opt},
$tracelevel)
}
$_[1] = $text;
return $return;
}
}
package XML::XSH2::Parser; sub new { my $self = bless( {
'_precompiled' => 1,
'localvars' => '',
'startcode' => '',
'namespace' => 'Parse::RecDescent::XML::XSH2::Parser',
'rules' => {
'xps' => bless( {
'impcount' => 0,
'calls' => [],
'changed' => 0,
'opcount' => 0,
'prods' => [
bless( {
'number' => '0',
'strcount' => 0,
'dircount' => 0,
'uncommit' => undef,
'error' => undef,
'patcount' => 1,
'actcount' => 0,
'items' => [
bless( {
'pattern' => '(?: [^\\$\\[\\]()\'"};]+ |
\\$(?!\\{) |
\\$\\{ (?:\\$?[a-zA-Z_][a-zA-Z0-9_]* |
\\{.*?\\} |
\\(.+?\\)
)
\\} |
\'(?:\\$\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\{.*?\\} | \\(.+?\\)) \\} |
\\$(?!\\{) | [^\\$\']
)*\' |
"(?:\\$\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\{.*?\\} | \\(.+?\\)) \\} |
\\$(?!\\{) | [^\\$"]
)*"
)*',
'hashname' => '__PATTERN1__',
'description' => '/(?: [^\\\\$\\\\[\\\\]()\'"\\};]+ |
\\\\$(?!\\\\\\{) |
\\\\$\\\\\\{ (?:\\\\$?[a-zA-Z_][a-zA-Z0-9_]* |
\\\\\\{.*?\\\\\\} |
\\\\(.+?\\\\)
)
\\\\\\} |
\'(?:\\\\$\\\\\\{ (?: \\\\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\\\\{.*?\\\\\\} | \\\\(.+?\\\\)) \\\\\\} |
\\\\$(?!\\\\\\{) | [^\\\\$\']
)*\' |
"(?:\\\\$\\\\\\{ (?: \\\\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\\\\{.*?\\\\\\} | \\\\(.+?\\\\)) \\\\\\} |
\\\\$(?!\\\\\\{) | [^\\\\$"]
)*"
)*/x',
'lookahead' => 0,