CSS
view release on metacpan or search on metacpan
CSS/Parse/CompiledGrammar.pm view on Meta::CPAN
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: [macro_escape]<<},
Parse::RecDescent::_tracefirst($text),
q{_alternation_1_of_production_1_of_rule_macro_string1},
$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_macro_string1},
$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_macro_string1},
$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_macro_string1},
$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_macro_string1},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::CSS::Parse::CompiledGrammar::macro_unicode
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"macro_unicode"};
Parse::RecDescent::_trace(q{Trying rule: [macro_unicode]},
Parse::RecDescent::_tracefirst($_[1]),
q{macro_unicode},
$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{/\\[0-9a-f]\{1,6\}[ \\n\\r\\t\\f]?/});
$expectation->at($_[1]);
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/\\[0-9a-f]\{1,6\}[ \\n\\r\\t\\f]?/]},
Parse::RecDescent::_tracefirst($_[1]),
q{macro_unicode},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{macro_unicode});
%item = (__RULE__ => q{macro_unicode});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/\\[0-9a-f]\{1,6\}[ \\n\\r\\t\\f]?/]}, Parse::RecDescent::_tracefirst($text),
q{macro_unicode},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\[0-9a-f]{1,6}[ \n\r\t\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 action},
Parse::RecDescent::_tracefirst($text),
q{macro_unicode},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do {$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: [/\\[0-9a-f]\{1,6\}[ \\n\\r\\t\\f]?/]<<},
Parse::RecDescent::_tracefirst($text),
q{macro_unicode},
$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{macro_unicode},
$tracelevel)
if defined $::RD_TRACE;
return undef;
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{macro_unicode},
$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{macro_unicode},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{macro_unicode},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::CSS::Parse::CompiledGrammar::_alternation_1_of_production_2_of_rule_URI
{
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_URI"};
Parse::RecDescent::_trace(q{Trying rule: [_alternation_1_of_production_2_of_rule_URI]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_2_of_rule_URI},
$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 macro_nonascii, or macro_escape});
$expectation->at($_[1]);
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/[!#$%&*-~]/]},
Parse::RecDescent::_tracefirst($_[1]),
q{_alternation_1_of_production_2_of_rule_URI},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{_alternation_1_of_production_2_of_rule_URI});
%item = (__RULE__ => q{_alternation_1_of_production_2_of_rule_URI});
CSS/Parse/CompiledGrammar.pm view on Meta::CPAN
}
if (!defined($return) && defined($score))
{
Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
q{declaration},
$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{declaration},
$tracelevel);
Parse::RecDescent::_trace(q{(consumed: [} .
Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
Parse::RecDescent::_tracefirst($text),
, q{declaration},
$tracelevel)
}
$_[1] = $text;
return $return;
}
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
sub Parse::RecDescent::CSS::Parse::CompiledGrammar::macro_escape
{
my $thisparser = $_[0];
use vars q{$tracelevel};
local $tracelevel = ($tracelevel||0)+1;
$ERRORS = 0;
my $thisrule = $thisparser->{"rules"}{"macro_escape"};
Parse::RecDescent::_trace(q{Trying rule: [macro_escape]},
Parse::RecDescent::_tracefirst($_[1]),
q{macro_escape},
$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{macro_unicode, or /\\\\[ -~\\200-\\4177777]/});
$expectation->at($_[1]);
my $thisline;
tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [macro_unicode]},
Parse::RecDescent::_tracefirst($_[1]),
q{macro_escape},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[0];
$text = $_[1];
my $_savetext;
@item = (q{macro_escape});
%item = (__RULE__ => q{macro_escape});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying subrule: [macro_unicode]},
Parse::RecDescent::_tracefirst($text),
q{macro_escape},
$tracelevel)
if defined $::RD_TRACE;
if (1) { no strict qw{refs};
$expectation->is(q{})->at($text);
unless (defined ($_tok = Parse::RecDescent::CSS::Parse::CompiledGrammar::macro_unicode($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
{
Parse::RecDescent::_trace(q{<<Didn't match subrule: [macro_unicode]>>},
Parse::RecDescent::_tracefirst($text),
q{macro_escape},
$tracelevel)
if defined $::RD_TRACE;
$expectation->failed();
last;
}
Parse::RecDescent::_trace(q{>>Matched subrule: [macro_unicode]<< (return value: [}
. $_tok . q{]},
Parse::RecDescent::_tracefirst($text),
q{macro_escape},
$tracelevel)
if defined $::RD_TRACE;
$item{q{macro_unicode}} = $_tok;
push @item, $_tok;
}
Parse::RecDescent::_trace(q{Trying action},
Parse::RecDescent::_tracefirst($text),
q{macro_escape},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do {$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: [macro_unicode]<<},
Parse::RecDescent::_tracefirst($text),
q{macro_escape},
$tracelevel)
if defined $::RD_TRACE;
$_matched = 1;
last;
}
while (!$_matched && !$commit)
{
Parse::RecDescent::_trace(q{Trying production: [/\\\\[ -~\\200-\\4177777]/]},
Parse::RecDescent::_tracefirst($_[1]),
q{macro_escape},
$tracelevel)
if defined $::RD_TRACE;
my $thisprod = $thisrule->{"prods"}[1];
$text = $_[1];
my $_savetext;
@item = (q{macro_escape});
%item = (__RULE__ => q{macro_escape});
my $repcount = 0;
Parse::RecDescent::_trace(q{Trying terminal: [/\\\\[ -~\\200-\\4177777]/]}, Parse::RecDescent::_tracefirst($text),
q{macro_escape},
$tracelevel)
if defined $::RD_TRACE;
$lastsep = "";
$expectation->is(q{})->at($text);
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\\[ -~\200-\4177777])/)
{
$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{macro_escape},
$tracelevel)
if defined $::RD_TRACE;
$_tok = ($_noactions) ? 0 : do {$return = $item[1]};
CSS/Parse/CompiledGrammar.pm view on Meta::CPAN
],
'line' => 112
}, 'Parse::RecDescent::Production' ),
bless( {
'number' => '3',
'strcount' => 0,
'dircount' => 0,
'uncommit' => undef,
'error' => undef,
'patcount' => 0,
'actcount' => 1,
'items' => [
bless( {
'subrule' => 'macro_nonascii',
'matchrule' => 0,
'implicit' => undef,
'argcode' => undef,
'lookahead' => 0,
'line' => 113
}, 'Parse::RecDescent::Subrule' ),
bless( {
'hashname' => '__ACTION1__',
'lookahead' => 0,
'line' => 113,
'code' => '{$return = $item[1]}'
}, 'Parse::RecDescent::Action' )
],
'line' => 113
}, 'Parse::RecDescent::Production' ),
bless( {
'number' => '4',
'strcount' => 0,
'dircount' => 0,
'uncommit' => undef,
'error' => undef,
'patcount' => 0,
'actcount' => 1,
'items' => [
bless( {
'subrule' => 'macro_escape',
'matchrule' => 0,
'implicit' => undef,
'argcode' => undef,
'lookahead' => 0,
'line' => 114
}, 'Parse::RecDescent::Subrule' ),
bless( {
'hashname' => '__ACTION1__',
'lookahead' => 0,
'line' => 114,
'code' => '{$return = $item[1]}'
}, 'Parse::RecDescent::Action' )
],
'line' => 114
}, 'Parse::RecDescent::Production' )
],
'name' => '_alternation_1_of_production_1_of_rule_macro_string1',
'vars' => '',
'line' => 109
}, 'Parse::RecDescent::Rule' ),
'macro_unicode' => bless( {
'impcount' => 0,
'calls' => [],
'changed' => 0,
'opcount' => 0,
'prods' => [
bless( {
'number' => '0',
'strcount' => 0,
'dircount' => 0,
'uncommit' => undef,
'error' => undef,
'patcount' => 1,
'actcount' => 1,
'items' => [
bless( {
'pattern' => '\\[0-9a-f]{1,6}[ \\n\\r\\t\\f]?',
'hashname' => '__PATTERN1__',
'description' => '/\\\\[0-9a-f]\\{1,6\\}[ \\\\n\\\\r\\\\t\\\\f]?/',
'lookahead' => 0,
'rdelim' => '/',
'line' => 89,
'mod' => '',
'ldelim' => '/'
}, 'Parse::RecDescent::Token' ),
bless( {
'hashname' => '__ACTION1__',
'lookahead' => 0,
'line' => 89,
'code' => '{$return = $item[1]}'
}, 'Parse::RecDescent::Action' )
],
'line' => undef
}, 'Parse::RecDescent::Production' )
],
'name' => 'macro_unicode',
'vars' => '',
'line' => 89
}, 'Parse::RecDescent::Rule' ),
'_alternation_1_of_production_2_of_rule_URI' => bless( {
'impcount' => 0,
'calls' => [
'macro_nonascii',
'macro_escape'
],
'changed' => 0,
'opcount' => 0,
'prods' => [
bless( {
'number' => '0',
'strcount' => 0,
'dircount' => 0,
'uncommit' => undef,
'error' => undef,
'patcount' => 1,
'actcount' => 1,
'items' => [
bless( {
'pattern' => '[!#$%&*-~]',
'hashname' => '__PATTERN1__',
'description' => '/[!#$%&*-~]/',
'lookahead' => 0,
'rdelim' => '/',
'line' => 112,
'mod' => '',
'ldelim' => '/'
}, 'Parse::RecDescent::Token' ),
bless( {
'hashname' => '__ACTION1__',
'lookahead' => 0,
'line' => 112,
'code' => '{$return = $item[1]}'
}, 'Parse::RecDescent::Action' )
],
'line' => undef
}, 'Parse::RecDescent::Production' ),
bless( {
'number' => '1',
'strcount' => 0,
'dircount' => 0,
'uncommit' => undef,
'error' => undef,
'patcount' => 0,
'actcount' => 1,
'items' => [
bless( {
'subrule' => 'macro_nonascii',
'matchrule' => 0,
'implicit' => undef,
'argcode' => undef,
'lookahead' => 0,
'line' => 113
}, 'Parse::RecDescent::Subrule' ),
bless( {
'hashname' => '__ACTION1__',
'lookahead' => 0,
CSS/Parse/CompiledGrammar.pm view on Meta::CPAN
'subrule' => 'WS',
'expected' => undef,
'min' => 0,
'argcode' => undef,
'max' => 100000000,
'matchrule' => 0,
'repspec' => 's?',
'lookahead' => 0,
'line' => 25
}, 'Parse::RecDescent::Repetition' ),
bless( {
'subrule' => 'value',
'matchrule' => 0,
'implicit' => undef,
'argcode' => undef,
'lookahead' => 0,
'line' => 25
}, 'Parse::RecDescent::Subrule' ),
bless( {
'hashname' => '__ACTION1__',
'lookahead' => 0,
'line' => 26,
'code' => '{
$ruleset->add_property(new CSS::Property({
\'property\' => $item[1],
\'value\' => $item[4],
}));
1;
}'
}, 'Parse::RecDescent::Action' )
],
'line' => undef
}, 'Parse::RecDescent::Production' ),
bless( {
'number' => '1',
'strcount' => 0,
'dircount' => 1,
'uncommit' => undef,
'error' => undef,
'patcount' => 0,
'actcount' => 0,
'items' => [
bless( {
'hashname' => '__DIRECTIVE1__',
'name' => '<rulevar: local $value>',
'lookahead' => 0,
'line' => 33
}, 'Parse::RecDescent::UncondReject' )
],
'line' => undef
}, 'Parse::RecDescent::Production' )
],
'name' => 'declaration',
'vars' => ' local $value;
',
'line' => 25
}, 'Parse::RecDescent::Rule' ),
'macro_escape' => bless( {
'impcount' => 0,
'calls' => [
'macro_unicode'
],
'changed' => 0,
'opcount' => 0,
'prods' => [
bless( {
'number' => '0',
'strcount' => 0,
'dircount' => 0,
'uncommit' => undef,
'error' => undef,
'patcount' => 0,
'actcount' => 1,
'items' => [
bless( {
'subrule' => 'macro_unicode',
'matchrule' => 0,
'implicit' => undef,
'argcode' => undef,
'lookahead' => 0,
'line' => 90
}, 'Parse::RecDescent::Subrule' ),
bless( {
'hashname' => '__ACTION1__',
'lookahead' => 0,
'line' => 90,
'code' => '{$return = $item[1]}'
}, 'Parse::RecDescent::Action' )
],
'line' => undef
}, 'Parse::RecDescent::Production' ),
bless( {
'number' => '1',
'strcount' => 0,
'dircount' => 0,
'uncommit' => undef,
'error' => undef,
'patcount' => 1,
'actcount' => 1,
'items' => [
bless( {
'pattern' => '\\\\[ -~\\200-\\4177777]',
'hashname' => '__PATTERN1__',
'description' => '/\\\\\\\\[ -~\\\\200-\\\\4177777]/',
'lookahead' => 0,
'rdelim' => '/',
'line' => 91,
'mod' => '',
'ldelim' => '/'
}, 'Parse::RecDescent::Token' ),
bless( {
'hashname' => '__ACTION1__',
'lookahead' => 0,
'line' => 91,
'code' => '{$return = $item[1]}'
}, 'Parse::RecDescent::Action' )
],
'line' => 91
}, 'Parse::RecDescent::Production' )
],
'name' => 'macro_escape',
'vars' => '',
'line' => 90
}, 'Parse::RecDescent::Rule' ),
'FUNCTION' => bless( {
'impcount' => 0,
'calls' => [
'macro_ident'
],
'changed' => 0,
'opcount' => 0,
'prods' => [
bless( {
'number' => '0',
'strcount' => 1,
'dircount' => 0,
( run in 1.446 second using v1.01-cache-2.11-cpan-d7f47b0818f )