Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

regex compiler: implemented '?' quantifier

  • Loading branch information...
commit 0de2489446fdad643c23fade1e478fc26ba142eb 1 parent 4adcaa3
Flavio S. Glock authored
1  ChangeLog
View
@@ -1,5 +1,6 @@
(5.0)
- 'elsif'
+- regex quantifiers
4.1 2010-03-24
- floating point numbers
23 lib/MiniPerl6/Emitter/Token.pm
View
@@ -78,6 +78,18 @@ class Rul::Quantifier {
~ '1 '
~ '}';
}
+ if ($.quant eq '?') && ($.greedy eq '') {
+ $.term.set_captures_to_array;
+ return
+ 'do { '
+ ~ 'my $last_pos := $MATCH.to; '
+ ~ 'if !(do {' ~ $.term.emit ~ '}) '
+ ~ '{ '
+ ~ '$MATCH.to := $last_pos; '
+ ~ '}; '
+ ~ '1 '
+ ~ '}';
+ }
# TODO
warn "Rul::Quantifier: " ~ $.quant ~ $.greedy ~ " not implemented";
@@ -125,7 +137,16 @@ class Rul::Subrule {
}
elsif $.captures > 1 {
# TODO: capture level > 2
- $code := 'if $m2 { $MATCH.to := $m2.to; ($MATCH{\'' ~ $.metasyntax ~ '\'}).push( $m2 ); 1 } else { false } '
+ $code := 'if $m2 { '
+ ~ '$MATCH.to := $m2.to; '
+ ~ 'if exists $MATCH{\'' ~ $.metasyntax ~ '\'} { '
+ ~ '($MATCH{\'' ~ $.metasyntax ~ '\'}).push( $m2 ); '
+ ~ '} '
+ ~ 'else { '
+ ~ '$MATCH{\'' ~ $.metasyntax ~ '\'} := [ $m2 ]; '
+ ~ '} '
+ ~ '1 '
+ ~ '} else { false } '
}
else {
$code := 'if $m2 { $MATCH.to := $m2.to; 1 } else { false } '
45 lib/MiniPerl6/Grammar.pm
View
@@ -5,9 +5,6 @@ grammar MiniPerl6::Grammar {
use MiniPerl6::Grammar::Regex;
use MiniPerl6::Grammar::Mapping;
use MiniPerl6::Grammar::Control;
-
-# XXX - move to v6.pm emitter
-#sub array($data) { use v5; @$data; use v6; }
my $Class_name; # for diagnostic messages
sub get_class_name { $Class_name }
@@ -47,9 +44,9 @@ token ws {
]+
}
-token opt_ws { <.ws> | '' }
-token opt_ws2 { <.ws> | '' }
-token opt_ws3 { <.ws> | '' }
+token opt_ws { <.ws>? }
+token opt_ws2 { <.ws>? }
+token opt_ws3 { <.ws>? }
token parse {
| <comp_unit>
@@ -62,7 +59,7 @@ token parse {
}
token comp_unit {
- <.opt_ws> [\; <.opt_ws> | '' ]
+ <.opt_ws> [ \; <.opt_ws> ]?
[ 'use' <.ws> 'v6-' <ident> <.opt_ws> \; <.ws>
| 'use' <.ws> 'v6' <.opt_ws> \; <.ws>
| ''
@@ -75,7 +72,7 @@ token comp_unit {
<exp_stmts>
<.opt_ws>
'}'
- <.opt_ws> [\; <.opt_ws> | '' ]
+ <.opt_ws> [ \; <.opt_ws> ]?
{
make CompUnit.new(
name => $$<full_ident>,
@@ -95,7 +92,7 @@ token infix_op {
}
token hyper_op {
- '>>' | ''
+ '>>'?
}
token prefix_op {
@@ -244,11 +241,11 @@ token term_meth {
}
token sub_or_method_name {
- <full_ident> [ \. <ident> | '' ]
+ <full_ident> [ \. <ident> ]?
}
token opt_type {
- | [ '::' | '' ] <full_ident> { make $$<full_ident> }
+ | '::'? <full_ident> { make $$<full_ident> }
| '' { make '' }
}
@@ -275,7 +272,7 @@ token exp_term {
{ make Do.new( block => $$<exp_stmts> ) } # do { stmt; ... }
| <declarator> <.ws> <opt_type> <.opt_ws> <var_ident> # my Int $variable
{ make Decl.new( decl => $$<declarator>, type => $$<opt_type>, var => $$<var_ident> ) }
- | use <.ws> <full_ident> [ - <ident> | '' ]
+ | use <.ws> <full_ident> [ - <ident> ]?
{ make Use.new( mod => $$<full_ident> ) }
| <val> { make $$<val> } # 'value'
| <lit> { make $$<lit> } # [literal construct]
@@ -289,16 +286,13 @@ token exp_term {
| <apply> { make $$<apply> } # self; print 1,2,3
}
-#token index { XXX }
-#token lookup { XXX }
-
}
#---- split into compilation units in order to use less RAM...
grammar MiniPerl6::Grammar {
token var_sigil { \$ |\% |\@ |\& }
-token var_twigil { [ \. | \! | \^ | \* ] | '' }
+token var_twigil { [ \. | \! | \^ | \* ]? }
token var_name { <full_ident> | '/' | <digit> }
@@ -316,7 +310,6 @@ token var_ident {
token val {
| <val_undef> { make $$<val_undef> } # undef
- # | $<exp> := <val_object> # (not exposed to the outside)
| <val_num> { make $$<val_num> } # 123.456
| <val_int> { make $$<val_int> } # 123
| <val_bit> { make $$<val_bit> } # True, False
@@ -344,10 +337,7 @@ token val_undef {
token val_num {
<digits>
[ [ 'e' | 'E' ] <digits>
- | \. <digits>
- [ [ 'e' | 'E' ] <digits>
- | ''
- ]
+ | \. <digits> [ [ 'e' | 'E' ] <digits> ]?
]
{ make Val::Num.new( num => ~$/ ) }
}
@@ -424,18 +414,9 @@ token exp_seq {
grammar MiniPerl6::Grammar {
token lit {
- #| <lit_seq> { make $$<lit_seq> } # (a, b, c)
- #| <lit_array> { make $$<lit_array> } # [a, b, c]
- #| <lit_hash> { make $$<lit_hash> } # {a => x, b => y}
- #| <lit_code> { make $$<lit_code> } # sub $x {...}
- | <lit_object> { make $$<lit_object> } # Tree.new(a => x, b => y);
+ <lit_object> { make $$<lit_object> } # Tree.new(a => x, b => y);
}
-token lit_seq { XXX { make 'TODO: lit_seq' } }
-token lit_array { XXX { make 'TODO: lit_array' } }
-token lit_hash { XXX { make 'TODO: lit_hash' } }
-token lit_code { XXX { make 'TODO - Lit::Code' } }
-
token lit_object {
'::'
<full_ident>
@@ -499,7 +480,7 @@ token apply {
]
}
-token opt_name { <ident> | '' }
+token opt_name { <ident>? }
token var_invocant {
4 lib5/MiniPerl6/Emitter/Token.pm
View
@@ -18,7 +18,7 @@ sub greedy { $_[0]->{greedy} };
sub ws1 { $_[0]->{ws1} };
sub ws2 { $_[0]->{ws2} };
sub ws3 { $_[0]->{ws3} };
-sub emit { my $self = $_[0]; if ((($self->{quant} eq '') && ($self->{greedy} eq ''))) { return($self->{term}->emit()) } else { }; if ((($self->{quant} eq '+') && ($self->{greedy} eq ''))) { $self->{term}->set_captures_to_array();return('do { ' . 'my $last_match_null := 0; ' . 'my $last_pos := $MATCH.to; ' . 'my $count := 0; ' . 'while ' . $self->{term}->emit() . ' && ($last_match_null < 2) ' . '{ ' . 'if $last_pos == $MATCH.to { ' . '$last_match_null := $last_match_null + 1; ' . '} ' . 'else { ' . '$last_match_null := 0; ' . '} ' . '$last_pos := $MATCH.to; ' . '$count := $count + 1; ' . '}; ' . '$MATCH.to := $last_pos; ' . '$count > 0; ' . '}') } else { }; if ((($self->{quant} eq '*') && ($self->{greedy} eq ''))) { $self->{term}->set_captures_to_array();return('do { ' . 'my $last_match_null := 0; ' . 'my $last_pos := $MATCH.to; ' . 'while ' . $self->{term}->emit() . ' && ($last_match_null < 2) ' . '{ ' . 'if $last_pos == $MATCH.to { ' . '$last_match_null := $last_match_null + 1; ' . '} ' . 'else { ' . '$last_match_null := 0; ' . '} ' . '$last_pos := $MATCH.to; ' . '}; ' . '$MATCH.to := $last_pos; ' . '1 ' . '}') } else { }; warn('Rul::Quantifier: ' . $self->{quant} . $self->{greedy} . ' not implemented'); $self->{term}->emit() };
+sub emit { my $self = $_[0]; if ((($self->{quant} eq '') && ($self->{greedy} eq ''))) { return($self->{term}->emit()) } else { }; if ((($self->{quant} eq '+') && ($self->{greedy} eq ''))) { $self->{term}->set_captures_to_array();return('do { ' . 'my $last_match_null := 0; ' . 'my $last_pos := $MATCH.to; ' . 'my $count := 0; ' . 'while ' . $self->{term}->emit() . ' && ($last_match_null < 2) ' . '{ ' . 'if $last_pos == $MATCH.to { ' . '$last_match_null := $last_match_null + 1; ' . '} ' . 'else { ' . '$last_match_null := 0; ' . '} ' . '$last_pos := $MATCH.to; ' . '$count := $count + 1; ' . '}; ' . '$MATCH.to := $last_pos; ' . '$count > 0; ' . '}') } else { }; if ((($self->{quant} eq '*') && ($self->{greedy} eq ''))) { $self->{term}->set_captures_to_array();return('do { ' . 'my $last_match_null := 0; ' . 'my $last_pos := $MATCH.to; ' . 'while ' . $self->{term}->emit() . ' && ($last_match_null < 2) ' . '{ ' . 'if $last_pos == $MATCH.to { ' . '$last_match_null := $last_match_null + 1; ' . '} ' . 'else { ' . '$last_match_null := 0; ' . '} ' . '$last_pos := $MATCH.to; ' . '}; ' . '$MATCH.to := $last_pos; ' . '1 ' . '}') } else { }; if ((($self->{quant} eq '?') && ($self->{greedy} eq ''))) { $self->{term}->set_captures_to_array();return('do { ' . 'my $last_pos := $MATCH.to; ' . 'if !(do {' . $self->{term}->emit() . '}) ' . '{ ' . '$MATCH.to := $last_pos; ' . '}; ' . '1 ' . '}') } else { }; warn('Rul::Quantifier: ' . $self->{quant} . $self->{greedy} . ' not implemented'); $self->{term}->emit() };
sub set_captures_to_array { my $self = $_[0]; $self->{term}->set_captures_to_array() }
}
@@ -43,7 +43,7 @@ package Rul::Subrule;
sub new { shift; bless { @_ }, "Rul::Subrule" }
sub metasyntax { $_[0]->{metasyntax} };
sub captures { $_[0]->{captures} };
-sub emit { my $self = $_[0]; (my $meth = ((1 + index($self->{metasyntax}, '.')) ? $self->{metasyntax} : '$grammar.' . $self->{metasyntax})); my $code; if (($self->{captures} == 1)) { ($code = 'if $m2 { $MATCH.to := $m2.to; $MATCH{\'' . $self->{metasyntax} . '\'} := $m2; 1 } else { false } ') } else { if (($self->{captures} > 1)) { ($code = 'if $m2 { $MATCH.to := $m2.to; ($MATCH{\'' . $self->{metasyntax} . '\'}).push( $m2 ); 1 } else { false } ') } else { ($code = 'if $m2 { $MATCH.to := $m2.to; 1 } else { false } ') } }; 'do { ' . 'my $m2 := ' . $meth . '($str, $MATCH.to); ' . $code . '}' };
+sub emit { my $self = $_[0]; (my $meth = ((1 + index($self->{metasyntax}, '.')) ? $self->{metasyntax} : '$grammar.' . $self->{metasyntax})); my $code; if (($self->{captures} == 1)) { ($code = 'if $m2 { $MATCH.to := $m2.to; $MATCH{\'' . $self->{metasyntax} . '\'} := $m2; 1 } else { false } ') } else { if (($self->{captures} > 1)) { ($code = 'if $m2 { ' . '$MATCH.to := $m2.to; ' . 'if exists $MATCH{\'' . $self->{metasyntax} . '\'} { ' . '($MATCH{\'' . $self->{metasyntax} . '\'}).push( $m2 ); ' . '} ' . 'else { ' . '$MATCH{\'' . $self->{metasyntax} . '\'} := [ $m2 ]; ' . '} ' . '1 ' . '} else { false } ') } else { ($code = 'if $m2 { $MATCH.to := $m2.to; 1 } else { false } ') } }; 'do { ' . 'my $m2 := ' . $meth . '($str, $MATCH.to); ' . $code . '}' };
sub set_captures_to_array { my $self = $_[0]; ($self->{captures} = ($self->{captures} + 1)) }
}
26 lib5/MiniPerl6/Grammar.pm
View
@@ -17,13 +17,13 @@ sub namespace_before_ident { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[
sub optional_namespace_before_ident { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->namespace_before_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'namespace_before_ident'} = $m2);1 } else { 0 } } && ((('::' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (("" . $MATCH->{'namespace_before_ident'}))) } || 1))) } || do { (($MATCH)->{to} = $pos1); (1 && (do { ($MATCH->{capture} = ('')) } || 1)) }) }); $MATCH };
sub pod_begin { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->is_newline($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('=end' eq substr($str, $MATCH->to(), 4)) ? (1 + (($MATCH)->{to} = (4 + $MATCH->to()))) : 0) && do { (my $last_match_null = 0); (my $last_pos = $MATCH->to()); while ((do { (my $m2 = $grammar->not_newline($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ($last_match_null < 2))) {if (($last_pos == $MATCH->to())) { ($last_match_null = ($last_match_null + 1)) } else { ($last_match_null = 0) };($last_pos = $MATCH->to()) }; (($MATCH)->{to} = $last_pos); 1 })) } || do { (($MATCH)->{to} = $pos1); ((('' ne substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $last_match_null = 0); (my $last_pos = $MATCH->to()); while ((do { (my $m2 = $grammar->not_newline($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ($last_match_null < 2))) {if (($last_pos == $MATCH->to())) { ($last_match_null = ($last_match_null + 1)) } else { ($last_match_null = 0) };($last_pos = $MATCH->to()) }; (($MATCH)->{to} = $last_pos); 1 } && do { (my $m2 = $grammar->pod_begin($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } })) }) }); $MATCH };
sub ws { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { do { (my $last_match_null = 0); (my $last_pos = $MATCH->to()); (my $count = 0); while ((do { (my $pos1 = $MATCH->to()); (do { ((('#' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && do { (my $last_match_null = 0); (my $last_pos = $MATCH->to()); while ((do { (my $m2 = $grammar->not_newline($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ($last_match_null < 2))) {if (($last_pos == $MATCH->to())) { ($last_match_null = ($last_match_null + 1)) } else { ($last_match_null = 0) };($last_pos = $MATCH->to()) }; (($MATCH)->{to} = $last_pos); 1 }) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->is_newline($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && do { (my $pos1 = $MATCH->to()); (do { ((('=begin' eq substr($str, $MATCH->to(), 6)) ? (1 + (($MATCH)->{to} = (6 + $MATCH->to()))) : 0) && do { (my $m2 = $grammar->pod_begin($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'pod_begin'} = $m2);1 } else { 0 } }) } || (do { (($MATCH)->{to} = $pos1); ((('=for' eq substr($str, $MATCH->to(), 4)) ? (1 + (($MATCH)->{to} = (4 + $MATCH->to()))) : 0) && do { (my $m2 = $grammar->pod_begin($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'pod_begin'} = $m2);1 } else { 0 } }) } || do { (($MATCH)->{to} = $pos1); 1 })) }) } || do { (($MATCH)->{to} = $pos1); do { (my $m2 = $grammar->space($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } })) } && ($last_match_null < 2))) {if (($last_pos == $MATCH->to())) { ($last_match_null = ($last_match_null + 1)) } else { ($last_match_null = 0) };($last_pos = $MATCH->to());($count = ($count + 1)) }; (($MATCH)->{to} = $last_pos); ($count > 0) } } }); $MATCH };
-sub opt_ws { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } } || do { (($MATCH)->{to} = $pos1); 1 }) }); $MATCH };
-sub opt_ws2 { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } } || do { (($MATCH)->{to} = $pos1); 1 }) }); $MATCH };
-sub opt_ws3 { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } } || do { (($MATCH)->{to} = $pos1); 1 }) }); $MATCH };
+sub opt_ws { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { do { (my $last_pos = $MATCH->to()); if (do { do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'ws'} = $m2);1 } else { 0 } } }) { } else { (($MATCH)->{to} = $last_pos) }; 1 } } }); $MATCH };
+sub opt_ws2 { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { do { (my $last_pos = $MATCH->to()); if (do { do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'ws'} = $m2);1 } else { 0 } } }) { } else { (($MATCH)->{to} = $last_pos) }; 1 } } }); $MATCH };
+sub opt_ws3 { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { do { (my $last_pos = $MATCH->to()); if (do { do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'ws'} = $m2);1 } else { 0 } } }) { } else { (($MATCH)->{to} = $last_pos) }; 1 } } }); $MATCH };
sub parse { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->comp_unit($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'comp_unit'} = $m2);1 } else { 0 } } && do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->parse($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'parse'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = ([${$MATCH->{'comp_unit'}}, @{${$MATCH->{'parse'}}}])) } || 1)) } || do { (($MATCH)->{to} = $pos1); (do { ($MATCH->{capture} = ([${$MATCH->{'comp_unit'}}])) } || 1) }) }) } || do { (($MATCH)->{to} = $pos1); (do { ($MATCH->{capture} = ([])) } || 1) }) }); $MATCH };
-sub comp_unit { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $pos1 = $MATCH->to()); (do { (((';' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } }) } || do { (($MATCH)->{to} = $pos1); 1 }) } && (do { (my $pos1 = $MATCH->to()); (do { ((('use' eq substr($str, $MATCH->to(), 3)) ? (1 + (($MATCH)->{to} = (3 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('v6-' eq substr($str, $MATCH->to(), 3)) ? (1 + (($MATCH)->{to} = (3 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'ident'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (((';' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } })))))) } || (do { (($MATCH)->{to} = $pos1); ((('use' eq substr($str, $MATCH->to(), 3)) ? (1 + (($MATCH)->{to} = (3 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('v6' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (((';' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } }))))) } || do { (($MATCH)->{to} = $pos1); 1 })) } && (do { (my $pos1 = $MATCH->to()); (do { (('class' eq substr($str, $MATCH->to(), 5)) ? (1 + (($MATCH)->{to} = (5 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); (('grammar' eq substr($str, $MATCH->to(), 7)) ? (1 + (($MATCH)->{to} = (7 + $MATCH->to()))) : 0) }) } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->full_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'full_ident'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('{' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((do { ($Class_name = ("" . $MATCH->{'full_ident'})) } || 1) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp_stmts($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_stmts'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('}' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $pos1 = $MATCH->to()); (do { (((';' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } }) } || do { (($MATCH)->{to} = $pos1); 1 }) } && (do { ($MATCH->{capture} = (CompUnit->new( 'name' => ${$MATCH->{'full_ident'}},'attributes' => { },'methods' => { },'body' => ${$MATCH->{'exp_stmts'}}, ))) } || 1)))))))))))))))) } }); $MATCH };
+sub comp_unit { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $last_pos = $MATCH->to()); if (do { do { (my $pos1 = $MATCH->to()); do { (((';' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'opt_ws'} = $m2);1 } else { 0 } }) } } }) { } else { (($MATCH)->{to} = $last_pos) }; 1 } && (do { (my $pos1 = $MATCH->to()); (do { ((('use' eq substr($str, $MATCH->to(), 3)) ? (1 + (($MATCH)->{to} = (3 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('v6-' eq substr($str, $MATCH->to(), 3)) ? (1 + (($MATCH)->{to} = (3 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'ident'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (((';' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } })))))) } || (do { (($MATCH)->{to} = $pos1); ((('use' eq substr($str, $MATCH->to(), 3)) ? (1 + (($MATCH)->{to} = (3 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('v6' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (((';' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } }))))) } || do { (($MATCH)->{to} = $pos1); 1 })) } && (do { (my $pos1 = $MATCH->to()); (do { (('class' eq substr($str, $MATCH->to(), 5)) ? (1 + (($MATCH)->{to} = (5 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); (('grammar' eq substr($str, $MATCH->to(), 7)) ? (1 + (($MATCH)->{to} = (7 + $MATCH->to()))) : 0) }) } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->full_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'full_ident'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('{' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((do { ($Class_name = ("" . $MATCH->{'full_ident'})) } || 1) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp_stmts($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_stmts'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('}' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $last_pos = $MATCH->to()); if (do { do { (my $pos1 = $MATCH->to()); do { (((';' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'opt_ws'} = $m2);1 } else { 0 } }) } } }) { } else { (($MATCH)->{to} = $last_pos) }; 1 } && (do { ($MATCH->{capture} = (CompUnit->new( 'name' => ${$MATCH->{'full_ident'}},'attributes' => { },'methods' => { },'body' => ${$MATCH->{'exp_stmts'}}, ))) } || 1)))))))))))))))) } }); $MATCH };
sub infix_op { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (('+' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('-' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('*' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('/' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); ((('e' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (('q' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0)) } || (do { (($MATCH)->{to} = $pos1); ((('n' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (('e' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0)) } || (do { (($MATCH)->{to} = $pos1); (('==' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('!=' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('&&' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('||' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('~~' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('~' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('>=' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('>' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('<=' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('<' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); (('x' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) })))))))))))))))) }); $MATCH };
-sub hyper_op { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (('>>' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); 1 }) }); $MATCH };
+sub hyper_op { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { do { (my $last_pos = $MATCH->to()); if (do { (('>>' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) }) { } else { (($MATCH)->{to} = $last_pos) }; 1 } } }); $MATCH };
sub prefix_op { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $pos1 = $MATCH->to()); (do { (('$' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('@' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('%' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('?' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('!' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('++' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('--' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('+' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('-' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); (('~' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) }))))))))) } && do { (my $tmp = $MATCH); ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $tmp->to(),'to' => $tmp->to(),'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (('(' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); (('$' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) }) }); (($tmp)->{bool} = ($MATCH ? 1 : 0)); ($MATCH = $tmp); ($MATCH ? 1 : 0) }) } }); $MATCH };
sub declarator { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (('my' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('state' eq substr($str, $MATCH->to(), 5)) ? (1 + (($MATCH)->{to} = (5 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); (('has' eq substr($str, $MATCH->to(), 3)) ? (1 + (($MATCH)->{to} = (3 + $MATCH->to()))) : 0) })) }); $MATCH };
sub exp2 { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $m2 = $grammar->exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'exp'}})) } || 1)) } }); $MATCH };
@@ -36,16 +36,16 @@ sub new { shift; bless { @_ }, "MiniPerl6::Grammar" }
sub exp { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $m2 = $grammar->term_meth($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'term_meth'} = $m2);1 } else { 0 } } && do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('??' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) && do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('!!' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp2($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp2'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Apply->new( 'namespace' => '','code' => 'ternary:<?? !!>','arguments' => [${$MATCH->{'term_meth'}}, ${$MATCH->{'exp'}}, ${$MATCH->{'exp2'}}], ))) } || 1))))))) } || do { (($MATCH)->{to} = $pos1); (do { Main::say('*** Syntax error in ternary operation') } || 1) }) })) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->infix_op($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'infix_op'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Apply->new( 'namespace' => '','code' => 'infix:<' . $MATCH->{'infix_op'} . '>','arguments' => [${$MATCH->{'term_meth'}}, ${$MATCH->{'exp'}}], ))) } || 1))))) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (((':=' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Bind->new( 'parameters' => ${$MATCH->{'term_meth'}},'arguments' => ${$MATCH->{'exp'}}, ))) } || 1))))) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('=' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp'} = $m2);1 } else { 0 } } && (do { die('*** Error in assignment operation: infix<=> not implemented; use infix<:=> instead') } || 1))))) } || do { (($MATCH)->{to} = $pos1); (do { ($MATCH->{capture} = (${$MATCH->{'term_meth'}})) } || 1) })))) }) } }); $MATCH };
sub opt_ident { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'ident'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'ident'}})) } || 1)) } || do { (($MATCH)->{to} = $pos1); (1 && (do { ($MATCH->{capture} = ('postcircumfix:<( )>')) } || 1)) }) }); $MATCH };
sub term_meth { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->full_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'full_ident'} = $m2);1 } else { 0 } } && do { (my $pos1 = $MATCH->to()); (do { do { (my $pos1 = $MATCH->to()); do { ((('.new(' eq substr($str, $MATCH->to(), 5)) ? (1 + (($MATCH)->{to} = (5 + $MATCH->to()))) : 0) && do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp_mapping($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_mapping'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (((')' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Lit::Object->new( 'class' => ${$MATCH->{'full_ident'}},'fields' => ${$MATCH->{'exp_mapping'}}, ))) } || 1))))) } || do { (($MATCH)->{to} = $pos1); (do { Main::say('*** Syntax Error parsing Constructor'); die() } || 1) }) }) } } } || do { (($MATCH)->{to} = $pos1); do { (my $pos1 = $MATCH->to()); do { ((('.' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->hyper_op($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'hyper_op'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'ident'} = $m2);1 } else { 0 } } && do { (my $pos1 = $MATCH->to()); (do { ((('(' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp_seq($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_seq'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (((')' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Call->new( 'invocant' => Proto->new( 'name' => ("" . $MATCH->{'full_ident'}), ),'method' => ${$MATCH->{'ident'}},'arguments' => ${$MATCH->{'exp_seq'}},'hyper' => ${$MATCH->{'hyper_op'}}, ))) } || 1)))))) } || (do { (($MATCH)->{to} = $pos1); (((':' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp_seq($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_seq'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { ($MATCH->{capture} = (Call->new( 'invocant' => Proto->new( 'name' => ("" . $MATCH->{'full_ident'}), ),'method' => ${$MATCH->{'ident'}},'arguments' => ${$MATCH->{'exp_seq'}},'hyper' => ${$MATCH->{'hyper_op'}}, ))) } || 1))))) } || do { (($MATCH)->{to} = $pos1); (do { ($MATCH->{capture} = (Call->new( 'invocant' => Proto->new( 'name' => ("" . $MATCH->{'full_ident'}), ),'method' => ${$MATCH->{'ident'}},'arguments' => [],'hyper' => ${$MATCH->{'hyper_op'}}, ))) } || 1) })) }))) } } }) }) } || do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->exp_term($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_term'} = $m2);1 } else { 0 } } && do { (my $pos1 = $MATCH->to()); (do { ((('.' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->hyper_op($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'hyper_op'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'opt_ident'} = $m2);1 } else { 0 } } && (do { (my $pos1 = $MATCH->to()); (do { ((('(' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp_seq($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_seq'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((')' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0))))) } || (do { (($MATCH)->{to} = $pos1); (((':' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp_seq($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_seq'} = $m2);1 } else { 0 } } && do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } }))) } || do { (($MATCH)->{to} = $pos1); (do { ($MATCH->{capture} = (Call->new( 'invocant' => ${$MATCH->{'exp_term'}},'method' => ${$MATCH->{'opt_ident'}},'arguments' => [],'hyper' => ${$MATCH->{'hyper_op'}}, ))) } || 1) })) } && (do { ($MATCH->{capture} = (Call->new( 'invocant' => ${$MATCH->{'exp_term'}},'method' => ${$MATCH->{'opt_ident'}},'arguments' => ${$MATCH->{'exp_seq'}},'hyper' => ${$MATCH->{'hyper_op'}}, ))) } || 1))))) } || (do { (($MATCH)->{to} = $pos1); ((('[' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (((']' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Index->new( 'obj' => ${$MATCH->{'exp_term'}},'index_exp' => ${$MATCH->{'exp'}}, ))) } || 1)))))) } || (do { (($MATCH)->{to} = $pos1); ((('{' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('}' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Lookup->new( 'obj' => ${$MATCH->{'exp_term'}},'index_exp' => ${$MATCH->{'exp'}}, ))) } || 1)))))) } || do { (($MATCH)->{to} = $pos1); (do { ($MATCH->{capture} = (${$MATCH->{'exp_term'}})) } || 1) }))) }) }) }); $MATCH };
-sub sub_or_method_name { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $m2 = $grammar->full_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'full_ident'} = $m2);1 } else { 0 } } && do { (my $pos1 = $MATCH->to()); (do { ((('.' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && do { (my $m2 = $grammar->ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'ident'} = $m2);1 } else { 0 } }) } || do { (($MATCH)->{to} = $pos1); 1 }) }) } }); $MATCH };
-sub opt_type { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (do { (my $pos1 = $MATCH->to()); (do { (('::' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); 1 }) } && (do { (my $m2 = $grammar->full_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'full_ident'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'full_ident'}})) } || 1))) } || do { (($MATCH)->{to} = $pos1); (1 && (do { ($MATCH->{capture} = ('')) } || 1)) }) }); $MATCH };
-sub exp_term { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->var_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'var_ident'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'var_ident'}})) } || 1)) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->prefix_op($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'prefix_op'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Apply->new( 'namespace' => '','code' => 'prefix:<' . $MATCH->{'prefix_op'} . '>','arguments' => [${$MATCH->{'exp'}}], ))) } || 1))) } || (do { (($MATCH)->{to} = $pos1); ((('(' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (((')' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (${$MATCH->{'exp'}})) } || 1)))))) } || (do { (($MATCH)->{to} = $pos1); ((('{' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp_mapping($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_mapping'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('}' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Lit::Hash->new( 'hash1' => ${$MATCH->{'exp_mapping'}}, ))) } || 1)))))) } || (do { (($MATCH)->{to} = $pos1); ((('[' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp_seq($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_seq'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (((']' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Lit::Array->new( 'array1' => ${$MATCH->{'exp_seq'}}, ))) } || 1)))))) } || (do { (($MATCH)->{to} = $pos1); ((('$' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('<' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->sub_or_method_name($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'sub_or_method_name'} = $m2);1 } else { 0 } } && ((('>' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Lookup->new( 'obj' => Var->new( 'sigil' => '$','twigil' => '','name' => '/', ),'index_exp' => Val::Buf->new( 'buf' => ${$MATCH->{'sub_or_method_name'}}, ), ))) } || 1))))) } || (do { (($MATCH)->{to} = $pos1); ((('d' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('o' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('{' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp_stmts($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_stmts'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('}' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Do->new( 'block' => ${$MATCH->{'exp_stmts'}}, ))) } || 1))))))))) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->declarator($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'declarator'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->opt_type($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'opt_type'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->var_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'var_ident'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Decl->new( 'decl' => ${$MATCH->{'declarator'}},'type' => ${$MATCH->{'opt_type'}},'var' => ${$MATCH->{'var_ident'}}, ))) } || 1)))))) } || (do { (($MATCH)->{to} = $pos1); ((('u' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('s' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('e' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->full_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'full_ident'} = $m2);1 } else { 0 } } && (do { (my $pos1 = $MATCH->to()); (do { ((('-' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && do { (my $m2 = $grammar->ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'ident'} = $m2);1 } else { 0 } }) } || do { (($MATCH)->{to} = $pos1); 1 }) } && (do { ($MATCH->{capture} = (Use->new( 'mod' => ${$MATCH->{'full_ident'}}, ))) } || 1))))))) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->val($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'val'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'val'}})) } || 1)) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->lit($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'lit'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'lit'}})) } || 1)) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->token($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'token'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'token'}})) } || 1)) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->method_def($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'method_def'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'method_def'}})) } || 1)) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->sub_def($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'sub_def'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'sub_def'}})) } || 1)) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->control($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'control'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'control'}})) } || 1)) } || do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->apply($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'apply'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'apply'}})) } || 1)) }))))))))))))))) }); $MATCH }
+sub sub_or_method_name { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $m2 = $grammar->full_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'full_ident'} = $m2);1 } else { 0 } } && do { (my $last_pos = $MATCH->to()); if (do { do { (my $pos1 = $MATCH->to()); do { ((('.' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && do { (my $m2 = $grammar->ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());push( @{$MATCH->{'ident'}}, $m2 );1 } else { 0 } }) } } }) { } else { (($MATCH)->{to} = $last_pos) }; 1 }) } }); $MATCH };
+sub opt_type { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (do { (my $last_pos = $MATCH->to()); if (do { (('::' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) }) { } else { (($MATCH)->{to} = $last_pos) }; 1 } && (do { (my $m2 = $grammar->full_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'full_ident'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'full_ident'}})) } || 1))) } || do { (($MATCH)->{to} = $pos1); (1 && (do { ($MATCH->{capture} = ('')) } || 1)) }) }); $MATCH };
+sub exp_term { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->var_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'var_ident'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'var_ident'}})) } || 1)) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->prefix_op($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'prefix_op'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Apply->new( 'namespace' => '','code' => 'prefix:<' . $MATCH->{'prefix_op'} . '>','arguments' => [${$MATCH->{'exp'}}], ))) } || 1))) } || (do { (($MATCH)->{to} = $pos1); ((('(' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (((')' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (${$MATCH->{'exp'}})) } || 1)))))) } || (do { (($MATCH)->{to} = $pos1); ((('{' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp_mapping($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_mapping'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('}' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Lit::Hash->new( 'hash1' => ${$MATCH->{'exp_mapping'}}, ))) } || 1)))))) } || (do { (($MATCH)->{to} = $pos1); ((('[' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp_seq($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_seq'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (((']' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Lit::Array->new( 'array1' => ${$MATCH->{'exp_seq'}}, ))) } || 1)))))) } || (do { (($MATCH)->{to} = $pos1); ((('$' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('<' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->sub_or_method_name($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'sub_or_method_name'} = $m2);1 } else { 0 } } && ((('>' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Lookup->new( 'obj' => Var->new( 'sigil' => '$','twigil' => '','name' => '/', ),'index_exp' => Val::Buf->new( 'buf' => ${$MATCH->{'sub_or_method_name'}}, ), ))) } || 1))))) } || (do { (($MATCH)->{to} = $pos1); ((('d' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('o' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('{' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp_stmts($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_stmts'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('}' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Do->new( 'block' => ${$MATCH->{'exp_stmts'}}, ))) } || 1))))))))) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->declarator($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'declarator'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->opt_type($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'opt_type'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->var_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'var_ident'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Decl->new( 'decl' => ${$MATCH->{'declarator'}},'type' => ${$MATCH->{'opt_type'}},'var' => ${$MATCH->{'var_ident'}}, ))) } || 1)))))) } || (do { (($MATCH)->{to} = $pos1); ((('u' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('s' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('e' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->full_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'full_ident'} = $m2);1 } else { 0 } } && (do { (my $last_pos = $MATCH->to()); if (do { do { (my $pos1 = $MATCH->to()); do { ((('-' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && do { (my $m2 = $grammar->ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());push( @{$MATCH->{'ident'}}, $m2 );1 } else { 0 } }) } } }) { } else { (($MATCH)->{to} = $last_pos) }; 1 } && (do { ($MATCH->{capture} = (Use->new( 'mod' => ${$MATCH->{'full_ident'}}, ))) } || 1))))))) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->val($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'val'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'val'}})) } || 1)) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->lit($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'lit'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'lit'}})) } || 1)) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->token($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'token'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'token'}})) } || 1)) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->method_def($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'method_def'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'method_def'}})) } || 1)) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->sub_def($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'sub_def'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'sub_def'}})) } || 1)) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->control($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'control'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'control'}})) } || 1)) } || do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->apply($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'apply'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'apply'}})) } || 1)) }))))))))))))))) }); $MATCH }
}
{
package MiniPerl6::Grammar;
sub new { shift; bless { @_ }, "MiniPerl6::Grammar" }
sub var_sigil { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (('$' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('%' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('@' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); (('&' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) }))) }); $MATCH };
-sub var_twigil { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { do { (my $pos1 = $MATCH->to()); (do { (('.' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('!' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('^' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); (('*' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) }))) } } || do { (($MATCH)->{to} = $pos1); 1 }) }); $MATCH };
+sub var_twigil { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { do { (my $last_pos = $MATCH->to()); if (do { do { (my $pos1 = $MATCH->to()); (do { (('.' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('!' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('^' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); (('*' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) }))) } }) { } else { (($MATCH)->{to} = $last_pos) }; 1 } } }); $MATCH };
sub var_name { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { do { (my $m2 = $grammar->full_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'full_ident'} = $m2);1 } else { 0 } } } || (do { (($MATCH)->{to} = $pos1); (('/' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); do { (my $m2 = $grammar->digit($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'digit'} = $m2);1 } else { 0 } } })) }); $MATCH };
sub var_ident { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $m2 = $grammar->var_sigil($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'var_sigil'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->var_twigil($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'var_twigil'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->optional_namespace_before_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'optional_namespace_before_ident'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->var_name($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'var_name'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Var->new( 'sigil' => ("" . $MATCH->{'var_sigil'}),'twigil' => ("" . $MATCH->{'var_twigil'}),'namespace' => ${$MATCH->{'optional_namespace_before_ident'}},'name' => ("" . $MATCH->{'var_name'}), ))) } || 1))))) } }); $MATCH };
sub val { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->val_undef($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'val_undef'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'val_undef'}})) } || 1)) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->val_num($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'val_num'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'val_num'}})) } || 1)) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->val_int($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'val_int'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'val_int'}})) } || 1)) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->val_bit($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'val_bit'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'val_bit'}})) } || 1)) } || do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->val_buf($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'val_buf'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'val_buf'}})) } || 1)) })))) }); $MATCH };
@@ -57,7 +57,7 @@ package MiniPerl6::Grammar;
sub new { shift; bless { @_ }, "MiniPerl6::Grammar" }
sub digits { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { do { (my $last_match_null = 0); (my $last_pos = $MATCH->to()); (my $count = 0); while ((do { (my $m2 = $grammar->digit($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ($last_match_null < 2))) {if (($last_pos == $MATCH->to())) { ($last_match_null = ($last_match_null + 1)) } else { ($last_match_null = 0) };($last_pos = $MATCH->to());($count = ($count + 1)) }; (($MATCH)->{to} = $last_pos); ($count > 0) } } }); $MATCH };
sub val_undef { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { ((('u' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('n' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('d' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('e' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('f' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $tmp = $MATCH); ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $tmp->to(),'to' => $tmp->to(),'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (('w' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } }); (($tmp)->{bool} = ($MATCH ? 0 : 1)); ($MATCH = $tmp); ($MATCH ? 1 : 0) } && (do { ($MATCH->{capture} = (Val::Undef->new( ))) } || 1))))))) } }); $MATCH };
-sub val_num { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $m2 = $grammar->digits($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'digits'} = $m2);1 } else { 0 } } && (do { (my $pos1 = $MATCH->to()); (do { (do { (my $pos1 = $MATCH->to()); (do { (('e' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); (('E' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) }) } && do { (my $m2 = $grammar->digits($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'digits'} = $m2);1 } else { 0 } }) } || do { (($MATCH)->{to} = $pos1); ((('.' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->digits($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'digits'} = $m2);1 } else { 0 } } && do { (my $pos1 = $MATCH->to()); (do { (do { (my $pos1 = $MATCH->to()); (do { (('e' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); (('E' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) }) } && do { (my $m2 = $grammar->digits($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'digits'} = $m2);1 } else { 0 } }) } || do { (($MATCH)->{to} = $pos1); 1 }) })) }) } && (do { ($MATCH->{capture} = (Val::Num->new( 'num' => ("" . $MATCH), ))) } || 1))) } }); $MATCH };
+sub val_num { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $m2 = $grammar->digits($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'digits'} = $m2);1 } else { 0 } } && (do { (my $pos1 = $MATCH->to()); (do { (do { (my $pos1 = $MATCH->to()); (do { (('e' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); (('E' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) }) } && do { (my $m2 = $grammar->digits($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'digits'} = $m2);1 } else { 0 } }) } || do { (($MATCH)->{to} = $pos1); ((('.' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->digits($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'digits'} = $m2);1 } else { 0 } } && do { (my $last_pos = $MATCH->to()); if (do { do { (my $pos1 = $MATCH->to()); do { (do { (my $pos1 = $MATCH->to()); (do { (('e' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); (('E' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) }) } && do { (my $m2 = $grammar->digits($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());push( @{$MATCH->{'digits'}}, $m2 );1 } else { 0 } }) } } }) { } else { (($MATCH)->{to} = $last_pos) }; 1 })) }) } && (do { ($MATCH->{capture} = (Val::Num->new( 'num' => ("" . $MATCH), ))) } || 1))) } }); $MATCH };
sub char_any { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (('' ne substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } }); $MATCH };
sub single_quoted_unescape { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { ((('\\' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('\'' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->single_quoted_unescape($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'single_quoted_unescape'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = ('\'' . $MATCH->{'single_quoted_unescape'})) } || 1)))) } || (do { (($MATCH)->{to} = $pos1); ((('\\' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('"' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->single_quoted_unescape($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'single_quoted_unescape'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = ('"' . $MATCH->{'single_quoted_unescape'})) } || 1)))) } || (do { (($MATCH)->{to} = $pos1); ((('\\' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('\\' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->single_quoted_unescape($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'single_quoted_unescape'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = ('\\' . $MATCH->{'single_quoted_unescape'})) } || 1)))) } || (do { (($MATCH)->{to} = $pos1); (do { (my $tmp = $MATCH); ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $tmp->to(),'to' => $tmp->to(),'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (('\'' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } }); (($tmp)->{bool} = ($MATCH ? 0 : 1)); ($MATCH = $tmp); ($MATCH ? 1 : 0) } && (do { (my $m2 = $grammar->char_any($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'char_any'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->single_quoted_unescape($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'single_quoted_unescape'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = ($MATCH->{'char_any'} . $MATCH->{'single_quoted_unescape'})) } || 1)))) } || do { (($MATCH)->{to} = $pos1); 1 })))) }); $MATCH };
sub double_quoted_unescape { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { ((('\\' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('\'' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->double_quoted_unescape($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'double_quoted_unescape'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = ('\'' . $MATCH->{'double_quoted_unescape'})) } || 1)))) } || (do { (($MATCH)->{to} = $pos1); ((('\\' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('"' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->double_quoted_unescape($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'double_quoted_unescape'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = ('"' . $MATCH->{'double_quoted_unescape'})) } || 1)))) } || (do { (($MATCH)->{to} = $pos1); ((('\\' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('\\' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->double_quoted_unescape($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'double_quoted_unescape'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = ('\\' . $MATCH->{'double_quoted_unescape'})) } || 1)))) } || (do { (($MATCH)->{to} = $pos1); ((('\\' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('n' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->double_quoted_unescape($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'double_quoted_unescape'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Main->newline() . $MATCH->{'double_quoted_unescape'})) } || 1)))) } || (do { (($MATCH)->{to} = $pos1); (do { (my $tmp = $MATCH); ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $tmp->to(),'to' => $tmp->to(),'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (('"' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } }); (($tmp)->{bool} = ($MATCH ? 0 : 1)); ($MATCH = $tmp); ($MATCH ? 1 : 0) } && (do { (my $m2 = $grammar->char_any($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'char_any'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->double_quoted_unescape($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'double_quoted_unescape'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = ($MATCH->{'char_any'} . $MATCH->{'double_quoted_unescape'})) } || 1)))) } || do { (($MATCH)->{to} = $pos1); 1 }))))) }); $MATCH };
@@ -71,15 +71,11 @@ sub exp_seq { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH;
package MiniPerl6::Grammar;
sub new { shift; bless { @_ }, "MiniPerl6::Grammar" }
sub lit { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $m2 = $grammar->lit_object($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'lit_object'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'lit_object'}})) } || 1)) } }); $MATCH };
-sub lit_seq { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { ((('X' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('X' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('X' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = ('TODO: lit_seq')) } || 1)))) } }); $MATCH };
-sub lit_array { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { ((('X' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('X' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('X' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = ('TODO: lit_array')) } || 1)))) } }); $MATCH };
-sub lit_hash { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { ((('X' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('X' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('X' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = ('TODO: lit_hash')) } || 1)))) } }); $MATCH };
-sub lit_code { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { ((('X' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('X' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('X' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = ('TODO - Lit::Code')) } || 1)))) } }); $MATCH };
sub lit_object { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { ((('::' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->full_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'full_ident'} = $m2);1 } else { 0 } } && ((('(' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp_mapping($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_mapping'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (((')' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Lit::Object->new( 'class' => ${$MATCH->{'full_ident'}},'fields' => ${$MATCH->{'exp_mapping'}}, ))) } || 1))))) } || do { (($MATCH)->{to} = $pos1); (do { Main::say('*** Syntax Error parsing Constructor'); die() } || 1) }) }))) } }); $MATCH };
sub bind { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $m2 = $grammar->exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (((':=' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp2($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp2'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Bind->new( 'parameters' => ${$MATCH->{'exp'}},'arguments' => ${$MATCH->{'exp2'}}, ))) } || 1)))))) } }); $MATCH };
sub call { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $m2 = $grammar->exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp'} = $m2);1 } else { 0 } } && ((('.' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'ident'} = $m2);1 } else { 0 } } && ((('(' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp_seq($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_seq'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (((')' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Call->new( 'invocant' => ${$MATCH->{'exp'}},'method' => ${$MATCH->{'ident'}},'arguments' => ${$MATCH->{'exp_seq'}},'hyper' => '', ))) } || 1))))))))) } }); $MATCH };
sub apply { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $m2 = $grammar->optional_namespace_before_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'optional_namespace_before_ident'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->full_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'full_ident'} = $m2);1 } else { 0 } } && do { (my $pos1 = $MATCH->to()); (do { (do { (my $pos1 = $MATCH->to()); (do { ((('(' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp_seq($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_seq'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((')' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0))))) } || do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp_seq($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_seq'} = $m2);1 } else { 0 } } && do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } })) }) } && (do { ($MATCH->{capture} = (Apply->new( 'namespace' => ${$MATCH->{'optional_namespace_before_ident'}},'code' => ${$MATCH->{'full_ident'}},'arguments' => ${$MATCH->{'exp_seq'}}, ))) } || 1)) } || do { (($MATCH)->{to} = $pos1); (do { ($MATCH->{capture} = (Apply->new( 'namespace' => ${$MATCH->{'optional_namespace_before_ident'}},'code' => ${$MATCH->{'full_ident'}},'arguments' => [], ))) } || 1) }) })) } }); $MATCH };
-sub opt_name { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { do { (my $m2 = $grammar->ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'ident'} = $m2);1 } else { 0 } } } || do { (($MATCH)->{to} = $pos1); 1 }) }); $MATCH };
+sub opt_name { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { do { (my $last_pos = $MATCH->to()); if (do { do { (my $m2 = $grammar->ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());push( @{$MATCH->{'ident'}}, $m2 );1 } else { 0 } } }) { } else { (($MATCH)->{to} = $last_pos) }; 1 } } }); $MATCH };
sub var_invocant { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->var_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'var_ident'} = $m2);1 } else { 0 } } && (((':' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (${$MATCH->{'var_ident'}})) } || 1))) } || do { (($MATCH)->{to} = $pos1); (do { ($MATCH->{capture} = (Var->new( 'sigil' => '$','twigil' => '','name' => 'self', ))) } || 1) }) }); $MATCH };
sub args_sig { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $m2 = $grammar->var_invocant($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'var_invocant'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->exp_seq($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'exp_seq'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Sig->new( 'invocant' => ${$MATCH->{'var_invocant'}},'positional' => ${$MATCH->{'exp_seq'}},'named' => { }, ))) } || 1)))) } }); $MATCH };
sub method_sig { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('(' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->args_sig($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'args_sig'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (((')' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (${$MATCH->{'args_sig'}})) } || 1))))))) } || do { (($MATCH)->{to} = $pos1); (do { ($MATCH->{capture} = (Sig->new( 'invocant' => Var->new( 'sigil' => '$','twigil' => '','name' => 'self', ),'positional' => [],'named' => { }, ))) } || 1) }) }); $MATCH };
4 lib5/MiniPerl6/Grammar/Regex.pm
View
@@ -19,14 +19,14 @@ sub parsed_code { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MA
sub named_capture_body { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { ((('(' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->rule($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'rule'} = $m2);1 } else { 0 } } && (((')' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = ({ 'capturing_group' => ${$MATCH->{'rule'}}, })) } || 1)))) } || (do { (($MATCH)->{to} = $pos1); ((('[' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->rule($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'rule'} = $m2);1 } else { 0 } } && (((']' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (${$MATCH->{'rule'}})) } || 1)))) } || (do { (($MATCH)->{to} = $pos1); ((('<' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->metasyntax_exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'metasyntax_exp'} = $m2);1 } else { 0 } } && ((('>' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Rul::Subrule->new( 'metasyntax' => ${$MATCH->{'metasyntax_exp'}},'captures' => 1, ))) } || 1)))) } || do { (($MATCH)->{to} = $pos1); (do { die('invalid alias syntax') } || 1) }))) }); $MATCH };
sub variables { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { ((('$<' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->rule_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'rule_ident'} = $m2);1 } else { 0 } } && ((('>' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = ('$/{' . '\'' . $MATCH->{'rule_ident'} . '\'' . '}')) } || 1)))) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = MiniPerl6::Grammar->var_sigil($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'MiniPerl6::Grammar.var_sigil'} = $m2);1 } else { 0 } } && (do { (my $m2 = MiniPerl6::Grammar->digits($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'MiniPerl6::Grammar.digits'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = ($MATCH->{'MiniPerl6::Grammar.var_sigil'} . '/[' . $MATCH->{'MiniPerl6::Grammar.digits'} . ']')) } || 1))) } || do { (($MATCH)->{to} = $pos1); (do { (my $m2 = MiniPerl6::Grammar->var_sigil($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'MiniPerl6::Grammar.var_sigil'} = $m2);1 } else { 0 } } && (do { (my $m2 = MiniPerl6::Grammar->var_twigil($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'MiniPerl6::Grammar.var_twigil'} = $m2);1 } else { 0 } } && (do { (my $m2 = MiniPerl6::Grammar->full_ident($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'MiniPerl6::Grammar.full_ident'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Rul::Var->new( 'sigil' => ("" . $MATCH->{'MiniPerl6::Grammar.var_sigil'}),'twigil' => ("" . $MATCH->{'MiniPerl6::Grammar.var_twigil'}),'name' => ("" . $MATCH->{'MiniPerl6::Grammar.full_ident'}), ))) } || 1)))) })) }); $MATCH };
sub rule_terms { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { ((('(' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->rule($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'rule'} = $m2);1 } else { 0 } } && (((')' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Rul::Capture->new( 'rule_exp' => ${$MATCH->{'rule'}}, ))) } || 1)))) } || (do { (($MATCH)->{to} = $pos1); ((('<(' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->rule($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'rule'} = $m2);1 } else { 0 } } && (((')>' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Rul::CaptureResult->new( 'rule_exp' => ${$MATCH->{'rule'}}, ))) } || 1)))) } || (do { (($MATCH)->{to} = $pos1); ((('<after' eq substr($str, $MATCH->to(), 6)) ? (1 + (($MATCH)->{to} = (6 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->rule($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'rule'} = $m2);1 } else { 0 } } && ((('>' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Rul::After->new( 'rule_exp' => ${$MATCH->{'rule'}}, ))) } || 1))))) } || (do { (($MATCH)->{to} = $pos1); ((('<before' eq substr($str, $MATCH->to(), 7)) ? (1 + (($MATCH)->{to} = (7 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->rule($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'rule'} = $m2);1 } else { 0 } } && ((('>' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Rul::Before->new( 'rule_exp' => ${$MATCH->{'rule'}}, ))) } || 1))))) } || (do { (($MATCH)->{to} = $pos1); ((('<!before' eq substr($str, $MATCH->to(), 8)) ? (1 + (($MATCH)->{to} = (8 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->rule($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'rule'} = $m2);1 } else { 0 } } && ((('>' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Rul::NotBefore->new( 'rule_exp' => ${$MATCH->{'rule'}}, ))) } || 1))))) } || (do { (($MATCH)->{to} = $pos1); ((('<!' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->metasyntax_exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'metasyntax_exp'} = $m2);1 } else { 0 } } && ((('>' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = ({ 'negate' => { 'metasyntax' => ${$MATCH->{'metasyntax_exp'}}, }, })) } || 1)))) } || (do { (($MATCH)->{to} = $pos1); ((('<+' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->char_class($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'char_class'} = $m2);1 } else { 0 } } && ((('>' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Rul::CharClass->new( 'chars' => ("" . $MATCH->{'char_class'}), ))) } || 1)))) } || (do { (($MATCH)->{to} = $pos1); ((('<-' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->char_class($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'char_class'} = $m2);1 } else { 0 } } && ((('>' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Rul::NegateCharClass->new( 'chars' => ("" . $MATCH->{'char_class'}), ))) } || 1)))) } || (do { (($MATCH)->{to} = $pos1); ((('\'' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->literal($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'literal'} = $m2);1 } else { 0 } } && ((('\'' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Rul::Constant->new( 'constant' => ${$MATCH->{'literal'}}, ))) } || 1)))) } || (do { (($MATCH)->{to} = $pos1); ((('<' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('\'' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->literal($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'literal'} = $m2);1 } else { 0 } } && ((('\'' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && ((('>' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Rul::Constant->new( 'constant' => ${$MATCH->{'literal'}}, ))) } || 1)))))) } || (do { (($MATCH)->{to} = $pos1); ((('<' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->variables($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'variables'} = $m2);1 } else { 0 } } && ((('>' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Rul::InterpolateVar->new( 'var' => ${$MATCH->{'variables'}}, ))) } || 1))) } || (do { (($MATCH)->{to} = $pos1); ((('?' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->metasyntax_exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'metasyntax_exp'} = $m2);1 } else { 0 } } && ((('>' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Rul::Subrule->new( 'metasyntax' => ${$MATCH->{'metasyntax_exp'}},'captures' => 0, ))) } || 1)))) } || (do { (($MATCH)->{to} = $pos1); ((('.' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->metasyntax_exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'metasyntax_exp'} = $m2);1 } else { 0 } } && ((('>' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Rul::Subrule->new( 'metasyntax' => ${$MATCH->{'metasyntax_exp'}},'captures' => 0, ))) } || 1)))) } || do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->metasyntax_exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'metasyntax_exp'} = $m2);1 } else { 0 } } && ((('>' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Rul::Subrule->new( 'metasyntax' => ${$MATCH->{'metasyntax_exp'}},'captures' => 1, ))) } || 1))) }))) }) } || (do { (($MATCH)->{to} = $pos1); ((('{' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->parsed_code($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'parsed_code'} = $m2);1 } else { 0 } } && ((('}' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Rul::Block->new( 'closure' => ${$MATCH->{'parsed_code'}}, ))) } || 1)))) } || (do { (($MATCH)->{to} = $pos1); ((('\\' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && do { (my $pos1 = $MATCH->to()); do { (do { (my $m2 = $grammar->any($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'any'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Rul::SpecialChar->new( 'char' => ${$MATCH->{'any'}}, ))) } || 1)) } }) } || (do { (($MATCH)->{to} = $pos1); ((('.' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (Rul::Dot->new( ))) } || 1)) } || do { (($MATCH)->{to} = $pos1); ((('[' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->rule($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'rule'} = $m2);1 } else { 0 } } && (((']' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = (${$MATCH->{'rule'}})) } || 1)))) })))))))))))))) }); $MATCH };
-sub rule_term { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->variables($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'variables'} = $m2);1 } else { 0 } } && do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (((':=' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->named_capture_body($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'named_capture_body'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Rul::NamedCapture->new( 'rule_exp' => ${$MATCH->{'named_capture_body'}},'capture_ident' => ${$MATCH->{'variables'}}, ))) } || 1))))) } || do { (($MATCH)->{to} = $pos1); (do { ($MATCH->{capture} = (${$MATCH->{'variables'}})) } || 1) }) }) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->rule_terms($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'rule_terms'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'rule_terms'}})) } || 1)) } || do { (($MATCH)->{to} = $pos1); (do { (my $tmp = $MATCH); ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $tmp->to(),'to' => $tmp->to(),'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { ((']' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('}' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); ((')' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('>' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); ((':' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('?' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('+' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('*' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('|' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('&' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); (('/' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) })))))))))) }); (($tmp)->{bool} = ($MATCH ? 0 : 1)); ($MATCH = $tmp); ($MATCH ? 1 : 0) } && (do { (my $m2 = $grammar->any($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'any'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Rul::Constant->new( 'constant' => ${$MATCH->{'any'}}, ))) } || 1))) })) }); $MATCH };
+sub rule_term { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->variables($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'variables'} = $m2);1 } else { 0 } } && do { (my $pos1 = $MATCH->to()); (do { (do { (my $last_pos = $MATCH->to()); if (do { do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'ws'} = $m2);1 } else { 0 } } }) { } else { (($MATCH)->{to} = $last_pos) }; 1 } && (((':=' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) && (do { (my $last_pos = $MATCH->to()); if (do { do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'ws'} = $m2);1 } else { 0 } } }) { } else { (($MATCH)->{to} = $last_pos) }; 1 } && (do { (my $m2 = $grammar->named_capture_body($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'named_capture_body'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Rul::NamedCapture->new( 'rule_exp' => ${$MATCH->{'named_capture_body'}},'capture_ident' => ${$MATCH->{'variables'}}, ))) } || 1))))) } || do { (($MATCH)->{to} = $pos1); (do { ($MATCH->{capture} = (${$MATCH->{'variables'}})) } || 1) }) }) } || (do { (($MATCH)->{to} = $pos1); (do { (my $m2 = $grammar->rule_terms($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'rule_terms'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (${$MATCH->{'rule_terms'}})) } || 1)) } || do { (($MATCH)->{to} = $pos1); (do { (my $tmp = $MATCH); ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $tmp->to(),'to' => $tmp->to(),'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { ((']' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('}' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); ((')' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('>' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); ((':' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('?' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('+' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('*' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('|' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('&' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); (('/' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) })))))))))) }); (($tmp)->{bool} = ($MATCH ? 0 : 1)); ($MATCH = $tmp); ($MATCH ? 1 : 0) } && (do { (my $m2 = $grammar->any($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'any'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Rul::Constant->new( 'constant' => ${$MATCH->{'any'}}, ))) } || 1))) })) }); $MATCH };
sub quant_exp { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { ((('**' eq substr($str, $MATCH->to(), 2)) ? (1 + (($MATCH)->{to} = (2 + $MATCH->to()))) : 0) && (do { (my $m2 = MiniPerl6::Grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && ((('{' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->parsed_code($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'parsed_code'} = $m2);1 } else { 0 } } && ((('}' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { ($MATCH->{capture} = ({ 'closure' => ${$MATCH->{'parsed_code'}}, })) } || 1)))))) } || do { (($MATCH)->{to} = $pos1); do { (my $pos1 = $MATCH->to()); (do { (('?' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('*' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); (('+' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) })) } }) }); $MATCH };
sub greedy_exp { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (('?' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || (do { (($MATCH)->{to} = $pos1); (('+' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) } || do { (($MATCH)->{to} = $pos1); 1 })) }); $MATCH };
sub quantifier { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $m2 = MiniPerl6::Grammar->opt_ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { (my $m2 = $grammar->rule_term($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'rule_term'} = $m2);1 } else { 0 } } && (do { (my $m2 = MiniPerl6::Grammar->opt_ws2($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->quant_exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'quant_exp'} = $m2);1 } else { 0 } } && (do { (my $m2 = $grammar->greedy_exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'greedy_exp'} = $m2);1 } else { 0 } } && (do { (my $m2 = MiniPerl6::Grammar->opt_ws3($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (do { ($MATCH->{capture} = (Rul::Quantifier->new( 'term' => ${$MATCH->{'rule_term'}},'quant' => ${$MATCH->{'quant_exp'}},'greedy' => ${$MATCH->{'greedy_exp'}},'ws1' => ${$MATCH->{'MiniPerl6::Grammar.opt_ws'}},'ws2' => ${$MATCH->{'MiniPerl6::Grammar.opt_ws2'}},'ws3' => ${$MATCH->{'MiniPerl6::Grammar.opt_ws3'}}, ))) } || 1)))) } || do { (($MATCH)->{to} = $pos1); (do { ($MATCH->{capture} = (${$MATCH->{'rule_term'}})) } || 1) }) }))) } }); $MATCH };
sub concat_list { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->quantifier($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'quantifier'} = $m2);1 } else { 0 } } && do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->concat_list($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'concat_list'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = ([${$MATCH->{'quantifier'}}, @{${$MATCH->{'concat_list'}}}])) } || 1)) } || do { (($MATCH)->{to} = $pos1); (do { ($MATCH->{capture} = ([${$MATCH->{'quantifier'}}])) } || 1) }) }) } || do { (($MATCH)->{to} = $pos1); (do { ($MATCH->{capture} = ([])) } || 1) }) }); $MATCH };
sub concat_exp { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $m2 = $grammar->concat_list($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'concat_list'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Rul::Concat->new( 'concat' => ${$MATCH->{'concat_list'}}, ))) } || 1)) } }); $MATCH };
sub or_list_exp { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->concat_exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'concat_exp'} = $m2);1 } else { 0 } } && do { (my $pos1 = $MATCH->to()); (do { ((('|' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0) && (do { (my $m2 = $grammar->or_list_exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'or_list_exp'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = ([${$MATCH->{'concat_exp'}}, @{${$MATCH->{'or_list_exp'}}}])) } || 1))) } || do { (($MATCH)->{to} = $pos1); (do { ($MATCH->{capture} = ([${$MATCH->{'concat_exp'}}])) } || 1) }) }) } || do { (($MATCH)->{to} = $pos1); (do { ($MATCH->{capture} = ([])) } || 1) }) }); $MATCH };
-sub rule { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $pos1 = $MATCH->to()); (do { (do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());1 } else { 0 } } && (('|' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0)) } || do { (($MATCH)->{to} = $pos1); 1 }) } && (do { (my $m2 = $grammar->or_list_exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'or_list_exp'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Rul::Or->new( 'or_list' => ${$MATCH->{'or_list_exp'}}, ))) } || 1))) } }); $MATCH }
+sub rule { my $grammar = $_[0]; my $str = $_[1]; my $pos = $_[2]; my $MATCH; ($MATCH = MiniPerl6::Match->new( 'str' => $str,'from' => $pos,'to' => $pos,'bool' => 1, )); (($MATCH)->{bool} = do { (my $pos1 = $MATCH->to()); do { (do { (my $pos1 = $MATCH->to()); (do { (do { (my $last_pos = $MATCH->to()); if (do { do { (my $m2 = $grammar->ws($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'ws'} = $m2);1 } else { 0 } } }) { } else { (($MATCH)->{to} = $last_pos) }; 1 } && (('|' eq substr($str, $MATCH->to(), 1)) ? (1 + (($MATCH)->{to} = (1 + $MATCH->to()))) : 0)) } || do { (($MATCH)->{to} = $pos1); 1 }) } && (do { (my $m2 = $grammar->or_list_exp($str, $MATCH->to())); if ($m2) { (($MATCH)->{to} = $m2->to());($MATCH->{'or_list_exp'} = $m2);1 } else { 0 } } && (do { ($MATCH->{capture} = (Rul::Or->new( 'or_list' => ${$MATCH->{'or_list_exp'}}, ))) } || 1))) } }); $MATCH }
}
1;
4 libjs/MiniPerl6/Emitter/Token.js
View
@@ -44,7 +44,7 @@ if (typeof Rul$Quantifier != 'object') {
// method emit
Rul$Quantifier.f_emit = function () {
var v_self = this;
- try { if ( f_bool(( f_bool((v_self.v_quant == "")) && f_bool((v_self.v_greedy == "")) )) ) { (function () { throw(v_self.v_term.f_emit()); })() } else { (function () { null })() };if ( f_bool(( f_bool((v_self.v_quant == "+")) && f_bool((v_self.v_greedy == "")) )) ) { (function () { v_self.v_term.f_set_captures_to_array();throw(( f_string("do { ") + f_string(( f_string("my $last_match_null := 0; ") + f_string(( f_string("my $last_pos := $MATCH.to; ") + f_string(( f_string("my $count := 0; ") + f_string(( f_string("while ") + f_string(( f_string(v_self.v_term.f_emit()) + f_string(( f_string(" && ($last_match_null < 2) ") + f_string(( f_string("{ ") + f_string(( f_string("if $last_pos == $MATCH.to { ") + f_string(( f_string("$last_match_null := $last_match_null + 1; ") + f_string(( f_string("} ") + f_string(( f_string("else { ") + f_string(( f_string("$last_match_null := 0; ") + f_string(( f_string("} ") + f_string(( f_string("$last_pos := $MATCH.to; ") + f_string(( f_string("$count := $count + 1; ") + f_string(( f_string("}; ") + f_string(( f_string("$MATCH.to := $last_pos; ") + f_string(( f_string("$count > 0; ") + f_string("}") )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )); })() } else { (function () { null })() };if ( f_bool(( f_bool((v_self.v_quant == "*")) && f_bool((v_self.v_greedy == "")) )) ) { (function () { v_self.v_term.f_set_captures_to_array();throw(( f_string("do { ") + f_string(( f_string("my $last_match_null := 0; ") + f_string(( f_string("my $last_pos := $MATCH.to; ") + f_string(( f_string("while ") + f_string(( f_string(v_self.v_term.f_emit()) + f_string(( f_string(" && ($last_match_null < 2) ") + f_string(( f_string("{ ") + f_string(( f_string("if $last_pos == $MATCH.to { ") + f_string(( f_string("$last_match_null := $last_match_null + 1; ") + f_string(( f_string("} ") + f_string(( f_string("else { ") + f_string(( f_string("$last_match_null := 0; ") + f_string(( f_string("} ") + f_string(( f_string("$last_pos := $MATCH.to; ") + f_string(( f_string("}; ") + f_string(( f_string("$MATCH.to := $last_pos; ") + f_string(( f_string("1 ") + f_string("}") )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )); })() } else { (function () { null })() };f_warn(( f_string("Rul::Quantifier: ") + f_string(( f_string(v_self.v_quant) + f_string(( f_string(v_self.v_greedy) + f_string(" not implemented") )) )) ));return(v_self.v_term.f_emit()) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+ try { if ( f_bool(( f_bool((v_self.v_quant == "")) && f_bool((v_self.v_greedy == "")) )) ) { (function () { throw(v_self.v_term.f_emit()); })() } else { (function () { null })() };if ( f_bool(( f_bool((v_self.v_quant == "+")) && f_bool((v_self.v_greedy == "")) )) ) { (function () { v_self.v_term.f_set_captures_to_array();throw(( f_string("do { ") + f_string(( f_string("my $last_match_null := 0; ") + f_string(( f_string("my $last_pos := $MATCH.to; ") + f_string(( f_string("my $count := 0; ") + f_string(( f_string("while ") + f_string(( f_string(v_self.v_term.f_emit()) + f_string(( f_string(" && ($last_match_null < 2) ") + f_string(( f_string("{ ") + f_string(( f_string("if $last_pos == $MATCH.to { ") + f_string(( f_string("$last_match_null := $last_match_null + 1; ") + f_string(( f_string("} ") + f_string(( f_string("else { ") + f_string(( f_string("$last_match_null := 0; ") + f_string(( f_string("} ") + f_string(( f_string("$last_pos := $MATCH.to; ") + f_string(( f_string("$count := $count + 1; ") + f_string(( f_string("}; ") + f_string(( f_string("$MATCH.to := $last_pos; ") + f_string(( f_string("$count > 0; ") + f_string("}") )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )); })() } else { (function () { null })() };if ( f_bool(( f_bool((v_self.v_quant == "*")) && f_bool((v_self.v_greedy == "")) )) ) { (function () { v_self.v_term.f_set_captures_to_array();throw(( f_string("do { ") + f_string(( f_string("my $last_match_null := 0; ") + f_string(( f_string("my $last_pos := $MATCH.to; ") + f_string(( f_string("while ") + f_string(( f_string(v_self.v_term.f_emit()) + f_string(( f_string(" && ($last_match_null < 2) ") + f_string(( f_string("{ ") + f_string(( f_string("if $last_pos == $MATCH.to { ") + f_string(( f_string("$last_match_null := $last_match_null + 1; ") + f_string(( f_string("} ") + f_string(( f_string("else { ") + f_string(( f_string("$last_match_null := 0; ") + f_string(( f_string("} ") + f_string(( f_string("$last_pos := $MATCH.to; ") + f_string(( f_string("}; ") + f_string(( f_string("$MATCH.to := $last_pos; ") + f_string(( f_string("1 ") + f_string("}") )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )); })() } else { (function () { null })() };if ( f_bool(( f_bool((v_self.v_quant == "?")) && f_bool((v_self.v_greedy == "")) )) ) { (function () { v_self.v_term.f_set_captures_to_array();throw(( f_string("do { ") + f_string(( f_string("my $last_pos := $MATCH.to; ") + f_string(( f_string("if !(do {") + f_string(( f_string(v_self.v_term.f_emit()) + f_string(( f_string("}) ") + f_string(( f_string("{ ") + f_string(( f_string("$MATCH.to := $last_pos; ") + f_string(( f_string("}; ") + f_string(( f_string("1 ") + f_string("}") )) )) )) )) )) )) )) )) )); })() } else { (function () { null })() };f_warn(( f_string("Rul::Quantifier: ") + f_string(( f_string(v_self.v_quant) + f_string(( f_string(v_self.v_greedy) + f_string(" not implemented") )) )) ));return(v_self.v_term.f_emit()) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
Rul$Quantifier.f_emit; // v8 bug workaround
// method set_captures_to_array
@@ -126,7 +126,7 @@ if (typeof Rul$Subrule != 'object') {
Rul$Subrule.f_emit = function () {
var v_self = this;
try { var v_meth;var v_code = null;
-(v_meth = ( f_bool(f_add(1, f_index(v_self.v_metasyntax, "."))) ? v_self.v_metasyntax : ( f_string("$grammar.") + f_string(v_self.v_metasyntax) )));if ( f_bool((v_self.v_captures == 1)) ) { (function () { (v_code = ( f_string("if $m2 { $MATCH.to := $m2.to; $MATCH{'") + f_string(( f_string(v_self.v_metasyntax) + f_string("'} := $m2; 1 } else { false } ") )) )); })() } else { (function () { if ( f_bool((v_self.v_captures > 1)) ) { (function () { (v_code = ( f_string("if $m2 { $MATCH.to := $m2.to; ($MATCH{'") + f_string(( f_string(v_self.v_metasyntax) + f_string("'}).push( $m2 ); 1 } else { false } ") )) )); })() } else { (function () { (v_code = "if $m2 { $MATCH.to := $m2.to; 1 } else { false } "); })() }; })() };return(( f_string("do { ") + f_string(( f_string("my $m2 := ") + f_string(( f_string(v_meth) + f_string(( f_string("($str, $MATCH.to); ") + f_string(( f_string(v_code) + f_string("}") )) )) )) )) )) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_meth = ( f_bool(f_add(1, f_index(v_self.v_metasyntax, "."))) ? v_self.v_metasyntax : ( f_string("$grammar.") + f_string(v_self.v_metasyntax) )));if ( f_bool((v_self.v_captures == 1)) ) { (function () { (v_code = ( f_string("if $m2 { $MATCH.to := $m2.to; $MATCH{'") + f_string(( f_string(v_self.v_metasyntax) + f_string("'} := $m2; 1 } else { false } ") )) )); })() } else { (function () { if ( f_bool((v_self.v_captures > 1)) ) { (function () { (v_code = ( f_string("if $m2 { ") + f_string(( f_string("$MATCH.to := $m2.to; ") + f_string(( f_string("if exists $MATCH{'") + f_string(( f_string(v_self.v_metasyntax) + f_string(( f_string("'} { ") + f_string(( f_string("($MATCH{'") + f_string(( f_string(v_self.v_metasyntax) + f_string(( f_string("'}).push( $m2 ); ") + f_string(( f_string("} ") + f_string(( f_string("else { ") + f_string(( f_string("$MATCH{'") + f_string(( f_string(v_self.v_metasyntax) + f_string(( f_string("'} := [ $m2 ]; ") + f_string(( f_string("} ") + f_string(( f_string("1 ") + f_string("} else { false } ") )) )) )) )) )) )) )) )) )) )) )) )) )) )) )); })() } else { (function () { (v_code = "if $m2 { $MATCH.to := $m2.to; 1 } else { false } "); })() }; })() };return(( f_string("do { ") + f_string(( f_string("my $m2 := ") + f_string(( f_string(v_meth) + f_string(( f_string("($str, $MATCH.to); ") + f_string(( f_string(v_code) + f_string("}") )) )) )) )) )) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
Rul$Subrule.f_emit; // v8 bug workaround
// method set_captures_to_array
50 libjs/MiniPerl6/Grammar.js
View
@@ -59,21 +59,21 @@ var v_Class_name = null;
MiniPerl6$Grammar.f_opt_ws = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ws"] = v_m2);return(1) } else { return(0) } })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_opt_ws; // v8 bug workaround
// method opt_ws2
MiniPerl6$Grammar.f_opt_ws2 = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ws"] = v_m2);return(1) } else { return(0) } })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_opt_ws2; // v8 bug workaround
// method opt_ws3
MiniPerl6$Grammar.f_opt_ws3 = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ws"] = v_m2);return(1) } else { return(0) } })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_opt_ws3; // v8 bug workaround
// method parse
@@ -87,7 +87,7 @@ var v_Class_name = null;
MiniPerl6$Grammar.f_comp_unit = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(( f_bool((";" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })()) && f_bool(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(( f_bool(("use" == (v_str || "").substr(v_MATCH.f_to(), 3))) ? f_add(1, (v_MATCH.v_to = f_add(3, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("v6-" == (v_str || "").substr(v_MATCH.f_to(), 3))) ? f_add(1, (v_MATCH.v_to = f_add(3, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool((";" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("use" == (v_str || "").substr(v_MATCH.f_to(), 3))) ? f_add(1, (v_MATCH.v_to = f_add(3, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("v6" == (v_str || "").substr(v_MATCH.f_to(), 2))) ? f_add(1, (v_MATCH.v_to = f_add(2, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool((";" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) )) )) )) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) )) })()) && f_bool(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("class" == (v_str || "").substr(v_MATCH.f_to(), 5))) ? f_add(1, (v_MATCH.v_to = f_add(5, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("grammar" == (v_str || "").substr(v_MATCH.f_to(), 7))) ? f_add(1, (v_MATCH.v_to = f_add(7, v_MATCH.f_to()))) : 0)) })()) )) })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_full_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["full_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("{" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool((function () { return((v_Class_name = (v_MATCH["full_ident"]).f_string())) })()) || f_bool(1) )) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp_stmts(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp_stmts"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("}" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(( f_bool((";" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_name: f_scalar(v_MATCH["full_ident"]),v_attributes: { },v_methods: { },v_body: f_scalar(v_MATCH["exp_stmts"]),}; tmp.__proto__ = CompUnit; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool(( f_bool((";" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["opt_ws"] = v_m2);return(1) } else { return(0) } })()) )) })()) })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) && f_bool(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(( f_bool(("use" == (v_str || "").substr(v_MATCH.f_to(), 3))) ? f_add(1, (v_MATCH.v_to = f_add(3, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("v6-" == (v_str || "").substr(v_MATCH.f_to(), 3))) ? f_add(1, (v_MATCH.v_to = f_add(3, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool((";" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("use" == (v_str || "").substr(v_MATCH.f_to(), 3))) ? f_add(1, (v_MATCH.v_to = f_add(3, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("v6" == (v_str || "").substr(v_MATCH.f_to(), 2))) ? f_add(1, (v_MATCH.v_to = f_add(2, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool((";" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) )) )) )) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) )) })()) && f_bool(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("class" == (v_str || "").substr(v_MATCH.f_to(), 5))) ? f_add(1, (v_MATCH.v_to = f_add(5, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("grammar" == (v_str || "").substr(v_MATCH.f_to(), 7))) ? f_add(1, (v_MATCH.v_to = f_add(7, v_MATCH.f_to()))) : 0)) })()) )) })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_full_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["full_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("{" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool((function () { return((v_Class_name = (v_MATCH["full_ident"]).f_string())) })()) || f_bool(1) )) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp_stmts(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp_stmts"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("}" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool(( f_bool((";" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["opt_ws"] = v_m2);return(1) } else { return(0) } })()) )) })()) })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_name: f_scalar(v_MATCH["full_ident"]),v_attributes: { },v_methods: { },v_body: f_scalar(v_MATCH["exp_stmts"]),}; tmp.__proto__ = CompUnit; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_comp_unit; // v8 bug workaround
// method infix_op
@@ -101,7 +101,7 @@ var v_Class_name = null;
MiniPerl6$Grammar.f_hyper_op = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((">>" == (v_str || "").substr(v_MATCH.f_to(), 2))) ? f_add(1, (v_MATCH.v_to = f_add(2, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return(( f_bool((">>" == (v_str || "").substr(v_MATCH.f_to(), 2))) ? f_add(1, (v_MATCH.v_to = f_add(2, v_MATCH.f_to()))) : 0)) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_hyper_op; // v8 bug workaround
// method prefix_op
@@ -171,21 +171,21 @@ if (typeof MiniPerl6$Grammar != 'object') {
MiniPerl6$Grammar.f_sub_or_method_name = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_full_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["full_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(( f_bool(("." == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ident"] = v_m2);return(1) } else { return(0) } })()) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })()) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_full_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["full_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool(( f_bool(("." == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());if ( f_bool((v_MATCH).hasOwnProperty("ident")) ) { (function () { v_MATCH["ident"].push(v_m2); })() } else { (function () { (v_MATCH["ident"] = [v_m2]); })() };return(1) } else { return(0) } })()) )) })()) })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_sub_or_method_name; // v8 bug workaround
// method opt_type
MiniPerl6$Grammar.f_opt_type = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("::" == (v_str || "").substr(v_MATCH.f_to(), 2))) ? f_add(1, (v_MATCH.v_to = f_add(2, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_full_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["full_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["full_ident"]))) })()) || f_bool(1) )) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(1) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = "")) })()) || f_bool(1) )) )) })()) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return(( f_bool(("::" == (v_str || "").substr(v_MATCH.f_to(), 2))) ? f_add(1, (v_MATCH.v_to = f_add(2, v_MATCH.f_to()))) : 0)) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_full_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["full_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["full_ident"]))) })()) || f_bool(1) )) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(1) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = "")) })()) || f_bool(1) )) )) })()) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_opt_type; // v8 bug workaround
// method exp_term
MiniPerl6$Grammar.f_exp_term = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_var_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["var_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["var_ident"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_prefix_op(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["prefix_op"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_namespace: "",v_code: ( f_string("prefix:<") + f_string(( f_string(v_MATCH["prefix_op"]) + f_string(">") )) ),v_arguments: [f_scalar(v_MATCH["exp"])],}; tmp.__proto__ = Apply; return tmp }())) })()) || f_bool(1) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("(" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool((")" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["exp"]))) })()) || f_bool(1) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("{" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp_mapping(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp_mapping"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("}" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_hash1: f_scalar(v_MATCH["exp_mapping"]),}; tmp.__proto__ = Lit$Hash; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("[" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp_seq(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp_seq"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("]" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_array1: f_scalar(v_MATCH["exp_seq"]),}; tmp.__proto__ = Lit$Array; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("$" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("<" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_sub_or_method_name(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["sub_or_method_name"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool((">" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_obj: function () { var tmp = {v_sigil: "$",v_twigil: "",v_name: "/",}; tmp.__proto__ = Var; return tmp }(),v_index_exp: function () { var tmp = {v_buf: f_scalar(v_MATCH["sub_or_method_name"]),}; tmp.__proto__ = Val$Buf; return tmp }(),}; tmp.__proto__ = Lookup; return tmp }())) })()) || f_bool(1) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("d" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("o" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("{" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp_stmts(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp_stmts"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("}" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_block: f_scalar(v_MATCH["exp_stmts"]),}; tmp.__proto__ = Do; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_declarator(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["declarator"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_type(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["opt_type"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_var_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["var_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_decl: f_scalar(v_MATCH["declarator"]),v_type: f_scalar(v_MATCH["opt_type"]),v_var: f_scalar(v_MATCH["var_ident"]),}; tmp.__proto__ = Decl; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("u" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("s" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("e" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_full_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["full_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(( f_bool(("-" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ident"] = v_m2);return(1) } else { return(0) } })()) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_mod: f_scalar(v_MATCH["full_ident"]),}; tmp.__proto__ = Use; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_val(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["val"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["val"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_lit(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["lit"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["lit"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_token(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["token"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["token"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_method_def(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["method_def"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["method_def"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_sub_def(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["sub_def"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["sub_def"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_control(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["control"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["control"]))) })()) || f_bool(1) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_apply(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["apply"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["apply"]))) })()) || f_bool(1) )) )) })()) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_var_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["var_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["var_ident"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_prefix_op(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["prefix_op"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_namespace: "",v_code: ( f_string("prefix:<") + f_string(( f_string(v_MATCH["prefix_op"]) + f_string(">") )) ),v_arguments: [f_scalar(v_MATCH["exp"])],}; tmp.__proto__ = Apply; return tmp }())) })()) || f_bool(1) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("(" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool((")" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["exp"]))) })()) || f_bool(1) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("{" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp_mapping(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp_mapping"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("}" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_hash1: f_scalar(v_MATCH["exp_mapping"]),}; tmp.__proto__ = Lit$Hash; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("[" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp_seq(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp_seq"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("]" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_array1: f_scalar(v_MATCH["exp_seq"]),}; tmp.__proto__ = Lit$Array; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("$" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("<" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_sub_or_method_name(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["sub_or_method_name"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool((">" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_obj: function () { var tmp = {v_sigil: "$",v_twigil: "",v_name: "/",}; tmp.__proto__ = Var; return tmp }(),v_index_exp: function () { var tmp = {v_buf: f_scalar(v_MATCH["sub_or_method_name"]),}; tmp.__proto__ = Val$Buf; return tmp }(),}; tmp.__proto__ = Lookup; return tmp }())) })()) || f_bool(1) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("d" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("o" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("{" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp_stmts(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp_stmts"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("}" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_block: f_scalar(v_MATCH["exp_stmts"]),}; tmp.__proto__ = Do; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_declarator(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["declarator"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_type(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["opt_type"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_var_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["var_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_decl: f_scalar(v_MATCH["declarator"]),v_type: f_scalar(v_MATCH["opt_type"]),v_var: f_scalar(v_MATCH["var_ident"]),}; tmp.__proto__ = Decl; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("u" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("s" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("e" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_full_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["full_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool(( f_bool(("-" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());if ( f_bool((v_MATCH).hasOwnProperty("ident")) ) { (function () { v_MATCH["ident"].push(v_m2); })() } else { (function () { (v_MATCH["ident"] = [v_m2]); })() };return(1) } else { return(0) } })()) )) })()) })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_mod: f_scalar(v_MATCH["full_ident"]),}; tmp.__proto__ = Use; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_val(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["val"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["val"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_lit(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["lit"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["lit"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_token(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["token"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["token"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_method_def(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["method_def"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["method_def"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_sub_def(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["sub_def"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["sub_def"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_control(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["control"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["control"]))) })()) || f_bool(1) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_apply(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["apply"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["apply"]))) })()) || f_bool(1) )) )) })()) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_exp_term; // v8 bug workaround
})();
@@ -210,7 +210,7 @@ if (typeof MiniPerl6$Grammar != 'object') {
MiniPerl6$Grammar.f_var_twigil = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("." == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("!" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("^" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("*" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) )) )) )) })()) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("." == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("!" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("^" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("*" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) )) )) )) })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_var_twigil; // v8 bug workaround
// method var_name
@@ -270,7 +270,7 @@ if (typeof MiniPerl6$Grammar != 'object') {
MiniPerl6$Grammar.f_val_num = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_digits(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["digits"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("e" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("E" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) )) })()) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_digits(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["digits"] = v_m2);return(1) } else { return(0) } })()) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("." == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_digits(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["digits"] = v_m2);return(1) } else { return(0) } })()) && f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("e" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("E" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) )) })()) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_digits(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["digits"] = v_m2);return(1) } else { return(0) } })()) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })()) )) )) })()) )) })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_num: (v_MATCH).f_string(),}; tmp.__proto__ = Val$Num; return tmp }())) })()) || f_bool(1) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_digits(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["digits"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("e" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("E" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) )) })()) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_digits(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["digits"] = v_m2);return(1) } else { return(0) } })()) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("." == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_digits(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["digits"] = v_m2);return(1) } else { return(0) } })()) && f_bool((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("e" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("E" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) )) })()) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_digits(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());if ( f_bool((v_MATCH).hasOwnProperty("digits")) ) { (function () { v_MATCH["digits"].push(v_m2); })() } else { (function () { (v_MATCH["digits"] = [v_m2]); })() };return(1) } else { return(0) } })()) )) })()) })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) )) )) })()) )) })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_num: (v_MATCH).f_string(),}; tmp.__proto__ = Val$Num; return tmp }())) })()) || f_bool(1) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_val_num; // v8 bug workaround
// method char_any
@@ -340,34 +340,6 @@ if (typeof MiniPerl6$Grammar != 'object') {
(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_lit_object(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["lit_object"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["lit_object"]))) })()) || f_bool(1) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_lit; // v8 bug workaround
- // method lit_seq
- MiniPerl6$Grammar.f_lit_seq = function (v_str, v_pos) {
- var v_grammar = this;
- try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = "TODO: lit_seq")) })()) || f_bool(1) )) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
- }
- MiniPerl6$Grammar.f_lit_seq; // v8 bug workaround
- // method lit_array
- MiniPerl6$Grammar.f_lit_array = function (v_str, v_pos) {
- var v_grammar = this;
- try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = "TODO: lit_array")) })()) || f_bool(1) )) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
- }
- MiniPerl6$Grammar.f_lit_array; // v8 bug workaround
- // method lit_hash
- MiniPerl6$Grammar.f_lit_hash = function (v_str, v_pos) {
- var v_grammar = this;
- try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = "TODO: lit_hash")) })()) || f_bool(1) )) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
- }
- MiniPerl6$Grammar.f_lit_hash; // v8 bug workaround
- // method lit_code
- MiniPerl6$Grammar.f_lit_code = function (v_str, v_pos) {
- var v_grammar = this;
- try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = "TODO - Lit::Code")) })()) || f_bool(1) )) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
- }
- MiniPerl6$Grammar.f_lit_code; // v8 bug workaround
// method lit_object
MiniPerl6$Grammar.f_lit_object = function (v_str, v_pos) {
var v_grammar = this;
@@ -400,7 +372,7 @@ if (typeof MiniPerl6$Grammar != 'object') {
MiniPerl6$Grammar.f_opt_name = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ident"] = v_m2);return(1) } else { return(0) } })()) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());if ( f_bool((v_MATCH).hasOwnProperty("ident")) ) { (function () { v_MATCH["ident"].push(v_m2); })() } else { (function () { (v_MATCH["ident"] = [v_m2]); })() };return(1) } else { return(0) } })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_opt_name; // v8 bug workaround
// method var_invocant
4 libjs/MiniPerl6/Grammar/Regex.js
View
@@ -97,7 +97,7 @@ var Hash_rule_terms = {};
MiniPerl6$Grammar$Regex.f_rule_term = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_variables(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["variables"] = v_m2);return(1) } else { return(0) } })()) && f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool((":=" == (v_str || "").substr(v_MATCH.f_to(), 2))) ? f_add(1, (v_MATCH.v_to = f_add(2, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_named_capture_body(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["named_capture_body"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_rule_exp: f_scalar(v_MATCH["named_capture_body"]),v_capture_ident: f_scalar(v_MATCH["variables"]),}; tmp.__proto__ = Rul$NamedCapture; return tmp }())) })()) || f_bool(1) )) )) )) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["variables"]))) })()) || f_bool(1) )) })()) )) })()) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_rule_terms(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["rule_terms"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["rule_terms"]))) })()) || f_bool(1) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_tmp;(v_tmp = v_MATCH);(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_tmp.f_to(),v_to: v_tmp.f_to(),v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("]" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("}" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((")" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((">" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((":" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("?" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("+" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("*" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("|" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("&" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("/" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) )) )) )) )) )) )) )) )) )) )) })());(v_tmp.v_bool = ( f_bool(v_MATCH) ? false : true));(v_MATCH = v_tmp);return(( f_bool(v_MATCH) ? true : false)) })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_any(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["any"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_constant: f_scalar(v_MATCH["any"]),}; tmp.__proto__ = Rul$Constant; return tmp }())) })()) || f_bool(1) )) )) )) })()) )) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_variables(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["variables"] = v_m2);return(1) } else { return(0) } })()) && f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ws"] = v_m2);return(1) } else { return(0) } })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) && f_bool(( f_bool(( f_bool((":=" == (v_str || "").substr(v_MATCH.f_to(), 2))) ? f_add(1, (v_MATCH.v_to = f_add(2, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ws"] = v_m2);return(1) } else { return(0) } })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_named_capture_body(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["named_capture_body"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_rule_exp: f_scalar(v_MATCH["named_capture_body"]),v_capture_ident: f_scalar(v_MATCH["variables"]),}; tmp.__proto__ = Rul$NamedCapture; return tmp }())) })()) || f_bool(1) )) )) )) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["variables"]))) })()) || f_bool(1) )) })()) )) })()) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_rule_terms(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["rule_terms"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["rule_terms"]))) })()) || f_bool(1) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_tmp;(v_tmp = v_MATCH);(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_tmp.f_to(),v_to: v_tmp.f_to(),v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("]" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("}" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((")" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((">" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((":" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("?" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("+" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("*" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("|" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("&" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("/" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) )) )) )) )) )) )) )) )) )) )) })());(v_tmp.v_bool = ( f_bool(v_MATCH) ? false : true));(v_MATCH = v_tmp);return(( f_bool(v_MATCH) ? true : false)) })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_any(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["any"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_constant: f_scalar(v_MATCH["any"]),}; tmp.__proto__ = Rul$Constant; return tmp }())) })()) || f_bool(1) )) )) )) })()) )) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar$Regex.f_rule_term; // v8 bug workaround
// method quant_exp
@@ -146,7 +146,7 @@ var Hash_rule_terms = {};
MiniPerl6$Grammar$Regex.f_rule = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(("|" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_or_list_exp(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["or_list_exp"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_or_list: f_scalar(v_MATCH["or_list_exp"]),}; tmp.__proto__ = Rul$Or; return tmp }())) })()) || f_bool(1) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ws"] = v_m2);return(1) } else { return(0) } })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) && f_bool(( f_bool(("|" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_or_list_exp(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["or_list_exp"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_or_list: f_scalar(v_MATCH["or_list_exp"]),}; tmp.__proto__ = Rul$Or; return tmp }())) })()) || f_bool(1) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar$Regex.f_rule; // v8 bug workaround
})();
4 liblisp/MiniPerl6/Emitter/Token.lisp
View
@@ -159,7 +159,7 @@ new-slots))
(:documentation "a method")))
(defmethod sv-emit ((sv-self mp-Rul-Quantifier))
(block mp6-function
- (progn (if (sv-bool (sv-and (sv-eq (sv-quant sv-self) "") (sv-eq (sv-greedy sv-self) ""))) (progn (return-from mp6-function (sv-emit (sv-term sv-self) ))) nil)(if (sv-bool (sv-and (sv-eq (sv-quant sv-self) "+") (sv-eq (sv-greedy sv-self) ""))) (progn (sv-set_captures_to_array (sv-term sv-self) )(return-from mp6-function (concatenate 'string (sv-string "do { ") (sv-string (concatenate 'string (sv-string "my $last_match_null := 0; ") (sv-string (concatenate 'string (sv-string "my $last_pos := $MATCH.to; ") (sv-string (concatenate 'string (sv-string "my $count := 0; ") (sv-string (concatenate 'string (sv-string "while ") (sv-string (concatenate 'string (sv-string (sv-emit (sv-term sv-self) )) (sv-string (concatenate 'string (sv-string " && ($last_match_null < 2) ") (sv-string (concatenate 'string (sv-string "{ ") (sv-string (concatenate 'string (sv-string "if $last_pos == $MATCH.to { ") (sv-string (concatenate 'string (sv-string "$last_match_null := $last_match_null + 1; ") (sv-string (concatenate 'string (sv-string "} ") (sv-string (concatenate 'string (sv-string "else { ") (sv-string (concatenate 'string (sv-string "$last_match_null := 0; ") (sv-string (concatenate 'string (sv-string "} ") (sv-string (concatenate 'string (sv-string "$last_pos := $MATCH.to; ") (sv-string (concatenate 'string (sv-string "$count := $count + 1; ") (sv-string (concatenate 'string (sv-string "}; ") (sv-string (concatenate 'string (sv-string "$MATCH.to := $last_pos; ") (sv-string (concatenate 'string (sv-string "$count > 0; ") (sv-string "}")))))))))))))))))))))))))))))))))))))))) nil)(if (sv-bool (sv-and (sv-eq (sv-quant sv-self) "*") (sv-eq (sv-greedy sv-self) ""))) (progn (sv-set_captures_to_array (sv-term sv-self) )(return-from mp6-function (concatenate 'string (sv-string "do { ") (sv-string (concatenate 'string (sv-string "my $last_match_null := 0; ") (sv-string (concatenate 'string (sv-string "my $last_pos := $MATCH.to; ") (sv-string (concatenate 'string (sv-string "while ") (sv-string (concatenate 'string (sv-string (sv-emit (sv-term sv-self) )) (sv-string (concatenate 'string (sv-string " && ($last_match_null < 2) ") (sv-string (concatenate 'string (sv-string "{ ") (sv-string (concatenate 'string (sv-string "if $last_pos == $MATCH.to { ") (sv-string (concatenate 'string (sv-string "$last_match_null := $last_match_null + 1; ") (sv-string (concatenate 'string (sv-string "} ") (sv-string (concatenate 'string (sv-string "else { ") (sv-string (concatenate 'string (sv-string "$last_match_null := 0; ") (sv-string (concatenate 'string (sv-string "} ") (sv-string (concatenate 'string (sv-string "$last_pos := $MATCH.to; ") (sv-string (concatenate 'string (sv-string "}; ") (sv-string (concatenate 'string (sv-string "$MATCH.to := $last_pos; ") (sv-string (concatenate 'string (sv-string "1 ") (sv-string "}")))))))))))))))))))))))))))))))))))) nil)(write-line (format nil "~{~a~}" (list (concatenate 'string (sv-string "Rul::Quantifier: ") (sv-string (concatenate 'string (sv-string (sv-quant sv-self)) (sv-string (concatenate 'string (sv-string (sv-greedy sv-self)) (sv-string " not implemented")))))))) *error-output*)(sv-emit (sv-term sv-self) ))))
+ (progn (if (sv-bool (sv-and (sv-eq (sv-quant sv-self) "") (sv-eq (sv-greedy sv-self) ""))) (progn (return-from mp6-function (sv-emit (sv-term sv-self) ))) nil)(if (sv-bool (sv-and (sv-eq (sv-quant sv-self) "+") (sv-eq (sv-greedy sv-self) ""))) (progn (sv-set_captures_to_array (sv-term sv-self) )(return-from mp6-function (concatenate 'string (sv-string "do { ") (sv-string (concatenate 'string (sv-string "my $last_match_null := 0; ") (sv-string (concatenate 'string (sv-string "my $last_pos := $MATCH.to; ") (sv-string (concatenate 'string (sv-string "my $count := 0; ") (sv-string (concatenate 'string (sv-string "while ") (sv-string (concatenate 'string (sv-string (sv-emit (sv-term sv-self) )) (sv-string (concatenate 'string (sv-string " && ($last_match_null < 2) ") (sv-string (concatenate 'string (sv-string "{ ") (sv-string (concatenate 'string (sv-string "if $last_pos == $MATCH.to { ") (sv-string (concatenate 'string (sv-string "$last_match_null := $last_match_null + 1; ") (sv-string (concatenate 'string (sv-string "} ") (sv-string (concatenate 'string (sv-string "else { ") (sv-string (concatenate 'string (sv-string "$last_match_null := 0; ") (sv-string (concatenate 'string (sv-string "} ") (sv-string (concatenate 'string (sv-string "$last_pos := $MATCH.to; ") (sv-string (concatenate 'string (sv-string "$count := $count + 1; ") (sv-string (concatenate 'string (sv-string "}; ") (sv-string (concatenate 'string (sv-string "$MATCH.to := $last_pos; ") (sv-string (concatenate 'string (sv-string "$count > 0; ") (sv-string "}")))))))))))))))))))))))))))))))))))))))) nil)(if (sv-bool (sv-and (sv-eq (sv-quant sv-self) "*") (sv-eq (sv-greedy sv-self) ""))) (progn (sv-set_captures_to_array (sv-term sv-self) )(return-from mp6-function (concatenate 'string (sv-string "do { ") (sv-string (concatenate 'string (sv-string "my $last_match_null := 0; ") (sv-string (concatenate 'string (sv-string "my $last_pos := $MATCH.to; ") (sv-string (concatenate 'string (sv-string "while ") (sv-string (concatenate 'string (sv-string (sv-emit (sv-term sv-self) )) (sv-string (concatenate 'string (sv-string " && ($last_match_null < 2) ") (sv-string (concatenate 'string (sv-string "{ ") (sv-string (concatenate 'string (sv-string "if $last_pos == $MATCH.to { ") (sv-string (concatenate 'string (sv-string "$last_match_null := $last_match_null + 1; ") (sv-string (concatenate 'string (sv-string "} ") (sv-string (concatenate 'string (sv-string "else { ") (sv-string (concatenate 'string (sv-string "$last_match_null := 0; ") (sv-string (concatenate 'string (sv-string "} ") (sv-string (concatenate 'string (sv-string "$last_pos := $MATCH.to; ") (sv-string (concatenate 'string (sv-string "}; ") (sv-string (concatenate 'string (sv-string "$MATCH.to := $last_pos; ") (sv-string (concatenate 'string (sv-string "1 ") (sv-string "}")))))))))))))))))))))))))))))))))))) nil)(if (sv-bool (sv-and (sv-eq (sv-quant sv-self) "?") (sv-eq (sv-greedy sv-self) ""))) (progn (sv-set_captures_to_array (sv-term sv-self) )(return-from mp6-function (concatenate 'string (sv-string "do { ") (sv-string (concatenate 'string (sv-string "my $last_pos := $MATCH.to; ") (sv-string (concatenate 'string (sv-string "if !(do {") (sv-string (concatenate 'string (sv-string (sv-emit (sv-term sv-self) )) (sv-string (concatenate 'string (sv-string "}) ") (sv-string (concatenate 'string (sv-string "{ ") (sv-string (concatenate 'string (sv-string "$MATCH.to := $last_pos; ") (sv-string (concatenate 'string (sv-string "}; ") (sv-string (concatenate 'string (sv-string "1 ") (sv-string "}")))))))))))))))))))) nil)(write-line (format nil "~{~a~}" (list (concatenate 'string (sv-string "Rul::Quantifier: ") (sv-string (concatenate 'string (sv-string (sv-quant sv-self)) (sv-string (concatenate 'string (sv-string (sv-greedy sv-self)) (sv-string " not implemented")))))))) *error-output*)(sv-emit (sv-term sv-self) ))))
;; method set_captures_to_array
(if (not (ignore-errors (find-method 'sv-set_captures_to_array () ())))
@@ -306,7 +306,7 @@ new-slots))
(:documentation "a method")))
(defmethod sv-emit ((sv-self mp-Rul-Subrule))
(block mp6-function
- (let ((sv-meth (sv-undef))(sv-code (sv-undef))) (setf sv-meth (if (sv-bool (sv-add 1 (sv-index (sv-metasyntax sv-self) "."))) (sv-metasyntax sv-self) (concatenate 'string (sv-string "$grammar.") (sv-string (sv-metasyntax sv-self)))))(if (sv-bool (sv-numeric-equal (sv-captures sv-self) 1)) (progn (setf sv-code (concatenate 'string (sv-string "if $m2 { $MATCH.to := $m2.to; $MATCH{'") (sv-string (concatenate 'string (sv-string (sv-metasyntax sv-self)) (sv-string "'} := $m2; 1 } else { false } ")))))) (progn (if (sv-bool (sv-numeric-bigger (sv-captures sv-self) 1)) (progn (setf sv-code (concatenate 'string (sv-string "if $m2 { $MATCH.to := $m2.to; ($MATCH{'") (sv-string (concatenate 'string (sv-string (sv-metasyntax sv-self)) (sv-string "'}).push( $m2 ); 1 } else { false } ")))))) (progn (setf sv-code "if $m2 { $MATCH.to := $m2.to; 1 } else { false } ")))))(concatenate 'string (sv-string "do { ") (sv-string (concatenate 'string (sv-string "my $m2 := ") (sv-string (concatenate 'string (sv-string sv-meth) (sv-string (concatenate 'string (sv-string "($str, $MATCH.to); ") (sv-string (concatenate 'string (sv-string sv-code) (sv-string "}")))))))))))))
+ (let ((sv-meth (sv-undef))(sv-code (sv-undef))) (setf sv-meth (if (sv-bool (sv-add 1 (sv-index (sv-metasyntax sv-self) "."))) (sv-metasyntax sv-self) (concatenate 'string (sv-string "$grammar.") (sv-string (sv-metasyntax sv-self)))))(if (sv-bool (sv-numeric-equal (sv-captures sv-self) 1)) (progn (setf sv-code (concatenate 'string (sv-string "if $m2 { $MATCH.to := $m2.to; $MATCH{'") (sv-string (concatenate 'string (sv-string (sv-metasyntax sv-self)) (sv-string "'} := $m2; 1 } else { false } ")))))) (progn (if (sv-bool (sv-numeric-bigger (sv-captures sv-self) 1)) (progn (setf sv-code (concatenate 'string (sv-string "if $m2 { ") (sv-string (concatenate 'string (sv-string "$MATCH.to := $m2.to; ") (sv-string (concatenate 'string (sv-string "if exists $MATCH{'") (sv-string (concatenate 'string (sv-string (sv-metasyntax sv-self)) (sv-string (concatenate 'string (sv-string "'} { ") (sv-string (concatenate 'string (sv-string "($MATCH{'") (sv-string (concatenate 'string (sv-string (sv-metasyntax sv-self)) (sv-string (concatenate 'string (sv-string "'}).push( $m2 ); ") (sv-string (concatenate 'string (sv-string "} ") (sv-string (concatenate 'string (sv-string "else { ") (sv-string (concatenate 'string (sv-string "$MATCH{'") (sv-string (concatenate 'string (sv-string (sv-metasyntax sv-self)) (sv-string (concatenate 'string (sv-string "'} := [ $m2 ]; ") (sv-string (concatenate 'string (sv-string "} ") (sv-string (concatenate 'string (sv-string "1 ") (sv-string "} else { false } ")))))))))))))))))))))))))))))))) (progn (setf sv-code "if $m2 { $MATCH.to := $m2.to; 1 } else { false } ")))))(concatenate 'string (sv-string "do { ") (sv-string (concatenate 'string (sv-string "my $m2 := ") (sv-string (concatenate 'string (sv-string sv-meth) (sv-string (concatenate 'string (sv-string "($str, $MATCH.to); ") (sv-string (concatenate 'string (sv-string sv-code) (sv-string "}")))))))))))))
;; method set_captures_to_array
(if (not (ignore-errors (find-method 'sv-set_captures_to_array () ())))
54 liblisp/MiniPerl6/Grammar.lisp
View
@@ -79,7 +79,7 @@
(:documentation "a method")))
(defmethod sv-opt_ws ((sv-grammar mp-MiniPerl6-Grammar) &optional sv-str sv-pos)
(block mp6-function
- (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil)))) (progn (setf (sv-to sv-MATCH ) sv-pos1)1))))sv-MATCH)))
+ (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (let ((sv-last_pos (sv-undef))) (setf sv-last_pos (sv-to sv-MATCH ))(if (sv-bool (not (sv-bool (progn (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "ws" sv-MATCH) sv-m2)1) (progn nil))))))) (progn (setf (sv-to sv-MATCH ) sv-last_pos)) nil)1))))sv-MATCH)))
;; method opt_ws2
(if (not (ignore-errors (find-method 'sv-opt_ws2 () ())))
@@ -87,7 +87,7 @@
(:documentation "a method")))
(defmethod sv-opt_ws2 ((sv-grammar mp-MiniPerl6-Grammar) &optional sv-str sv-pos)
(block mp6-function
- (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil)))) (progn (setf (sv-to sv-MATCH ) sv-pos1)1))))sv-MATCH)))
+ (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (let ((sv-last_pos (sv-undef))) (setf sv-last_pos (sv-to sv-MATCH ))(if (sv-bool (not (sv-bool (progn (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "ws" sv-MATCH) sv-m2)1) (progn nil))))))) (progn (setf (sv-to sv-MATCH ) sv-last_pos)) nil)1))))sv-MATCH)))
;; method opt_ws3
(if (not (ignore-errors (find-method 'sv-opt_ws3 () ())))
@@ -95,7 +95,7 @@
(:documentation "a method")))
(defmethod sv-opt_ws3 ((sv-grammar mp-MiniPerl6-Grammar) &optional sv-str sv-pos)
(block mp6-function
- (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil)))) (progn (setf (sv-to sv-MATCH ) sv-pos1)1))))sv-MATCH)))
+ (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (let ((sv-last_pos (sv-undef))) (setf sv-last_pos (sv-to sv-MATCH ))(if (sv-bool (not (sv-bool (progn (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "ws" sv-MATCH) sv-m2)1) (progn nil))))))) (progn (setf (sv-to sv-MATCH ) sv-last_pos)) nil)1))))sv-MATCH)))
;; method parse
(if (not (ignore-errors (find-method 'sv-parse () ())))
@@ -111,7 +111,7 @@
(:documentation "a method")))
(defmethod sv-comp_unit ((sv-grammar mp-MiniPerl6-Grammar) &optional sv-str sv-pos)
(block mp6-function
- (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (if (sv-bool (sv-eq ";" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))))) (progn (setf (sv-to sv-MATCH ) sv-pos1)1))) (sv-and (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (if (sv-bool (sv-eq "use" (sv-substr sv-str (sv-to sv-MATCH ) 3))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 3 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq "v6-" (sv-substr sv-str (sv-to sv-MATCH ) 3))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 3 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "ident" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq ";" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil)))))))))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (if (sv-bool (sv-eq "use" (sv-substr sv-str (sv-to sv-MATCH ) 3))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 3 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq "v6" (sv-substr sv-str (sv-to sv-MATCH ) 2))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 2 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq ";" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))))))))) (progn (setf (sv-to sv-MATCH ) sv-pos1)1)))) (sv-and (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (if (sv-bool (sv-eq "class" (sv-substr sv-str (sv-to sv-MATCH ) 5))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 5 (sv-to sv-MATCH )))) nil)) (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "grammar" (sv-substr sv-str (sv-to sv-MATCH ) 7))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 7 (sv-to sv-MATCH )))) nil)))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-full_ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "full_ident" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq "{" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (sv-or (progn (setf sv-Class_name (sv-string (mp-Main::sv-hash-lookup "full_ident" sv-MATCH)))) 1) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-exp_stmts sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "exp_stmts" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq "}" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (if (sv-bool (sv-eq ";" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))))) (progn (setf (sv-to sv-MATCH ) sv-pos1)1))) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-CompUnit))) (setf (sv-name m) (sv-scalar (mp-Main::sv-hash-lookup "full_ident" sv-MATCH)))(setf (sv-attributes m) (make-hash-table :test 'equal))(setf (sv-methods m) (make-hash-table :test 'equal))(setf (sv-body m) (sv-scalar (mp-Main::sv-hash-lookup "exp_stmts" sv-MATCH))) m))) 1)))))))))))))))))))sv-MATCH)))
+ (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-last_pos (sv-undef))) (setf sv-last_pos (sv-to sv-MATCH ))(if (sv-bool (not (sv-bool (progn (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (sv-and (if (sv-bool (sv-eq ";" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "opt_ws" sv-MATCH) sv-m2)1) (progn nil)))))))))) (progn (setf (sv-to sv-MATCH ) sv-last_pos)) nil)1) (sv-and (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (if (sv-bool (sv-eq "use" (sv-substr sv-str (sv-to sv-MATCH ) 3))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 3 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq "v6-" (sv-substr sv-str (sv-to sv-MATCH ) 3))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 3 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "ident" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq ";" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil)))))))))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (if (sv-bool (sv-eq "use" (sv-substr sv-str (sv-to sv-MATCH ) 3))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 3 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq "v6" (sv-substr sv-str (sv-to sv-MATCH ) 2))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 2 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq ";" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))))))))) (progn (setf (sv-to sv-MATCH ) sv-pos1)1)))) (sv-and (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (if (sv-bool (sv-eq "class" (sv-substr sv-str (sv-to sv-MATCH ) 5))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 5 (sv-to sv-MATCH )))) nil)) (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "grammar" (sv-substr sv-str (sv-to sv-MATCH ) 7))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 7 (sv-to sv-MATCH )))) nil)))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-full_ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "full_ident" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq "{" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (sv-or (progn (setf sv-Class_name (sv-string (mp-Main::sv-hash-lookup "full_ident" sv-MATCH)))) 1) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-exp_stmts sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "exp_stmts" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq "}" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-last_pos (sv-undef))) (setf sv-last_pos (sv-to sv-MATCH ))(if (sv-bool (not (sv-bool (progn (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (sv-and (if (sv-bool (sv-eq ";" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "opt_ws" sv-MATCH) sv-m2)1) (progn nil)))))))))) (progn (setf (sv-to sv-MATCH ) sv-last_pos)) nil)1) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-CompUnit))) (setf (sv-name m) (sv-scalar (mp-Main::sv-hash-lookup "full_ident" sv-MATCH)))(setf (sv-attributes m) (make-hash-table :test 'equal))(setf (sv-methods m) (make-hash-table :test 'equal))(setf (sv-body m) (sv-scalar (mp-Main::sv-hash-lookup "exp_stmts" sv-MATCH))) m))) 1)))))))))))))))))))sv-MATCH)))
;; method infix_op
(if (not (ignore-errors (find-method 'sv-infix_op () ())))
@@ -127,7 +127,7 @@
(:documentation "a method")))
(defmethod sv-hyper_op ((sv-grammar mp-MiniPerl6-Grammar) &optional sv-str sv-pos)
(block mp6-function
- (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (if (sv-bool (sv-eq ">>" (sv-substr sv-str (sv-to sv-MATCH ) 2))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 2 (sv-to sv-MATCH )))) nil)) (progn (setf (sv-to sv-MATCH ) sv-pos1)1))))sv-MATCH)))
+ (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (let ((sv-last_pos (sv-undef))) (setf sv-last_pos (sv-to sv-MATCH ))(if (sv-bool (not (sv-bool (progn (if (sv-bool (sv-eq ">>" (sv-substr sv-str (sv-to sv-MATCH ) 2))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 2 (sv-to sv-MATCH )))) nil))))) (progn (setf (sv-to sv-MATCH ) sv-last_pos)) nil)1))))sv-MATCH)))
;; method prefix_op
(if (not (ignore-errors (find-method 'sv-prefix_op () ())))
@@ -213,7 +213,7 @@
(:documentation "a method")))
(defmethod sv-sub_or_method_name ((sv-grammar mp-MiniPerl6-Grammar) &optional sv-str sv-pos)
(block mp6-function
- (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-full_ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "full_ident" sv-MATCH) sv-m2)1) (progn nil))) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (if (sv-bool (sv-eq "." (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "ident" sv-MATCH) sv-m2)1) (progn nil))))) (progn (setf (sv-to sv-MATCH ) sv-pos1)1)))))))sv-MATCH)))
+ (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-full_ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "full_ident" sv-MATCH) sv-m2)1) (progn nil))) (let ((sv-last_pos (sv-undef))) (setf sv-last_pos (sv-to sv-MATCH ))(if (sv-bool (not (sv-bool (progn (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (sv-and (if (sv-bool (sv-eq "." (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(if (sv-bool (nth-value 1 (mp-Main::sv-hash-lookup "ident" sv-MATCH))) (progn (sv-push (mp-Main::sv-hash-lookup "ident" sv-MATCH) sv-m2)) (progn (setf (mp-Main::sv-hash-lookup "ident" sv-MATCH) (let ((_tmp_ (concatenate 'list (list sv-m2)))) (make-array (length _tmp_) :adjustable 1 :fill-pointer t :initial-contents _tmp_)))))1) (progn nil)))))))))) (progn (setf (sv-to sv-MATCH ) sv-last_pos)) nil)1)))))sv-MATCH)))
;; method opt_type
(if (not (ignore-errors (find-method 'sv-opt_type () ())))
@@ -221,7 +221,7 @@
(:documentation "a method")))
(defmethod sv-opt_type ((sv-grammar mp-MiniPerl6-Grammar) &optional sv-str sv-pos)
(block mp6-function
- (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (if (sv-bool (sv-eq "::" (sv-substr sv-str (sv-to sv-MATCH ) 2))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 2 (sv-to sv-MATCH )))) nil)) (progn (setf (sv-to sv-MATCH ) sv-pos1)1))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-full_ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "full_ident" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "full_ident" sv-MATCH)))) 1)))) (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and 1 (sv-or (progn (setf (sv-capture sv-MATCH) "")) 1))))))sv-MATCH)))
+ (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (let ((sv-last_pos (sv-undef))) (setf sv-last_pos (sv-to sv-MATCH ))(if (sv-bool (not (sv-bool (progn (if (sv-bool (sv-eq "::" (sv-substr sv-str (sv-to sv-MATCH ) 2))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 2 (sv-to sv-MATCH )))) nil))))) (progn (setf (sv-to sv-MATCH ) sv-last_pos)) nil)1) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-full_ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "full_ident" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "full_ident" sv-MATCH)))) 1)))) (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and 1 (sv-or (progn (setf (sv-capture sv-MATCH) "")) 1))))))sv-MATCH)))
;; method exp_term
(if (not (ignore-errors (find-method 'sv-exp_term () ())))
@@ -229,7 +229,7 @@
(:documentation "a method")))
(defmethod sv-exp_term ((sv-grammar mp-MiniPerl6-Grammar) &optional sv-str sv-pos)
(block mp6-function
- (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-var_ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "var_ident" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "var_ident" sv-MATCH)))) 1))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-prefix_op sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "prefix_op" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-exp sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "exp" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Apply))) (setf (sv-namespace m) "")(setf (sv-code m) (concatenate 'string (sv-string "prefix:<") (sv-string (concatenate 'string (sv-string (mp-Main::sv-hash-lookup "prefix_op" sv-MATCH)) (sv-string ">")))))(setf (sv-arguments m) (let ((_tmp_ (concatenate 'list (list (sv-scalar (mp-Main::sv-hash-lookup "exp" sv-MATCH)))))) (make-array (length _tmp_) :adjustable 1 :fill-pointer t :initial-contents _tmp_))) m))) 1)))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (if (sv-bool (sv-eq "(" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-exp sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "exp" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq ")" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "exp" sv-MATCH)))) 1))))))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (if (sv-bool (sv-eq "{" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-exp_mapping sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "exp_mapping" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq "}" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Lit-Hash))) (setf (sv-hash1 m) (sv-scalar (mp-Main::sv-hash-lookup "exp_mapping" sv-MATCH))) m))) 1))))))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (if (sv-bool (sv-eq "[" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-exp_seq sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "exp_seq" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq "]" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Lit-Array))) (setf (sv-array1 m) (sv-scalar (mp-Main::sv-hash-lookup "exp_seq" sv-MATCH))) m))) 1))))))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (if (sv-bool (sv-eq "$" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (if (sv-bool (sv-eq "<" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-sub_or_method_name sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "sub_or_method_name" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (if (sv-bool (sv-eq ">" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Lookup))) (setf (sv-obj m) (let ((m (make-instance 'mp-Var))) (setf (sv-sigil m) "$")(setf (sv-twigil m) "")(setf (sv-name m) "/") m))(setf (sv-index_exp m) (let ((m (make-instance 'mp-Val-Buf))) (setf (sv-buf m) (sv-scalar (mp-Main::sv-hash-lookup "sub_or_method_name" sv-MATCH))) m)) m))) 1)))))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (if (sv-bool (sv-eq "d" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (if (sv-bool (sv-eq "o" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq "{" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-exp_stmts sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "exp_stmts" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq "}" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Do))) (setf (sv-block m) (sv-scalar (mp-Main::sv-hash-lookup "exp_stmts" sv-MATCH))) m))) 1)))))))))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-declarator sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "declarator" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_type sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "opt_type" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-var_ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "var_ident" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Decl))) (setf (sv-decl m) (sv-scalar (mp-Main::sv-hash-lookup "declarator" sv-MATCH)))(setf (sv-type m) (sv-scalar (mp-Main::sv-hash-lookup "opt_type" sv-MATCH)))(setf (sv-var m) (sv-scalar (mp-Main::sv-hash-lookup "var_ident" sv-MATCH))) m))) 1))))))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (if (sv-bool (sv-eq "u" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (if (sv-bool (sv-eq "s" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (if (sv-bool (sv-eq "e" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-full_ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "full_ident" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (if (sv-bool (sv-eq "-" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "ident" sv-MATCH) sv-m2)1) (progn nil))))) (progn (setf (sv-to sv-MATCH ) sv-pos1)1))) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Use))) (setf (sv-mod m) (sv-scalar (mp-Main::sv-hash-lookup "full_ident" sv-MATCH))) m))) 1)))))))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-val sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "val" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "val" sv-MATCH)))) 1))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-lit sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "lit" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "lit" sv-MATCH)))) 1))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-token sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "token" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "token" sv-MATCH)))) 1))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-method_def sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "method_def" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "method_def" sv-MATCH)))) 1))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-sub_def sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "sub_def" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "sub_def" sv-MATCH)))) 1))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-control sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "control" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "control" sv-MATCH)))) 1))) (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-apply sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "apply" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "apply" sv-MATCH)))) 1))))))))))))))))))))sv-MATCH)))
+ (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-var_ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "var_ident" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "var_ident" sv-MATCH)))) 1))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-prefix_op sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "prefix_op" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-exp sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "exp" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Apply))) (setf (sv-namespace m) "")(setf (sv-code m) (concatenate 'string (sv-string "prefix:<") (sv-string (concatenate 'string (sv-string (mp-Main::sv-hash-lookup "prefix_op" sv-MATCH)) (sv-string ">")))))(setf (sv-arguments m) (let ((_tmp_ (concatenate 'list (list (sv-scalar (mp-Main::sv-hash-lookup "exp" sv-MATCH)))))) (make-array (length _tmp_) :adjustable 1 :fill-pointer t :initial-contents _tmp_))) m))) 1)))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (if (sv-bool (sv-eq "(" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-exp sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "exp" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq ")" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "exp" sv-MATCH)))) 1))))))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (if (sv-bool (sv-eq "{" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-exp_mapping sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "exp_mapping" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq "}" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Lit-Hash))) (setf (sv-hash1 m) (sv-scalar (mp-Main::sv-hash-lookup "exp_mapping" sv-MATCH))) m))) 1))))))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (if (sv-bool (sv-eq "[" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-exp_seq sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "exp_seq" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq "]" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Lit-Array))) (setf (sv-array1 m) (sv-scalar (mp-Main::sv-hash-lookup "exp_seq" sv-MATCH))) m))) 1))))))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (if (sv-bool (sv-eq "$" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (if (sv-bool (sv-eq "<" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-sub_or_method_name sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "sub_or_method_name" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (if (sv-bool (sv-eq ">" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Lookup))) (setf (sv-obj m) (let ((m (make-instance 'mp-Var))) (setf (sv-sigil m) "$")(setf (sv-twigil m) "")(setf (sv-name m) "/") m))(setf (sv-index_exp m) (let ((m (make-instance 'mp-Val-Buf))) (setf (sv-buf m) (sv-scalar (mp-Main::sv-hash-lookup "sub_or_method_name" sv-MATCH))) m)) m))) 1)))))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (if (sv-bool (sv-eq "d" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (if (sv-bool (sv-eq "o" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq "{" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-exp_stmts sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "exp_stmts" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq "}" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Do))) (setf (sv-block m) (sv-scalar (mp-Main::sv-hash-lookup "exp_stmts" sv-MATCH))) m))) 1)))))))))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-declarator sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "declarator" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_type sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "opt_type" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-opt_ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-var_ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "var_ident" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Decl))) (setf (sv-decl m) (sv-scalar (mp-Main::sv-hash-lookup "declarator" sv-MATCH)))(setf (sv-type m) (sv-scalar (mp-Main::sv-hash-lookup "opt_type" sv-MATCH)))(setf (sv-var m) (sv-scalar (mp-Main::sv-hash-lookup "var_ident" sv-MATCH))) m))) 1))))))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (if (sv-bool (sv-eq "u" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (if (sv-bool (sv-eq "s" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (if (sv-bool (sv-eq "e" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-full_ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "full_ident" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-last_pos (sv-undef))) (setf sv-last_pos (sv-to sv-MATCH ))(if (sv-bool (not (sv-bool (progn (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (sv-and (if (sv-bool (sv-eq "-" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(if (sv-bool (nth-value 1 (mp-Main::sv-hash-lookup "ident" sv-MATCH))) (progn (sv-push (mp-Main::sv-hash-lookup "ident" sv-MATCH) sv-m2)) (progn (setf (mp-Main::sv-hash-lookup "ident" sv-MATCH) (let ((_tmp_ (concatenate 'list (list sv-m2)))) (make-array (length _tmp_) :adjustable 1 :fill-pointer t :initial-contents _tmp_)))))1) (progn nil)))))))))) (progn (setf (sv-to sv-MATCH ) sv-last_pos)) nil)1) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Use))) (setf (sv-mod m) (sv-scalar (mp-Main::sv-hash-lookup "full_ident" sv-MATCH))) m))) 1)))))))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-val sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "val" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "val" sv-MATCH)))) 1))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-lit sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "lit" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "lit" sv-MATCH)))) 1))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-token sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "token" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "token" sv-MATCH)))) 1))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-method_def sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "method_def" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "method_def" sv-MATCH)))) 1))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-sub_def sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "sub_def" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "sub_def" sv-MATCH)))) 1))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-control sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "control" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "control" sv-MATCH)))) 1))) (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-apply sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "apply" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "apply" sv-MATCH)))) 1))))))))))))))))))))sv-MATCH)))
(defmethod sv-perl ((self mp-MiniPerl6-Grammar))
(mp-Main::sv-lisp_dump_object "::MiniPerl6::Grammar" (list )))
@@ -258,7 +258,7 @@
(:documentation "a method")))
(defmethod sv-var_twigil ((sv-grammar mp-MiniPerl6-Grammar) &optional sv-str sv-pos)
(block mp6-function
- (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (if (sv-bool (sv-eq "." (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "!" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "^" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "*" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil))))))) (progn (setf (sv-to sv-MATCH ) sv-pos1)1))))sv-MATCH)))
+ (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (let ((sv-last_pos (sv-undef))) (setf sv-last_pos (sv-to sv-MATCH ))(if (sv-bool (not (sv-bool (progn (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (if (sv-bool (sv-eq "." (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "!" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "^" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "*" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)))))))))) (progn (setf (sv-to sv-MATCH ) sv-last_pos)) nil)1))))sv-MATCH)))
;; method var_name
(if (not (ignore-errors (find-method 'sv-var_name () ())))
@@ -327,7 +327,7 @@
(:documentation "a method")))
(defmethod sv-val_num ((sv-grammar mp-MiniPerl6-Grammar) &optional sv-str sv-pos)
(block mp6-function
- (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-digits sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "digits" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (if (sv-bool (sv-eq "e" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "E" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)))) (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-digits sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "digits" sv-MATCH) sv-m2)1) (progn nil))))) (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (if (sv-bool (sv-eq "." (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-digits sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "digits" sv-MATCH) sv-m2)1) (progn nil))) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (if (sv-bool (sv-eq "e" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "E" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)))) (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-digits sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "digits" sv-MATCH) sv-m2)1) (progn nil))))) (progn (setf (sv-to sv-MATCH ) sv-pos1)1)))))))) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Val-Num))) (setf (sv-num m) (sv-string sv-MATCH)) m))) 1))))))sv-MATCH)))
+ (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-digits sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "digits" sv-MATCH) sv-m2)1) (progn nil))) (sv-and (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (if (sv-bool (sv-eq "e" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "E" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)))) (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-digits sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "digits" sv-MATCH) sv-m2)1) (progn nil))))) (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (if (sv-bool (sv-eq "." (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-digits sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "digits" sv-MATCH) sv-m2)1) (progn nil))) (let ((sv-last_pos (sv-undef))) (setf sv-last_pos (sv-to sv-MATCH ))(if (sv-bool (not (sv-bool (progn (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (sv-and (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (if (sv-bool (sv-eq "e" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "E" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)))) (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-digits sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(if (sv-bool (nth-value 1 (mp-Main::sv-hash-lookup "digits" sv-MATCH))) (progn (sv-push (mp-Main::sv-hash-lookup "digits" sv-MATCH) sv-m2)) (progn (setf (mp-Main::sv-hash-lookup "digits" sv-MATCH) (let ((_tmp_ (concatenate 'list (list sv-m2)))) (make-array (length _tmp_) :adjustable 1 :fill-pointer t :initial-contents _tmp_)))))1) (progn nil)))))))))) (progn (setf (sv-to sv-MATCH ) sv-last_pos)) nil)1)))))) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Val-Num))) (setf (sv-num m) (sv-string sv-MATCH)) m))) 1))))))sv-MATCH)))
;; method char_any
(if (not (ignore-errors (find-method 'sv-char_any () ())))
@@ -406,38 +406,6 @@
(block mp6-function
(let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-lit_object sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "lit_object" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "lit_object" sv-MATCH)))) 1)))))sv-MATCH)))
-;; method lit_seq
-(if (not (ignore-errors (find-method 'sv-lit_seq () ())))
- (defgeneric sv-lit_seq (sv-grammar &optional sv-str sv-pos)
- (:documentation "a method")))
-(defmethod sv-lit_seq ((sv-grammar mp-MiniPerl6-Grammar) &optional sv-str sv-pos)
- (block mp6-function
- (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (sv-and (if (sv-bool (sv-eq "X" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (if (sv-bool (sv-eq "X" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (if (sv-bool (sv-eq "X" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-or (progn (setf (sv-capture sv-MATCH) "TODO: lit_seq")) 1)))))))sv-MATCH)))
-
-;; method lit_array
-(if (not (ignore-errors (find-method 'sv-lit_array () ())))
- (defgeneric sv-lit_array (sv-grammar &optional sv-str sv-pos)
- (:documentation "a method")))
-(defmethod sv-lit_array ((sv-grammar mp-MiniPerl6-Grammar) &optional sv-str sv-pos)
- (block mp6-function
- (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (sv-and (if (sv-bool (sv-eq "X" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (if (sv-bool (sv-eq "X" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (if (sv-bool (sv-eq "X" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-or (progn (setf (sv-capture sv-MATCH) "TODO: lit_array")) 1)))))))sv-MATCH)))
-
-;; method lit_hash
-(if (not (ignore-errors (find-method 'sv-lit_hash () ())))
- (defgeneric sv-lit_hash (sv-grammar &optional sv-str sv-pos)
- (:documentation "a method")))
-(defmethod sv-lit_hash ((sv-grammar mp-MiniPerl6-Grammar) &optional sv-str sv-pos)
- (block mp6-function
- (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (sv-and (if (sv-bool (sv-eq "X" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (if (sv-bool (sv-eq "X" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (if (sv-bool (sv-eq "X" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-or (progn (setf (sv-capture sv-MATCH) "TODO: lit_hash")) 1)))))))sv-MATCH)))
-
-;; method lit_code
-(if (not (ignore-errors (find-method 'sv-lit_code () ())))
- (defgeneric sv-lit_code (sv-grammar &optional sv-str sv-pos)
- (:documentation "a method")))
-(defmethod sv-lit_code ((sv-grammar mp-MiniPerl6-Grammar) &optional sv-str sv-pos)
- (block mp6-function
- (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (sv-and (if (sv-bool (sv-eq "X" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (if (sv-bool (sv-eq "X" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-and (if (sv-bool (sv-eq "X" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil) (sv-or (progn (setf (sv-capture sv-MATCH) "TODO - Lit::Code")) 1)))))))sv-MATCH)))
-
;; method lit_object
(if (not (ignore-errors (find-method 'sv-lit_object () ())))
(defgeneric sv-lit_object (sv-grammar &optional sv-str sv-pos)
@@ -476,7 +444,7 @@
(:documentation "a method")))
(defmethod sv-opt_name ((sv-grammar mp-MiniPerl6-Grammar) &optional sv-str sv-pos)
(block mp6-function
- (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "ident" sv-MATCH) sv-m2)1) (progn nil)))) (progn (setf (sv-to sv-MATCH ) sv-pos1)1))))sv-MATCH)))
+ (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (let ((sv-last_pos (sv-undef))) (setf sv-last_pos (sv-to sv-MATCH ))(if (sv-bool (not (sv-bool (progn (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ident sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(if (sv-bool (nth-value 1 (mp-Main::sv-hash-lookup "ident" sv-MATCH))) (progn (sv-push (mp-Main::sv-hash-lookup "ident" sv-MATCH) sv-m2)) (progn (setf (mp-Main::sv-hash-lookup "ident" sv-MATCH) (let ((_tmp_ (concatenate 'list (list sv-m2)))) (make-array (length _tmp_) :adjustable 1 :fill-pointer t :initial-contents _tmp_)))))1) (progn nil))))))) (progn (setf (sv-to sv-MATCH ) sv-last_pos)) nil)1))))sv-MATCH)))
;; method var_invocant
(if (not (ignore-errors (find-method 'sv-var_invocant () ())))
4 liblisp/MiniPerl6/Grammar/Regex.lisp
View
@@ -111,7 +111,7 @@
(:documentation "a method")))
(defmethod sv-rule_term ((sv-grammar mp-MiniPerl6-Grammar-Regex) &optional sv-str sv-pos)
(block mp6-function
- (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-variables sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "variables" sv-MATCH) sv-m2)1) (progn nil))) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (if (sv-bool (sv-eq ":=" (sv-substr sv-str (sv-to sv-MATCH ) 2))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 2 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-named_capture_body sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "named_capture_body" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Rul-NamedCapture))) (setf (sv-rule_exp m) (sv-scalar (mp-Main::sv-hash-lookup "named_capture_body" sv-MATCH)))(setf (sv-capture_ident m) (sv-scalar (mp-Main::sv-hash-lookup "variables" sv-MATCH))) m))) 1)))))) (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "variables" sv-MATCH)))) 1)))))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-rule_terms sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "rule_terms" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "rule_terms" sv-MATCH)))) 1))) (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-tmp (sv-undef))) (setf sv-tmp sv-MATCH)(setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) (sv-to sv-tmp ))(setf (sv-to m) (sv-to sv-tmp ))(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (if (sv-bool (sv-eq "]" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "}" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq ")" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq ">" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq ":" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "?" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "+" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "*" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "|" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "&" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "/" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil))))))))))))))(setf (sv-bool sv-tmp ) (not (sv-bool sv-MATCH)))(setf sv-MATCH sv-tmp)(sv-bool sv-MATCH)) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-any sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "any" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Rul-Constant))) (setf (sv-constant m) (sv-scalar (mp-Main::sv-hash-lookup "any" sv-MATCH))) m))) 1))))))))sv-MATCH)))
+ (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-variables sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "variables" sv-MATCH) sv-m2)1) (progn nil))) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (let ((sv-last_pos (sv-undef))) (setf sv-last_pos (sv-to sv-MATCH ))(if (sv-bool (not (sv-bool (progn (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "ws" sv-MATCH) sv-m2)1) (progn nil))))))) (progn (setf (sv-to sv-MATCH ) sv-last_pos)) nil)1) (sv-and (if (sv-bool (sv-eq ":=" (sv-substr sv-str (sv-to sv-MATCH ) 2))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 2 (sv-to sv-MATCH )))) nil) (sv-and (let ((sv-last_pos (sv-undef))) (setf sv-last_pos (sv-to sv-MATCH ))(if (sv-bool (not (sv-bool (progn (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "ws" sv-MATCH) sv-m2)1) (progn nil))))))) (progn (setf (sv-to sv-MATCH ) sv-last_pos)) nil)1) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-named_capture_body sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "named_capture_body" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Rul-NamedCapture))) (setf (sv-rule_exp m) (sv-scalar (mp-Main::sv-hash-lookup "named_capture_body" sv-MATCH)))(setf (sv-capture_ident m) (sv-scalar (mp-Main::sv-hash-lookup "variables" sv-MATCH))) m))) 1)))))) (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "variables" sv-MATCH)))) 1)))))) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-rule_terms sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "rule_terms" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (sv-scalar (mp-Main::sv-hash-lookup "rule_terms" sv-MATCH)))) 1))) (progn (setf (sv-to sv-MATCH ) sv-pos1)(sv-and (let ((sv-tmp (sv-undef))) (setf sv-tmp sv-MATCH)(setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) (sv-to sv-tmp ))(setf (sv-to m) (sv-to sv-tmp ))(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (if (sv-bool (sv-eq "]" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "}" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq ")" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq ">" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq ":" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "?" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "+" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "*" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "|" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (sv-or (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "&" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil)) (progn (setf (sv-to sv-MATCH ) sv-pos1)(if (sv-bool (sv-eq "/" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil))))))))))))))(setf (sv-bool sv-tmp ) (not (sv-bool sv-MATCH)))(setf sv-MATCH sv-tmp)(sv-bool sv-MATCH)) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-any sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "any" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Rul-Constant))) (setf (sv-constant m) (sv-scalar (mp-Main::sv-hash-lookup "any" sv-MATCH))) m))) 1))))))))sv-MATCH)))
;; method quant_exp
(if (not (ignore-errors (find-method 'sv-quant_exp () ())))
@@ -167,7 +167,7 @@
(:documentation "a method")))
(defmethod sv-rule ((sv-grammar mp-MiniPerl6-Grammar-Regex) &optional sv-str sv-pos)
(block mp6-function
- (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (sv-and (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))1) (progn nil))) (if (sv-bool (sv-eq "|" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil))) (progn (setf (sv-to sv-MATCH ) sv-pos1)1))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-or_list_exp sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "or_list_exp" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Rul-Or))) (setf (sv-or_list m) (sv-scalar (mp-Main::sv-hash-lookup "or_list_exp" sv-MATCH))) m))) 1))))))sv-MATCH)))
+ (let ((sv-MATCH (sv-undef))) (setf sv-MATCH (let ((m (make-instance 'mp-MiniPerl6-Match))) (setf (sv-str m) sv-str)(setf (sv-from m) sv-pos)(setf (sv-to m) sv-pos)(setf (sv-bool m) 1) m))(setf (sv-bool sv-MATCH ) (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(progn (sv-and (let ((sv-pos1 (sv-undef))) (setf sv-pos1 (sv-to sv-MATCH ))(sv-or (progn (sv-and (let ((sv-last_pos (sv-undef))) (setf sv-last_pos (sv-to sv-MATCH ))(if (sv-bool (not (sv-bool (progn (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-ws sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "ws" sv-MATCH) sv-m2)1) (progn nil))))))) (progn (setf (sv-to sv-MATCH ) sv-last_pos)) nil)1) (if (sv-bool (sv-eq "|" (sv-substr sv-str (sv-to sv-MATCH ) 1))) (sv-add 1 (setf (sv-to sv-MATCH ) (sv-add 1 (sv-to sv-MATCH )))) nil))) (progn (setf (sv-to sv-MATCH ) sv-pos1)1))) (sv-and (let ((sv-m2 (sv-undef))) (setf sv-m2 (sv-or_list_exp sv-grammar sv-str (sv-to sv-MATCH )))(if (sv-bool sv-m2) (progn (setf (sv-to sv-MATCH ) (sv-to sv-m2 ))(setf (mp-Main::sv-hash-lookup "or_list_exp" sv-MATCH) sv-m2)1) (progn nil))) (sv-or (progn (setf (sv-capture sv-MATCH) (let ((m (make-instance 'mp-Rul-Or))) (setf (sv-or_list m) (sv-scalar (mp-Main::sv-hash-lookup "or_list_exp" sv-MATCH))) m))) 1))))))sv-MATCH)))
(defmethod sv-perl ((self mp-MiniPerl6-Grammar-Regex))
(mp-Main::sv-lisp_dump_object "::MiniPerl6::Grammar::Regex" (list )))
58 perlito.js
View
@@ -1112,21 +1112,21 @@ var v_Class_name = null;
MiniPerl6$Grammar.f_opt_ws = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ws"] = v_m2);return(1) } else { return(0) } })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_opt_ws; // v8 bug workaround
// method opt_ws2
MiniPerl6$Grammar.f_opt_ws2 = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ws"] = v_m2);return(1) } else { return(0) } })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_opt_ws2; // v8 bug workaround
// method opt_ws3
MiniPerl6$Grammar.f_opt_ws3 = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ws"] = v_m2);return(1) } else { return(0) } })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_opt_ws3; // v8 bug workaround
// method parse
@@ -1140,7 +1140,7 @@ var v_Class_name = null;
MiniPerl6$Grammar.f_comp_unit = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(( f_bool((";" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })()) && f_bool(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(( f_bool(("use" == (v_str || "").substr(v_MATCH.f_to(), 3))) ? f_add(1, (v_MATCH.v_to = f_add(3, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("v6-" == (v_str || "").substr(v_MATCH.f_to(), 3))) ? f_add(1, (v_MATCH.v_to = f_add(3, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool((";" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("use" == (v_str || "").substr(v_MATCH.f_to(), 3))) ? f_add(1, (v_MATCH.v_to = f_add(3, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("v6" == (v_str || "").substr(v_MATCH.f_to(), 2))) ? f_add(1, (v_MATCH.v_to = f_add(2, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool((";" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) )) )) )) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) )) })()) && f_bool(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("class" == (v_str || "").substr(v_MATCH.f_to(), 5))) ? f_add(1, (v_MATCH.v_to = f_add(5, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("grammar" == (v_str || "").substr(v_MATCH.f_to(), 7))) ? f_add(1, (v_MATCH.v_to = f_add(7, v_MATCH.f_to()))) : 0)) })()) )) })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_full_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["full_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("{" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool((function () { return((v_Class_name = (v_MATCH["full_ident"]).f_string())) })()) || f_bool(1) )) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp_stmts(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp_stmts"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("}" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(( f_bool((";" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_name: f_scalar(v_MATCH["full_ident"]),v_attributes: { },v_methods: { },v_body: f_scalar(v_MATCH["exp_stmts"]),}; tmp.__proto__ = CompUnit; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool(( f_bool((";" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["opt_ws"] = v_m2);return(1) } else { return(0) } })()) )) })()) })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) && f_bool(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(( f_bool(("use" == (v_str || "").substr(v_MATCH.f_to(), 3))) ? f_add(1, (v_MATCH.v_to = f_add(3, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("v6-" == (v_str || "").substr(v_MATCH.f_to(), 3))) ? f_add(1, (v_MATCH.v_to = f_add(3, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool((";" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("use" == (v_str || "").substr(v_MATCH.f_to(), 3))) ? f_add(1, (v_MATCH.v_to = f_add(3, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("v6" == (v_str || "").substr(v_MATCH.f_to(), 2))) ? f_add(1, (v_MATCH.v_to = f_add(2, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool((";" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) )) )) )) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) )) })()) && f_bool(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("class" == (v_str || "").substr(v_MATCH.f_to(), 5))) ? f_add(1, (v_MATCH.v_to = f_add(5, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("grammar" == (v_str || "").substr(v_MATCH.f_to(), 7))) ? f_add(1, (v_MATCH.v_to = f_add(7, v_MATCH.f_to()))) : 0)) })()) )) })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_full_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["full_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("{" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool((function () { return((v_Class_name = (v_MATCH["full_ident"]).f_string())) })()) || f_bool(1) )) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp_stmts(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp_stmts"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("}" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool(( f_bool((";" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["opt_ws"] = v_m2);return(1) } else { return(0) } })()) )) })()) })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_name: f_scalar(v_MATCH["full_ident"]),v_attributes: { },v_methods: { },v_body: f_scalar(v_MATCH["exp_stmts"]),}; tmp.__proto__ = CompUnit; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_comp_unit; // v8 bug workaround
// method infix_op
@@ -1154,7 +1154,7 @@ var v_Class_name = null;
MiniPerl6$Grammar.f_hyper_op = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((">>" == (v_str || "").substr(v_MATCH.f_to(), 2))) ? f_add(1, (v_MATCH.v_to = f_add(2, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return(( f_bool((">>" == (v_str || "").substr(v_MATCH.f_to(), 2))) ? f_add(1, (v_MATCH.v_to = f_add(2, v_MATCH.f_to()))) : 0)) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_hyper_op; // v8 bug workaround
// method prefix_op
@@ -1224,21 +1224,21 @@ if (typeof MiniPerl6$Grammar != 'object') {
MiniPerl6$Grammar.f_sub_or_method_name = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_full_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["full_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(( f_bool(("." == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ident"] = v_m2);return(1) } else { return(0) } })()) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })()) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_full_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["full_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool(( f_bool(("." == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());if ( f_bool((v_MATCH).hasOwnProperty("ident")) ) { (function () { v_MATCH["ident"].push(v_m2); })() } else { (function () { (v_MATCH["ident"] = [v_m2]); })() };return(1) } else { return(0) } })()) )) })()) })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_sub_or_method_name; // v8 bug workaround
// method opt_type
MiniPerl6$Grammar.f_opt_type = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("::" == (v_str || "").substr(v_MATCH.f_to(), 2))) ? f_add(1, (v_MATCH.v_to = f_add(2, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_full_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["full_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["full_ident"]))) })()) || f_bool(1) )) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(1) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = "")) })()) || f_bool(1) )) )) })()) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return(( f_bool(("::" == (v_str || "").substr(v_MATCH.f_to(), 2))) ? f_add(1, (v_MATCH.v_to = f_add(2, v_MATCH.f_to()))) : 0)) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_full_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["full_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["full_ident"]))) })()) || f_bool(1) )) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(1) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = "")) })()) || f_bool(1) )) )) })()) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_opt_type; // v8 bug workaround
// method exp_term
MiniPerl6$Grammar.f_exp_term = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_var_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["var_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["var_ident"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_prefix_op(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["prefix_op"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_namespace: "",v_code: ( f_string("prefix:<") + f_string(( f_string(v_MATCH["prefix_op"]) + f_string(">") )) ),v_arguments: [f_scalar(v_MATCH["exp"])],}; tmp.__proto__ = Apply; return tmp }())) })()) || f_bool(1) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("(" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool((")" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["exp"]))) })()) || f_bool(1) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("{" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp_mapping(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp_mapping"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("}" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_hash1: f_scalar(v_MATCH["exp_mapping"]),}; tmp.__proto__ = Lit$Hash; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("[" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp_seq(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp_seq"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("]" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_array1: f_scalar(v_MATCH["exp_seq"]),}; tmp.__proto__ = Lit$Array; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("$" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("<" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_sub_or_method_name(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["sub_or_method_name"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool((">" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_obj: function () { var tmp = {v_sigil: "$",v_twigil: "",v_name: "/",}; tmp.__proto__ = Var; return tmp }(),v_index_exp: function () { var tmp = {v_buf: f_scalar(v_MATCH["sub_or_method_name"]),}; tmp.__proto__ = Val$Buf; return tmp }(),}; tmp.__proto__ = Lookup; return tmp }())) })()) || f_bool(1) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("d" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("o" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("{" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp_stmts(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp_stmts"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("}" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_block: f_scalar(v_MATCH["exp_stmts"]),}; tmp.__proto__ = Do; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_declarator(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["declarator"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_type(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["opt_type"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_var_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["var_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_decl: f_scalar(v_MATCH["declarator"]),v_type: f_scalar(v_MATCH["opt_type"]),v_var: f_scalar(v_MATCH["var_ident"]),}; tmp.__proto__ = Decl; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("u" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("s" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("e" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_full_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["full_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(( f_bool(("-" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ident"] = v_m2);return(1) } else { return(0) } })()) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_mod: f_scalar(v_MATCH["full_ident"]),}; tmp.__proto__ = Use; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_val(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["val"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["val"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_lit(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["lit"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["lit"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_token(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["token"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["token"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_method_def(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["method_def"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["method_def"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_sub_def(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["sub_def"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["sub_def"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_control(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["control"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["control"]))) })()) || f_bool(1) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_apply(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["apply"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["apply"]))) })()) || f_bool(1) )) )) })()) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_var_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["var_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["var_ident"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_prefix_op(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["prefix_op"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_namespace: "",v_code: ( f_string("prefix:<") + f_string(( f_string(v_MATCH["prefix_op"]) + f_string(">") )) ),v_arguments: [f_scalar(v_MATCH["exp"])],}; tmp.__proto__ = Apply; return tmp }())) })()) || f_bool(1) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("(" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool((")" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["exp"]))) })()) || f_bool(1) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("{" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp_mapping(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp_mapping"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("}" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_hash1: f_scalar(v_MATCH["exp_mapping"]),}; tmp.__proto__ = Lit$Hash; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("[" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp_seq(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp_seq"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("]" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_array1: f_scalar(v_MATCH["exp_seq"]),}; tmp.__proto__ = Lit$Array; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("$" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("<" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_sub_or_method_name(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["sub_or_method_name"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool((">" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_obj: function () { var tmp = {v_sigil: "$",v_twigil: "",v_name: "/",}; tmp.__proto__ = Var; return tmp }(),v_index_exp: function () { var tmp = {v_buf: f_scalar(v_MATCH["sub_or_method_name"]),}; tmp.__proto__ = Val$Buf; return tmp }(),}; tmp.__proto__ = Lookup; return tmp }())) })()) || f_bool(1) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("d" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("o" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("{" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_exp_stmts(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["exp_stmts"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool(("}" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_block: f_scalar(v_MATCH["exp_stmts"]),}; tmp.__proto__ = Do; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_declarator(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["declarator"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_type(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["opt_type"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_opt_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_var_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["var_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_decl: f_scalar(v_MATCH["declarator"]),v_type: f_scalar(v_MATCH["opt_type"]),v_var: f_scalar(v_MATCH["var_ident"]),}; tmp.__proto__ = Decl; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("u" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("s" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("e" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_full_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["full_ident"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool(( f_bool(("-" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());if ( f_bool((v_MATCH).hasOwnProperty("ident")) ) { (function () { v_MATCH["ident"].push(v_m2); })() } else { (function () { (v_MATCH["ident"] = [v_m2]); })() };return(1) } else { return(0) } })()) )) })()) })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_mod: f_scalar(v_MATCH["full_ident"]),}; tmp.__proto__ = Use; return tmp }())) })()) || f_bool(1) )) )) )) )) )) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_val(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["val"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["val"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_lit(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["lit"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["lit"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_token(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["token"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["token"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_method_def(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["method_def"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["method_def"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_sub_def(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["sub_def"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["sub_def"]))) })()) || f_bool(1) )) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_control(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["control"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["control"]))) })()) || f_bool(1) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_apply(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["apply"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["apply"]))) })()) || f_bool(1) )) )) })()) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_exp_term; // v8 bug workaround
})();
@@ -1263,7 +1263,7 @@ if (typeof MiniPerl6$Grammar != 'object') {
MiniPerl6$Grammar.f_var_twigil = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("." == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("!" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("^" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("*" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) )) )) )) })()) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("." == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("!" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("^" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("*" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) )) )) )) })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_var_twigil; // v8 bug workaround
// method var_name
@@ -1323,7 +1323,7 @@ if (typeof MiniPerl6$Grammar != 'object') {
MiniPerl6$Grammar.f_val_num = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_digits(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["digits"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("e" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("E" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) )) })()) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_digits(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["digits"] = v_m2);return(1) } else { return(0) } })()) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("." == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_digits(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["digits"] = v_m2);return(1) } else { return(0) } })()) && f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("e" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("E" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) )) })()) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_digits(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["digits"] = v_m2);return(1) } else { return(0) } })()) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })()) )) )) })()) )) })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_num: (v_MATCH).f_string(),}; tmp.__proto__ = Val$Num; return tmp }())) })()) || f_bool(1) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_digits(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["digits"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("e" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("E" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) )) })()) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_digits(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["digits"] = v_m2);return(1) } else { return(0) } })()) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(( f_bool(("." == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_digits(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["digits"] = v_m2);return(1) } else { return(0) } })()) && f_bool((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("e" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("E" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) )) })()) && f_bool((function () { var v_m2;(v_m2 = v_grammar.f_digits(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());if ( f_bool((v_MATCH).hasOwnProperty("digits")) ) { (function () { v_MATCH["digits"].push(v_m2); })() } else { (function () { (v_MATCH["digits"] = [v_m2]); })() };return(1) } else { return(0) } })()) )) })()) })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) )) )) })()) )) })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_num: (v_MATCH).f_string(),}; tmp.__proto__ = Val$Num; return tmp }())) })()) || f_bool(1) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_val_num; // v8 bug workaround
// method char_any
@@ -1393,34 +1393,6 @@ if (typeof MiniPerl6$Grammar != 'object') {
(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_lit_object(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["lit_object"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["lit_object"]))) })()) || f_bool(1) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_lit; // v8 bug workaround
- // method lit_seq
- MiniPerl6$Grammar.f_lit_seq = function (v_str, v_pos) {
- var v_grammar = this;
- try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = "TODO: lit_seq")) })()) || f_bool(1) )) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
- }
- MiniPerl6$Grammar.f_lit_seq; // v8 bug workaround
- // method lit_array
- MiniPerl6$Grammar.f_lit_array = function (v_str, v_pos) {
- var v_grammar = this;
- try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = "TODO: lit_array")) })()) || f_bool(1) )) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
- }
- MiniPerl6$Grammar.f_lit_array; // v8 bug workaround
- // method lit_hash
- MiniPerl6$Grammar.f_lit_hash = function (v_str, v_pos) {
- var v_grammar = this;
- try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = "TODO: lit_hash")) })()) || f_bool(1) )) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
- }
- MiniPerl6$Grammar.f_lit_hash; // v8 bug workaround
- // method lit_code
- MiniPerl6$Grammar.f_lit_code = function (v_str, v_pos) {
- var v_grammar = this;
- try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool(( f_bool(("X" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = "TODO - Lit::Code")) })()) || f_bool(1) )) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
- }
- MiniPerl6$Grammar.f_lit_code; // v8 bug workaround
// method lit_object
MiniPerl6$Grammar.f_lit_object = function (v_str, v_pos) {
var v_grammar = this;
@@ -1453,7 +1425,7 @@ if (typeof MiniPerl6$Grammar != 'object') {
MiniPerl6$Grammar.f_opt_name = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ident"] = v_m2);return(1) } else { return(0) } })()) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ident(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());if ( f_bool((v_MATCH).hasOwnProperty("ident")) ) { (function () { v_MATCH["ident"].push(v_m2); })() } else { (function () { (v_MATCH["ident"] = [v_m2]); })() };return(1) } else { return(0) } })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar.f_opt_name; // v8 bug workaround
// method var_invocant
@@ -1704,7 +1676,7 @@ var Hash_rule_terms = {};
MiniPerl6$Grammar$Regex.f_rule_term = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_variables(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["variables"] = v_m2);return(1) } else { return(0) } })()) && f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(( f_bool((":=" == (v_str || "").substr(v_MATCH.f_to(), 2))) ? f_add(1, (v_MATCH.v_to = f_add(2, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_named_capture_body(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["named_capture_body"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_rule_exp: f_scalar(v_MATCH["named_capture_body"]),v_capture_ident: f_scalar(v_MATCH["variables"]),}; tmp.__proto__ = Rul$NamedCapture; return tmp }())) })()) || f_bool(1) )) )) )) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["variables"]))) })()) || f_bool(1) )) })()) )) })()) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_rule_terms(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["rule_terms"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["rule_terms"]))) })()) || f_bool(1) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_tmp;(v_tmp = v_MATCH);(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_tmp.f_to(),v_to: v_tmp.f_to(),v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("]" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("}" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((")" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((">" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((":" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("?" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("+" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("*" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("|" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("&" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("/" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) )) )) )) )) )) )) )) )) )) )) })());(v_tmp.v_bool = ( f_bool(v_MATCH) ? false : true));(v_MATCH = v_tmp);return(( f_bool(v_MATCH) ? true : false)) })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_any(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["any"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_constant: f_scalar(v_MATCH["any"]),}; tmp.__proto__ = Rul$Constant; return tmp }())) })()) || f_bool(1) )) )) )) })()) )) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_variables(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["variables"] = v_m2);return(1) } else { return(0) } })()) && f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ws"] = v_m2);return(1) } else { return(0) } })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) && f_bool(( f_bool(( f_bool((":=" == (v_str || "").substr(v_MATCH.f_to(), 2))) ? f_add(1, (v_MATCH.v_to = f_add(2, v_MATCH.f_to()))) : 0)) && f_bool(( f_bool((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ws"] = v_m2);return(1) } else { return(0) } })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_named_capture_body(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["named_capture_body"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_rule_exp: f_scalar(v_MATCH["named_capture_body"]),v_capture_ident: f_scalar(v_MATCH["variables"]),}; tmp.__proto__ = Rul$NamedCapture; return tmp }())) })()) || f_bool(1) )) )) )) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["variables"]))) })()) || f_bool(1) )) })()) )) })()) )) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_rule_terms(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["rule_terms"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = f_scalar(v_MATCH["rule_terms"]))) })()) || f_bool(1) )) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((function () { var v_tmp;(v_tmp = v_MATCH);(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_tmp.f_to(),v_to: v_tmp.f_to(),v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool(("]" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("}" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((")" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((">" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool((":" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("?" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("+" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("*" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("|" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool(( f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("&" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(( f_bool(("/" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) })()) )) )) )) )) )) )) )) )) )) )) })());(v_tmp.v_bool = ( f_bool(v_MATCH) ? false : true));(v_MATCH = v_tmp);return(( f_bool(v_MATCH) ? true : false)) })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_any(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["any"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_constant: f_scalar(v_MATCH["any"]),}; tmp.__proto__ = Rul$Constant; return tmp }())) })()) || f_bool(1) )) )) )) })()) )) )) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar$Regex.f_rule_term; // v8 bug workaround
// method quant_exp
@@ -1753,7 +1725,7 @@ var Hash_rule_terms = {};
MiniPerl6$Grammar$Regex.f_rule = function (v_str, v_pos) {
var v_grammar = this;
try { var v_MATCH = null;
-(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());return(1) } else { return(0) } })()) && f_bool(( f_bool(("|" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_or_list_exp(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["or_list_exp"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_or_list: f_scalar(v_MATCH["or_list_exp"]),}; tmp.__proto__ = Rul$Or; return tmp }())) })()) || f_bool(1) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_MATCH = function () { var tmp = {v_str: v_str,v_from: v_pos,v_to: v_pos,v_bool: 1,}; tmp.__proto__ = MiniPerl6$Match; return tmp }());(v_MATCH.v_bool = (function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return((function () { return(( f_bool((function () { var v_pos1;(v_pos1 = v_MATCH.f_to());return(( f_bool((function () { return(( f_bool((function () { var v_last_pos;(v_last_pos = v_MATCH.f_to());if ( f_bool((function () { return((function () { var v_m2;(v_m2 = v_grammar.f_ws(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["ws"] = v_m2);return(1) } else { return(0) } })()) })()) ) { (function () { null })() } else { (function () { (v_MATCH.v_to = v_last_pos); })() };return(1) })()) && f_bool(( f_bool(("|" == (v_str || "").substr(v_MATCH.f_to(), 1))) ? f_add(1, (v_MATCH.v_to = f_add(1, v_MATCH.f_to()))) : 0)) )) })()) || f_bool((function () { (v_MATCH.v_to = v_pos1);return(1) })()) )) })()) && f_bool(( f_bool((function () { var v_m2;(v_m2 = v_grammar.f_or_list_exp(v_str, v_MATCH.f_to()));if ( f_bool(v_m2) ) { (v_MATCH.v_to = v_m2.f_to());(v_MATCH["or_list_exp"] = v_m2);return(1) } else { return(0) } })()) && f_bool(( f_bool((function () { return((v_MATCH.v_capture = function () { var tmp = {v_or_list: f_scalar(v_MATCH["or_list_exp"]),}; tmp.__proto__ = Rul$Or; return tmp }())) })()) || f_bool(1) )) )) )) })()) })());return(v_MATCH) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
MiniPerl6$Grammar$Regex.f_rule; // v8 bug workaround
})();
@@ -1804,7 +1776,7 @@ if (typeof Rul$Quantifier != 'object') {
// method emit
Rul$Quantifier.f_emit = function () {
var v_self = this;
- try { if ( f_bool(( f_bool((v_self.v_quant == "")) && f_bool((v_self.v_greedy == "")) )) ) { (function () { throw(v_self.v_term.f_emit()); })() } else { (function () { null })() };if ( f_bool(( f_bool((v_self.v_quant == "+")) && f_bool((v_self.v_greedy == "")) )) ) { (function () { v_self.v_term.f_set_captures_to_array();throw(( f_string("do { ") + f_string(( f_string("my $last_match_null := 0; ") + f_string(( f_string("my $last_pos := $MATCH.to; ") + f_string(( f_string("my $count := 0; ") + f_string(( f_string("while ") + f_string(( f_string(v_self.v_term.f_emit()) + f_string(( f_string(" && ($last_match_null < 2) ") + f_string(( f_string("{ ") + f_string(( f_string("if $last_pos == $MATCH.to { ") + f_string(( f_string("$last_match_null := $last_match_null + 1; ") + f_string(( f_string("} ") + f_string(( f_string("else { ") + f_string(( f_string("$last_match_null := 0; ") + f_string(( f_string("} ") + f_string(( f_string("$last_pos := $MATCH.to; ") + f_string(( f_string("$count := $count + 1; ") + f_string(( f_string("}; ") + f_string(( f_string("$MATCH.to := $last_pos; ") + f_string(( f_string("$count > 0; ") + f_string("}") )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )); })() } else { (function () { null })() };if ( f_bool(( f_bool((v_self.v_quant == "*")) && f_bool((v_self.v_greedy == "")) )) ) { (function () { v_self.v_term.f_set_captures_to_array();throw(( f_string("do { ") + f_string(( f_string("my $last_match_null := 0; ") + f_string(( f_string("my $last_pos := $MATCH.to; ") + f_string(( f_string("while ") + f_string(( f_string(v_self.v_term.f_emit()) + f_string(( f_string(" && ($last_match_null < 2) ") + f_string(( f_string("{ ") + f_string(( f_string("if $last_pos == $MATCH.to { ") + f_string(( f_string("$last_match_null := $last_match_null + 1; ") + f_string(( f_string("} ") + f_string(( f_string("else { ") + f_string(( f_string("$last_match_null := 0; ") + f_string(( f_string("} ") + f_string(( f_string("$last_pos := $MATCH.to; ") + f_string(( f_string("}; ") + f_string(( f_string("$MATCH.to := $last_pos; ") + f_string(( f_string("1 ") + f_string("}") )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )); })() } else { (function () { null })() };f_warn(( f_string("Rul::Quantifier: ") + f_string(( f_string(v_self.v_quant) + f_string(( f_string(v_self.v_greedy) + f_string(" not implemented") )) )) ));return(v_self.v_term.f_emit()) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+ try { if ( f_bool(( f_bool((v_self.v_quant == "")) && f_bool((v_self.v_greedy == "")) )) ) { (function () { throw(v_self.v_term.f_emit()); })() } else { (function () { null })() };if ( f_bool(( f_bool((v_self.v_quant == "+")) && f_bool((v_self.v_greedy == "")) )) ) { (function () { v_self.v_term.f_set_captures_to_array();throw(( f_string("do { ") + f_string(( f_string("my $last_match_null := 0; ") + f_string(( f_string("my $last_pos := $MATCH.to; ") + f_string(( f_string("my $count := 0; ") + f_string(( f_string("while ") + f_string(( f_string(v_self.v_term.f_emit()) + f_string(( f_string(" && ($last_match_null < 2) ") + f_string(( f_string("{ ") + f_string(( f_string("if $last_pos == $MATCH.to { ") + f_string(( f_string("$last_match_null := $last_match_null + 1; ") + f_string(( f_string("} ") + f_string(( f_string("else { ") + f_string(( f_string("$last_match_null := 0; ") + f_string(( f_string("} ") + f_string(( f_string("$last_pos := $MATCH.to; ") + f_string(( f_string("$count := $count + 1; ") + f_string(( f_string("}; ") + f_string(( f_string("$MATCH.to := $last_pos; ") + f_string(( f_string("$count > 0; ") + f_string("}") )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )); })() } else { (function () { null })() };if ( f_bool(( f_bool((v_self.v_quant == "*")) && f_bool((v_self.v_greedy == "")) )) ) { (function () { v_self.v_term.f_set_captures_to_array();throw(( f_string("do { ") + f_string(( f_string("my $last_match_null := 0; ") + f_string(( f_string("my $last_pos := $MATCH.to; ") + f_string(( f_string("while ") + f_string(( f_string(v_self.v_term.f_emit()) + f_string(( f_string(" && ($last_match_null < 2) ") + f_string(( f_string("{ ") + f_string(( f_string("if $last_pos == $MATCH.to { ") + f_string(( f_string("$last_match_null := $last_match_null + 1; ") + f_string(( f_string("} ") + f_string(( f_string("else { ") + f_string(( f_string("$last_match_null := 0; ") + f_string(( f_string("} ") + f_string(( f_string("$last_pos := $MATCH.to; ") + f_string(( f_string("}; ") + f_string(( f_string("$MATCH.to := $last_pos; ") + f_string(( f_string("1 ") + f_string("}") )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )) )); })() } else { (function () { null })() };if ( f_bool(( f_bool((v_self.v_quant == "?")) && f_bool((v_self.v_greedy == "")) )) ) { (function () { v_self.v_term.f_set_captures_to_array();throw(( f_string("do { ") + f_string(( f_string("my $last_pos := $MATCH.to; ") + f_string(( f_string("if !(do {") + f_string(( f_string(v_self.v_term.f_emit()) + f_string(( f_string("}) ") + f_string(( f_string("{ ") + f_string(( f_string("$MATCH.to := $last_pos; ") + f_string(( f_string("}; ") + f_string(( f_string("1 ") + f_string("}") )) )) )) )) )) )) )) )) )); })() } else { (function () { null })() };f_warn(( f_string("Rul::Quantifier: ") + f_string(( f_string(v_self.v_quant) + f_string(( f_string(v_self.v_greedy) + f_string(" not implemented") )) )) ));return(v_self.v_term.f_emit()) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
Rul$Quantifier.f_emit; // v8 bug workaround
// method set_captures_to_array
@@ -1886,7 +1858,7 @@ if (typeof Rul$Subrule != 'object') {
Rul$Subrule.f_emit = function () {
var v_self = this;
try { var v_meth;var v_code = null;
-(v_meth = ( f_bool(f_add(1, f_index(v_self.v_metasyntax, "."))) ? v_self.v_metasyntax : ( f_string("$grammar.") + f_string(v_self.v_metasyntax) )));if ( f_bool((v_self.v_captures == 1)) ) { (function () { (v_code = ( f_string("if $m2 { $MATCH.to := $m2.to; $MATCH{'") + f_string(( f_string(v_self.v_metasyntax) + f_string("'} := $m2; 1 } else { false } ") )) )); })() } else { (function () { if ( f_bool((v_self.v_captures > 1)) ) { (function () { (v_code = ( f_string("if $m2 { $MATCH.to := $m2.to; ($MATCH{'") + f_string(( f_string(v_self.v_metasyntax) + f_string("'}).push( $m2 ); 1 } else { false } ") )) )); })() } else { (function () { (v_code = "if $m2 { $MATCH.to := $m2.to; 1 } else { false } "); })() }; })() };return(( f_string("do { ") + f_string(( f_string("my $m2 := ") + f_string(( f_string(v_meth) + f_string(( f_string("($str, $MATCH.to); ") + f_string(( f_string(v_code) + f_string("}") )) )) )) )) )) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
+(v_meth = ( f_bool(f_add(1, f_index(v_self.v_metasyntax, "."))) ? v_self.v_metasyntax : ( f_string("$grammar.") + f_string(v_self.v_metasyntax) )));if ( f_bool((v_self.v_captures == 1)) ) { (function () { (v_code = ( f_string("if $m2 { $MATCH.to := $m2.to; $MATCH{'") + f_string(( f_string(v_self.v_metasyntax) + f_string("'} := $m2; 1 } else { false } ") )) )); })() } else { (function () { if ( f_bool((v_self.v_captures > 1)) ) { (function () { (v_code = ( f_string("if $m2 { ") + f_string(( f_string("$MATCH.to := $m2.to; ") + f_string(( f_string("if exists $MATCH{'") + f_string(( f_string(v_self.v_metasyntax) + f_string(( f_string("'} { ") + f_string(( f_string("($MATCH{'") + f_string(( f_string(v_self.v_metasyntax) + f_string(( f_string("'}).push( $m2 ); ") + f_string(( f_string("} ") + f_string(( f_string("else { ") + f_string(( f_string("$MATCH{'") + f_string(( f_string(v_self.v_metasyntax) + f_string(( f_string("'} := [ $m2 ]; ") + f_string(( f_string("} ") + f_string(( f_string("1 ") + f_string("} else { false } ") )) )) )) )) )) )) )) )) )) )) )) )) )) )) )); })() } else { (function () { (v_code = "if $m2 { $MATCH.to := $m2.to; 1 } else { false } "); })() }; })() };return(( f_string("do { ") + f_string(( f_string("my $m2 := ") + f_string(( f_string(v_meth) + f_string(( f_string("($str, $MATCH.to); ") + f_string(( f_string(v_code) + f_string("}") )) )) )) )) )) } catch(err) { if ( err instanceof Error ) { throw(err) } else { return(err) } }
}
Rul$Subrule.f_emit; // v8 bug workaround
// method set_captures_to_array
Please sign in to comment.
Something went wrong with that request. Please try again.