line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
## no critic (Miscellanea::ProhibitUnrestrictedNoCritic) |
2
|
|
|
|
|
|
|
## no critic Generated code follows |
3
|
|
|
|
|
|
|
{ |
4
|
|
|
|
|
|
|
# GENERATE RECURSIVE DESCENT PARSER OBJECTS FROM A GRAMMAR |
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
54
|
use 5.006; |
|
2
|
|
|
|
|
8
|
|
7
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
58
|
|
|
2
|
|
|
|
|
90
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime; |
10
|
|
|
|
|
|
|
|
11
|
2
|
|
|
2
|
|
1124
|
use Text::Balanced qw ( extract_codeblock extract_bracketed extract_quotelike extract_delimited ); |
|
2
|
|
|
|
|
15528
|
|
|
2
|
|
|
|
|
221
|
|
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
2
|
|
18
|
use vars qw ( $skip ); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
13174
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
*defskip = \ '\s*'; # DEFAULT SEPARATOR IS OPTIONAL WHITESPACE |
16
|
|
|
|
|
|
|
$skip = '\s*'; # UNIVERSAL SEPARATOR IS OPTIONAL WHITESPACE |
17
|
|
|
|
|
|
|
my $MAXREP = 100_000_000; # REPETITIONS MATCH AT MOST 100,000,000 TIMES |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::LineCounter; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub TIESCALAR # ($classname, \$text, $thisparser, $prevflag) |
25
|
|
|
|
|
|
|
{ |
26
|
2016
|
50
|
|
2016
|
|
8057
|
bless { |
27
|
|
|
|
|
|
|
text => $_[1], |
28
|
|
|
|
|
|
|
parser => $_[2], |
29
|
|
|
|
|
|
|
prev => $_[3]?1:0, |
30
|
|
|
|
|
|
|
}, $_[0]; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub FETCH |
34
|
|
|
|
|
|
|
{ |
35
|
0
|
|
|
0
|
|
0
|
my $parser = $_[0]->{parser}; |
36
|
0
|
|
|
|
|
0
|
my $cache = $parser->{linecounter_cache}; |
37
|
0
|
|
|
|
|
0
|
my $from = $parser->{fulltextlen}-length(${$_[0]->{text}})-$_[0]->{prev} |
38
|
0
|
|
|
|
|
0
|
; |
39
|
|
|
|
|
|
|
|
40
|
0
|
0
|
|
|
|
0
|
unless (exists $cache->{$from}) |
41
|
|
|
|
|
|
|
{ |
42
|
|
|
|
|
|
|
$parser->{lastlinenum} = $parser->{offsetlinenum} |
43
|
0
|
|
|
|
|
0
|
- Parse::RecDescent::_Runtime::_linecount(substr($parser->{fulltext},$from)) |
44
|
|
|
|
|
|
|
+ 1; |
45
|
0
|
|
|
|
|
0
|
$cache->{$from} = $parser->{lastlinenum}; |
46
|
|
|
|
|
|
|
} |
47
|
0
|
|
|
|
|
0
|
return $cache->{$from}; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub STORE |
51
|
|
|
|
|
|
|
{ |
52
|
0
|
|
|
0
|
|
0
|
my $parser = $_[0]->{parser}; |
53
|
0
|
|
|
|
|
0
|
$parser->{offsetlinenum} -= $parser->{lastlinenum} - $_[1]; |
54
|
0
|
|
|
|
|
0
|
return undef; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub resync # ($linecounter) |
58
|
|
|
|
|
|
|
{ |
59
|
0
|
|
|
0
|
|
0
|
my $self = tied($_[0]); |
60
|
0
|
0
|
|
|
|
0
|
die "Tried to alter something other than a LineCounter\n" |
61
|
|
|
|
|
|
|
unless $self =~ /Parse::RecDescent::_Runtime::LineCounter/; |
62
|
|
|
|
|
|
|
|
63
|
0
|
|
|
|
|
0
|
my $parser = $self->{parser}; |
64
|
|
|
|
|
|
|
my $apparently = $parser->{offsetlinenum} |
65
|
0
|
|
|
|
|
0
|
- Parse::RecDescent::_Runtime::_linecount(${$self->{text}}) |
|
0
|
|
|
|
|
0
|
|
66
|
|
|
|
|
|
|
+ 1; |
67
|
|
|
|
|
|
|
|
68
|
0
|
|
|
|
|
0
|
$parser->{offsetlinenum} += $parser->{lastlinenum} - $apparently; |
69
|
0
|
|
|
|
|
0
|
return 1; |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::ColCounter; |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub TIESCALAR # ($classname, \$text, $thisparser, $prevflag) |
75
|
|
|
|
|
|
|
{ |
76
|
0
|
0
|
|
0
|
|
0
|
bless { |
77
|
|
|
|
|
|
|
text => $_[1], |
78
|
|
|
|
|
|
|
parser => $_[2], |
79
|
|
|
|
|
|
|
prev => $_[3]?1:0, |
80
|
|
|
|
|
|
|
}, $_[0]; |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
sub FETCH |
84
|
|
|
|
|
|
|
{ |
85
|
0
|
|
|
0
|
|
0
|
my $parser = $_[0]->{parser}; |
86
|
0
|
|
|
|
|
0
|
my $missing = $parser->{fulltextlen}-length(${$_[0]->{text}})-$_[0]->{prev}+1; |
|
0
|
|
|
|
|
0
|
|
87
|
0
|
|
|
|
|
0
|
substr($parser->{fulltext},0,$missing) =~ m/^(.*)\Z/m; |
88
|
0
|
|
|
|
|
0
|
return length($1); |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
sub STORE |
92
|
|
|
|
|
|
|
{ |
93
|
0
|
|
|
0
|
|
0
|
die "Can't set column number via \$thiscolumn\n"; |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::OffsetCounter; |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub TIESCALAR # ($classname, \$text, $thisparser, $prev) |
100
|
|
|
|
|
|
|
{ |
101
|
0
|
0
|
|
0
|
|
0
|
bless { |
102
|
|
|
|
|
|
|
text => $_[1], |
103
|
|
|
|
|
|
|
parser => $_[2], |
104
|
|
|
|
|
|
|
prev => $_[3]?-1:0, |
105
|
|
|
|
|
|
|
}, $_[0]; |
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
sub FETCH |
109
|
|
|
|
|
|
|
{ |
110
|
0
|
|
|
0
|
|
0
|
my $parser = $_[0]->{parser}; |
111
|
0
|
|
|
|
|
0
|
return $parser->{fulltextlen}-length(${$_[0]->{text}})+$_[0]->{prev}; |
|
0
|
|
|
|
|
0
|
|
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
sub STORE |
115
|
|
|
|
|
|
|
{ |
116
|
0
|
|
|
0
|
|
0
|
die "Can't set current offset via \$thisoffset or \$prevoffset\n"; |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::Rule; |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
sub new ($$$$$) |
124
|
|
|
|
|
|
|
{ |
125
|
0
|
|
0
|
0
|
|
0
|
my $class = ref($_[0]) || $_[0]; |
126
|
0
|
|
|
|
|
0
|
my $name = $_[1]; |
127
|
0
|
|
|
|
|
0
|
my $owner = $_[2]; |
128
|
0
|
|
|
|
|
0
|
my $line = $_[3]; |
129
|
0
|
|
|
|
|
0
|
my $replace = $_[4]; |
130
|
|
|
|
|
|
|
|
131
|
0
|
0
|
|
|
|
0
|
if (defined $owner->{"rules"}{$name}) |
132
|
|
|
|
|
|
|
{ |
133
|
0
|
|
|
|
|
0
|
my $self = $owner->{"rules"}{$name}; |
134
|
0
|
0
|
0
|
|
|
0
|
if ($replace && !$self->{"changed"}) |
135
|
|
|
|
|
|
|
{ |
136
|
0
|
|
|
|
|
0
|
$self->reset; |
137
|
|
|
|
|
|
|
} |
138
|
0
|
|
|
|
|
0
|
return $self; |
139
|
|
|
|
|
|
|
} |
140
|
|
|
|
|
|
|
else |
141
|
|
|
|
|
|
|
{ |
142
|
0
|
|
|
|
|
0
|
return $owner->{"rules"}{$name} = |
143
|
|
|
|
|
|
|
bless |
144
|
|
|
|
|
|
|
{ |
145
|
|
|
|
|
|
|
"name" => $name, |
146
|
|
|
|
|
|
|
"prods" => [], |
147
|
|
|
|
|
|
|
"calls" => [], |
148
|
|
|
|
|
|
|
"changed" => 0, |
149
|
|
|
|
|
|
|
"line" => $line, |
150
|
|
|
|
|
|
|
"impcount" => 0, |
151
|
|
|
|
|
|
|
"opcount" => 0, |
152
|
|
|
|
|
|
|
"vars" => "", |
153
|
|
|
|
|
|
|
}, $class; |
154
|
|
|
|
|
|
|
} |
155
|
|
|
|
|
|
|
} |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
sub reset($) |
158
|
|
|
|
|
|
|
{ |
159
|
0
|
|
|
0
|
|
0
|
@{$_[0]->{"prods"}} = (); |
|
0
|
|
|
|
|
0
|
|
160
|
0
|
|
|
|
|
0
|
@{$_[0]->{"calls"}} = (); |
|
0
|
|
|
|
|
0
|
|
161
|
0
|
|
|
|
|
0
|
$_[0]->{"changed"} = 0; |
162
|
0
|
|
|
|
|
0
|
$_[0]->{"impcount"} = 0; |
163
|
0
|
|
|
|
|
0
|
$_[0]->{"opcount"} = 0; |
164
|
0
|
|
|
|
|
0
|
$_[0]->{"vars"} = ""; |
165
|
|
|
|
|
|
|
} |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
0
|
|
|
sub DESTROY {} |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
sub hasleftmost($$) |
170
|
|
|
|
|
|
|
{ |
171
|
0
|
|
|
0
|
|
0
|
my ($self, $ref) = @_; |
172
|
|
|
|
|
|
|
|
173
|
0
|
|
|
|
|
0
|
my $prod; |
174
|
0
|
|
|
|
|
0
|
foreach $prod ( @{$self->{"prods"}} ) |
|
0
|
|
|
|
|
0
|
|
175
|
|
|
|
|
|
|
{ |
176
|
0
|
0
|
|
|
|
0
|
return 1 if $prod->hasleftmost($ref); |
177
|
|
|
|
|
|
|
} |
178
|
|
|
|
|
|
|
|
179
|
0
|
|
|
|
|
0
|
return 0; |
180
|
|
|
|
|
|
|
} |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
sub leftmostsubrules($) |
183
|
|
|
|
|
|
|
{ |
184
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
185
|
0
|
|
|
|
|
0
|
my @subrules = (); |
186
|
|
|
|
|
|
|
|
187
|
0
|
|
|
|
|
0
|
my $prod; |
188
|
0
|
|
|
|
|
0
|
foreach $prod ( @{$self->{"prods"}} ) |
|
0
|
|
|
|
|
0
|
|
189
|
|
|
|
|
|
|
{ |
190
|
0
|
|
|
|
|
0
|
push @subrules, $prod->leftmostsubrule(); |
191
|
|
|
|
|
|
|
} |
192
|
|
|
|
|
|
|
|
193
|
0
|
|
|
|
|
0
|
return @subrules; |
194
|
|
|
|
|
|
|
} |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
sub expected($) |
197
|
|
|
|
|
|
|
{ |
198
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
199
|
0
|
|
|
|
|
0
|
my @expected = (); |
200
|
|
|
|
|
|
|
|
201
|
0
|
|
|
|
|
0
|
my $prod; |
202
|
0
|
|
|
|
|
0
|
foreach $prod ( @{$self->{"prods"}} ) |
|
0
|
|
|
|
|
0
|
|
203
|
|
|
|
|
|
|
{ |
204
|
0
|
|
|
|
|
0
|
my $next = $prod->expected(); |
205
|
0
|
0
|
0
|
|
|
0
|
unless (! $next or _contains($next,@expected) ) |
206
|
|
|
|
|
|
|
{ |
207
|
0
|
|
|
|
|
0
|
push @expected, $next; |
208
|
|
|
|
|
|
|
} |
209
|
|
|
|
|
|
|
} |
210
|
|
|
|
|
|
|
|
211
|
0
|
|
|
|
|
0
|
return join ', or ', @expected; |
212
|
|
|
|
|
|
|
} |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
sub _contains($@) |
215
|
|
|
|
|
|
|
{ |
216
|
0
|
|
|
0
|
|
0
|
my $target = shift; |
217
|
0
|
|
|
|
|
0
|
my $item; |
218
|
0
|
0
|
|
|
|
0
|
foreach $item ( @_ ) { return 1 if $target eq $item; } |
|
0
|
|
|
|
|
0
|
|
219
|
0
|
|
|
|
|
0
|
return 0; |
220
|
|
|
|
|
|
|
} |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
sub addcall($$) |
223
|
|
|
|
|
|
|
{ |
224
|
0
|
|
|
0
|
|
0
|
my ( $self, $subrule ) = @_; |
225
|
0
|
0
|
|
|
|
0
|
unless ( _contains($subrule, @{$self->{"calls"}}) ) |
|
0
|
|
|
|
|
0
|
|
226
|
|
|
|
|
|
|
{ |
227
|
0
|
|
|
|
|
0
|
push @{$self->{"calls"}}, $subrule; |
|
0
|
|
|
|
|
0
|
|
228
|
|
|
|
|
|
|
} |
229
|
|
|
|
|
|
|
} |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
sub addprod($$) |
232
|
|
|
|
|
|
|
{ |
233
|
0
|
|
|
0
|
|
0
|
my ( $self, $prod ) = @_; |
234
|
0
|
|
|
|
|
0
|
push @{$self->{"prods"}}, $prod; |
|
0
|
|
|
|
|
0
|
|
235
|
0
|
|
|
|
|
0
|
$self->{"changed"} = 1; |
236
|
0
|
|
|
|
|
0
|
$self->{"impcount"} = 0; |
237
|
0
|
|
|
|
|
0
|
$self->{"opcount"} = 0; |
238
|
0
|
|
|
|
|
0
|
$prod->{"number"} = $#{$self->{"prods"}}; |
|
0
|
|
|
|
|
0
|
|
239
|
0
|
|
|
|
|
0
|
return $prod; |
240
|
|
|
|
|
|
|
} |
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
sub addvar |
243
|
|
|
|
|
|
|
{ |
244
|
0
|
|
|
0
|
|
0
|
my ( $self, $var, $parser ) = @_; |
245
|
0
|
0
|
|
|
|
0
|
if ($var =~ /\A\s*local\s+([%@\$]\w+)/) |
246
|
|
|
|
|
|
|
{ |
247
|
0
|
|
|
|
|
0
|
$parser->{localvars} .= " $1"; |
248
|
0
|
|
|
|
|
0
|
$self->{"vars"} .= "$var;\n" } |
249
|
|
|
|
|
|
|
else |
250
|
0
|
|
|
|
|
0
|
{ $self->{"vars"} .= "my $var;\n" } |
251
|
0
|
|
|
|
|
0
|
$self->{"changed"} = 1; |
252
|
0
|
|
|
|
|
0
|
return 1; |
253
|
|
|
|
|
|
|
} |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
sub addautoscore |
256
|
|
|
|
|
|
|
{ |
257
|
0
|
|
|
0
|
|
0
|
my ( $self, $code ) = @_; |
258
|
0
|
|
|
|
|
0
|
$self->{"autoscore"} = $code; |
259
|
0
|
|
|
|
|
0
|
$self->{"changed"} = 1; |
260
|
0
|
|
|
|
|
0
|
return 1; |
261
|
|
|
|
|
|
|
} |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
sub nextoperator($) |
264
|
|
|
|
|
|
|
{ |
265
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
266
|
0
|
|
|
|
|
0
|
my $prodcount = scalar @{$self->{"prods"}}; |
|
0
|
|
|
|
|
0
|
|
267
|
0
|
|
|
|
|
0
|
my $opcount = ++$self->{"opcount"}; |
268
|
0
|
|
|
|
|
0
|
return "_operator_${opcount}_of_production_${prodcount}_of_rule_$self->{name}"; |
269
|
|
|
|
|
|
|
} |
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
sub nextimplicit($) |
272
|
|
|
|
|
|
|
{ |
273
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
274
|
0
|
|
|
|
|
0
|
my $prodcount = scalar @{$self->{"prods"}}; |
|
0
|
|
|
|
|
0
|
|
275
|
0
|
|
|
|
|
0
|
my $impcount = ++$self->{"impcount"}; |
276
|
0
|
|
|
|
|
0
|
return "_alternation_${impcount}_of_production_${prodcount}_of_rule_$self->{name}"; |
277
|
|
|
|
|
|
|
} |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
|
280
|
|
|
|
|
|
|
sub code |
281
|
|
|
|
|
|
|
{ |
282
|
0
|
|
|
0
|
|
0
|
my ($self, $namespace, $parser, $check) = @_; |
283
|
|
|
|
|
|
|
|
284
|
0
|
0
|
|
|
|
0
|
eval 'undef &' . $namespace . '::' . $self->{"name"} unless $parser->{saving}; |
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
my $code = |
287
|
|
|
|
|
|
|
' |
288
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
289
|
|
|
|
|
|
|
sub ' . $namespace . '::' . $self->{"name"} . ' |
290
|
|
|
|
|
|
|
{ |
291
|
|
|
|
|
|
|
my $thisparser = $_[0]; |
292
|
|
|
|
|
|
|
use vars q{$tracelevel}; |
293
|
|
|
|
|
|
|
local $tracelevel = ($tracelevel||0)+1; |
294
|
|
|
|
|
|
|
$ERRORS = 0; |
295
|
|
|
|
|
|
|
my $thisrule = $thisparser->{"rules"}{"' . $self->{"name"} . '"}; |
296
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [' . $self->{"name"} . ']}, |
298
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
299
|
|
|
|
|
|
|
q{' . $self->{"name"} . '}, |
300
|
|
|
|
|
|
|
$tracelevel) |
301
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
302
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
' . ($parser->{deferrable} |
304
|
|
|
|
|
|
|
? 'my $def_at = @{$thisparser->{deferred}};' |
305
|
|
|
|
|
|
|
: '') . |
306
|
|
|
|
|
|
|
' |
307
|
|
|
|
|
|
|
my $err_at = @{$thisparser->{errors}}; |
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
my $score; |
310
|
|
|
|
|
|
|
my $score_return; |
311
|
|
|
|
|
|
|
my $_tok; |
312
|
|
|
|
|
|
|
my $return = undef; |
313
|
|
|
|
|
|
|
my $_matched=0; |
314
|
|
|
|
|
|
|
my $commit=0; |
315
|
|
|
|
|
|
|
my @item = (); |
316
|
|
|
|
|
|
|
my %item = (); |
317
|
|
|
|
|
|
|
my $repeating = $_[2]; |
318
|
|
|
|
|
|
|
my $_noactions = $_[3]; |
319
|
|
|
|
|
|
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
320
|
|
|
|
|
|
|
my $_itempos = $_[5]; |
321
|
|
|
|
|
|
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
322
|
|
|
|
|
|
|
my $text; |
323
|
|
|
|
|
|
|
my $lastsep; |
324
|
|
|
|
|
|
|
my $current_match; |
325
|
|
|
|
|
|
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{' . $self->expected() . '}); |
326
|
|
|
|
|
|
|
$expectation->at($_[1]); |
327
|
|
|
|
|
|
|
'. ($parser->{_check}{thisoffset}?' |
328
|
|
|
|
|
|
|
my $thisoffset; |
329
|
|
|
|
|
|
|
tie $thisoffset, q{Parse::RecDescent::_Runtime::OffsetCounter}, \$text, $thisparser; |
330
|
|
|
|
|
|
|
':'') . ($parser->{_check}{prevoffset}?' |
331
|
|
|
|
|
|
|
my $prevoffset; |
332
|
|
|
|
|
|
|
tie $prevoffset, q{Parse::RecDescent::_Runtime::OffsetCounter}, \$text, $thisparser, 1; |
333
|
|
|
|
|
|
|
':'') . ($parser->{_check}{thiscolumn}?' |
334
|
|
|
|
|
|
|
my $thiscolumn; |
335
|
|
|
|
|
|
|
tie $thiscolumn, q{Parse::RecDescent::_Runtime::ColCounter}, \$text, $thisparser; |
336
|
|
|
|
|
|
|
':'') . ($parser->{_check}{prevcolumn}?' |
337
|
|
|
|
|
|
|
my $prevcolumn; |
338
|
|
|
|
|
|
|
tie $prevcolumn, q{Parse::RecDescent::_Runtime::ColCounter}, \$text, $thisparser, 1; |
339
|
|
|
|
|
|
|
':'') . ($parser->{_check}{prevline}?' |
340
|
|
|
|
|
|
|
my $prevline; |
341
|
|
|
|
|
|
|
tie $prevline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser, 1; |
342
|
|
|
|
|
|
|
':'') . ' |
343
|
|
|
|
|
|
|
my $thisline; |
344
|
|
|
|
|
|
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
345
|
|
|
|
|
|
|
|
346
|
0
|
0
|
|
|
|
0
|
'. $self->{vars} .' |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
347
|
|
|
|
|
|
|
'; |
348
|
|
|
|
|
|
|
|
349
|
0
|
|
|
|
|
0
|
my $prod; |
350
|
0
|
|
|
|
|
0
|
foreach $prod ( @{$self->{"prods"}} ) |
|
0
|
|
|
|
|
0
|
|
351
|
|
|
|
|
|
|
{ |
352
|
0
|
0
|
|
|
|
0
|
$prod->addscore($self->{autoscore},0,0) if $self->{autoscore}; |
353
|
0
|
0
|
|
|
|
0
|
next unless $prod->checkleftmost(); |
354
|
0
|
|
|
|
|
0
|
$code .= $prod->code($namespace,$self,$parser); |
355
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
$code .= $parser->{deferrable} |
357
|
0
|
0
|
|
|
|
0
|
? ' splice |
358
|
|
|
|
|
|
|
@{$thisparser->{deferred}}, $def_at unless $_matched; |
359
|
|
|
|
|
|
|
' |
360
|
|
|
|
|
|
|
: ''; |
361
|
|
|
|
|
|
|
} |
362
|
|
|
|
|
|
|
|
363
|
|
|
|
|
|
|
$code .= |
364
|
|
|
|
|
|
|
' |
365
|
|
|
|
|
|
|
unless ( $_matched || defined($score) ) |
366
|
|
|
|
|
|
|
{ |
367
|
|
|
|
|
|
|
' .($parser->{deferrable} |
368
|
|
|
|
|
|
|
? ' splice @{$thisparser->{deferred}}, $def_at; |
369
|
|
|
|
|
|
|
' |
370
|
|
|
|
|
|
|
: '') . ' |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
373
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{<<'.Parse::RecDescent::_Runtime::_matchtracemessage($self,1).' rule>>}, |
374
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
375
|
|
|
|
|
|
|
q{' . $self->{"name"} .'}, |
376
|
|
|
|
|
|
|
$tracelevel) |
377
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
378
|
|
|
|
|
|
|
return undef; |
379
|
|
|
|
|
|
|
} |
380
|
|
|
|
|
|
|
if (!defined($return) && defined($score)) |
381
|
|
|
|
|
|
|
{ |
382
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
383
|
|
|
|
|
|
|
q{' . $self->{"name"} .'}, |
384
|
|
|
|
|
|
|
$tracelevel) |
385
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
386
|
|
|
|
|
|
|
$return = $score_return; |
387
|
|
|
|
|
|
|
} |
388
|
|
|
|
|
|
|
splice @{$thisparser->{errors}}, $err_at; |
389
|
|
|
|
|
|
|
$return = $item[$#item] unless defined $return; |
390
|
|
|
|
|
|
|
if (defined $::RD_TRACE) |
391
|
|
|
|
|
|
|
{ |
392
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{>>'.Parse::RecDescent::_Runtime::_matchtracemessage($self).' rule<< (return value: [} . |
393
|
|
|
|
|
|
|
$return . q{])}, "", |
394
|
|
|
|
|
|
|
q{' . $self->{"name"} .'}, |
395
|
|
|
|
|
|
|
$tracelevel); |
396
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
397
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
398
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
399
|
0
|
0
|
|
|
|
0
|
, q{' . $self->{"name"} .'}, |
400
|
|
|
|
|
|
|
$tracelevel) |
401
|
|
|
|
|
|
|
} |
402
|
|
|
|
|
|
|
$_[1] = $text; |
403
|
|
|
|
|
|
|
return $return; |
404
|
|
|
|
|
|
|
} |
405
|
|
|
|
|
|
|
'; |
406
|
|
|
|
|
|
|
|
407
|
0
|
|
|
|
|
0
|
return $code; |
408
|
|
|
|
|
|
|
} |
409
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
my @left; |
411
|
|
|
|
|
|
|
sub isleftrec($$) |
412
|
|
|
|
|
|
|
{ |
413
|
0
|
|
|
0
|
|
0
|
my ($self, $rules) = @_; |
414
|
0
|
|
|
|
|
0
|
my $root = $self->{"name"}; |
415
|
0
|
|
|
|
|
0
|
@left = $self->leftmostsubrules(); |
416
|
0
|
|
|
|
|
0
|
my $next; |
417
|
0
|
|
|
|
|
0
|
foreach $next ( @left ) |
418
|
|
|
|
|
|
|
{ |
419
|
0
|
0
|
|
|
|
0
|
next unless defined $rules->{$next}; # SKIP NON-EXISTENT RULES |
420
|
0
|
0
|
|
|
|
0
|
return 1 if $next eq $root; |
421
|
0
|
|
|
|
|
0
|
my $child; |
422
|
0
|
|
|
|
|
0
|
foreach $child ( $rules->{$next}->leftmostsubrules() ) |
423
|
|
|
|
|
|
|
{ |
424
|
0
|
0
|
|
|
|
0
|
push(@left, $child) |
425
|
|
|
|
|
|
|
if ! _contains($child, @left) ; |
426
|
|
|
|
|
|
|
} |
427
|
|
|
|
|
|
|
} |
428
|
0
|
|
|
|
|
0
|
return 0; |
429
|
|
|
|
|
|
|
} |
430
|
|
|
|
|
|
|
|
431
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::Production; |
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
sub describe ($;$) |
434
|
|
|
|
|
|
|
{ |
435
|
0
|
0
|
|
0
|
|
0
|
return join ' ', map { $_->describe($_[1]) or () } @{$_[0]->{items}}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
436
|
|
|
|
|
|
|
} |
437
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
sub new ($$;$$) |
439
|
|
|
|
|
|
|
{ |
440
|
0
|
|
|
0
|
|
0
|
my ($self, $line, $uncommit, $error) = @_; |
441
|
0
|
|
0
|
|
|
0
|
my $class = ref($self) || $self; |
442
|
|
|
|
|
|
|
|
443
|
0
|
|
|
|
|
0
|
bless |
444
|
|
|
|
|
|
|
{ |
445
|
|
|
|
|
|
|
"items" => [], |
446
|
|
|
|
|
|
|
"uncommit" => $uncommit, |
447
|
|
|
|
|
|
|
"error" => $error, |
448
|
|
|
|
|
|
|
"line" => $line, |
449
|
|
|
|
|
|
|
strcount => 0, |
450
|
|
|
|
|
|
|
patcount => 0, |
451
|
|
|
|
|
|
|
dircount => 0, |
452
|
|
|
|
|
|
|
actcount => 0, |
453
|
|
|
|
|
|
|
}, $class; |
454
|
|
|
|
|
|
|
} |
455
|
|
|
|
|
|
|
|
456
|
|
|
|
|
|
|
sub expected ($) |
457
|
|
|
|
|
|
|
{ |
458
|
0
|
|
|
0
|
|
0
|
my $itemcount = scalar @{$_[0]->{"items"}}; |
|
0
|
|
|
|
|
0
|
|
459
|
0
|
0
|
|
|
|
0
|
return ($itemcount) ? $_[0]->{"items"}[0]->describe(1) : ''; |
460
|
|
|
|
|
|
|
} |
461
|
|
|
|
|
|
|
|
462
|
|
|
|
|
|
|
sub hasleftmost ($$) |
463
|
|
|
|
|
|
|
{ |
464
|
0
|
|
|
0
|
|
0
|
my ($self, $ref) = @_; |
465
|
0
|
0
|
|
|
|
0
|
return ${$self->{"items"}}[0] eq $ref if scalar @{$self->{"items"}}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
466
|
0
|
|
|
|
|
0
|
return 0; |
467
|
|
|
|
|
|
|
} |
468
|
|
|
|
|
|
|
|
469
|
|
|
|
|
|
|
sub isempty($) |
470
|
|
|
|
|
|
|
{ |
471
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
472
|
0
|
|
|
|
|
0
|
return 0 == @{$self->{"items"}}; |
|
0
|
|
|
|
|
0
|
|
473
|
|
|
|
|
|
|
} |
474
|
|
|
|
|
|
|
|
475
|
|
|
|
|
|
|
sub leftmostsubrule($) |
476
|
|
|
|
|
|
|
{ |
477
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
478
|
|
|
|
|
|
|
|
479
|
0
|
0
|
|
|
|
0
|
if ( $#{$self->{"items"}} >= 0 ) |
|
0
|
|
|
|
|
0
|
|
480
|
|
|
|
|
|
|
{ |
481
|
0
|
|
|
|
|
0
|
my $subrule = $self->{"items"}[0]->issubrule(); |
482
|
0
|
0
|
|
|
|
0
|
return $subrule if defined $subrule; |
483
|
|
|
|
|
|
|
} |
484
|
|
|
|
|
|
|
|
485
|
0
|
|
|
|
|
0
|
return (); |
486
|
|
|
|
|
|
|
} |
487
|
|
|
|
|
|
|
|
488
|
|
|
|
|
|
|
sub checkleftmost($) |
489
|
|
|
|
|
|
|
{ |
490
|
0
|
|
|
0
|
|
0
|
my @items = @{$_[0]->{"items"}}; |
|
0
|
|
|
|
|
0
|
|
491
|
0
|
0
|
0
|
|
|
0
|
if (@items==1 && ref($items[0]) =~ /\AParse::RecDescent::_Runtime::Error/ |
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
492
|
|
|
|
|
|
|
&& $items[0]->{commitonly} ) |
493
|
|
|
|
|
|
|
{ |
494
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_warn(2,"Lone <error?> in production treated |
495
|
|
|
|
|
|
|
as <error?> <reject>"); |
496
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_hint("A production consisting of a single |
497
|
|
|
|
|
|
|
conditional <error?> directive would |
498
|
|
|
|
|
|
|
normally succeed (with the value zero) if the |
499
|
|
|
|
|
|
|
rule is not 'commited' when it is |
500
|
|
|
|
|
|
|
tried. Since you almost certainly wanted |
501
|
|
|
|
|
|
|
'<error?> <reject>' Parse::RecDescent::_Runtime |
502
|
|
|
|
|
|
|
supplied it for you."); |
503
|
0
|
|
|
|
|
0
|
push @{$_[0]->{items}}, |
|
0
|
|
|
|
|
0
|
|
504
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::UncondReject->new(0,0,'<reject>'); |
505
|
|
|
|
|
|
|
} |
506
|
|
|
|
|
|
|
elsif (@items==1 && ($items[0]->describe||"") =~ /<rulevar|<autoscore/) |
507
|
|
|
|
|
|
|
{ |
508
|
|
|
|
|
|
|
# Do nothing |
509
|
|
|
|
|
|
|
} |
510
|
|
|
|
|
|
|
elsif (@items && |
511
|
|
|
|
|
|
|
( ref($items[0]) =~ /\AParse::RecDescent::_Runtime::UncondReject/ |
512
|
|
|
|
|
|
|
|| ($items[0]->describe||"") =~ /<autoscore/ |
513
|
|
|
|
|
|
|
)) |
514
|
|
|
|
|
|
|
{ |
515
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_warn(1,"Optimizing away production: [". $_[0]->describe ."]"); |
516
|
0
|
0
|
|
|
|
0
|
my $what = $items[0]->describe =~ /<rulevar/ |
|
|
0
|
|
|
|
|
|
517
|
|
|
|
|
|
|
? "a <rulevar> (which acts like an unconditional <reject> during parsing)" |
518
|
|
|
|
|
|
|
: $items[0]->describe =~ /<autoscore/ |
519
|
|
|
|
|
|
|
? "an <autoscore> (which acts like an unconditional <reject> during parsing)" |
520
|
|
|
|
|
|
|
: "an unconditional <reject>"; |
521
|
0
|
0
|
|
|
|
0
|
my $caveat = $items[0]->describe =~ /<rulevar/ |
522
|
|
|
|
|
|
|
? " after the specified variable was set up" |
523
|
|
|
|
|
|
|
: ""; |
524
|
0
|
0
|
|
|
|
0
|
my $advice = @items > 1 |
525
|
|
|
|
|
|
|
? "However, there were also other (useless) items after the leading " |
526
|
|
|
|
|
|
|
. $items[0]->describe |
527
|
|
|
|
|
|
|
. ", so you may have been expecting some other behaviour." |
528
|
|
|
|
|
|
|
: "You can safely ignore this message."; |
529
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_hint("The production starts with $what. That means that the |
530
|
|
|
|
|
|
|
production can never successfully match, so it was |
531
|
|
|
|
|
|
|
optimized out of the final parser$caveat. $advice"); |
532
|
0
|
|
|
|
|
0
|
return 0; |
533
|
|
|
|
|
|
|
} |
534
|
0
|
|
|
|
|
0
|
return 1; |
535
|
|
|
|
|
|
|
} |
536
|
|
|
|
|
|
|
|
537
|
|
|
|
|
|
|
sub changesskip($) |
538
|
|
|
|
|
|
|
{ |
539
|
0
|
|
|
0
|
|
0
|
my $item; |
540
|
0
|
|
|
|
|
0
|
foreach $item (@{$_[0]->{"items"}}) |
|
0
|
|
|
|
|
0
|
|
541
|
|
|
|
|
|
|
{ |
542
|
0
|
0
|
|
|
|
0
|
if (ref($item) =~ /Parse::RecDescent::_Runtime::(Action|Directive)/) |
543
|
|
|
|
|
|
|
{ |
544
|
0
|
0
|
|
|
|
0
|
return 1 if $item->{code} =~ /\$skip\s*=/; |
545
|
|
|
|
|
|
|
} |
546
|
|
|
|
|
|
|
} |
547
|
0
|
|
|
|
|
0
|
return 0; |
548
|
|
|
|
|
|
|
} |
549
|
|
|
|
|
|
|
|
550
|
|
|
|
|
|
|
sub adddirective |
551
|
|
|
|
|
|
|
{ |
552
|
0
|
|
|
0
|
|
0
|
my ( $self, $whichop, $line, $name ) = @_; |
553
|
0
|
|
|
|
|
0
|
push @{$self->{op}}, |
554
|
|
|
|
|
|
|
{ type=>$whichop, line=>$line, name=>$name, |
555
|
0
|
|
|
|
|
0
|
offset=> scalar(@{$self->{items}}) }; |
|
0
|
|
|
|
|
0
|
|
556
|
|
|
|
|
|
|
} |
557
|
|
|
|
|
|
|
|
558
|
|
|
|
|
|
|
sub addscore |
559
|
|
|
|
|
|
|
{ |
560
|
0
|
|
|
0
|
|
0
|
my ( $self, $code, $lookahead, $line ) = @_; |
561
|
|
|
|
|
|
|
$self->additem(Parse::RecDescent::_Runtime::Directive->new( |
562
|
|
|
|
|
|
|
"local \$^W; |
563
|
|
|
|
|
|
|
my \$thisscore = do { $code } + 0; |
564
|
|
|
|
|
|
|
if (!defined(\$score) || \$thisscore>\$score) |
565
|
|
|
|
|
|
|
{ \$score=\$thisscore; \$score_return=\$item[-1]; } |
566
|
|
|
|
|
|
|
undef;", $lookahead, $line,"<score: $code>") ) |
567
|
0
|
0
|
|
|
|
0
|
unless $self->{items}[-1]->describe =~ /<score/; |
568
|
0
|
|
|
|
|
0
|
return 1; |
569
|
|
|
|
|
|
|
} |
570
|
|
|
|
|
|
|
|
571
|
|
|
|
|
|
|
sub check_pending |
572
|
|
|
|
|
|
|
{ |
573
|
0
|
|
|
0
|
|
0
|
my ( $self, $line ) = @_; |
574
|
0
|
0
|
|
|
|
0
|
if ($self->{op}) |
575
|
|
|
|
|
|
|
{ |
576
|
0
|
|
|
|
|
0
|
while (my $next = pop @{$self->{op}}) |
|
0
|
|
|
|
|
0
|
|
577
|
|
|
|
|
|
|
{ |
578
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_error("Incomplete <$next->{type}op:...>.", $line); |
579
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_hint( |
580
|
|
|
|
|
|
|
"The current production ended without completing the |
581
|
|
|
|
|
|
|
<$next->{type}op:...> directive that started near line |
582
|
|
|
|
|
|
|
$next->{line}. Did you forget the closing '>'?"); |
583
|
|
|
|
|
|
|
} |
584
|
|
|
|
|
|
|
} |
585
|
0
|
|
|
|
|
0
|
return 1; |
586
|
|
|
|
|
|
|
} |
587
|
|
|
|
|
|
|
|
588
|
|
|
|
|
|
|
sub enddirective |
589
|
|
|
|
|
|
|
{ |
590
|
0
|
|
|
0
|
|
0
|
my ( $self, $line, $minrep, $maxrep ) = @_; |
591
|
0
|
0
|
|
|
|
0
|
unless ($self->{op}) |
592
|
|
|
|
|
|
|
{ |
593
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_error("Unmatched > found.", $line); |
594
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_hint( |
595
|
|
|
|
|
|
|
"A '>' angle bracket was encountered, which typically |
596
|
|
|
|
|
|
|
indicates the end of a directive. However no suitable |
597
|
|
|
|
|
|
|
preceding directive was encountered. Typically this |
598
|
|
|
|
|
|
|
indicates either a extra '>' in the grammar, or a |
599
|
|
|
|
|
|
|
problem inside the previous directive."); |
600
|
0
|
|
|
|
|
0
|
return; |
601
|
|
|
|
|
|
|
} |
602
|
0
|
|
|
|
|
0
|
my $op = pop @{$self->{op}}; |
|
0
|
|
|
|
|
0
|
|
603
|
0
|
|
|
|
|
0
|
my $span = @{$self->{items}} - $op->{offset}; |
|
0
|
|
|
|
|
0
|
|
604
|
0
|
0
|
|
|
|
0
|
if ($op->{type} =~ /left|right/) |
605
|
|
|
|
|
|
|
{ |
606
|
0
|
0
|
|
|
|
0
|
if ($span != 3) |
607
|
|
|
|
|
|
|
{ |
608
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_error( |
609
|
|
|
|
|
|
|
"Incorrect <$op->{type}op:...> specification: |
610
|
|
|
|
|
|
|
expected 3 args, but found $span instead", $line); |
611
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_hint( |
612
|
|
|
|
|
|
|
"The <$op->{type}op:...> directive requires a |
613
|
|
|
|
|
|
|
sequence of exactly three elements. For example: |
614
|
|
|
|
|
|
|
<$op->{type}op:leftarg /op/ rightarg>"); |
615
|
|
|
|
|
|
|
} |
616
|
|
|
|
|
|
|
else |
617
|
|
|
|
|
|
|
{ |
618
|
0
|
|
|
|
|
0
|
push @{$self->{items}}, |
619
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::Operator->new( |
620
|
0
|
|
|
|
|
0
|
$op->{type}, $minrep, $maxrep, splice(@{$self->{"items"}}, -3)); |
|
0
|
|
|
|
|
0
|
|
621
|
0
|
|
|
|
|
0
|
$self->{items}[-1]->sethashname($self); |
622
|
0
|
|
|
|
|
0
|
$self->{items}[-1]{name} = $op->{name}; |
623
|
|
|
|
|
|
|
} |
624
|
|
|
|
|
|
|
} |
625
|
|
|
|
|
|
|
} |
626
|
|
|
|
|
|
|
|
627
|
|
|
|
|
|
|
sub prevwasreturn |
628
|
|
|
|
|
|
|
{ |
629
|
0
|
|
|
0
|
|
0
|
my ( $self, $line ) = @_; |
630
|
0
|
0
|
|
|
|
0
|
unless (@{$self->{items}}) |
|
0
|
|
|
|
|
0
|
|
631
|
|
|
|
|
|
|
{ |
632
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_error( |
633
|
|
|
|
|
|
|
"Incorrect <return:...> specification: |
634
|
|
|
|
|
|
|
expected item missing", $line); |
635
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_hint( |
636
|
|
|
|
|
|
|
"The <return:...> directive requires a |
637
|
|
|
|
|
|
|
sequence of at least one item. For example: |
638
|
|
|
|
|
|
|
<return: list>"); |
639
|
0
|
|
|
|
|
0
|
return; |
640
|
|
|
|
|
|
|
} |
641
|
0
|
|
|
|
|
0
|
push @{$self->{items}}, |
|
0
|
|
|
|
|
0
|
|
642
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::Result->new(); |
643
|
|
|
|
|
|
|
} |
644
|
|
|
|
|
|
|
|
645
|
|
|
|
|
|
|
sub additem |
646
|
|
|
|
|
|
|
{ |
647
|
0
|
|
|
0
|
|
0
|
my ( $self, $item ) = @_; |
648
|
0
|
|
|
|
|
0
|
$item->sethashname($self); |
649
|
0
|
|
|
|
|
0
|
push @{$self->{"items"}}, $item; |
|
0
|
|
|
|
|
0
|
|
650
|
0
|
|
|
|
|
0
|
return $item; |
651
|
|
|
|
|
|
|
} |
652
|
|
|
|
|
|
|
|
653
|
|
|
|
|
|
|
sub _duplicate_itempos |
654
|
|
|
|
|
|
|
{ |
655
|
0
|
|
|
0
|
|
0
|
my ($src) = @_; |
656
|
0
|
|
|
|
|
0
|
my $dst = {}; |
657
|
|
|
|
|
|
|
|
658
|
0
|
|
|
|
|
0
|
foreach (keys %$src) |
659
|
|
|
|
|
|
|
{ |
660
|
0
|
|
|
|
|
0
|
%{$dst->{$_}} = %{$src->{$_}}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
661
|
|
|
|
|
|
|
} |
662
|
0
|
|
|
|
|
0
|
$dst; |
663
|
|
|
|
|
|
|
} |
664
|
|
|
|
|
|
|
|
665
|
|
|
|
|
|
|
sub _update_itempos |
666
|
|
|
|
|
|
|
{ |
667
|
0
|
|
|
0
|
|
0
|
my ($dst, $src, $typekeys, $poskeys) = @_; |
668
|
|
|
|
|
|
|
|
669
|
0
|
0
|
|
|
|
0
|
my @typekeys = 'ARRAY' eq ref $typekeys ? |
670
|
|
|
|
|
|
|
@$typekeys : |
671
|
|
|
|
|
|
|
keys %$src; |
672
|
|
|
|
|
|
|
|
673
|
0
|
|
|
|
|
0
|
foreach my $k (keys %$src) |
674
|
|
|
|
|
|
|
{ |
675
|
0
|
0
|
|
|
|
0
|
if ('ARRAY' eq ref $poskeys) |
676
|
|
|
|
|
|
|
{ |
677
|
0
|
|
|
|
|
0
|
@{$dst->{$k}}{@$poskeys} = @{$src->{$k}}{@$poskeys}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
678
|
|
|
|
|
|
|
} |
679
|
|
|
|
|
|
|
else |
680
|
|
|
|
|
|
|
{ |
681
|
0
|
|
|
|
|
0
|
%{$dst->{$k}} = %{$src->{$k}}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
682
|
|
|
|
|
|
|
} |
683
|
|
|
|
|
|
|
} |
684
|
|
|
|
|
|
|
} |
685
|
|
|
|
|
|
|
|
686
|
|
|
|
|
|
|
sub preitempos |
687
|
|
|
|
|
|
|
{ |
688
|
|
|
|
|
|
|
return q |
689
|
0
|
|
|
0
|
|
0
|
{ |
690
|
|
|
|
|
|
|
push @itempos, {'offset' => {'from'=>$thisoffset, 'to'=>undef}, |
691
|
|
|
|
|
|
|
'line' => {'from'=>$thisline, 'to'=>undef}, |
692
|
|
|
|
|
|
|
'column' => {'from'=>$thiscolumn, 'to'=>undef} }; |
693
|
|
|
|
|
|
|
} |
694
|
|
|
|
|
|
|
} |
695
|
|
|
|
|
|
|
|
696
|
|
|
|
|
|
|
sub incitempos |
697
|
|
|
|
|
|
|
{ |
698
|
|
|
|
|
|
|
return q |
699
|
0
|
|
|
0
|
|
0
|
{ |
700
|
|
|
|
|
|
|
$itempos[$#itempos]{'offset'}{'from'} += length($lastsep); |
701
|
|
|
|
|
|
|
$itempos[$#itempos]{'line'}{'from'} = $thisline; |
702
|
|
|
|
|
|
|
$itempos[$#itempos]{'column'}{'from'} = $thiscolumn; |
703
|
|
|
|
|
|
|
} |
704
|
|
|
|
|
|
|
} |
705
|
|
|
|
|
|
|
|
706
|
|
|
|
|
|
|
sub unincitempos |
707
|
|
|
|
|
|
|
{ |
708
|
|
|
|
|
|
|
# the next incitempos will properly set these two fields, but |
709
|
|
|
|
|
|
|
# {'offset'}{'from'} needs to be decreased by length($lastsep) |
710
|
|
|
|
|
|
|
# $itempos[$#itempos]{'line'}{'from'} |
711
|
|
|
|
|
|
|
# $itempos[$#itempos]{'column'}{'from'} |
712
|
|
|
|
|
|
|
return q |
713
|
0
|
|
|
0
|
|
0
|
{ |
714
|
|
|
|
|
|
|
$itempos[$#itempos]{'offset'}{'from'} -= length($lastsep) if defined $lastsep; |
715
|
|
|
|
|
|
|
} |
716
|
|
|
|
|
|
|
} |
717
|
|
|
|
|
|
|
|
718
|
|
|
|
|
|
|
sub postitempos |
719
|
|
|
|
|
|
|
{ |
720
|
|
|
|
|
|
|
return q |
721
|
0
|
|
|
0
|
|
0
|
{ |
722
|
|
|
|
|
|
|
$itempos[$#itempos]{'offset'}{'to'} = $prevoffset; |
723
|
|
|
|
|
|
|
$itempos[$#itempos]{'line'}{'to'} = $prevline; |
724
|
|
|
|
|
|
|
$itempos[$#itempos]{'column'}{'to'} = $prevcolumn; |
725
|
|
|
|
|
|
|
} |
726
|
|
|
|
|
|
|
} |
727
|
|
|
|
|
|
|
|
728
|
|
|
|
|
|
|
sub code($$$$) |
729
|
|
|
|
|
|
|
{ |
730
|
0
|
|
|
0
|
|
0
|
my ($self,$namespace,$rule,$parser) = @_; |
731
|
|
|
|
|
|
|
my $code = |
732
|
|
|
|
|
|
|
' |
733
|
|
|
|
|
|
|
while (!$_matched' |
734
|
|
|
|
|
|
|
. (defined $self->{"uncommit"} ? '' : ' && !$commit') |
735
|
|
|
|
|
|
|
. ') |
736
|
|
|
|
|
|
|
{ |
737
|
|
|
|
|
|
|
' . |
738
|
|
|
|
|
|
|
($self->changesskip() |
739
|
|
|
|
|
|
|
? 'local $skip = defined($skip) ? $skip : $Parse::RecDescent::_Runtime::skip;' |
740
|
|
|
|
|
|
|
: '') .' |
741
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [' |
742
|
|
|
|
|
|
|
. $self->describe . ']}, |
743
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
744
|
|
|
|
|
|
|
q{' . $rule ->{name}. '}, |
745
|
|
|
|
|
|
|
$tracelevel) |
746
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
747
|
|
|
|
|
|
|
my $thisprod = $thisrule->{"prods"}[' . $self->{"number"} . ']; |
748
|
|
|
|
|
|
|
' . (defined $self->{"error"} ? '' : '$text = $_[1];' ) . ' |
749
|
|
|
|
|
|
|
my $_savetext; |
750
|
|
|
|
|
|
|
@item = (q{' . $rule->{"name"} . '}); |
751
|
0
|
0
|
|
|
|
0
|
%item = (__RULE__ => q{' . $rule->{"name"} . '}); |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
752
|
|
|
|
|
|
|
my $repcount = 0; |
753
|
|
|
|
|
|
|
|
754
|
|
|
|
|
|
|
'; |
755
|
|
|
|
|
|
|
$code .= |
756
|
|
|
|
|
|
|
' my @itempos = ({}); |
757
|
0
|
0
|
|
|
|
0
|
' if $parser->{_check}{itempos}; |
758
|
|
|
|
|
|
|
|
759
|
0
|
|
|
|
|
0
|
my $item; |
760
|
|
|
|
|
|
|
my $i; |
761
|
|
|
|
|
|
|
|
762
|
0
|
|
|
|
|
0
|
for ($i = 0; $i < @{$self->{"items"}}; $i++) |
|
0
|
|
|
|
|
0
|
|
763
|
|
|
|
|
|
|
{ |
764
|
0
|
|
|
|
|
0
|
$item = ${$self->{items}}[$i]; |
|
0
|
|
|
|
|
0
|
|
765
|
|
|
|
|
|
|
|
766
|
0
|
0
|
|
|
|
0
|
$code .= preitempos() if $parser->{_check}{itempos}; |
767
|
|
|
|
|
|
|
|
768
|
0
|
|
|
|
|
0
|
$code .= $item->code($namespace,$rule,$parser->{_check}); |
769
|
|
|
|
|
|
|
|
770
|
0
|
0
|
|
|
|
0
|
$code .= postitempos() if $parser->{_check}{itempos}; |
771
|
|
|
|
|
|
|
|
772
|
|
|
|
|
|
|
} |
773
|
|
|
|
|
|
|
|
774
|
0
|
0
|
0
|
|
|
0
|
if ($parser->{_AUTOACTION} && defined($item) && !$item->isa("Parse::RecDescent::_Runtime::Action")) |
|
|
0
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
775
|
|
|
|
|
|
|
{ |
776
|
0
|
|
|
|
|
0
|
$code .= $parser->{_AUTOACTION}->code($namespace,$rule); |
777
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_warn(1,"Autogenerating action in rule |
778
|
|
|
|
|
|
|
\"$rule->{name}\": |
779
|
|
|
|
|
|
|
$parser->{_AUTOACTION}{code}") |
780
|
|
|
|
|
|
|
and |
781
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_hint("The \$::RD_AUTOACTION was defined, |
782
|
|
|
|
|
|
|
so any production not ending in an |
783
|
|
|
|
|
|
|
explicit action has the specified |
784
|
|
|
|
|
|
|
\"auto-action\" automatically |
785
|
|
|
|
|
|
|
appended."); |
786
|
|
|
|
|
|
|
} |
787
|
|
|
|
|
|
|
elsif ($parser->{_AUTOTREE} && defined($item) && !$item->isa("Parse::RecDescent::_Runtime::Action")) |
788
|
|
|
|
|
|
|
{ |
789
|
0
|
0
|
0
|
|
|
0
|
if ($i==1 && $item->isterminal) |
790
|
|
|
|
|
|
|
{ |
791
|
0
|
|
|
|
|
0
|
$code .= $parser->{_AUTOTREE}{TERMINAL}->code($namespace,$rule); |
792
|
|
|
|
|
|
|
} |
793
|
|
|
|
|
|
|
else |
794
|
|
|
|
|
|
|
{ |
795
|
0
|
|
|
|
|
0
|
$code .= $parser->{_AUTOTREE}{NODE}->code($namespace,$rule); |
796
|
|
|
|
|
|
|
} |
797
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_warn(1,"Autogenerating tree-building action in rule |
798
|
|
|
|
|
|
|
\"$rule->{name}\"") |
799
|
|
|
|
|
|
|
and |
800
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_hint("The directive <autotree> was specified, |
801
|
|
|
|
|
|
|
so any production not ending |
802
|
|
|
|
|
|
|
in an explicit action has |
803
|
|
|
|
|
|
|
some parse-tree building code |
804
|
|
|
|
|
|
|
automatically appended."); |
805
|
|
|
|
|
|
|
} |
806
|
|
|
|
|
|
|
|
807
|
|
|
|
|
|
|
$code .= |
808
|
|
|
|
|
|
|
' |
809
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{>>'.Parse::RecDescent::_Runtime::_matchtracemessage($self).' production: [' |
810
|
|
|
|
|
|
|
. $self->describe . ']<<}, |
811
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
812
|
|
|
|
|
|
|
q{' . $rule->{name} . '}, |
813
|
|
|
|
|
|
|
$tracelevel) |
814
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
815
|
|
|
|
|
|
|
|
816
|
0
|
0
|
|
|
|
0
|
' . ( $parser->{_check}{itempos} ? ' |
817
|
|
|
|
|
|
|
if ( defined($_itempos) ) |
818
|
|
|
|
|
|
|
{ |
819
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::Production::_update_itempos($_itempos, $itempos[ 1], undef, [qw(from)]); |
820
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::Production::_update_itempos($_itempos, $itempos[-1], undef, [qw(to)]); |
821
|
|
|
|
|
|
|
} |
822
|
|
|
|
|
|
|
' : '' ) . ' |
823
|
|
|
|
|
|
|
|
824
|
|
|
|
|
|
|
$_matched = 1; |
825
|
|
|
|
|
|
|
last; |
826
|
|
|
|
|
|
|
} |
827
|
|
|
|
|
|
|
|
828
|
|
|
|
|
|
|
'; |
829
|
0
|
|
|
|
|
0
|
return $code; |
830
|
|
|
|
|
|
|
} |
831
|
|
|
|
|
|
|
|
832
|
|
|
|
|
|
|
1; |
833
|
|
|
|
|
|
|
|
834
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::Action; |
835
|
|
|
|
|
|
|
|
836
|
0
|
|
|
0
|
|
0
|
sub describe { undef } |
837
|
|
|
|
|
|
|
|
838
|
0
|
|
|
0
|
|
0
|
sub sethashname { $_[0]->{hashname} = '__ACTION' . ++$_[1]->{actcount} .'__'; } |
839
|
|
|
|
|
|
|
|
840
|
|
|
|
|
|
|
sub new |
841
|
|
|
|
|
|
|
{ |
842
|
0
|
|
0
|
0
|
|
0
|
my $class = ref($_[0]) || $_[0]; |
843
|
0
|
|
|
|
|
0
|
bless |
844
|
|
|
|
|
|
|
{ |
845
|
|
|
|
|
|
|
"code" => $_[1], |
846
|
|
|
|
|
|
|
"lookahead" => $_[2], |
847
|
|
|
|
|
|
|
"line" => $_[3], |
848
|
|
|
|
|
|
|
}, $class; |
849
|
|
|
|
|
|
|
} |
850
|
|
|
|
|
|
|
|
851
|
0
|
|
|
0
|
|
0
|
sub issubrule { undef } |
852
|
0
|
|
|
0
|
|
0
|
sub isterminal { 0 } |
853
|
|
|
|
|
|
|
|
854
|
|
|
|
|
|
|
sub code($$$$) |
855
|
|
|
|
|
|
|
{ |
856
|
0
|
|
|
0
|
|
0
|
my ($self, $namespace, $rule) = @_; |
857
|
|
|
|
|
|
|
|
858
|
|
|
|
|
|
|
' |
859
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
860
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
861
|
|
|
|
|
|
|
q{' . $rule->{name} . '}, |
862
|
|
|
|
|
|
|
$tracelevel) |
863
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
864
|
|
|
|
|
|
|
' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) .' |
865
|
|
|
|
|
|
|
|
866
|
|
|
|
|
|
|
$_tok = ($_noactions) ? 0 : do ' . $self->{"code"} . '; |
867
|
|
|
|
|
|
|
' . ($self->{"lookahead"}<0?'if':'unless') . ' (defined $_tok) |
868
|
|
|
|
|
|
|
{ |
869
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{<<'.Parse::RecDescent::_Runtime::_matchtracemessage($self,1).' action>> (return value: [undef])}) |
870
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
871
|
|
|
|
|
|
|
last; |
872
|
|
|
|
|
|
|
} |
873
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{>>'.Parse::RecDescent::_Runtime::_matchtracemessage($self).' action<< (return value: [} |
874
|
|
|
|
|
|
|
. $_tok . q{])}, |
875
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
876
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
877
|
|
|
|
|
|
|
push @item, $_tok; |
878
|
|
|
|
|
|
|
' . ($self->{line}>=0 ? '$item{'. $self->{hashname} .'}=$_tok;' : '' ) .' |
879
|
0
|
0
|
|
|
|
0
|
' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .' |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
880
|
|
|
|
|
|
|
' |
881
|
|
|
|
|
|
|
} |
882
|
|
|
|
|
|
|
|
883
|
|
|
|
|
|
|
|
884
|
|
|
|
|
|
|
1; |
885
|
|
|
|
|
|
|
|
886
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::Directive; |
887
|
|
|
|
|
|
|
|
888
|
0
|
|
|
0
|
|
0
|
sub sethashname { $_[0]->{hashname} = '__DIRECTIVE' . ++$_[1]->{dircount} . '__'; } |
889
|
|
|
|
|
|
|
|
890
|
0
|
|
|
0
|
|
0
|
sub issubrule { undef } |
891
|
0
|
|
|
0
|
|
0
|
sub isterminal { 0 } |
892
|
0
|
0
|
|
0
|
|
0
|
sub describe { $_[1] ? '' : $_[0]->{name} } |
893
|
|
|
|
|
|
|
|
894
|
|
|
|
|
|
|
sub new ($$$$$) |
895
|
|
|
|
|
|
|
{ |
896
|
0
|
|
0
|
0
|
|
0
|
my $class = ref($_[0]) || $_[0]; |
897
|
0
|
|
|
|
|
0
|
bless |
898
|
|
|
|
|
|
|
{ |
899
|
|
|
|
|
|
|
"code" => $_[1], |
900
|
|
|
|
|
|
|
"lookahead" => $_[2], |
901
|
|
|
|
|
|
|
"line" => $_[3], |
902
|
|
|
|
|
|
|
"name" => $_[4], |
903
|
|
|
|
|
|
|
}, $class; |
904
|
|
|
|
|
|
|
} |
905
|
|
|
|
|
|
|
|
906
|
|
|
|
|
|
|
sub code($$$$) |
907
|
|
|
|
|
|
|
{ |
908
|
0
|
|
|
0
|
|
0
|
my ($self, $namespace, $rule) = @_; |
909
|
|
|
|
|
|
|
|
910
|
|
|
|
|
|
|
' |
911
|
|
|
|
|
|
|
' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) .' |
912
|
|
|
|
|
|
|
|
913
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{Trying directive: [' |
914
|
|
|
|
|
|
|
. $self->describe . ']}, |
915
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
916
|
|
|
|
|
|
|
q{' . $rule->{name} . '}, |
917
|
|
|
|
|
|
|
$tracelevel) |
918
|
|
|
|
|
|
|
if defined $::RD_TRACE; ' .' |
919
|
|
|
|
|
|
|
$_tok = do { ' . $self->{"code"} . ' }; |
920
|
|
|
|
|
|
|
if (defined($_tok)) |
921
|
|
|
|
|
|
|
{ |
922
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{>>'.Parse::RecDescent::_Runtime::_matchtracemessage($self).' directive<< (return value: [} |
923
|
|
|
|
|
|
|
. $_tok . q{])}, |
924
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
925
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
926
|
|
|
|
|
|
|
} |
927
|
|
|
|
|
|
|
else |
928
|
|
|
|
|
|
|
{ |
929
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{<<'.Parse::RecDescent::_Runtime::_matchtracemessage($self,1).' directive>>}, |
930
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
931
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
932
|
|
|
|
|
|
|
} |
933
|
|
|
|
|
|
|
' . ($self->{"lookahead"} ? '$text = $_savetext and ' : '' ) .' |
934
|
|
|
|
|
|
|
last ' |
935
|
|
|
|
|
|
|
. ($self->{"lookahead"}<0?'if':'unless') . ' defined $_tok; |
936
|
|
|
|
|
|
|
push @item, $item{'.$self->{hashname}.'}=$_tok; |
937
|
0
|
0
|
|
|
|
0
|
' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .' |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
938
|
|
|
|
|
|
|
' |
939
|
|
|
|
|
|
|
} |
940
|
|
|
|
|
|
|
|
941
|
|
|
|
|
|
|
1; |
942
|
|
|
|
|
|
|
|
943
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::UncondReject; |
944
|
|
|
|
|
|
|
|
945
|
0
|
|
|
0
|
|
0
|
sub issubrule { undef } |
946
|
0
|
|
|
0
|
|
0
|
sub isterminal { 0 } |
947
|
0
|
0
|
|
0
|
|
0
|
sub describe { $_[1] ? '' : $_[0]->{name} } |
948
|
0
|
|
|
0
|
|
0
|
sub sethashname { $_[0]->{hashname} = '__DIRECTIVE' . ++$_[1]->{dircount} . '__'; } |
949
|
|
|
|
|
|
|
|
950
|
|
|
|
|
|
|
sub new ($$$;$) |
951
|
|
|
|
|
|
|
{ |
952
|
0
|
|
0
|
0
|
|
0
|
my $class = ref($_[0]) || $_[0]; |
953
|
0
|
|
|
|
|
0
|
bless |
954
|
|
|
|
|
|
|
{ |
955
|
|
|
|
|
|
|
"lookahead" => $_[1], |
956
|
|
|
|
|
|
|
"line" => $_[2], |
957
|
|
|
|
|
|
|
"name" => $_[3], |
958
|
|
|
|
|
|
|
}, $class; |
959
|
|
|
|
|
|
|
} |
960
|
|
|
|
|
|
|
|
961
|
|
|
|
|
|
|
# MARK, YOU MAY WANT TO OPTIMIZE THIS. |
962
|
|
|
|
|
|
|
|
963
|
|
|
|
|
|
|
|
964
|
|
|
|
|
|
|
sub code($$$$) |
965
|
|
|
|
|
|
|
{ |
966
|
0
|
|
|
0
|
|
0
|
my ($self, $namespace, $rule) = @_; |
967
|
|
|
|
|
|
|
|
968
|
|
|
|
|
|
|
' |
969
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{>>Rejecting production<< (found ' |
970
|
|
|
|
|
|
|
. $self->describe . ')}, |
971
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
972
|
|
|
|
|
|
|
q{' . $rule->{name} . '}, |
973
|
|
|
|
|
|
|
$tracelevel) |
974
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
975
|
|
|
|
|
|
|
undef $return; |
976
|
|
|
|
|
|
|
' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) .' |
977
|
|
|
|
|
|
|
|
978
|
|
|
|
|
|
|
$_tok = undef; |
979
|
|
|
|
|
|
|
' . ($self->{"lookahead"} ? '$text = $_savetext and ' : '' ) .' |
980
|
|
|
|
|
|
|
last ' |
981
|
0
|
0
|
|
|
|
0
|
. ($self->{"lookahead"}<0?'if':'unless') . ' defined $_tok; |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
982
|
|
|
|
|
|
|
' |
983
|
|
|
|
|
|
|
} |
984
|
|
|
|
|
|
|
|
985
|
|
|
|
|
|
|
1; |
986
|
|
|
|
|
|
|
|
987
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::Error; |
988
|
|
|
|
|
|
|
|
989
|
0
|
|
|
0
|
|
0
|
sub issubrule { undef } |
990
|
0
|
|
|
0
|
|
0
|
sub isterminal { 0 } |
991
|
0
|
0
|
|
0
|
|
0
|
sub describe { $_[1] ? '' : $_[0]->{commitonly} ? '<error?:...>' : '<error...>' } |
|
|
0
|
|
|
|
|
|
992
|
0
|
|
|
0
|
|
0
|
sub sethashname { $_[0]->{hashname} = '__DIRECTIVE' . ++$_[1]->{dircount} . '__'; } |
993
|
|
|
|
|
|
|
|
994
|
|
|
|
|
|
|
sub new ($$$$$) |
995
|
|
|
|
|
|
|
{ |
996
|
0
|
|
0
|
0
|
|
0
|
my $class = ref($_[0]) || $_[0]; |
997
|
0
|
|
|
|
|
0
|
bless |
998
|
|
|
|
|
|
|
{ |
999
|
|
|
|
|
|
|
"msg" => $_[1], |
1000
|
|
|
|
|
|
|
"lookahead" => $_[2], |
1001
|
|
|
|
|
|
|
"commitonly" => $_[3], |
1002
|
|
|
|
|
|
|
"line" => $_[4], |
1003
|
|
|
|
|
|
|
}, $class; |
1004
|
|
|
|
|
|
|
} |
1005
|
|
|
|
|
|
|
|
1006
|
|
|
|
|
|
|
sub code($$$$) |
1007
|
|
|
|
|
|
|
{ |
1008
|
0
|
|
|
0
|
|
0
|
my ($self, $namespace, $rule) = @_; |
1009
|
|
|
|
|
|
|
|
1010
|
0
|
|
|
|
|
0
|
my $action = ''; |
1011
|
|
|
|
|
|
|
|
1012
|
0
|
0
|
|
|
|
0
|
if ($self->{"msg"}) # ERROR MESSAGE SUPPLIED |
1013
|
|
|
|
|
|
|
{ |
1014
|
|
|
|
|
|
|
#WAS: $action .= "Parse::RecDescent::_Runtime::_error(qq{$self->{msg}}" . ',$thisline);'; |
1015
|
0
|
|
|
|
|
0
|
$action .= 'push @{$thisparser->{errors}}, [qq{'.$self->{msg}.'},$thisline];'; |
1016
|
|
|
|
|
|
|
|
1017
|
|
|
|
|
|
|
} |
1018
|
|
|
|
|
|
|
else # GENERATE ERROR MESSAGE DURING PARSE |
1019
|
|
|
|
|
|
|
{ |
1020
|
0
|
|
|
|
|
0
|
$action .= ' |
1021
|
|
|
|
|
|
|
my $rule = $item[0]; |
1022
|
|
|
|
|
|
|
$rule =~ s/_/ /g; |
1023
|
|
|
|
|
|
|
#WAS: Parse::RecDescent::_Runtime::_error("Invalid $rule: " . $expectation->message() ,$thisline); |
1024
|
|
|
|
|
|
|
push @{$thisparser->{errors}}, ["Invalid $rule: " . $expectation->message() ,$thisline]; |
1025
|
|
|
|
|
|
|
'; |
1026
|
|
|
|
|
|
|
} |
1027
|
|
|
|
|
|
|
|
1028
|
|
|
|
|
|
|
my $dir = |
1029
|
|
|
|
|
|
|
new Parse::RecDescent::_Runtime::Directive('if (' . |
1030
|
|
|
|
|
|
|
($self->{"commitonly"} ? '$commit' : '1') . |
1031
|
|
|
|
|
|
|
") { do {$action} unless ".' $_noactions; undef } else {0}', |
1032
|
0
|
0
|
|
|
|
0
|
$self->{"lookahead"},0,$self->describe); |
1033
|
0
|
|
|
|
|
0
|
$dir->{hashname} = $self->{hashname}; |
1034
|
0
|
|
|
|
|
0
|
return $dir->code($namespace, $rule, 0); |
1035
|
|
|
|
|
|
|
} |
1036
|
|
|
|
|
|
|
|
1037
|
|
|
|
|
|
|
1; |
1038
|
|
|
|
|
|
|
|
1039
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::Token; |
1040
|
|
|
|
|
|
|
|
1041
|
0
|
|
|
0
|
|
0
|
sub sethashname { $_[0]->{hashname} = '__PATTERN' . ++$_[1]->{patcount} . '__'; } |
1042
|
|
|
|
|
|
|
|
1043
|
0
|
|
|
0
|
|
0
|
sub issubrule { undef } |
1044
|
0
|
|
|
0
|
|
0
|
sub isterminal { 1 } |
1045
|
0
|
|
|
0
|
|
0
|
sub describe ($) { shift->{'description'}} |
1046
|
|
|
|
|
|
|
|
1047
|
|
|
|
|
|
|
|
1048
|
|
|
|
|
|
|
# ARGS ARE: $self, $pattern, $left_delim, $modifiers, $lookahead, $linenum |
1049
|
|
|
|
|
|
|
sub new ($$$$$$) |
1050
|
|
|
|
|
|
|
{ |
1051
|
0
|
|
0
|
0
|
|
0
|
my $class = ref($_[0]) || $_[0]; |
1052
|
0
|
|
|
|
|
0
|
my $pattern = $_[1]; |
1053
|
0
|
|
|
|
|
0
|
my $pat = $_[1]; |
1054
|
0
|
|
|
|
|
0
|
my $ldel = $_[2]; |
1055
|
0
|
|
|
|
|
0
|
my $rdel = $ldel; |
1056
|
0
|
|
|
|
|
0
|
$rdel =~ tr/{[(</}])>/; |
1057
|
|
|
|
|
|
|
|
1058
|
0
|
|
|
|
|
0
|
my $mod = $_[3]; |
1059
|
|
|
|
|
|
|
|
1060
|
0
|
|
|
|
|
0
|
my $desc; |
1061
|
|
|
|
|
|
|
|
1062
|
0
|
0
|
|
|
|
0
|
if ($ldel eq '/') { $desc = "$ldel$pattern$rdel$mod" } |
|
0
|
|
|
|
|
0
|
|
1063
|
0
|
|
|
|
|
0
|
else { $desc = "m$ldel$pattern$rdel$mod" } |
1064
|
0
|
|
|
|
|
0
|
$desc =~ s/\\/\\\\/g; |
1065
|
0
|
|
|
|
|
0
|
$desc =~ s/\$$/\\\$/g; |
1066
|
0
|
|
|
|
|
0
|
$desc =~ s/}/\\}/g; |
1067
|
0
|
|
|
|
|
0
|
$desc =~ s/{/\\{/g; |
1068
|
|
|
|
|
|
|
|
1069
|
0
|
0
|
0
|
|
|
0
|
if (!eval "no strict; |
1070
|
|
|
|
|
|
|
local \$SIG{__WARN__} = sub {0}; |
1071
|
|
|
|
|
|
|
'' =~ m$ldel$pattern$rdel$mod" and $@) |
1072
|
|
|
|
|
|
|
{ |
1073
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_warn(3, "Token pattern \"m$ldel$pattern$rdel$mod\" |
1074
|
|
|
|
|
|
|
may not be a valid regular expression", |
1075
|
|
|
|
|
|
|
$_[5]); |
1076
|
0
|
|
|
|
|
0
|
$@ =~ s/ at \(eval.*/./; |
1077
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_hint($@); |
1078
|
|
|
|
|
|
|
} |
1079
|
|
|
|
|
|
|
|
1080
|
|
|
|
|
|
|
# QUIETLY PREVENT (WELL-INTENTIONED) CALAMITY |
1081
|
0
|
|
|
|
|
0
|
$mod =~ s/[gc]//g; |
1082
|
0
|
|
|
|
|
0
|
$pattern =~ s/(\A|[^\\])\\G/$1/g; |
1083
|
|
|
|
|
|
|
|
1084
|
0
|
|
|
|
|
0
|
bless |
1085
|
|
|
|
|
|
|
{ |
1086
|
|
|
|
|
|
|
"pattern" => $pattern, |
1087
|
|
|
|
|
|
|
"ldelim" => $ldel, |
1088
|
|
|
|
|
|
|
"rdelim" => $rdel, |
1089
|
|
|
|
|
|
|
"mod" => $mod, |
1090
|
|
|
|
|
|
|
"lookahead" => $_[4], |
1091
|
|
|
|
|
|
|
"line" => $_[5], |
1092
|
|
|
|
|
|
|
"description" => $desc, |
1093
|
|
|
|
|
|
|
}, $class; |
1094
|
|
|
|
|
|
|
} |
1095
|
|
|
|
|
|
|
|
1096
|
|
|
|
|
|
|
|
1097
|
|
|
|
|
|
|
sub code($$$$$) |
1098
|
|
|
|
|
|
|
{ |
1099
|
0
|
|
|
0
|
|
0
|
my ($self, $namespace, $rule, $check) = @_; |
1100
|
0
|
|
|
|
|
0
|
my $ldel = $self->{"ldelim"}; |
1101
|
0
|
|
|
|
|
0
|
my $rdel = $self->{"rdelim"}; |
1102
|
0
|
|
|
|
|
0
|
my $sdel = $ldel; |
1103
|
0
|
|
|
|
|
0
|
my $mod = $self->{"mod"}; |
1104
|
|
|
|
|
|
|
|
1105
|
0
|
|
|
|
|
0
|
$sdel =~ s/[[{(<]/{}/; |
1106
|
|
|
|
|
|
|
|
1107
|
|
|
|
|
|
|
my $code = ' |
1108
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [' . $self->describe |
1109
|
|
|
|
|
|
|
. ']}, Parse::RecDescent::_Runtime::_tracefirst($text), |
1110
|
|
|
|
|
|
|
q{' . $rule->{name} . '}, |
1111
|
|
|
|
|
|
|
$tracelevel) |
1112
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
1113
|
|
|
|
|
|
|
undef $lastsep; |
1114
|
|
|
|
|
|
|
$expectation->is(q{' . ($rule->hasleftmost($self) ? '' |
1115
|
|
|
|
|
|
|
: $self->describe ) . '})->at($text); |
1116
|
|
|
|
|
|
|
' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) . ' |
1117
|
|
|
|
|
|
|
|
1118
|
|
|
|
|
|
|
' . ($self->{"lookahead"}<0?'if':'unless') |
1119
|
|
|
|
|
|
|
. ' ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and ' |
1120
|
|
|
|
|
|
|
. ($check->{itempos}? 'do {'.Parse::RecDescent::_Runtime::Production::incitempos().' 1} and ' : '') |
1121
|
|
|
|
|
|
|
. ' $text =~ m' . $ldel . '\A(?:' . $self->{"pattern"} . ')' . $rdel . $mod . ') |
1122
|
|
|
|
|
|
|
{ |
1123
|
|
|
|
|
|
|
'.($self->{"lookahead"} ? '$text = $_savetext;' : '$text = $lastsep . $text if defined $lastsep;') . |
1124
|
|
|
|
|
|
|
($check->{itempos} ? Parse::RecDescent::_Runtime::Production::unincitempos() : '') . ' |
1125
|
|
|
|
|
|
|
$expectation->failed(); |
1126
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn\'t match terminal>>}, |
1127
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
1128
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
1129
|
|
|
|
|
|
|
|
1130
|
|
|
|
|
|
|
last; |
1131
|
|
|
|
|
|
|
} |
1132
|
|
|
|
|
|
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
1133
|
|
|
|
|
|
|
substr($text,0,length($current_match),q{}); |
1134
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
1135
|
|
|
|
|
|
|
. $current_match . q{])}, |
1136
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
1137
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
1138
|
|
|
|
|
|
|
push @item, $item{'.$self->{hashname}.'}=$current_match; |
1139
|
0
|
0
|
|
|
|
0
|
' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .' |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1140
|
|
|
|
|
|
|
'; |
1141
|
|
|
|
|
|
|
|
1142
|
0
|
|
|
|
|
0
|
return $code; |
1143
|
|
|
|
|
|
|
} |
1144
|
|
|
|
|
|
|
|
1145
|
|
|
|
|
|
|
1; |
1146
|
|
|
|
|
|
|
|
1147
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::Literal; |
1148
|
|
|
|
|
|
|
|
1149
|
0
|
|
|
0
|
|
0
|
sub sethashname { $_[0]->{hashname} = '__STRING' . ++$_[1]->{strcount} . '__'; } |
1150
|
|
|
|
|
|
|
|
1151
|
0
|
|
|
0
|
|
0
|
sub issubrule { undef } |
1152
|
0
|
|
|
0
|
|
0
|
sub isterminal { 1 } |
1153
|
0
|
|
|
0
|
|
0
|
sub describe ($) { shift->{'description'} } |
1154
|
|
|
|
|
|
|
|
1155
|
|
|
|
|
|
|
sub new ($$$$) |
1156
|
|
|
|
|
|
|
{ |
1157
|
0
|
|
0
|
0
|
|
0
|
my $class = ref($_[0]) || $_[0]; |
1158
|
|
|
|
|
|
|
|
1159
|
0
|
|
|
|
|
0
|
my $pattern = $_[1]; |
1160
|
|
|
|
|
|
|
|
1161
|
0
|
|
|
|
|
0
|
my $desc = $pattern; |
1162
|
0
|
|
|
|
|
0
|
$desc=~s/\\/\\\\/g; |
1163
|
0
|
|
|
|
|
0
|
$desc=~s/}/\\}/g; |
1164
|
0
|
|
|
|
|
0
|
$desc=~s/{/\\{/g; |
1165
|
|
|
|
|
|
|
|
1166
|
0
|
|
|
|
|
0
|
bless |
1167
|
|
|
|
|
|
|
{ |
1168
|
|
|
|
|
|
|
"pattern" => $pattern, |
1169
|
|
|
|
|
|
|
"lookahead" => $_[2], |
1170
|
|
|
|
|
|
|
"line" => $_[3], |
1171
|
|
|
|
|
|
|
"description" => "'$desc'", |
1172
|
|
|
|
|
|
|
}, $class; |
1173
|
|
|
|
|
|
|
} |
1174
|
|
|
|
|
|
|
|
1175
|
|
|
|
|
|
|
|
1176
|
|
|
|
|
|
|
sub code($$$$) |
1177
|
|
|
|
|
|
|
{ |
1178
|
0
|
|
|
0
|
|
0
|
my ($self, $namespace, $rule, $check) = @_; |
1179
|
|
|
|
|
|
|
|
1180
|
|
|
|
|
|
|
my $code = ' |
1181
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [' . $self->describe |
1182
|
|
|
|
|
|
|
. ']}, |
1183
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
1184
|
|
|
|
|
|
|
q{' . $rule->{name} . '}, |
1185
|
|
|
|
|
|
|
$tracelevel) |
1186
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
1187
|
|
|
|
|
|
|
undef $lastsep; |
1188
|
|
|
|
|
|
|
$expectation->is(q{' . ($rule->hasleftmost($self) ? '' |
1189
|
|
|
|
|
|
|
: $self->describe ) . '})->at($text); |
1190
|
|
|
|
|
|
|
' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) . ' |
1191
|
|
|
|
|
|
|
|
1192
|
|
|
|
|
|
|
' . ($self->{"lookahead"}<0?'if':'unless') |
1193
|
|
|
|
|
|
|
. ' ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and ' |
1194
|
|
|
|
|
|
|
. ($check->{itempos}? 'do {'.Parse::RecDescent::_Runtime::Production::incitempos().' 1} and ' : '') |
1195
|
|
|
|
|
|
|
. ' $text =~ m/\A' . quotemeta($self->{"pattern"}) . '/) |
1196
|
|
|
|
|
|
|
{ |
1197
|
|
|
|
|
|
|
'.($self->{"lookahead"} ? '$text = $_savetext;' : '$text = $lastsep . $text if defined $lastsep;').' |
1198
|
|
|
|
|
|
|
'. ($check->{itempos} ? Parse::RecDescent::_Runtime::Production::unincitempos() : '') . ' |
1199
|
|
|
|
|
|
|
$expectation->failed(); |
1200
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(qq{<<Didn\'t match terminal>>}, |
1201
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
1202
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
1203
|
|
|
|
|
|
|
last; |
1204
|
|
|
|
|
|
|
} |
1205
|
|
|
|
|
|
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
1206
|
|
|
|
|
|
|
substr($text,0,length($current_match),q{}); |
1207
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
1208
|
|
|
|
|
|
|
. $current_match . q{])}, |
1209
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
1210
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
1211
|
|
|
|
|
|
|
push @item, $item{'.$self->{hashname}.'}=$current_match; |
1212
|
0
|
0
|
|
|
|
0
|
' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .' |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1213
|
|
|
|
|
|
|
'; |
1214
|
|
|
|
|
|
|
|
1215
|
0
|
|
|
|
|
0
|
return $code; |
1216
|
|
|
|
|
|
|
} |
1217
|
|
|
|
|
|
|
|
1218
|
|
|
|
|
|
|
1; |
1219
|
|
|
|
|
|
|
|
1220
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::InterpLit; |
1221
|
|
|
|
|
|
|
|
1222
|
0
|
|
|
0
|
|
0
|
sub sethashname { $_[0]->{hashname} = '__STRING' . ++$_[1]->{strcount} . '__'; } |
1223
|
|
|
|
|
|
|
|
1224
|
0
|
|
|
0
|
|
0
|
sub issubrule { undef } |
1225
|
0
|
|
|
0
|
|
0
|
sub isterminal { 1 } |
1226
|
0
|
|
|
0
|
|
0
|
sub describe ($) { shift->{'description'} } |
1227
|
|
|
|
|
|
|
|
1228
|
|
|
|
|
|
|
sub new ($$$$) |
1229
|
|
|
|
|
|
|
{ |
1230
|
0
|
|
0
|
0
|
|
0
|
my $class = ref($_[0]) || $_[0]; |
1231
|
|
|
|
|
|
|
|
1232
|
0
|
|
|
|
|
0
|
my $pattern = $_[1]; |
1233
|
0
|
|
|
|
|
0
|
$pattern =~ s#/#\\/#g; |
1234
|
|
|
|
|
|
|
|
1235
|
0
|
|
|
|
|
0
|
my $desc = $pattern; |
1236
|
0
|
|
|
|
|
0
|
$desc=~s/\\/\\\\/g; |
1237
|
0
|
|
|
|
|
0
|
$desc=~s/}/\\}/g; |
1238
|
0
|
|
|
|
|
0
|
$desc=~s/{/\\{/g; |
1239
|
|
|
|
|
|
|
|
1240
|
0
|
|
|
|
|
0
|
bless |
1241
|
|
|
|
|
|
|
{ |
1242
|
|
|
|
|
|
|
"pattern" => $pattern, |
1243
|
|
|
|
|
|
|
"lookahead" => $_[2], |
1244
|
|
|
|
|
|
|
"line" => $_[3], |
1245
|
|
|
|
|
|
|
"description" => "'$desc'", |
1246
|
|
|
|
|
|
|
}, $class; |
1247
|
|
|
|
|
|
|
} |
1248
|
|
|
|
|
|
|
|
1249
|
|
|
|
|
|
|
sub code($$$$) |
1250
|
|
|
|
|
|
|
{ |
1251
|
0
|
|
|
0
|
|
0
|
my ($self, $namespace, $rule, $check) = @_; |
1252
|
|
|
|
|
|
|
|
1253
|
|
|
|
|
|
|
my $code = ' |
1254
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [' . $self->describe |
1255
|
|
|
|
|
|
|
. ']}, |
1256
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
1257
|
|
|
|
|
|
|
q{' . $rule->{name} . '}, |
1258
|
|
|
|
|
|
|
$tracelevel) |
1259
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
1260
|
|
|
|
|
|
|
undef $lastsep; |
1261
|
|
|
|
|
|
|
$expectation->is(q{' . ($rule->hasleftmost($self) ? '' |
1262
|
|
|
|
|
|
|
: $self->describe ) . '})->at($text); |
1263
|
|
|
|
|
|
|
' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) . ' |
1264
|
|
|
|
|
|
|
|
1265
|
|
|
|
|
|
|
' . ($self->{"lookahead"}<0?'if':'unless') |
1266
|
|
|
|
|
|
|
. ' ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and ' |
1267
|
|
|
|
|
|
|
. ($check->{itempos}? 'do {'.Parse::RecDescent::_Runtime::Production::incitempos().' 1} and ' : '') |
1268
|
|
|
|
|
|
|
. ' do { $_tok = "' . $self->{"pattern"} . '"; 1 } and |
1269
|
|
|
|
|
|
|
substr($text,0,length($_tok)) eq $_tok and |
1270
|
|
|
|
|
|
|
do { substr($text,0,length($_tok)) = ""; 1; } |
1271
|
|
|
|
|
|
|
) |
1272
|
|
|
|
|
|
|
{ |
1273
|
|
|
|
|
|
|
'.($self->{"lookahead"} ? '$text = $_savetext;' : '$text = $lastsep . $text if defined $lastsep;').' |
1274
|
|
|
|
|
|
|
'. ($check->{itempos} ? Parse::RecDescent::_Runtime::Production::unincitempos() : '') . ' |
1275
|
|
|
|
|
|
|
$expectation->failed(); |
1276
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn\'t match terminal>>}, |
1277
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
1278
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
1279
|
|
|
|
|
|
|
last; |
1280
|
|
|
|
|
|
|
} |
1281
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
1282
|
|
|
|
|
|
|
. $_tok . q{])}, |
1283
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
1284
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
1285
|
|
|
|
|
|
|
push @item, $item{'.$self->{hashname}.'}=$_tok; |
1286
|
0
|
0
|
|
|
|
0
|
' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .' |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1287
|
|
|
|
|
|
|
'; |
1288
|
|
|
|
|
|
|
|
1289
|
0
|
|
|
|
|
0
|
return $code; |
1290
|
|
|
|
|
|
|
} |
1291
|
|
|
|
|
|
|
|
1292
|
|
|
|
|
|
|
1; |
1293
|
|
|
|
|
|
|
|
1294
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::Subrule; |
1295
|
|
|
|
|
|
|
|
1296
|
0
|
|
|
0
|
|
0
|
sub issubrule ($) { return $_[0]->{"subrule"} } |
1297
|
0
|
|
|
0
|
|
0
|
sub isterminal { 0 } |
1298
|
|
|
|
0
|
|
|
sub sethashname {} |
1299
|
|
|
|
|
|
|
|
1300
|
|
|
|
|
|
|
sub describe ($) |
1301
|
|
|
|
|
|
|
{ |
1302
|
0
|
|
0
|
0
|
|
0
|
my $desc = $_[0]->{"implicit"} || $_[0]->{"subrule"}; |
1303
|
0
|
0
|
|
|
|
0
|
$desc = "<matchrule:$desc>" if $_[0]->{"matchrule"}; |
1304
|
0
|
|
|
|
|
0
|
return $desc; |
1305
|
|
|
|
|
|
|
} |
1306
|
|
|
|
|
|
|
|
1307
|
|
|
|
|
|
|
sub callsyntax($$) |
1308
|
|
|
|
|
|
|
{ |
1309
|
0
|
0
|
|
0
|
|
0
|
if ($_[0]->{"matchrule"}) |
1310
|
|
|
|
|
|
|
{ |
1311
|
0
|
|
|
|
|
0
|
return "&{'$_[1]'.qq{$_[0]->{subrule}}}"; |
1312
|
|
|
|
|
|
|
} |
1313
|
|
|
|
|
|
|
else |
1314
|
|
|
|
|
|
|
{ |
1315
|
0
|
|
|
|
|
0
|
return $_[1].$_[0]->{"subrule"}; |
1316
|
|
|
|
|
|
|
} |
1317
|
|
|
|
|
|
|
} |
1318
|
|
|
|
|
|
|
|
1319
|
|
|
|
|
|
|
sub new ($$$$;$$$) |
1320
|
|
|
|
|
|
|
{ |
1321
|
0
|
|
0
|
0
|
|
0
|
my $class = ref($_[0]) || $_[0]; |
1322
|
0
|
|
0
|
|
|
0
|
bless |
|
|
|
0
|
|
|
|
|
1323
|
|
|
|
|
|
|
{ |
1324
|
|
|
|
|
|
|
"subrule" => $_[1], |
1325
|
|
|
|
|
|
|
"lookahead" => $_[2], |
1326
|
|
|
|
|
|
|
"line" => $_[3], |
1327
|
|
|
|
|
|
|
"implicit" => $_[4] || undef, |
1328
|
|
|
|
|
|
|
"matchrule" => $_[5], |
1329
|
|
|
|
|
|
|
"argcode" => $_[6] || undef, |
1330
|
|
|
|
|
|
|
}, $class; |
1331
|
|
|
|
|
|
|
} |
1332
|
|
|
|
|
|
|
|
1333
|
|
|
|
|
|
|
|
1334
|
|
|
|
|
|
|
sub code($$$$) |
1335
|
|
|
|
|
|
|
{ |
1336
|
0
|
|
|
0
|
|
0
|
my ($self, $namespace, $rule, $check) = @_; |
1337
|
|
|
|
|
|
|
|
1338
|
|
|
|
|
|
|
' |
1339
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [' . $self->{"subrule"} . ']}, |
1340
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
1341
|
|
|
|
|
|
|
q{' . $rule->{"name"} . '}, |
1342
|
|
|
|
|
|
|
$tracelevel) |
1343
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
1344
|
|
|
|
|
|
|
if (1) { no strict qw{refs}; |
1345
|
|
|
|
|
|
|
$expectation->is(' . ($rule->hasleftmost($self) ? 'q{}' |
1346
|
|
|
|
|
|
|
# WAS : 'qq{'.$self->describe.'}' ) . ')->at($text); |
1347
|
|
|
|
|
|
|
: 'q{'.$self->describe.'}' ) . ')->at($text); |
1348
|
|
|
|
|
|
|
' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) |
1349
|
|
|
|
|
|
|
. ($self->{"lookahead"}<0?'if':'unless') |
1350
|
|
|
|
|
|
|
. ' (defined ($_tok = ' |
1351
|
|
|
|
|
|
|
. $self->callsyntax($namespace.'::') |
1352
|
|
|
|
|
|
|
. '($thisparser,$text,$repeating,' |
1353
|
|
|
|
|
|
|
. ($self->{"lookahead"}?'1':'$_noactions') |
1354
|
|
|
|
|
|
|
. ($self->{argcode} ? ",sub { return $self->{argcode} }" |
1355
|
|
|
|
|
|
|
: ',sub { \\@arg }') |
1356
|
|
|
|
|
|
|
. ($check->{"itempos"}?',$itempos[$#itempos]':',undef') |
1357
|
|
|
|
|
|
|
. '))) |
1358
|
|
|
|
|
|
|
{ |
1359
|
|
|
|
|
|
|
'.($self->{"lookahead"} ? '$text = $_savetext;' : '').' |
1360
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{<<'.Parse::RecDescent::_Runtime::_matchtracemessage($self,1).' subrule: [' |
1361
|
|
|
|
|
|
|
. $self->{subrule} . ']>>}, |
1362
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
1363
|
|
|
|
|
|
|
q{' . $rule->{"name"} .'}, |
1364
|
|
|
|
|
|
|
$tracelevel) |
1365
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
1366
|
|
|
|
|
|
|
$expectation->failed(); |
1367
|
|
|
|
|
|
|
last; |
1368
|
|
|
|
|
|
|
} |
1369
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{>>'.Parse::RecDescent::_Runtime::_matchtracemessage($self).' subrule: [' |
1370
|
|
|
|
|
|
|
. $self->{subrule} . ']<< (return value: [} |
1371
|
|
|
|
|
|
|
. $_tok . q{]}, |
1372
|
|
|
|
|
|
|
|
1373
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
1374
|
|
|
|
|
|
|
q{' . $rule->{"name"} .'}, |
1375
|
|
|
|
|
|
|
$tracelevel) |
1376
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
1377
|
|
|
|
|
|
|
$item{q{' . $self->{subrule} . '}} = $_tok; |
1378
|
|
|
|
|
|
|
push @item, $_tok; |
1379
|
0
|
0
|
|
|
|
0
|
' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .' |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1380
|
|
|
|
|
|
|
} |
1381
|
|
|
|
|
|
|
' |
1382
|
|
|
|
|
|
|
} |
1383
|
|
|
|
|
|
|
|
1384
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::Repetition; |
1385
|
|
|
|
|
|
|
|
1386
|
0
|
|
|
0
|
|
0
|
sub issubrule ($) { return $_[0]->{"subrule"} } |
1387
|
0
|
|
|
0
|
|
0
|
sub isterminal { 0 } |
1388
|
|
|
|
0
|
|
|
sub sethashname { } |
1389
|
|
|
|
|
|
|
|
1390
|
|
|
|
|
|
|
sub describe ($) |
1391
|
|
|
|
|
|
|
{ |
1392
|
0
|
|
0
|
0
|
|
0
|
my $desc = $_[0]->{"expected"} || $_[0]->{"subrule"}; |
1393
|
0
|
0
|
|
|
|
0
|
$desc = "<matchrule:$desc>" if $_[0]->{"matchrule"}; |
1394
|
0
|
|
|
|
|
0
|
return $desc; |
1395
|
|
|
|
|
|
|
} |
1396
|
|
|
|
|
|
|
|
1397
|
|
|
|
|
|
|
sub callsyntax($$) |
1398
|
|
|
|
|
|
|
{ |
1399
|
0
|
0
|
|
0
|
|
0
|
if ($_[0]->{matchrule}) |
1400
|
0
|
|
|
|
|
0
|
{ return "sub { goto &{''.qq{$_[1]$_[0]->{subrule}}} }"; } |
1401
|
|
|
|
|
|
|
else |
1402
|
0
|
|
|
|
|
0
|
{ return "\\&$_[1]$_[0]->{subrule}"; } |
1403
|
|
|
|
|
|
|
} |
1404
|
|
|
|
|
|
|
|
1405
|
|
|
|
|
|
|
sub new ($$$$$$$$$$) |
1406
|
|
|
|
|
|
|
{ |
1407
|
0
|
|
|
0
|
|
0
|
my ($self, $subrule, $repspec, $min, $max, $lookahead, $line, $parser, $matchrule, $argcode) = @_; |
1408
|
0
|
|
0
|
|
|
0
|
my $class = ref($self) || $self; |
1409
|
0
|
0
|
|
|
|
0
|
($max, $min) = ( $min, $max) if ($max<$min); |
1410
|
|
|
|
|
|
|
|
1411
|
0
|
|
|
|
|
0
|
my $desc; |
1412
|
0
|
0
|
|
|
|
0
|
if ($subrule=~/\A_alternation_\d+_of_production_\d+_of_rule/) |
1413
|
0
|
|
|
|
|
0
|
{ $desc = $parser->{"rules"}{$subrule}->expected } |
1414
|
|
|
|
|
|
|
|
1415
|
0
|
0
|
|
|
|
0
|
if ($lookahead) |
1416
|
|
|
|
|
|
|
{ |
1417
|
0
|
0
|
|
|
|
0
|
if ($min>0) |
1418
|
|
|
|
|
|
|
{ |
1419
|
0
|
|
|
|
|
0
|
return new Parse::RecDescent::_Runtime::Subrule($subrule,$lookahead,$line,$desc,$matchrule,$argcode); |
1420
|
|
|
|
|
|
|
} |
1421
|
|
|
|
|
|
|
else |
1422
|
|
|
|
|
|
|
{ |
1423
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_error("Not symbol (\"!\") before |
1424
|
|
|
|
|
|
|
\"$subrule\" doesn't make |
1425
|
|
|
|
|
|
|
sense.",$line); |
1426
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_hint("Lookahead for negated optional |
1427
|
|
|
|
|
|
|
repetitions (such as |
1428
|
|
|
|
|
|
|
\"!$subrule($repspec)\" can never |
1429
|
|
|
|
|
|
|
succeed, since optional items always |
1430
|
|
|
|
|
|
|
match (zero times at worst). |
1431
|
|
|
|
|
|
|
Did you mean a single \"!$subrule\", |
1432
|
|
|
|
|
|
|
instead?"); |
1433
|
|
|
|
|
|
|
} |
1434
|
|
|
|
|
|
|
} |
1435
|
|
|
|
|
|
|
bless |
1436
|
|
|
|
|
|
|
{ |
1437
|
0
|
|
0
|
|
|
0
|
"subrule" => $subrule, |
1438
|
|
|
|
|
|
|
"repspec" => $repspec, |
1439
|
|
|
|
|
|
|
"min" => $min, |
1440
|
|
|
|
|
|
|
"max" => $max, |
1441
|
|
|
|
|
|
|
"lookahead" => $lookahead, |
1442
|
|
|
|
|
|
|
"line" => $line, |
1443
|
|
|
|
|
|
|
"expected" => $desc, |
1444
|
|
|
|
|
|
|
"argcode" => $argcode || undef, |
1445
|
|
|
|
|
|
|
"matchrule" => $matchrule, |
1446
|
|
|
|
|
|
|
}, $class; |
1447
|
|
|
|
|
|
|
} |
1448
|
|
|
|
|
|
|
|
1449
|
|
|
|
|
|
|
sub code($$$$) |
1450
|
|
|
|
|
|
|
{ |
1451
|
0
|
|
|
0
|
|
0
|
my ($self, $namespace, $rule, $check) = @_; |
1452
|
|
|
|
|
|
|
|
1453
|
|
|
|
|
|
|
my ($subrule, $repspec, $min, $max, $lookahead) = |
1454
|
0
|
|
|
|
|
0
|
@{$self}{ qw{subrule repspec min max lookahead} }; |
|
0
|
|
|
|
|
0
|
|
1455
|
|
|
|
|
|
|
|
1456
|
|
|
|
|
|
|
' |
1457
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{Trying repeated subrule: [' . $self->describe . ']}, |
1458
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
1459
|
|
|
|
|
|
|
q{' . $rule->{"name"} . '}, |
1460
|
|
|
|
|
|
|
$tracelevel) |
1461
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
1462
|
|
|
|
|
|
|
$expectation->is(' . ($rule->hasleftmost($self) ? 'q{}' |
1463
|
|
|
|
|
|
|
# WAS : 'qq{'.$self->describe.'}' ) . ')->at($text); |
1464
|
|
|
|
|
|
|
: 'q{'.$self->describe.'}' ) . ')->at($text); |
1465
|
|
|
|
|
|
|
' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) .' |
1466
|
|
|
|
|
|
|
unless (defined ($_tok = $thisparser->_parserepeat($text, ' |
1467
|
|
|
|
|
|
|
. $self->callsyntax($namespace.'::') |
1468
|
|
|
|
|
|
|
. ', ' . $min . ', ' . $max . ', ' |
1469
|
|
|
|
|
|
|
. ($self->{"lookahead"}?'1':'$_noactions') |
1470
|
|
|
|
|
|
|
. ',$expectation,' |
1471
|
|
|
|
|
|
|
. ($self->{argcode} ? "sub { return $self->{argcode} }" |
1472
|
|
|
|
|
|
|
: 'sub { \\@arg }') |
1473
|
|
|
|
|
|
|
. ($check->{"itempos"}?',$itempos[$#itempos]':',undef') |
1474
|
|
|
|
|
|
|
. '))) |
1475
|
|
|
|
|
|
|
{ |
1476
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{<<'.Parse::RecDescent::_Runtime::_matchtracemessage($self,1).' repeated subrule: [' |
1477
|
|
|
|
|
|
|
. $self->describe . ']>>}, |
1478
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
1479
|
|
|
|
|
|
|
q{' . $rule->{"name"} .'}, |
1480
|
|
|
|
|
|
|
$tracelevel) |
1481
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
1482
|
|
|
|
|
|
|
last; |
1483
|
|
|
|
|
|
|
} |
1484
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{>>'.Parse::RecDescent::_Runtime::_matchtracemessage($self).' repeated subrule: [' |
1485
|
|
|
|
|
|
|
. $self->{subrule} . ']<< (} |
1486
|
|
|
|
|
|
|
. @$_tok . q{ times)}, |
1487
|
|
|
|
|
|
|
|
1488
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
1489
|
|
|
|
|
|
|
q{' . $rule->{"name"} .'}, |
1490
|
|
|
|
|
|
|
$tracelevel) |
1491
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
1492
|
|
|
|
|
|
|
$item{q{' . "$self->{subrule}($self->{repspec})" . '}} = $_tok; |
1493
|
|
|
|
|
|
|
push @item, $_tok; |
1494
|
0
|
0
|
|
|
|
0
|
' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .' |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1495
|
|
|
|
|
|
|
|
1496
|
|
|
|
|
|
|
' |
1497
|
|
|
|
|
|
|
} |
1498
|
|
|
|
|
|
|
|
1499
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::Result; |
1500
|
|
|
|
|
|
|
|
1501
|
0
|
|
|
0
|
|
0
|
sub issubrule { 0 } |
1502
|
0
|
|
|
0
|
|
0
|
sub isterminal { 0 } |
1503
|
0
|
|
|
0
|
|
0
|
sub describe { '' } |
1504
|
|
|
|
|
|
|
|
1505
|
|
|
|
|
|
|
sub new |
1506
|
|
|
|
|
|
|
{ |
1507
|
0
|
|
|
0
|
|
0
|
my ($class, $pos) = @_; |
1508
|
|
|
|
|
|
|
|
1509
|
0
|
|
|
|
|
0
|
bless {}, $class; |
1510
|
|
|
|
|
|
|
} |
1511
|
|
|
|
|
|
|
|
1512
|
|
|
|
|
|
|
sub code($$$$) |
1513
|
|
|
|
|
|
|
{ |
1514
|
0
|
|
|
0
|
|
0
|
my ($self, $namespace, $rule) = @_; |
1515
|
|
|
|
|
|
|
|
1516
|
0
|
|
|
|
|
0
|
' |
1517
|
|
|
|
|
|
|
$return = $item[-1]; |
1518
|
|
|
|
|
|
|
'; |
1519
|
|
|
|
|
|
|
} |
1520
|
|
|
|
|
|
|
|
1521
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::Operator; |
1522
|
|
|
|
|
|
|
|
1523
|
|
|
|
|
|
|
my @opertype = ( " non-optional", "n optional" ); |
1524
|
|
|
|
|
|
|
|
1525
|
0
|
|
|
0
|
|
0
|
sub issubrule { 0 } |
1526
|
0
|
|
|
0
|
|
0
|
sub isterminal { 0 } |
1527
|
|
|
|
|
|
|
|
1528
|
0
|
|
|
0
|
|
0
|
sub describe { $_[0]->{"expected"} } |
1529
|
0
|
|
|
0
|
|
0
|
sub sethashname { $_[0]->{hashname} = '__DIRECTIVE' . ++$_[1]->{dircount} . '__'; } |
1530
|
|
|
|
|
|
|
|
1531
|
|
|
|
|
|
|
|
1532
|
|
|
|
|
|
|
sub new |
1533
|
|
|
|
|
|
|
{ |
1534
|
0
|
|
|
0
|
|
0
|
my ($class, $type, $minrep, $maxrep, $leftarg, $op, $rightarg) = @_; |
1535
|
|
|
|
|
|
|
|
1536
|
0
|
|
|
|
|
0
|
bless |
1537
|
|
|
|
|
|
|
{ |
1538
|
|
|
|
|
|
|
"type" => "${type}op", |
1539
|
|
|
|
|
|
|
"leftarg" => $leftarg, |
1540
|
|
|
|
|
|
|
"op" => $op, |
1541
|
|
|
|
|
|
|
"min" => $minrep, |
1542
|
|
|
|
|
|
|
"max" => $maxrep, |
1543
|
|
|
|
|
|
|
"rightarg" => $rightarg, |
1544
|
|
|
|
|
|
|
"expected" => "<${type}op: ".$leftarg->describe." ".$op->describe." ".$rightarg->describe.">", |
1545
|
|
|
|
|
|
|
}, $class; |
1546
|
|
|
|
|
|
|
} |
1547
|
|
|
|
|
|
|
|
1548
|
|
|
|
|
|
|
sub code($$$$) |
1549
|
|
|
|
|
|
|
{ |
1550
|
0
|
|
|
0
|
|
0
|
my ($self, $namespace, $rule, $check) = @_; |
1551
|
|
|
|
|
|
|
|
1552
|
0
|
|
|
|
|
0
|
my @codeargs = @_[1..$#_]; |
1553
|
|
|
|
|
|
|
|
1554
|
|
|
|
|
|
|
my ($leftarg, $op, $rightarg) = |
1555
|
0
|
|
|
|
|
0
|
@{$self}{ qw{leftarg op rightarg} }; |
|
0
|
|
|
|
|
0
|
|
1556
|
|
|
|
|
|
|
|
1557
|
|
|
|
|
|
|
my $code = ' |
1558
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{Trying operator: [' . $self->describe . ']}, |
1559
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
1560
|
0
|
0
|
|
|
|
0
|
q{' . $rule->{"name"} . '}, |
1561
|
|
|
|
|
|
|
$tracelevel) |
1562
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
1563
|
|
|
|
|
|
|
$expectation->is(' . ($rule->hasleftmost($self) ? 'q{}' |
1564
|
|
|
|
|
|
|
# WAS : 'qq{'.$self->describe.'}' ) . ')->at($text); |
1565
|
|
|
|
|
|
|
: 'q{'.$self->describe.'}' ) . ')->at($text); |
1566
|
|
|
|
|
|
|
|
1567
|
|
|
|
|
|
|
$_tok = undef; |
1568
|
|
|
|
|
|
|
OPLOOP: while (1) |
1569
|
|
|
|
|
|
|
{ |
1570
|
|
|
|
|
|
|
$repcount = 0; |
1571
|
|
|
|
|
|
|
my @item; |
1572
|
|
|
|
|
|
|
my %item; |
1573
|
|
|
|
|
|
|
'; |
1574
|
|
|
|
|
|
|
|
1575
|
|
|
|
|
|
|
$code .= ' |
1576
|
|
|
|
|
|
|
my $_itempos = $itempos[-1]; |
1577
|
|
|
|
|
|
|
my $itemposfirst; |
1578
|
0
|
0
|
|
|
|
0
|
' if $check->{itempos}; |
1579
|
|
|
|
|
|
|
|
1580
|
0
|
0
|
|
|
|
0
|
if ($self->{type} eq "leftop" ) |
1581
|
|
|
|
|
|
|
{ |
1582
|
0
|
|
|
|
|
0
|
$code .= ' |
1583
|
|
|
|
|
|
|
# MATCH LEFTARG |
1584
|
|
|
|
|
|
|
' . $leftarg->code(@codeargs) . ' |
1585
|
|
|
|
|
|
|
|
1586
|
|
|
|
|
|
|
'; |
1587
|
|
|
|
|
|
|
|
1588
|
|
|
|
|
|
|
$code .= ' |
1589
|
|
|
|
|
|
|
if (defined($_itempos) and !defined($itemposfirst)) |
1590
|
|
|
|
|
|
|
{ |
1591
|
|
|
|
|
|
|
$itemposfirst = Parse::RecDescent::_Runtime::Production::_duplicate_itempos($_itempos); |
1592
|
|
|
|
|
|
|
} |
1593
|
0
|
0
|
|
|
|
0
|
' if $check->{itempos}; |
1594
|
|
|
|
|
|
|
|
1595
|
|
|
|
|
|
|
$code .= ' |
1596
|
|
|
|
|
|
|
$repcount++; |
1597
|
|
|
|
|
|
|
|
1598
|
|
|
|
|
|
|
my $savetext = $text; |
1599
|
|
|
|
|
|
|
my $backtrack; |
1600
|
|
|
|
|
|
|
|
1601
|
|
|
|
|
|
|
# MATCH (OP RIGHTARG)(s) |
1602
|
|
|
|
|
|
|
while ($repcount < ' . $self->{max} . ') |
1603
|
|
|
|
|
|
|
{ |
1604
|
|
|
|
|
|
|
$backtrack = 0; |
1605
|
|
|
|
|
|
|
' . $op->code(@codeargs) . ' |
1606
|
|
|
|
|
|
|
' . ($op->isterminal() ? 'pop @item;' : '$backtrack=1;' ) . ' |
1607
|
|
|
|
|
|
|
' . (ref($op) eq 'Parse::RecDescent::_Runtime::Token' |
1608
|
0
|
0
|
0
|
|
|
0
|
? 'if (defined $1) {push @item, $item{'.($self->{name}||$self->{hashname}).'}=$1; $backtrack=1;}' |
|
|
0
|
|
|
|
|
|
1609
|
|
|
|
|
|
|
: "" ) . ' |
1610
|
|
|
|
|
|
|
' . $rightarg->code(@codeargs) . ' |
1611
|
|
|
|
|
|
|
$savetext = $text; |
1612
|
|
|
|
|
|
|
$repcount++; |
1613
|
|
|
|
|
|
|
} |
1614
|
|
|
|
|
|
|
$text = $savetext; |
1615
|
|
|
|
|
|
|
pop @item if $backtrack; |
1616
|
|
|
|
|
|
|
|
1617
|
|
|
|
|
|
|
'; |
1618
|
|
|
|
|
|
|
} |
1619
|
|
|
|
|
|
|
else |
1620
|
|
|
|
|
|
|
{ |
1621
|
|
|
|
|
|
|
$code .= ' |
1622
|
|
|
|
|
|
|
my $savetext = $text; |
1623
|
|
|
|
|
|
|
my $backtrack; |
1624
|
|
|
|
|
|
|
# MATCH (LEFTARG OP)(s) |
1625
|
0
|
|
|
|
|
0
|
while ($repcount < ' . $self->{max} . ') |
1626
|
|
|
|
|
|
|
{ |
1627
|
|
|
|
|
|
|
$backtrack = 0; |
1628
|
|
|
|
|
|
|
' . $leftarg->code(@codeargs) . ' |
1629
|
|
|
|
|
|
|
'; |
1630
|
|
|
|
|
|
|
$code .= ' |
1631
|
|
|
|
|
|
|
if (defined($_itempos) and !defined($itemposfirst)) |
1632
|
|
|
|
|
|
|
{ |
1633
|
|
|
|
|
|
|
$itemposfirst = Parse::RecDescent::_Runtime::Production::_duplicate_itempos($_itempos); |
1634
|
|
|
|
|
|
|
} |
1635
|
0
|
0
|
|
|
|
0
|
' if $check->{itempos}; |
1636
|
|
|
|
|
|
|
|
1637
|
|
|
|
|
|
|
$code .= ' |
1638
|
|
|
|
|
|
|
$repcount++; |
1639
|
|
|
|
|
|
|
$backtrack = 1; |
1640
|
|
|
|
|
|
|
' . $op->code(@codeargs) . ' |
1641
|
|
|
|
|
|
|
$savetext = $text; |
1642
|
|
|
|
|
|
|
' . ($op->isterminal() ? 'pop @item;' : "" ) . ' |
1643
|
0
|
0
|
0
|
|
|
0
|
' . (ref($op) eq 'Parse::RecDescent::_Runtime::Token' ? 'do { push @item, $item{'.($self->{name}||$self->{hashname}).'}=$1; } if defined $1;' : "" ) . ' |
|
|
0
|
|
|
|
|
|
1644
|
|
|
|
|
|
|
} |
1645
|
|
|
|
|
|
|
$text = $savetext; |
1646
|
|
|
|
|
|
|
pop @item if $backtrack; |
1647
|
|
|
|
|
|
|
|
1648
|
|
|
|
|
|
|
# MATCH RIGHTARG |
1649
|
|
|
|
|
|
|
' . $rightarg->code(@codeargs) . ' |
1650
|
|
|
|
|
|
|
$repcount++; |
1651
|
|
|
|
|
|
|
'; |
1652
|
|
|
|
|
|
|
} |
1653
|
|
|
|
|
|
|
|
1654
|
0
|
0
|
|
|
|
0
|
$code .= 'unless (@item) { undef $_tok; last }' unless $self->{min}==0; |
1655
|
|
|
|
|
|
|
|
1656
|
0
|
|
|
|
|
0
|
$code .= ' |
1657
|
|
|
|
|
|
|
$_tok = [ @item ]; |
1658
|
|
|
|
|
|
|
'; |
1659
|
|
|
|
|
|
|
|
1660
|
|
|
|
|
|
|
|
1661
|
|
|
|
|
|
|
$code .= ' |
1662
|
|
|
|
|
|
|
if (defined $itemposfirst) |
1663
|
|
|
|
|
|
|
{ |
1664
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::Production::_update_itempos( |
1665
|
|
|
|
|
|
|
$_itempos, $itemposfirst, undef, [qw(from)]); |
1666
|
|
|
|
|
|
|
} |
1667
|
0
|
0
|
|
|
|
0
|
' if $check->{itempos}; |
1668
|
|
|
|
|
|
|
|
1669
|
0
|
|
|
|
|
0
|
$code .= ' |
1670
|
|
|
|
|
|
|
last; |
1671
|
|
|
|
|
|
|
} # end of OPLOOP |
1672
|
|
|
|
|
|
|
'; |
1673
|
|
|
|
|
|
|
|
1674
|
|
|
|
|
|
|
$code .= ' |
1675
|
|
|
|
|
|
|
unless ($repcount>='.$self->{min}.') |
1676
|
|
|
|
|
|
|
{ |
1677
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{<<'.Parse::RecDescent::_Runtime::_matchtracemessage($self,1).' operator: [' |
1678
|
|
|
|
|
|
|
. $self->describe |
1679
|
|
|
|
|
|
|
. ']>>}, |
1680
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
1681
|
|
|
|
|
|
|
q{' . $rule->{"name"} .'}, |
1682
|
|
|
|
|
|
|
$tracelevel) |
1683
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
1684
|
|
|
|
|
|
|
$expectation->failed(); |
1685
|
|
|
|
|
|
|
last; |
1686
|
|
|
|
|
|
|
} |
1687
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_trace(q{>>'.Parse::RecDescent::_Runtime::_matchtracemessage($self).' operator: [' |
1688
|
|
|
|
|
|
|
. $self->describe |
1689
|
|
|
|
|
|
|
. ']<< (return value: [} |
1690
|
|
|
|
|
|
|
. qq{@{$_tok||[]}} . q{]}, |
1691
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
1692
|
|
|
|
|
|
|
q{' . $rule->{"name"} .'}, |
1693
|
|
|
|
|
|
|
$tracelevel) |
1694
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
1695
|
|
|
|
|
|
|
|
1696
|
0
|
|
0
|
|
|
0
|
push @item, $item{'.($self->{name}||$self->{hashname}).'}=$_tok||[]; |
1697
|
|
|
|
|
|
|
'; |
1698
|
|
|
|
|
|
|
|
1699
|
0
|
|
|
|
|
0
|
return $code; |
1700
|
|
|
|
|
|
|
} |
1701
|
|
|
|
|
|
|
|
1702
|
|
|
|
|
|
|
|
1703
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::Expectation; |
1704
|
|
|
|
|
|
|
|
1705
|
|
|
|
|
|
|
sub new ($) |
1706
|
|
|
|
|
|
|
{ |
1707
|
2016
|
|
|
2016
|
|
7224
|
bless { |
1708
|
|
|
|
|
|
|
"failed" => 0, |
1709
|
|
|
|
|
|
|
"expected" => "", |
1710
|
|
|
|
|
|
|
"unexpected" => "", |
1711
|
|
|
|
|
|
|
"lastexpected" => "", |
1712
|
|
|
|
|
|
|
"lastunexpected" => "", |
1713
|
|
|
|
|
|
|
"defexpected" => $_[1], |
1714
|
|
|
|
|
|
|
}; |
1715
|
|
|
|
|
|
|
} |
1716
|
|
|
|
|
|
|
|
1717
|
|
|
|
|
|
|
sub is ($$) |
1718
|
|
|
|
|
|
|
{ |
1719
|
4041
|
|
|
4041
|
|
7415
|
$_[0]->{lastexpected} = $_[1]; return $_[0]; |
|
4041
|
|
|
|
|
10186
|
|
1720
|
|
|
|
|
|
|
} |
1721
|
|
|
|
|
|
|
|
1722
|
|
|
|
|
|
|
sub at ($$) |
1723
|
|
|
|
|
|
|
{ |
1724
|
6057
|
|
|
6057
|
|
10403
|
$_[0]->{lastunexpected} = $_[1]; return $_[0]; |
|
6057
|
|
|
|
|
8644
|
|
1725
|
|
|
|
|
|
|
} |
1726
|
|
|
|
|
|
|
|
1727
|
|
|
|
|
|
|
sub failed ($) |
1728
|
|
|
|
|
|
|
{ |
1729
|
2699
|
100
|
|
2699
|
|
6374
|
return unless $_[0]->{lastexpected}; |
1730
|
167
|
50
|
|
|
|
508
|
$_[0]->{expected} = $_[0]->{lastexpected} unless $_[0]->{failed}; |
1731
|
167
|
50
|
|
|
|
518
|
$_[0]->{unexpected} = $_[0]->{lastunexpected} unless $_[0]->{failed}; |
1732
|
167
|
|
|
|
|
301
|
$_[0]->{failed} = 1; |
1733
|
|
|
|
|
|
|
} |
1734
|
|
|
|
|
|
|
|
1735
|
|
|
|
|
|
|
sub message ($) |
1736
|
|
|
|
|
|
|
{ |
1737
|
0
|
|
|
0
|
|
0
|
my ($self) = @_; |
1738
|
0
|
0
|
|
|
|
0
|
$self->{expected} = $self->{defexpected} unless $self->{expected}; |
1739
|
0
|
|
|
|
|
0
|
$self->{expected} =~ s/_/ /g; |
1740
|
0
|
0
|
0
|
|
|
0
|
if (!$self->{unexpected} || $self->{unexpected} =~ /\A\s*\Z/s) |
1741
|
|
|
|
|
|
|
{ |
1742
|
0
|
|
|
|
|
0
|
return "Was expecting $self->{expected}"; |
1743
|
|
|
|
|
|
|
} |
1744
|
|
|
|
|
|
|
else |
1745
|
|
|
|
|
|
|
{ |
1746
|
0
|
|
|
|
|
0
|
$self->{unexpected} =~ /\s*(.*)/; |
1747
|
0
|
|
|
|
|
0
|
return "Was expecting $self->{expected} but found \"$1\" instead"; |
1748
|
|
|
|
|
|
|
} |
1749
|
|
|
|
|
|
|
} |
1750
|
|
|
|
|
|
|
|
1751
|
|
|
|
|
|
|
1; |
1752
|
|
|
|
|
|
|
|
1753
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime; |
1754
|
|
|
|
|
|
|
|
1755
|
2
|
|
|
2
|
|
27
|
use Carp; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
144
|
|
1756
|
2
|
|
|
2
|
|
13
|
use vars qw ( $AUTOLOAD $VERSION $_FILENAME); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
661
|
|
1757
|
|
|
|
|
|
|
|
1758
|
|
|
|
|
|
|
my $ERRORS = 0; |
1759
|
|
|
|
|
|
|
|
1760
|
|
|
|
|
|
|
our $VERSION = '1.967009'; |
1761
|
|
|
|
|
|
|
$VERSION = eval $VERSION; |
1762
|
|
|
|
|
|
|
$_FILENAME=__FILE__; |
1763
|
|
|
|
|
|
|
|
1764
|
|
|
|
|
|
|
# BUILDING A PARSER |
1765
|
|
|
|
|
|
|
|
1766
|
|
|
|
|
|
|
my $nextnamespace = "namespace000001"; |
1767
|
|
|
|
|
|
|
|
1768
|
|
|
|
|
|
|
sub _nextnamespace() |
1769
|
|
|
|
|
|
|
{ |
1770
|
0
|
|
|
0
|
|
0
|
return "Parse::RecDescent::_Runtime::" . $nextnamespace++; |
1771
|
|
|
|
|
|
|
} |
1772
|
|
|
|
|
|
|
|
1773
|
|
|
|
|
|
|
# ARGS ARE: $class, $grammar, $compiling, $namespace |
1774
|
|
|
|
|
|
|
sub new ($$$$) |
1775
|
|
|
|
|
|
|
{ |
1776
|
0
|
|
0
|
0
|
|
0
|
my $class = ref($_[0]) || $_[0]; |
1777
|
0
|
|
|
|
|
0
|
local $Parse::RecDescent::_Runtime::compiling = $_[2]; |
1778
|
0
|
0
|
|
|
|
0
|
my $name_space_name = defined $_[3] |
1779
|
|
|
|
|
|
|
? "Parse::RecDescent::_Runtime::".$_[3] |
1780
|
|
|
|
|
|
|
: _nextnamespace(); |
1781
|
0
|
|
|
|
|
0
|
my $self = |
1782
|
|
|
|
|
|
|
{ |
1783
|
|
|
|
|
|
|
"rules" => {}, |
1784
|
|
|
|
|
|
|
"namespace" => $name_space_name, |
1785
|
|
|
|
|
|
|
"startcode" => '', |
1786
|
|
|
|
|
|
|
"localvars" => '', |
1787
|
|
|
|
|
|
|
"_AUTOACTION" => undef, |
1788
|
|
|
|
|
|
|
"_AUTOTREE" => undef, |
1789
|
|
|
|
|
|
|
|
1790
|
|
|
|
|
|
|
# Precompiled parsers used to set _precompiled, but that |
1791
|
|
|
|
|
|
|
# wasn't present in some versions of Parse::RecDescent::_Runtime used to |
1792
|
|
|
|
|
|
|
# build precompiled parsers. Instead, set a new |
1793
|
|
|
|
|
|
|
# _not_precompiled flag, which is remove from future |
1794
|
|
|
|
|
|
|
# Precompiled parsers at build time. |
1795
|
|
|
|
|
|
|
"_not_precompiled" => 1, |
1796
|
|
|
|
|
|
|
}; |
1797
|
|
|
|
|
|
|
|
1798
|
|
|
|
|
|
|
|
1799
|
0
|
0
|
|
|
|
0
|
if ($::RD_AUTOACTION) { |
1800
|
0
|
|
|
|
|
0
|
my $sourcecode = $::RD_AUTOACTION; |
1801
|
0
|
0
|
|
|
|
0
|
$sourcecode = "{ $sourcecode }" |
1802
|
|
|
|
|
|
|
unless $sourcecode =~ /\A\s*\{.*\}\s*\Z/; |
1803
|
|
|
|
|
|
|
$self->{_check}{itempos} = |
1804
|
0
|
|
|
|
|
0
|
$sourcecode =~ /\@itempos\b|\$itempos\s*\[/; |
1805
|
|
|
|
|
|
|
$self->{_AUTOACTION} |
1806
|
0
|
|
|
|
|
0
|
= new Parse::RecDescent::_Runtime::Action($sourcecode,0,-1) |
1807
|
|
|
|
|
|
|
} |
1808
|
|
|
|
|
|
|
|
1809
|
0
|
|
|
|
|
0
|
bless $self, $class; |
1810
|
0
|
|
|
|
|
0
|
return $self->Replace($_[1]) |
1811
|
|
|
|
|
|
|
} |
1812
|
|
|
|
|
|
|
|
1813
|
|
|
|
|
|
|
sub Compile($$$$) { |
1814
|
0
|
|
|
0
|
|
0
|
die "Compilation of Parse::RecDescent::_Runtime grammars not yet implemented\n"; |
1815
|
|
|
|
|
|
|
} |
1816
|
|
|
|
|
|
|
|
1817
|
|
|
|
|
|
|
sub DESTROY { |
1818
|
13
|
|
|
13
|
|
3509
|
my ($self) = @_; |
1819
|
13
|
|
|
|
|
48
|
my $namespace = $self->{namespace}; |
1820
|
13
|
|
|
|
|
70
|
$namespace =~ s/Parse::RecDescent::_Runtime:://; |
1821
|
13
|
50
|
|
|
|
3202
|
if ($self->{_not_precompiled}) { |
1822
|
|
|
|
|
|
|
# BEGIN WORKAROUND |
1823
|
|
|
|
|
|
|
# Perl has a bug that creates a circular reference between |
1824
|
|
|
|
|
|
|
# @ISA and that variable's stash: |
1825
|
|
|
|
|
|
|
# https://rt.perl.org/rt3/Ticket/Display.html?id=92708 |
1826
|
|
|
|
|
|
|
# Emptying the array before deleting the stash seems to |
1827
|
|
|
|
|
|
|
# prevent the leak. Once the ticket above has been resolved, |
1828
|
|
|
|
|
|
|
# these two lines can be removed. |
1829
|
2
|
|
|
2
|
|
14
|
no strict 'refs'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
14687
|
|
1830
|
0
|
|
|
|
|
0
|
@{$self->{namespace} . '::ISA'} = (); |
|
0
|
|
|
|
|
0
|
|
1831
|
|
|
|
|
|
|
# END WORKAROUND |
1832
|
|
|
|
|
|
|
|
1833
|
|
|
|
|
|
|
# Some grammars may contain circular references between rules, |
1834
|
|
|
|
|
|
|
# such as: |
1835
|
|
|
|
|
|
|
# a: 'ID' | b |
1836
|
|
|
|
|
|
|
# b: '(' a ')' |
1837
|
|
|
|
|
|
|
# Unless these references are broken, the subs stay around on |
1838
|
|
|
|
|
|
|
# stash deletion below. Iterate through the stash entries and |
1839
|
|
|
|
|
|
|
# for each defined code reference, set it to reference sub {} |
1840
|
|
|
|
|
|
|
# instead. |
1841
|
|
|
|
|
|
|
{ |
1842
|
0
|
|
|
|
|
0
|
local $^W; # avoid 'sub redefined' warnings. |
|
0
|
|
|
|
|
0
|
|
1843
|
0
|
|
|
0
|
|
0
|
my $blank_sub = sub {}; |
1844
|
0
|
|
|
|
|
0
|
while (my ($name, $glob) = each %{"Parse::RecDescent::_Runtime::$namespace\::"}) { |
|
0
|
|
|
|
|
0
|
|
1845
|
0
|
0
|
|
|
|
0
|
*$glob = $blank_sub if defined &$glob; |
1846
|
|
|
|
|
|
|
} |
1847
|
|
|
|
|
|
|
} |
1848
|
|
|
|
|
|
|
|
1849
|
|
|
|
|
|
|
# Delete the namespace's stash |
1850
|
0
|
|
|
|
|
0
|
delete $Parse::RecDescent::_Runtime::{$namespace.'::'}; |
1851
|
|
|
|
|
|
|
} |
1852
|
|
|
|
|
|
|
} |
1853
|
|
|
|
|
|
|
|
1854
|
|
|
|
|
|
|
# BUILDING A GRAMMAR.... |
1855
|
|
|
|
|
|
|
|
1856
|
|
|
|
|
|
|
# ARGS ARE: $self, $grammar, $isimplicit, $isleftop |
1857
|
|
|
|
|
|
|
sub Replace ($$) |
1858
|
|
|
|
|
|
|
{ |
1859
|
|
|
|
|
|
|
# set $replace = 1 for _generate |
1860
|
0
|
|
|
0
|
|
0
|
splice(@_, 2, 0, 1); |
1861
|
|
|
|
|
|
|
|
1862
|
0
|
|
|
|
|
0
|
return _generate(@_); |
1863
|
|
|
|
|
|
|
} |
1864
|
|
|
|
|
|
|
|
1865
|
|
|
|
|
|
|
# ARGS ARE: $self, $grammar, $isimplicit, $isleftop |
1866
|
|
|
|
|
|
|
sub Extend ($$) |
1867
|
|
|
|
|
|
|
{ |
1868
|
|
|
|
|
|
|
# set $replace = 0 for _generate |
1869
|
0
|
|
|
0
|
|
0
|
splice(@_, 2, 0, 0); |
1870
|
|
|
|
|
|
|
|
1871
|
0
|
|
|
|
|
0
|
return _generate(@_); |
1872
|
|
|
|
|
|
|
} |
1873
|
|
|
|
|
|
|
|
1874
|
|
|
|
|
|
|
sub _no_rule ($$;$) |
1875
|
|
|
|
|
|
|
{ |
1876
|
0
|
|
|
0
|
|
0
|
_error("Ruleless $_[0] at start of grammar.",$_[1]); |
1877
|
0
|
0
|
|
|
|
0
|
my $desc = $_[2] ? "\"$_[2]\"" : ""; |
1878
|
0
|
|
|
|
|
0
|
_hint("You need to define a rule for the $_[0] $desc |
1879
|
|
|
|
|
|
|
to be part of."); |
1880
|
|
|
|
|
|
|
} |
1881
|
|
|
|
|
|
|
|
1882
|
|
|
|
|
|
|
my $NEGLOOKAHEAD = '\G(\s*\.\.\.\!)'; |
1883
|
|
|
|
|
|
|
my $POSLOOKAHEAD = '\G(\s*\.\.\.)'; |
1884
|
|
|
|
|
|
|
my $RULE = '\G\s*(\w+)[ \t]*:'; |
1885
|
|
|
|
|
|
|
my $PROD = '\G\s*([|])'; |
1886
|
|
|
|
|
|
|
my $TOKEN = q{\G\s*/((\\\\/|\\\\\\\\|[^/])*)/([cgimsox]*)}; |
1887
|
|
|
|
|
|
|
my $MTOKEN = q{\G\s*(m\s*[^\w\s])}; |
1888
|
|
|
|
|
|
|
my $LITERAL = q{\G\s*'((\\\\['\\\\]|[^'])*)'}; |
1889
|
|
|
|
|
|
|
my $INTERPLIT = q{\G\s*"((\\\\["\\\\]|[^"])*)"}; |
1890
|
|
|
|
|
|
|
my $SUBRULE = '\G\s*(\w+)'; |
1891
|
|
|
|
|
|
|
my $MATCHRULE = '\G(\s*<matchrule:)'; |
1892
|
|
|
|
|
|
|
my $SIMPLEPAT = '((\\s+/[^/\\\\]*(?:\\\\.[^/\\\\]*)*/)?)'; |
1893
|
|
|
|
|
|
|
my $OPTIONAL = '\G\((\?)'.$SIMPLEPAT.'\)'; |
1894
|
|
|
|
|
|
|
my $ANY = '\G\((s\?)'.$SIMPLEPAT.'\)'; |
1895
|
|
|
|
|
|
|
my $MANY = '\G\((s|\.\.)'.$SIMPLEPAT.'\)'; |
1896
|
|
|
|
|
|
|
my $EXACTLY = '\G\(([1-9]\d*)'.$SIMPLEPAT.'\)'; |
1897
|
|
|
|
|
|
|
my $BETWEEN = '\G\((\d+)\.\.([1-9]\d*)'.$SIMPLEPAT.'\)'; |
1898
|
|
|
|
|
|
|
my $ATLEAST = '\G\((\d+)\.\.'.$SIMPLEPAT.'\)'; |
1899
|
|
|
|
|
|
|
my $ATMOST = '\G\(\.\.([1-9]\d*)'.$SIMPLEPAT.'\)'; |
1900
|
|
|
|
|
|
|
my $BADREP = '\G\((-?\d+)?\.\.(-?\d+)?'.$SIMPLEPAT.'\)'; |
1901
|
|
|
|
|
|
|
my $ACTION = '\G\s*\{'; |
1902
|
|
|
|
|
|
|
my $IMPLICITSUBRULE = '\G\s*\('; |
1903
|
|
|
|
|
|
|
my $COMMENT = '\G\s*(#.*)'; |
1904
|
|
|
|
|
|
|
my $COMMITMK = '\G\s*<commit>'; |
1905
|
|
|
|
|
|
|
my $UNCOMMITMK = '\G\s*<uncommit>'; |
1906
|
|
|
|
|
|
|
my $QUOTELIKEMK = '\G\s*<perl_quotelike>'; |
1907
|
|
|
|
|
|
|
my $CODEBLOCKMK = '\G\s*<perl_codeblock(?:\s+([][()<>{}]+))?>'; |
1908
|
|
|
|
|
|
|
my $VARIABLEMK = '\G\s*<perl_variable>'; |
1909
|
|
|
|
|
|
|
my $NOCHECKMK = '\G\s*<nocheck>'; |
1910
|
|
|
|
|
|
|
my $AUTOACTIONPATMK = '\G\s*<autoaction:'; |
1911
|
|
|
|
|
|
|
my $AUTOTREEMK = '\G\s*<autotree(?::\s*([\w:]+)\s*)?>'; |
1912
|
|
|
|
|
|
|
my $AUTOSTUBMK = '\G\s*<autostub>'; |
1913
|
|
|
|
|
|
|
my $AUTORULEMK = '\G\s*<autorule:(.*?)>'; |
1914
|
|
|
|
|
|
|
my $REJECTMK = '\G\s*<reject>'; |
1915
|
|
|
|
|
|
|
my $CONDREJECTMK = '\G\s*<reject:'; |
1916
|
|
|
|
|
|
|
my $SCOREMK = '\G\s*<score:'; |
1917
|
|
|
|
|
|
|
my $AUTOSCOREMK = '\G\s*<autoscore:'; |
1918
|
|
|
|
|
|
|
my $SKIPMK = '\G\s*<skip:'; |
1919
|
|
|
|
|
|
|
my $OPMK = '\G\s*<(left|right)op(?:=(\'.*?\'))?:'; |
1920
|
|
|
|
|
|
|
my $ENDDIRECTIVEMK = '\G\s*>'; |
1921
|
|
|
|
|
|
|
my $RESYNCMK = '\G\s*<resync>'; |
1922
|
|
|
|
|
|
|
my $RESYNCPATMK = '\G\s*<resync:'; |
1923
|
|
|
|
|
|
|
my $RULEVARPATMK = '\G\s*<rulevar:'; |
1924
|
|
|
|
|
|
|
my $DEFERPATMK = '\G\s*<defer:'; |
1925
|
|
|
|
|
|
|
my $TOKENPATMK = '\G\s*<token:'; |
1926
|
|
|
|
|
|
|
my $AUTOERRORMK = '\G\s*<error(\??)>'; |
1927
|
|
|
|
|
|
|
my $MSGERRORMK = '\G\s*<error(\??):'; |
1928
|
|
|
|
|
|
|
my $NOCHECK = '\G\s*<nocheck>'; |
1929
|
|
|
|
|
|
|
my $WARNMK = '\G\s*<warn((?::\s*(\d+)\s*)?)>'; |
1930
|
|
|
|
|
|
|
my $HINTMK = '\G\s*<hint>'; |
1931
|
|
|
|
|
|
|
my $TRACEBUILDMK = '\G\s*<trace_build((?::\s*(\d+)\s*)?)>'; |
1932
|
|
|
|
|
|
|
my $TRACEPARSEMK = '\G\s*<trace_parse((?::\s*(\d+)\s*)?)>'; |
1933
|
|
|
|
|
|
|
my $UNCOMMITPROD = $PROD.'\s*<uncommit'; |
1934
|
|
|
|
|
|
|
my $ERRORPROD = $PROD.'\s*<error'; |
1935
|
|
|
|
|
|
|
my $LONECOLON = '\G\s*:'; |
1936
|
|
|
|
|
|
|
my $OTHER = '\G\s*([^\s]+)'; |
1937
|
|
|
|
|
|
|
|
1938
|
|
|
|
|
|
|
my @lines = 0; |
1939
|
|
|
|
|
|
|
|
1940
|
|
|
|
|
|
|
sub _generate |
1941
|
|
|
|
|
|
|
{ |
1942
|
0
|
|
|
0
|
|
0
|
my ($self, $grammar, $replace, $isimplicit, $isleftop) = (@_, 0); |
1943
|
|
|
|
|
|
|
|
1944
|
0
|
|
|
|
|
0
|
my $aftererror = 0; |
1945
|
0
|
|
|
|
|
0
|
my $lookahead = 0; |
1946
|
0
|
|
|
|
|
0
|
my $lookaheadspec = ""; |
1947
|
0
|
|
|
|
|
0
|
my $must_pop_lines; |
1948
|
0
|
0
|
|
|
|
0
|
if (! $lines[-1]) { |
1949
|
0
|
|
|
|
|
0
|
push @lines, _linecount($grammar) ; |
1950
|
0
|
|
|
|
|
0
|
$must_pop_lines = 1; |
1951
|
|
|
|
|
|
|
} |
1952
|
|
|
|
|
|
|
$self->{_check}{itempos} = ($grammar =~ /\@itempos\b|\$itempos\s*\[/) |
1953
|
0
|
0
|
|
|
|
0
|
unless $self->{_check}{itempos}; |
1954
|
0
|
|
|
|
|
0
|
for (qw(thisoffset thiscolumn prevline prevoffset prevcolumn)) |
1955
|
|
|
|
|
|
|
{ |
1956
|
|
|
|
|
|
|
$self->{_check}{$_} = |
1957
|
|
|
|
|
|
|
($grammar =~ /\$$_/) || $self->{_check}{itempos} |
1958
|
0
|
0
|
0
|
|
|
0
|
unless $self->{_check}{$_}; |
1959
|
|
|
|
|
|
|
} |
1960
|
0
|
|
|
|
|
0
|
my $line; |
1961
|
|
|
|
|
|
|
|
1962
|
0
|
|
|
|
|
0
|
my $rule = undef; |
1963
|
0
|
|
|
|
|
0
|
my $prod = undef; |
1964
|
0
|
|
|
|
|
0
|
my $item = undef; |
1965
|
0
|
|
|
|
|
0
|
my $lastgreedy = ''; |
1966
|
0
|
|
|
|
|
0
|
pos $grammar = 0; |
1967
|
0
|
|
|
|
|
0
|
study $grammar; |
1968
|
|
|
|
|
|
|
|
1969
|
0
|
|
|
|
|
0
|
local $::RD_HINT = $::RD_HINT; |
1970
|
0
|
|
|
|
|
0
|
local $::RD_WARN = $::RD_WARN; |
1971
|
0
|
|
|
|
|
0
|
local $::RD_TRACE = $::RD_TRACE; |
1972
|
0
|
|
|
|
|
0
|
local $::RD_CHECK = $::RD_CHECK; |
1973
|
|
|
|
|
|
|
|
1974
|
0
|
|
|
|
|
0
|
while (pos $grammar < length $grammar) |
1975
|
|
|
|
|
|
|
{ |
1976
|
0
|
|
|
|
|
0
|
$line = $lines[-1] - _linecount($grammar) + 1; |
1977
|
0
|
|
|
|
|
0
|
my $commitonly; |
1978
|
0
|
|
|
|
|
0
|
my $code = ""; |
1979
|
0
|
|
|
|
|
0
|
my @components = (); |
1980
|
0
|
0
|
0
|
|
|
0
|
if ($grammar =~ m/$COMMENT/gco) |
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1981
|
|
|
|
|
|
|
{ |
1982
|
0
|
|
|
|
|
0
|
_parse("a comment",0,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
1983
|
0
|
|
|
|
|
0
|
next; |
1984
|
|
|
|
|
|
|
} |
1985
|
|
|
|
|
|
|
elsif ($grammar =~ m/$NEGLOOKAHEAD/gco) |
1986
|
|
|
|
|
|
|
{ |
1987
|
0
|
|
|
|
|
0
|
_parse("a negative lookahead",$aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
1988
|
0
|
0
|
|
|
|
0
|
$lookahead = $lookahead ? -$lookahead : -1; |
1989
|
0
|
|
|
|
|
0
|
$lookaheadspec .= $1; |
1990
|
0
|
|
|
|
|
0
|
next; # SKIP LOOKAHEAD RESET AT END OF while LOOP |
1991
|
|
|
|
|
|
|
} |
1992
|
|
|
|
|
|
|
elsif ($grammar =~ m/$POSLOOKAHEAD/gco) |
1993
|
|
|
|
|
|
|
{ |
1994
|
0
|
|
|
|
|
0
|
_parse("a positive lookahead",$aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
1995
|
0
|
0
|
|
|
|
0
|
$lookahead = $lookahead ? $lookahead : 1; |
1996
|
0
|
|
|
|
|
0
|
$lookaheadspec .= $1; |
1997
|
0
|
|
|
|
|
0
|
next; # SKIP LOOKAHEAD RESET AT END OF while LOOP |
1998
|
|
|
|
|
|
|
} |
1999
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$ACTION)/gco |
2000
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar); $code }) |
|
0
|
|
|
|
|
0
|
|
2001
|
|
|
|
|
|
|
{ |
2002
|
0
|
|
|
|
|
0
|
_parse("an action", $aftererror, $line, $code); |
2003
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Action($code,$lookahead,$line); |
2004
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2005
|
|
|
|
|
|
|
or $self->_addstartcode($code); |
2006
|
|
|
|
|
|
|
} |
2007
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$IMPLICITSUBRULE)/gco |
2008
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar,'{([',undef,'(',1); |
2009
|
0
|
|
|
|
|
0
|
$code }) |
2010
|
|
|
|
|
|
|
{ |
2011
|
0
|
|
|
|
|
0
|
$code =~ s/\A\s*\(|\)\Z//g; |
2012
|
0
|
|
|
|
|
0
|
_parse("an implicit subrule", $aftererror, $line, |
2013
|
|
|
|
|
|
|
"( $code )"); |
2014
|
0
|
|
|
|
|
0
|
my $implicit = $rule->nextimplicit; |
2015
|
|
|
|
|
|
|
return undef |
2016
|
0
|
0
|
|
|
|
0
|
if !$self->_generate("$implicit : $code",$replace,1); |
2017
|
0
|
|
|
|
|
0
|
my $pos = pos $grammar; |
2018
|
0
|
|
|
|
|
0
|
substr($grammar,$pos,0,$implicit); |
2019
|
0
|
|
|
|
|
0
|
pos $grammar = $pos;; |
2020
|
|
|
|
|
|
|
} |
2021
|
|
|
|
|
|
|
elsif ($grammar =~ m/$ENDDIRECTIVEMK/gco) |
2022
|
|
|
|
|
|
|
{ |
2023
|
|
|
|
|
|
|
|
2024
|
|
|
|
|
|
|
# EXTRACT TRAILING REPETITION SPECIFIER (IF ANY) |
2025
|
|
|
|
|
|
|
|
2026
|
0
|
|
|
|
|
0
|
my ($minrep,$maxrep) = (1,$MAXREP); |
2027
|
0
|
0
|
|
|
|
0
|
if ($grammar =~ m/\G[(]/gc) |
2028
|
|
|
|
|
|
|
{ |
2029
|
0
|
|
|
|
|
0
|
pos($grammar)--; |
2030
|
|
|
|
|
|
|
|
2031
|
0
|
0
|
|
|
|
0
|
if ($grammar =~ m/$OPTIONAL/gco) |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
2032
|
0
|
|
|
|
|
0
|
{ ($minrep, $maxrep) = (0,1) } |
2033
|
|
|
|
|
|
|
elsif ($grammar =~ m/$ANY/gco) |
2034
|
0
|
|
|
|
|
0
|
{ $minrep = 0 } |
2035
|
|
|
|
|
|
|
elsif ($grammar =~ m/$EXACTLY/gco) |
2036
|
0
|
|
|
|
|
0
|
{ ($minrep, $maxrep) = ($1,$1) } |
2037
|
|
|
|
|
|
|
elsif ($grammar =~ m/$BETWEEN/gco) |
2038
|
0
|
|
|
|
|
0
|
{ ($minrep, $maxrep) = ($1,$2) } |
2039
|
|
|
|
|
|
|
elsif ($grammar =~ m/$ATLEAST/gco) |
2040
|
0
|
|
|
|
|
0
|
{ $minrep = $1 } |
2041
|
|
|
|
|
|
|
elsif ($grammar =~ m/$ATMOST/gco) |
2042
|
0
|
|
|
|
|
0
|
{ $maxrep = $1 } |
2043
|
|
|
|
|
|
|
elsif ($grammar =~ m/$MANY/gco) |
2044
|
|
|
|
|
|
|
{ } |
2045
|
|
|
|
|
|
|
elsif ($grammar =~ m/$BADREP/gco) |
2046
|
|
|
|
|
|
|
{ |
2047
|
0
|
|
|
|
|
0
|
_parse("an invalid repetition specifier", 0,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2048
|
0
|
|
|
|
|
0
|
_error("Incorrect specification of a repeated directive", |
2049
|
|
|
|
|
|
|
$line); |
2050
|
0
|
|
|
|
|
0
|
_hint("Repeated directives cannot have |
2051
|
|
|
|
|
|
|
a maximum repetition of zero, nor can they have |
2052
|
|
|
|
|
|
|
negative components in their ranges."); |
2053
|
|
|
|
|
|
|
} |
2054
|
|
|
|
|
|
|
} |
2055
|
|
|
|
|
|
|
|
2056
|
0
|
0
|
|
|
|
0
|
$prod && $prod->enddirective($line,$minrep,$maxrep); |
2057
|
|
|
|
|
|
|
} |
2058
|
|
|
|
|
|
|
elsif ($grammar =~ m/\G\s*<[^m]/gc) |
2059
|
|
|
|
|
|
|
{ |
2060
|
0
|
|
|
|
|
0
|
pos($grammar)-=2; |
2061
|
|
|
|
|
|
|
|
2062
|
0
|
0
|
0
|
|
|
0
|
if ($grammar =~ m/$OPMK/gco) |
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
2063
|
|
|
|
|
|
|
{ |
2064
|
|
|
|
|
|
|
# $DB::single=1; |
2065
|
0
|
|
|
|
|
0
|
_parse("a $1-associative operator directive", $aftererror, $line, "<$1op:...>"); |
2066
|
0
|
|
0
|
|
|
0
|
$prod->adddirective($1, $line,$2||''); |
2067
|
|
|
|
|
|
|
} |
2068
|
|
|
|
|
|
|
elsif ($grammar =~ m/$UNCOMMITMK/gco) |
2069
|
|
|
|
|
|
|
{ |
2070
|
0
|
|
|
|
|
0
|
_parse("an uncommit marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2071
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive('$commit=0;1', |
2072
|
|
|
|
|
|
|
$lookahead,$line,"<uncommit>"); |
2073
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2074
|
|
|
|
|
|
|
or _no_rule("<uncommit>",$line); |
2075
|
|
|
|
|
|
|
} |
2076
|
|
|
|
|
|
|
elsif ($grammar =~ m/$QUOTELIKEMK/gco) |
2077
|
|
|
|
|
|
|
{ |
2078
|
0
|
|
|
|
|
0
|
_parse("an perl quotelike marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2079
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive( |
2080
|
|
|
|
|
|
|
'my ($match,@res); |
2081
|
|
|
|
|
|
|
($match,$text,undef,@res) = |
2082
|
|
|
|
|
|
|
Text::Balanced::extract_quotelike($text,$skip); |
2083
|
|
|
|
|
|
|
$match ? \@res : undef; |
2084
|
|
|
|
|
|
|
', $lookahead,$line,"<perl_quotelike>"); |
2085
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2086
|
|
|
|
|
|
|
or _no_rule("<perl_quotelike>",$line); |
2087
|
|
|
|
|
|
|
} |
2088
|
|
|
|
|
|
|
elsif ($grammar =~ m/$CODEBLOCKMK/gco) |
2089
|
|
|
|
|
|
|
{ |
2090
|
0
|
|
0
|
|
|
0
|
my $outer = $1||"{}"; |
2091
|
0
|
|
|
|
|
0
|
_parse("an perl codeblock marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2092
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive( |
2093
|
|
|
|
|
|
|
'Text::Balanced::extract_codeblock($text,undef,$skip,\''.$outer.'\'); |
2094
|
|
|
|
|
|
|
', $lookahead,$line,"<perl_codeblock>"); |
2095
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2096
|
|
|
|
|
|
|
or _no_rule("<perl_codeblock>",$line); |
2097
|
|
|
|
|
|
|
} |
2098
|
|
|
|
|
|
|
elsif ($grammar =~ m/$VARIABLEMK/gco) |
2099
|
|
|
|
|
|
|
{ |
2100
|
0
|
|
|
|
|
0
|
_parse("an perl variable marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2101
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive( |
2102
|
|
|
|
|
|
|
'Text::Balanced::extract_variable($text,$skip); |
2103
|
|
|
|
|
|
|
', $lookahead,$line,"<perl_variable>"); |
2104
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2105
|
|
|
|
|
|
|
or _no_rule("<perl_variable>",$line); |
2106
|
|
|
|
|
|
|
} |
2107
|
|
|
|
|
|
|
elsif ($grammar =~ m/$NOCHECKMK/gco) |
2108
|
|
|
|
|
|
|
{ |
2109
|
0
|
|
|
|
|
0
|
_parse("a disable checking marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2110
|
0
|
0
|
|
|
|
0
|
if ($rule) |
2111
|
|
|
|
|
|
|
{ |
2112
|
0
|
|
|
|
|
0
|
_error("<nocheck> directive not at start of grammar", $line); |
2113
|
0
|
|
|
|
|
0
|
_hint("The <nocheck> directive can only |
2114
|
|
|
|
|
|
|
be specified at the start of a |
2115
|
|
|
|
|
|
|
grammar (before the first rule |
2116
|
|
|
|
|
|
|
is defined."); |
2117
|
|
|
|
|
|
|
} |
2118
|
|
|
|
|
|
|
else |
2119
|
|
|
|
|
|
|
{ |
2120
|
0
|
|
|
|
|
0
|
local $::RD_CHECK = 1; |
2121
|
|
|
|
|
|
|
} |
2122
|
|
|
|
|
|
|
} |
2123
|
|
|
|
|
|
|
elsif ($grammar =~ m/$AUTOSTUBMK/gco) |
2124
|
|
|
|
|
|
|
{ |
2125
|
0
|
|
|
|
|
0
|
_parse("an autostub marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2126
|
0
|
|
|
|
|
0
|
$::RD_AUTOSTUB = ""; |
2127
|
|
|
|
|
|
|
} |
2128
|
|
|
|
|
|
|
elsif ($grammar =~ m/$AUTORULEMK/gco) |
2129
|
|
|
|
|
|
|
{ |
2130
|
0
|
|
|
|
|
0
|
_parse("an autorule marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2131
|
0
|
|
|
|
|
0
|
$::RD_AUTOSTUB = $1; |
2132
|
|
|
|
|
|
|
} |
2133
|
|
|
|
|
|
|
elsif ($grammar =~ m/$AUTOTREEMK/gco) |
2134
|
|
|
|
|
|
|
{ |
2135
|
0
|
0
|
|
|
|
0
|
my $base = defined($1) ? $1 : ""; |
2136
|
0
|
|
|
|
|
0
|
my $current_match = substr($grammar, $-[0], $+[0] - $-[0]); |
2137
|
0
|
0
|
0
|
|
|
0
|
$base .= "::" if $base && $base !~ /::$/; |
2138
|
0
|
|
|
|
|
0
|
_parse("an autotree marker", $aftererror,$line, $current_match); |
2139
|
0
|
0
|
|
|
|
0
|
if ($rule) |
2140
|
|
|
|
|
|
|
{ |
2141
|
0
|
|
|
|
|
0
|
_error("<autotree> directive not at start of grammar", $line); |
2142
|
0
|
|
|
|
|
0
|
_hint("The <autotree> directive can only |
2143
|
|
|
|
|
|
|
be specified at the start of a |
2144
|
|
|
|
|
|
|
grammar (before the first rule |
2145
|
|
|
|
|
|
|
is defined."); |
2146
|
|
|
|
|
|
|
} |
2147
|
|
|
|
|
|
|
else |
2148
|
|
|
|
|
|
|
{ |
2149
|
0
|
|
|
|
|
0
|
undef $self->{_AUTOACTION}; |
2150
|
|
|
|
|
|
|
$self->{_AUTOTREE}{NODE} |
2151
|
0
|
|
|
|
|
0
|
= new Parse::RecDescent::_Runtime::Action(q({bless \%item, ').$base.q('.$item[0]}),0,-1); |
2152
|
|
|
|
|
|
|
$self->{_AUTOTREE}{TERMINAL} |
2153
|
0
|
|
|
|
|
0
|
= new Parse::RecDescent::_Runtime::Action(q({bless {__VALUE__=>$item[1]}, ').$base.q('.$item[0]}),0,-1); |
2154
|
|
|
|
|
|
|
} |
2155
|
|
|
|
|
|
|
} |
2156
|
|
|
|
|
|
|
|
2157
|
|
|
|
|
|
|
elsif ($grammar =~ m/$REJECTMK/gco) |
2158
|
|
|
|
|
|
|
{ |
2159
|
0
|
|
|
|
|
0
|
_parse("an reject marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2160
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::UncondReject($lookahead,$line,"<reject>"); |
2161
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2162
|
|
|
|
|
|
|
or _no_rule("<reject>",$line); |
2163
|
|
|
|
|
|
|
} |
2164
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$CONDREJECTMK)/gco |
2165
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar,'{',undef,'<'); |
2166
|
0
|
|
|
|
|
0
|
$code }) |
2167
|
|
|
|
|
|
|
{ |
2168
|
0
|
|
|
|
|
0
|
_parse("a (conditional) reject marker", $aftererror,$line, $code ); |
2169
|
0
|
|
|
|
|
0
|
$code =~ /\A\s*<reject:(.*)>\Z/s; |
2170
|
0
|
|
|
|
|
0
|
my $cond = $1; |
2171
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive( |
2172
|
|
|
|
|
|
|
"($1) ? undef : 1", $lookahead,$line,"<reject:$cond>"); |
2173
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2174
|
|
|
|
|
|
|
or _no_rule("<reject:$cond>",$line); |
2175
|
|
|
|
|
|
|
} |
2176
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$SCOREMK)/gco |
2177
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar,'{',undef,'<'); |
2178
|
0
|
|
|
|
|
0
|
$code }) |
2179
|
|
|
|
|
|
|
{ |
2180
|
0
|
|
|
|
|
0
|
_parse("a score marker", $aftererror,$line, $code ); |
2181
|
0
|
|
|
|
|
0
|
$code =~ /\A\s*<score:(.*)>\Z/s; |
2182
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->addscore($1, $lookahead, $line) |
2183
|
|
|
|
|
|
|
or _no_rule($code,$line); |
2184
|
|
|
|
|
|
|
} |
2185
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$AUTOSCOREMK)/gco |
2186
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar,'{',undef,'<'); |
2187
|
0
|
|
|
|
|
0
|
$code; |
2188
|
|
|
|
|
|
|
} ) |
2189
|
|
|
|
|
|
|
{ |
2190
|
0
|
|
|
|
|
0
|
_parse("an autoscore specifier", $aftererror,$line,$code); |
2191
|
0
|
|
|
|
|
0
|
$code =~ /\A\s*<autoscore:(.*)>\Z/s; |
2192
|
|
|
|
|
|
|
|
2193
|
0
|
0
|
0
|
|
|
0
|
$rule and $rule->addautoscore($1,$self) |
2194
|
|
|
|
|
|
|
or _no_rule($code,$line); |
2195
|
|
|
|
|
|
|
|
2196
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::UncondReject($lookahead,$line,$code); |
2197
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2198
|
|
|
|
|
|
|
or _no_rule($code,$line); |
2199
|
|
|
|
|
|
|
} |
2200
|
|
|
|
|
|
|
elsif ($grammar =~ m/$RESYNCMK/gco) |
2201
|
|
|
|
|
|
|
{ |
2202
|
0
|
|
|
|
|
0
|
_parse("a resync to newline marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2203
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive( |
2204
|
|
|
|
|
|
|
'if ($text =~ s/(\A[^\n]*\n)//) { $return = 0; $1; } else { undef }', |
2205
|
|
|
|
|
|
|
$lookahead,$line,"<resync>"); |
2206
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2207
|
|
|
|
|
|
|
or _no_rule("<resync>",$line); |
2208
|
|
|
|
|
|
|
} |
2209
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$RESYNCPATMK)/gco |
2210
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_bracketed($grammar,'<'); |
2211
|
0
|
|
|
|
|
0
|
$code }) |
2212
|
|
|
|
|
|
|
{ |
2213
|
0
|
|
|
|
|
0
|
_parse("a resync with pattern marker", $aftererror,$line, $code ); |
2214
|
0
|
|
|
|
|
0
|
$code =~ /\A\s*<resync:(.*)>\Z/s; |
2215
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive( |
2216
|
|
|
|
|
|
|
'if ($text =~ s/(\A'.$1.')//) { $return = 0; $1; } else { undef }', |
2217
|
|
|
|
|
|
|
$lookahead,$line,$code); |
2218
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2219
|
|
|
|
|
|
|
or _no_rule($code,$line); |
2220
|
|
|
|
|
|
|
} |
2221
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$SKIPMK)/gco |
2222
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar,'<'); |
2223
|
0
|
|
|
|
|
0
|
$code }) |
2224
|
|
|
|
|
|
|
{ |
2225
|
0
|
|
|
|
|
0
|
_parse("a skip marker", $aftererror,$line, $code ); |
2226
|
0
|
|
|
|
|
0
|
$code =~ /\A\s*<skip:(.*)>\Z/s; |
2227
|
0
|
0
|
|
|
|
0
|
if ($rule) { |
2228
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive( |
2229
|
|
|
|
|
|
|
'my $oldskip = $skip; $skip='.$1.'; $oldskip', |
2230
|
|
|
|
|
|
|
$lookahead,$line,$code); |
2231
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2232
|
|
|
|
|
|
|
or _no_rule($code,$line); |
2233
|
|
|
|
|
|
|
} else { |
2234
|
|
|
|
|
|
|
#global <skip> directive |
2235
|
0
|
|
|
|
|
0
|
$self->{skip} = $1; |
2236
|
|
|
|
|
|
|
} |
2237
|
|
|
|
|
|
|
} |
2238
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$RULEVARPATMK)/gco |
2239
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar,'{',undef,'<'); |
2240
|
0
|
|
|
|
|
0
|
$code; |
2241
|
|
|
|
|
|
|
} ) |
2242
|
|
|
|
|
|
|
{ |
2243
|
0
|
|
|
|
|
0
|
_parse("a rule variable specifier", $aftererror,$line,$code); |
2244
|
0
|
|
|
|
|
0
|
$code =~ /\A\s*<rulevar:(.*)>\Z/s; |
2245
|
|
|
|
|
|
|
|
2246
|
0
|
0
|
0
|
|
|
0
|
$rule and $rule->addvar($1,$self) |
2247
|
|
|
|
|
|
|
or _no_rule($code,$line); |
2248
|
|
|
|
|
|
|
|
2249
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::UncondReject($lookahead,$line,$code); |
2250
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2251
|
|
|
|
|
|
|
or _no_rule($code,$line); |
2252
|
|
|
|
|
|
|
} |
2253
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$AUTOACTIONPATMK)/gco |
2254
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar,'{',undef,'<'); |
2255
|
0
|
|
|
|
|
0
|
$code; |
2256
|
|
|
|
|
|
|
} ) |
2257
|
|
|
|
|
|
|
{ |
2258
|
0
|
|
|
|
|
0
|
_parse("an autoaction specifier", $aftererror,$line,$code); |
2259
|
0
|
|
|
|
|
0
|
$code =~ s/\A\s*<autoaction:(.*)>\Z/$1/s; |
2260
|
0
|
0
|
|
|
|
0
|
if ($code =~ /\A\s*[^{]|[^}]\s*\Z/) { |
2261
|
0
|
|
|
|
|
0
|
$code = "{ $code }" |
2262
|
|
|
|
|
|
|
} |
2263
|
|
|
|
|
|
|
$self->{_check}{itempos} = |
2264
|
0
|
|
|
|
|
0
|
$code =~ /\@itempos\b|\$itempos\s*\[/; |
2265
|
|
|
|
|
|
|
$self->{_AUTOACTION} |
2266
|
0
|
|
|
|
|
0
|
= new Parse::RecDescent::_Runtime::Action($code,0,-$line) |
2267
|
|
|
|
|
|
|
} |
2268
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$DEFERPATMK)/gco |
2269
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar,'{',undef,'<'); |
2270
|
0
|
|
|
|
|
0
|
$code; |
2271
|
|
|
|
|
|
|
} ) |
2272
|
|
|
|
|
|
|
{ |
2273
|
0
|
|
|
|
|
0
|
_parse("a deferred action specifier", $aftererror,$line,$code); |
2274
|
0
|
|
|
|
|
0
|
$code =~ s/\A\s*<defer:(.*)>\Z/$1/s; |
2275
|
0
|
0
|
|
|
|
0
|
if ($code =~ /\A\s*[^{]|[^}]\s*\Z/) |
2276
|
|
|
|
|
|
|
{ |
2277
|
0
|
|
|
|
|
0
|
$code = "{ $code }" |
2278
|
|
|
|
|
|
|
} |
2279
|
|
|
|
|
|
|
|
2280
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive( |
2281
|
|
|
|
|
|
|
"push \@{\$thisparser->{deferred}}, sub $code;", |
2282
|
|
|
|
|
|
|
$lookahead,$line,"<defer:$code>"); |
2283
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2284
|
|
|
|
|
|
|
or _no_rule("<defer:$code>",$line); |
2285
|
|
|
|
|
|
|
|
2286
|
0
|
|
|
|
|
0
|
$self->{deferrable} = 1; |
2287
|
|
|
|
|
|
|
} |
2288
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$TOKENPATMK)/gco |
2289
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar,'{',undef,'<'); |
2290
|
0
|
|
|
|
|
0
|
$code; |
2291
|
|
|
|
|
|
|
} ) |
2292
|
|
|
|
|
|
|
{ |
2293
|
0
|
|
|
|
|
0
|
_parse("a token constructor", $aftererror,$line,$code); |
2294
|
0
|
|
|
|
|
0
|
$code =~ s/\A\s*<token:(.*)>\Z/$1/s; |
2295
|
|
|
|
|
|
|
|
2296
|
0
|
|
0
|
|
|
0
|
my $types = eval 'no strict; local $SIG{__WARN__} = sub {0}; my @arr=('.$code.'); @arr' || (); |
2297
|
0
|
0
|
|
|
|
0
|
if (!$types) |
2298
|
|
|
|
|
|
|
{ |
2299
|
0
|
|
|
|
|
0
|
_error("Incorrect token specification: \"$@\"", $line); |
2300
|
0
|
|
|
|
|
0
|
_hint("The <token:...> directive requires a list |
2301
|
|
|
|
|
|
|
of one or more strings representing possible |
2302
|
|
|
|
|
|
|
types of the specified token. For example: |
2303
|
|
|
|
|
|
|
<token:NOUN,VERB>"); |
2304
|
|
|
|
|
|
|
} |
2305
|
|
|
|
|
|
|
else |
2306
|
|
|
|
|
|
|
{ |
2307
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive( |
2308
|
|
|
|
|
|
|
'no strict; |
2309
|
|
|
|
|
|
|
$return = { text => $item[-1] }; |
2310
|
|
|
|
|
|
|
@{$return->{type}}{'.$code.'} = (1..'.$types.');', |
2311
|
|
|
|
|
|
|
$lookahead,$line,"<token:$code>"); |
2312
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2313
|
|
|
|
|
|
|
or _no_rule("<token:$code>",$line); |
2314
|
|
|
|
|
|
|
} |
2315
|
|
|
|
|
|
|
} |
2316
|
|
|
|
|
|
|
elsif ($grammar =~ m/$COMMITMK/gco) |
2317
|
|
|
|
|
|
|
{ |
2318
|
0
|
|
|
|
|
0
|
_parse("an commit marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2319
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive('$commit = 1', |
2320
|
|
|
|
|
|
|
$lookahead,$line,"<commit>"); |
2321
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2322
|
|
|
|
|
|
|
or _no_rule("<commit>",$line); |
2323
|
|
|
|
|
|
|
} |
2324
|
|
|
|
|
|
|
elsif ($grammar =~ m/$NOCHECKMK/gco) { |
2325
|
0
|
|
|
|
|
0
|
_parse("an hint request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2326
|
0
|
|
|
|
|
0
|
$::RD_CHECK = 0; |
2327
|
|
|
|
|
|
|
} |
2328
|
|
|
|
|
|
|
elsif ($grammar =~ m/$HINTMK/gco) { |
2329
|
0
|
|
|
|
|
0
|
_parse("an hint request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2330
|
0
|
|
|
|
|
0
|
$::RD_HINT = $self->{__HINT__} = 1; |
2331
|
|
|
|
|
|
|
} |
2332
|
|
|
|
|
|
|
elsif ($grammar =~ m/$WARNMK/gco) { |
2333
|
0
|
|
|
|
|
0
|
_parse("an warning request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2334
|
0
|
0
|
|
|
|
0
|
$::RD_WARN = $self->{__WARN__} = $1 ? $2+0 : 1; |
2335
|
|
|
|
|
|
|
} |
2336
|
|
|
|
|
|
|
elsif ($grammar =~ m/$TRACEBUILDMK/gco) { |
2337
|
0
|
|
|
|
|
0
|
_parse("an grammar build trace request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2338
|
0
|
0
|
|
|
|
0
|
$::RD_TRACE = $1 ? $2+0 : 1; |
2339
|
|
|
|
|
|
|
} |
2340
|
|
|
|
|
|
|
elsif ($grammar =~ m/$TRACEPARSEMK/gco) { |
2341
|
0
|
|
|
|
|
0
|
_parse("an parse trace request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2342
|
0
|
0
|
|
|
|
0
|
$self->{__TRACE__} = $1 ? $2+0 : 1; |
2343
|
|
|
|
|
|
|
} |
2344
|
|
|
|
|
|
|
elsif ($grammar =~ m/$AUTOERRORMK/gco) |
2345
|
|
|
|
|
|
|
{ |
2346
|
0
|
|
|
|
|
0
|
$commitonly = $1; |
2347
|
0
|
|
|
|
|
0
|
_parse("an error marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2348
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Error('',$lookahead,$1,$line); |
2349
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2350
|
|
|
|
|
|
|
or _no_rule("<error>",$line); |
2351
|
0
|
|
|
|
|
0
|
$aftererror = !$commitonly; |
2352
|
|
|
|
|
|
|
} |
2353
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$MSGERRORMK)/gco |
2354
|
0
|
|
|
|
|
0
|
and do { $commitonly = $1; |
2355
|
0
|
|
|
|
|
0
|
($code) = extract_bracketed($grammar,'<'); |
2356
|
0
|
|
|
|
|
0
|
$code }) |
2357
|
|
|
|
|
|
|
{ |
2358
|
0
|
|
|
|
|
0
|
_parse("an error marker", $aftererror,$line,$code); |
2359
|
0
|
|
|
|
|
0
|
$code =~ /\A\s*<error\??:(.*)>\Z/s; |
2360
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Error($1,$lookahead,$commitonly,$line); |
2361
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2362
|
|
|
|
|
|
|
or _no_rule("$code",$line); |
2363
|
0
|
|
|
|
|
0
|
$aftererror = !$commitonly; |
2364
|
|
|
|
|
|
|
} |
2365
|
0
|
|
|
|
|
0
|
elsif (do { $commitonly = $1; |
2366
|
0
|
|
|
|
|
0
|
($code) = extract_bracketed($grammar,'<'); |
2367
|
0
|
|
|
|
|
0
|
$code }) |
2368
|
|
|
|
|
|
|
{ |
2369
|
0
|
0
|
|
|
|
0
|
if ($code =~ /^<[A-Z_]+>$/) |
2370
|
|
|
|
|
|
|
{ |
2371
|
0
|
|
|
|
|
0
|
_error("Token items are not yet |
2372
|
|
|
|
|
|
|
supported: \"$code\"", |
2373
|
|
|
|
|
|
|
$line); |
2374
|
0
|
|
|
|
|
0
|
_hint("Items like $code that consist of angle |
2375
|
|
|
|
|
|
|
brackets enclosing a sequence of |
2376
|
|
|
|
|
|
|
uppercase characters will eventually |
2377
|
|
|
|
|
|
|
be used to specify pre-lexed tokens |
2378
|
|
|
|
|
|
|
in a grammar. That functionality is not |
2379
|
|
|
|
|
|
|
yet implemented. Or did you misspell |
2380
|
|
|
|
|
|
|
\"$code\"?"); |
2381
|
|
|
|
|
|
|
} |
2382
|
|
|
|
|
|
|
else |
2383
|
|
|
|
|
|
|
{ |
2384
|
0
|
|
|
|
|
0
|
_error("Untranslatable item encountered: \"$code\"", |
2385
|
|
|
|
|
|
|
$line); |
2386
|
0
|
|
|
|
|
0
|
_hint("Did you misspell \"$code\" |
2387
|
|
|
|
|
|
|
or forget to comment it out?"); |
2388
|
|
|
|
|
|
|
} |
2389
|
|
|
|
|
|
|
} |
2390
|
|
|
|
|
|
|
} |
2391
|
|
|
|
|
|
|
elsif ($grammar =~ m/$RULE/gco) |
2392
|
|
|
|
|
|
|
{ |
2393
|
0
|
0
|
|
|
|
0
|
_parseunneg("a rule declaration", 0, |
2394
|
|
|
|
|
|
|
$lookahead,$line, substr($grammar, $-[0], $+[0] - $-[0]) ) or next; |
2395
|
0
|
|
|
|
|
0
|
my $rulename = $1; |
2396
|
0
|
0
|
|
|
|
0
|
if ($rulename =~ /Replace|Extend|Precompile|Save/ ) |
2397
|
|
|
|
|
|
|
{ |
2398
|
0
|
0
|
|
|
|
0
|
_warn(2,"Rule \"$rulename\" hidden by method |
2399
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::$rulename",$line) |
2400
|
|
|
|
|
|
|
and |
2401
|
|
|
|
|
|
|
_hint("The rule named \"$rulename\" cannot be directly |
2402
|
|
|
|
|
|
|
called through the Parse::RecDescent::_Runtime object |
2403
|
|
|
|
|
|
|
for this grammar (although it may still |
2404
|
|
|
|
|
|
|
be used as a subrule of other rules). |
2405
|
|
|
|
|
|
|
It can't be directly called because |
2406
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::$rulename is already defined (it |
2407
|
|
|
|
|
|
|
is the standard method of all |
2408
|
|
|
|
|
|
|
parsers)."); |
2409
|
|
|
|
|
|
|
} |
2410
|
0
|
|
|
|
|
0
|
$rule = new Parse::RecDescent::_Runtime::Rule($rulename,$self,$line,$replace); |
2411
|
0
|
0
|
|
|
|
0
|
$prod->check_pending($line) if $prod; |
2412
|
0
|
|
|
|
|
0
|
$prod = $rule->addprod( new Parse::RecDescent::_Runtime::Production ); |
2413
|
0
|
|
|
|
|
0
|
$aftererror = 0; |
2414
|
|
|
|
|
|
|
} |
2415
|
|
|
|
|
|
|
elsif ($grammar =~ m/$UNCOMMITPROD/gco) |
2416
|
|
|
|
|
|
|
{ |
2417
|
0
|
|
|
|
|
0
|
pos($grammar)-=9; |
2418
|
0
|
0
|
|
|
|
0
|
_parseunneg("a new (uncommitted) production", |
2419
|
|
|
|
|
|
|
0, $lookahead, $line, substr($grammar, $-[0], $+[0] - $-[0]) ) or next; |
2420
|
|
|
|
|
|
|
|
2421
|
0
|
0
|
|
|
|
0
|
$prod->check_pending($line) if $prod; |
2422
|
0
|
|
|
|
|
0
|
$prod = new Parse::RecDescent::_Runtime::Production($line,1); |
2423
|
0
|
0
|
0
|
|
|
0
|
$rule and $rule->addprod($prod) |
2424
|
|
|
|
|
|
|
or _no_rule("<uncommit>",$line); |
2425
|
0
|
|
|
|
|
0
|
$aftererror = 0; |
2426
|
|
|
|
|
|
|
} |
2427
|
|
|
|
|
|
|
elsif ($grammar =~ m/$ERRORPROD/gco) |
2428
|
|
|
|
|
|
|
{ |
2429
|
0
|
|
|
|
|
0
|
pos($grammar)-=6; |
2430
|
0
|
0
|
|
|
|
0
|
_parseunneg("a new (error) production", $aftererror, |
2431
|
|
|
|
|
|
|
$lookahead,$line, substr($grammar, $-[0], $+[0] - $-[0]) ) or next; |
2432
|
0
|
0
|
|
|
|
0
|
$prod->check_pending($line) if $prod; |
2433
|
0
|
|
|
|
|
0
|
$prod = new Parse::RecDescent::_Runtime::Production($line,0,1); |
2434
|
0
|
0
|
0
|
|
|
0
|
$rule and $rule->addprod($prod) |
2435
|
|
|
|
|
|
|
or _no_rule("<error>",$line); |
2436
|
0
|
|
|
|
|
0
|
$aftererror = 0; |
2437
|
|
|
|
|
|
|
} |
2438
|
|
|
|
|
|
|
elsif ($grammar =~ m/$PROD/gco) |
2439
|
|
|
|
|
|
|
{ |
2440
|
0
|
0
|
|
|
|
0
|
_parseunneg("a new production", 0, |
2441
|
|
|
|
|
|
|
$lookahead,$line, substr($grammar, $-[0], $+[0] - $-[0]) ) or next; |
2442
|
0
|
0
|
0
|
|
|
0
|
$rule |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
2443
|
|
|
|
|
|
|
and (!$prod || $prod->check_pending($line)) |
2444
|
|
|
|
|
|
|
and $prod = $rule->addprod(new Parse::RecDescent::_Runtime::Production($line)) |
2445
|
|
|
|
|
|
|
or _no_rule("production",$line); |
2446
|
0
|
|
|
|
|
0
|
$aftererror = 0; |
2447
|
|
|
|
|
|
|
} |
2448
|
|
|
|
|
|
|
elsif ($grammar =~ m/$LITERAL/gco) |
2449
|
|
|
|
|
|
|
{ |
2450
|
0
|
|
|
|
|
0
|
my $literal = $1; |
2451
|
0
|
|
|
|
|
0
|
($code = $literal) =~ s/\\\\/\\/g; |
2452
|
0
|
|
|
|
|
0
|
_parse("a literal terminal", $aftererror,$line,$literal); |
2453
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Literal($code,$lookahead,$line); |
2454
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2455
|
|
|
|
|
|
|
or _no_rule("literal terminal",$line,"'$literal'"); |
2456
|
|
|
|
|
|
|
} |
2457
|
|
|
|
|
|
|
elsif ($grammar =~ m/$INTERPLIT/gco) |
2458
|
|
|
|
|
|
|
{ |
2459
|
0
|
|
|
|
|
0
|
_parse("an interpolated literal terminal", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2460
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::InterpLit($1,$lookahead,$line); |
2461
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2462
|
|
|
|
|
|
|
or _no_rule("interpolated literal terminal",$line,"'$1'"); |
2463
|
|
|
|
|
|
|
} |
2464
|
|
|
|
|
|
|
elsif ($grammar =~ m/$TOKEN/gco) |
2465
|
|
|
|
|
|
|
{ |
2466
|
0
|
|
|
|
|
0
|
_parse("a /../ pattern terminal", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2467
|
0
|
0
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Token($1,'/',$3?$3:'',$lookahead,$line); |
2468
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2469
|
|
|
|
|
|
|
or _no_rule("pattern terminal",$line,"/$1/"); |
2470
|
|
|
|
|
|
|
} |
2471
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$MTOKEN)/gco |
2472
|
0
|
|
|
|
|
0
|
and do { ($code, undef, @components) |
2473
|
|
|
|
|
|
|
= extract_quotelike($grammar); |
2474
|
0
|
|
|
|
|
0
|
$code } |
2475
|
|
|
|
|
|
|
) |
2476
|
|
|
|
|
|
|
|
2477
|
|
|
|
|
|
|
{ |
2478
|
0
|
|
|
|
|
0
|
_parse("an m/../ pattern terminal", $aftererror,$line,$code); |
2479
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Token(@components[3,2,8], |
2480
|
|
|
|
|
|
|
$lookahead,$line); |
2481
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2482
|
|
|
|
|
|
|
or _no_rule("pattern terminal",$line,$code); |
2483
|
|
|
|
|
|
|
} |
2484
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$MATCHRULE)/gco |
2485
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_bracketed($grammar,'<'); |
2486
|
0
|
|
|
|
|
0
|
$code |
2487
|
|
|
|
|
|
|
} |
2488
|
|
|
|
|
|
|
or $grammar =~ m/$SUBRULE/gco |
2489
|
|
|
|
|
|
|
and $code = $1) |
2490
|
|
|
|
|
|
|
{ |
2491
|
0
|
|
|
|
|
0
|
my $name = $code; |
2492
|
0
|
|
|
|
|
0
|
my $matchrule = 0; |
2493
|
0
|
0
|
|
|
|
0
|
if (substr($name,0,1) eq '<') |
2494
|
|
|
|
|
|
|
{ |
2495
|
0
|
|
|
|
|
0
|
$name =~ s/$MATCHRULE\s*//; |
2496
|
0
|
|
|
|
|
0
|
$name =~ s/\s*>\Z//; |
2497
|
0
|
|
|
|
|
0
|
$matchrule = 1; |
2498
|
|
|
|
|
|
|
} |
2499
|
|
|
|
|
|
|
|
2500
|
|
|
|
|
|
|
# EXTRACT TRAILING ARG LIST (IF ANY) |
2501
|
|
|
|
|
|
|
|
2502
|
0
|
|
0
|
|
|
0
|
my ($argcode) = extract_codeblock($grammar, "[]",'') || ''; |
2503
|
|
|
|
|
|
|
|
2504
|
|
|
|
|
|
|
# EXTRACT TRAILING REPETITION SPECIFIER (IF ANY) |
2505
|
|
|
|
|
|
|
|
2506
|
0
|
0
|
|
|
|
0
|
if ($grammar =~ m/\G[(]/gc) |
2507
|
|
|
|
|
|
|
{ |
2508
|
0
|
|
|
|
|
0
|
pos($grammar)--; |
2509
|
|
|
|
|
|
|
|
2510
|
0
|
0
|
|
|
|
0
|
if ($grammar =~ m/$OPTIONAL/gco) |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
2511
|
|
|
|
|
|
|
{ |
2512
|
0
|
|
|
|
|
0
|
_parse("an zero-or-one subrule match", $aftererror,$line,"$code$argcode($1)"); |
2513
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Repetition($name,$1,0,1, |
2514
|
|
|
|
|
|
|
$lookahead,$line, |
2515
|
|
|
|
|
|
|
$self, |
2516
|
|
|
|
|
|
|
$matchrule, |
2517
|
|
|
|
|
|
|
$argcode); |
2518
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2519
|
|
|
|
|
|
|
or _no_rule("repetition",$line,"$code$argcode($1)"); |
2520
|
|
|
|
|
|
|
|
2521
|
0
|
0
|
0
|
|
|
0
|
!$matchrule and $rule and $rule->addcall($name); |
2522
|
|
|
|
|
|
|
} |
2523
|
|
|
|
|
|
|
elsif ($grammar =~ m/$ANY/gco) |
2524
|
|
|
|
|
|
|
{ |
2525
|
0
|
|
|
|
|
0
|
_parse("a zero-or-more subrule match", $aftererror,$line,"$code$argcode($1)"); |
2526
|
0
|
0
|
|
|
|
0
|
if ($2) |
2527
|
|
|
|
|
|
|
{ |
2528
|
0
|
|
|
|
|
0
|
my $pos = pos $grammar; |
2529
|
0
|
|
|
|
|
0
|
substr($grammar,$pos,0, |
2530
|
|
|
|
|
|
|
"<leftop='$name(s?)': $name $2 $name>(s?) "); |
2531
|
|
|
|
|
|
|
|
2532
|
0
|
|
|
|
|
0
|
pos $grammar = $pos; |
2533
|
|
|
|
|
|
|
} |
2534
|
|
|
|
|
|
|
else |
2535
|
|
|
|
|
|
|
{ |
2536
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Repetition($name,$1,0,$MAXREP, |
2537
|
|
|
|
|
|
|
$lookahead,$line, |
2538
|
|
|
|
|
|
|
$self, |
2539
|
|
|
|
|
|
|
$matchrule, |
2540
|
|
|
|
|
|
|
$argcode); |
2541
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2542
|
|
|
|
|
|
|
or _no_rule("repetition",$line,"$code$argcode($1)"); |
2543
|
|
|
|
|
|
|
|
2544
|
0
|
0
|
0
|
|
|
0
|
!$matchrule and $rule and $rule->addcall($name); |
2545
|
|
|
|
|
|
|
|
2546
|
0
|
0
|
|
|
|
0
|
_check_insatiable($name,$1,$grammar,$line) if $::RD_CHECK; |
2547
|
|
|
|
|
|
|
} |
2548
|
|
|
|
|
|
|
} |
2549
|
|
|
|
|
|
|
elsif ($grammar =~ m/$MANY/gco) |
2550
|
|
|
|
|
|
|
{ |
2551
|
0
|
|
|
|
|
0
|
_parse("a one-or-more subrule match", $aftererror,$line,"$code$argcode($1)"); |
2552
|
0
|
0
|
|
|
|
0
|
if ($2) |
2553
|
|
|
|
|
|
|
{ |
2554
|
|
|
|
|
|
|
# $DB::single=1; |
2555
|
0
|
|
|
|
|
0
|
my $pos = pos $grammar; |
2556
|
0
|
|
|
|
|
0
|
substr($grammar,$pos,0, |
2557
|
|
|
|
|
|
|
"<leftop='$name(s)': $name $2 $name> "); |
2558
|
|
|
|
|
|
|
|
2559
|
0
|
|
|
|
|
0
|
pos $grammar = $pos; |
2560
|
|
|
|
|
|
|
} |
2561
|
|
|
|
|
|
|
else |
2562
|
|
|
|
|
|
|
{ |
2563
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Repetition($name,$1,1,$MAXREP, |
2564
|
|
|
|
|
|
|
$lookahead,$line, |
2565
|
|
|
|
|
|
|
$self, |
2566
|
|
|
|
|
|
|
$matchrule, |
2567
|
|
|
|
|
|
|
$argcode); |
2568
|
|
|
|
|
|
|
|
2569
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2570
|
|
|
|
|
|
|
or _no_rule("repetition",$line,"$code$argcode($1)"); |
2571
|
|
|
|
|
|
|
|
2572
|
0
|
0
|
0
|
|
|
0
|
!$matchrule and $rule and $rule->addcall($name); |
2573
|
|
|
|
|
|
|
|
2574
|
0
|
0
|
|
|
|
0
|
_check_insatiable($name,$1,$grammar,$line) if $::RD_CHECK; |
2575
|
|
|
|
|
|
|
} |
2576
|
|
|
|
|
|
|
} |
2577
|
|
|
|
|
|
|
elsif ($grammar =~ m/$EXACTLY/gco) |
2578
|
|
|
|
|
|
|
{ |
2579
|
0
|
|
|
|
|
0
|
_parse("an exactly-$1-times subrule match", $aftererror,$line,"$code$argcode($1)"); |
2580
|
0
|
0
|
|
|
|
0
|
if ($2) |
2581
|
|
|
|
|
|
|
{ |
2582
|
0
|
|
|
|
|
0
|
my $pos = pos $grammar; |
2583
|
0
|
|
|
|
|
0
|
substr($grammar,$pos,0, |
2584
|
|
|
|
|
|
|
"<leftop='$name($1)': $name $2 $name>($1) "); |
2585
|
|
|
|
|
|
|
|
2586
|
0
|
|
|
|
|
0
|
pos $grammar = $pos; |
2587
|
|
|
|
|
|
|
} |
2588
|
|
|
|
|
|
|
else |
2589
|
|
|
|
|
|
|
{ |
2590
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Repetition($name,$1,$1,$1, |
2591
|
|
|
|
|
|
|
$lookahead,$line, |
2592
|
|
|
|
|
|
|
$self, |
2593
|
|
|
|
|
|
|
$matchrule, |
2594
|
|
|
|
|
|
|
$argcode); |
2595
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2596
|
|
|
|
|
|
|
or _no_rule("repetition",$line,"$code$argcode($1)"); |
2597
|
|
|
|
|
|
|
|
2598
|
0
|
0
|
0
|
|
|
0
|
!$matchrule and $rule and $rule->addcall($name); |
2599
|
|
|
|
|
|
|
} |
2600
|
|
|
|
|
|
|
} |
2601
|
|
|
|
|
|
|
elsif ($grammar =~ m/$BETWEEN/gco) |
2602
|
|
|
|
|
|
|
{ |
2603
|
0
|
|
|
|
|
0
|
_parse("a $1-to-$2 subrule match", $aftererror,$line,"$code$argcode($1..$2)"); |
2604
|
0
|
0
|
|
|
|
0
|
if ($3) |
2605
|
|
|
|
|
|
|
{ |
2606
|
0
|
|
|
|
|
0
|
my $pos = pos $grammar; |
2607
|
0
|
|
|
|
|
0
|
substr($grammar,$pos,0, |
2608
|
|
|
|
|
|
|
"<leftop='$name($1..$2)': $name $3 $name>($1..$2) "); |
2609
|
|
|
|
|
|
|
|
2610
|
0
|
|
|
|
|
0
|
pos $grammar = $pos; |
2611
|
|
|
|
|
|
|
} |
2612
|
|
|
|
|
|
|
else |
2613
|
|
|
|
|
|
|
{ |
2614
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Repetition($name,"$1..$2",$1,$2, |
2615
|
|
|
|
|
|
|
$lookahead,$line, |
2616
|
|
|
|
|
|
|
$self, |
2617
|
|
|
|
|
|
|
$matchrule, |
2618
|
|
|
|
|
|
|
$argcode); |
2619
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2620
|
|
|
|
|
|
|
or _no_rule("repetition",$line,"$code$argcode($1..$2)"); |
2621
|
|
|
|
|
|
|
|
2622
|
0
|
0
|
0
|
|
|
0
|
!$matchrule and $rule and $rule->addcall($name); |
2623
|
|
|
|
|
|
|
} |
2624
|
|
|
|
|
|
|
} |
2625
|
|
|
|
|
|
|
elsif ($grammar =~ m/$ATLEAST/gco) |
2626
|
|
|
|
|
|
|
{ |
2627
|
0
|
|
|
|
|
0
|
_parse("a $1-or-more subrule match", $aftererror,$line,"$code$argcode($1..)"); |
2628
|
0
|
0
|
|
|
|
0
|
if ($2) |
2629
|
|
|
|
|
|
|
{ |
2630
|
0
|
|
|
|
|
0
|
my $pos = pos $grammar; |
2631
|
0
|
|
|
|
|
0
|
substr($grammar,$pos,0, |
2632
|
|
|
|
|
|
|
"<leftop='$name($1..)': $name $2 $name>($1..) "); |
2633
|
|
|
|
|
|
|
|
2634
|
0
|
|
|
|
|
0
|
pos $grammar = $pos; |
2635
|
|
|
|
|
|
|
} |
2636
|
|
|
|
|
|
|
else |
2637
|
|
|
|
|
|
|
{ |
2638
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Repetition($name,"$1..",$1,$MAXREP, |
2639
|
|
|
|
|
|
|
$lookahead,$line, |
2640
|
|
|
|
|
|
|
$self, |
2641
|
|
|
|
|
|
|
$matchrule, |
2642
|
|
|
|
|
|
|
$argcode); |
2643
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2644
|
|
|
|
|
|
|
or _no_rule("repetition",$line,"$code$argcode($1..)"); |
2645
|
|
|
|
|
|
|
|
2646
|
0
|
0
|
0
|
|
|
0
|
!$matchrule and $rule and $rule->addcall($name); |
2647
|
0
|
0
|
|
|
|
0
|
_check_insatiable($name,"$1..",$grammar,$line) if $::RD_CHECK; |
2648
|
|
|
|
|
|
|
} |
2649
|
|
|
|
|
|
|
} |
2650
|
|
|
|
|
|
|
elsif ($grammar =~ m/$ATMOST/gco) |
2651
|
|
|
|
|
|
|
{ |
2652
|
0
|
|
|
|
|
0
|
_parse("a one-to-$1 subrule match", $aftererror,$line,"$code$argcode(..$1)"); |
2653
|
0
|
0
|
|
|
|
0
|
if ($2) |
2654
|
|
|
|
|
|
|
{ |
2655
|
0
|
|
|
|
|
0
|
my $pos = pos $grammar; |
2656
|
0
|
|
|
|
|
0
|
substr($grammar,$pos,0, |
2657
|
|
|
|
|
|
|
"<leftop='$name(..$1)': $name $2 $name>(..$1) "); |
2658
|
|
|
|
|
|
|
|
2659
|
0
|
|
|
|
|
0
|
pos $grammar = $pos; |
2660
|
|
|
|
|
|
|
} |
2661
|
|
|
|
|
|
|
else |
2662
|
|
|
|
|
|
|
{ |
2663
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Repetition($name,"..$1",1,$1, |
2664
|
|
|
|
|
|
|
$lookahead,$line, |
2665
|
|
|
|
|
|
|
$self, |
2666
|
|
|
|
|
|
|
$matchrule, |
2667
|
|
|
|
|
|
|
$argcode); |
2668
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2669
|
|
|
|
|
|
|
or _no_rule("repetition",$line,"$code$argcode(..$1)"); |
2670
|
|
|
|
|
|
|
|
2671
|
0
|
0
|
0
|
|
|
0
|
!$matchrule and $rule and $rule->addcall($name); |
2672
|
|
|
|
|
|
|
} |
2673
|
|
|
|
|
|
|
} |
2674
|
|
|
|
|
|
|
elsif ($grammar =~ m/$BADREP/gco) |
2675
|
|
|
|
|
|
|
{ |
2676
|
0
|
|
|
|
|
0
|
my $current_match = substr($grammar, $-[0], $+[0] - $-[0]); |
2677
|
0
|
|
|
|
|
0
|
_parse("an subrule match with invalid repetition specifier", 0,$line, $current_match); |
2678
|
0
|
|
|
|
|
0
|
_error("Incorrect specification of a repeated subrule", |
2679
|
|
|
|
|
|
|
$line); |
2680
|
0
|
|
|
|
|
0
|
_hint("Repeated subrules like \"$code$argcode$current_match\" cannot have |
2681
|
|
|
|
|
|
|
a maximum repetition of zero, nor can they have |
2682
|
|
|
|
|
|
|
negative components in their ranges."); |
2683
|
|
|
|
|
|
|
} |
2684
|
|
|
|
|
|
|
} |
2685
|
|
|
|
|
|
|
else |
2686
|
|
|
|
|
|
|
{ |
2687
|
0
|
|
|
|
|
0
|
_parse("a subrule match", $aftererror,$line,$code); |
2688
|
0
|
|
|
|
|
0
|
my $desc; |
2689
|
0
|
0
|
|
|
|
0
|
if ($name=~/\A_alternation_\d+_of_production_\d+_of_rule/) |
2690
|
0
|
|
|
|
|
0
|
{ $desc = $self->{"rules"}{$name}->expected } |
2691
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Subrule($name, |
2692
|
|
|
|
|
|
|
$lookahead, |
2693
|
|
|
|
|
|
|
$line, |
2694
|
|
|
|
|
|
|
$desc, |
2695
|
|
|
|
|
|
|
$matchrule, |
2696
|
|
|
|
|
|
|
$argcode); |
2697
|
|
|
|
|
|
|
|
2698
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2699
|
|
|
|
|
|
|
or _no_rule("(sub)rule",$line,$name); |
2700
|
|
|
|
|
|
|
|
2701
|
0
|
0
|
0
|
|
|
0
|
!$matchrule and $rule and $rule->addcall($name); |
2702
|
|
|
|
|
|
|
} |
2703
|
|
|
|
|
|
|
} |
2704
|
|
|
|
|
|
|
elsif ($grammar =~ m/$LONECOLON/gco ) |
2705
|
|
|
|
|
|
|
{ |
2706
|
0
|
|
|
|
|
0
|
_error("Unexpected colon encountered", $line); |
2707
|
0
|
|
|
|
|
0
|
_hint("Did you mean \"|\" (to start a new production)? |
2708
|
|
|
|
|
|
|
Or perhaps you forgot that the colon |
2709
|
|
|
|
|
|
|
in a rule definition must be |
2710
|
|
|
|
|
|
|
on the same line as the rule name?"); |
2711
|
|
|
|
|
|
|
} |
2712
|
|
|
|
|
|
|
elsif ($grammar =~ m/$ACTION/gco ) # BAD ACTION, ALREADY FAILED |
2713
|
|
|
|
|
|
|
{ |
2714
|
0
|
|
|
|
|
0
|
_error("Malformed action encountered", |
2715
|
|
|
|
|
|
|
$line); |
2716
|
0
|
|
|
|
|
0
|
_hint("Did you forget the closing curly bracket |
2717
|
|
|
|
|
|
|
or is there a syntax error in the action?"); |
2718
|
|
|
|
|
|
|
} |
2719
|
|
|
|
|
|
|
elsif ($grammar =~ m/$OTHER/gco ) |
2720
|
|
|
|
|
|
|
{ |
2721
|
0
|
|
|
|
|
0
|
_error("Untranslatable item encountered: \"$1\"", |
2722
|
|
|
|
|
|
|
$line); |
2723
|
0
|
|
|
|
|
0
|
_hint("Did you misspell \"$1\" |
2724
|
|
|
|
|
|
|
or forget to comment it out?"); |
2725
|
|
|
|
|
|
|
} |
2726
|
|
|
|
|
|
|
|
2727
|
0
|
0
|
|
|
|
0
|
if ($lookaheadspec =~ tr /././ > 3) |
2728
|
|
|
|
|
|
|
{ |
2729
|
0
|
|
|
|
|
0
|
$lookaheadspec =~ s/\A\s+//; |
2730
|
0
|
0
|
|
|
|
0
|
$lookahead = $lookahead<0 |
2731
|
|
|
|
|
|
|
? 'a negative lookahead ("...!")' |
2732
|
|
|
|
|
|
|
: 'a positive lookahead ("...")' ; |
2733
|
0
|
0
|
|
|
|
0
|
_warn(1,"Found two or more lookahead specifiers in a |
2734
|
|
|
|
|
|
|
row.",$line) |
2735
|
|
|
|
|
|
|
and |
2736
|
|
|
|
|
|
|
_hint("Multiple positive and/or negative lookaheads |
2737
|
|
|
|
|
|
|
are simply multiplied together to produce a |
2738
|
|
|
|
|
|
|
single positive or negative lookahead |
2739
|
|
|
|
|
|
|
specification. In this case the sequence |
2740
|
|
|
|
|
|
|
\"$lookaheadspec\" was reduced to $lookahead. |
2741
|
|
|
|
|
|
|
Was this your intention?"); |
2742
|
|
|
|
|
|
|
} |
2743
|
0
|
|
|
|
|
0
|
$lookahead = 0; |
2744
|
0
|
|
|
|
|
0
|
$lookaheadspec = ""; |
2745
|
|
|
|
|
|
|
|
2746
|
0
|
|
|
|
|
0
|
$grammar =~ m/\G\s+/gc; |
2747
|
|
|
|
|
|
|
} |
2748
|
|
|
|
|
|
|
|
2749
|
0
|
0
|
|
|
|
0
|
if ($must_pop_lines) { |
2750
|
0
|
|
|
|
|
0
|
pop @lines; |
2751
|
|
|
|
|
|
|
} |
2752
|
|
|
|
|
|
|
|
2753
|
0
|
0
|
0
|
|
|
0
|
unless ($ERRORS or $isimplicit or !$::RD_CHECK) |
|
|
|
0
|
|
|
|
|
2754
|
|
|
|
|
|
|
{ |
2755
|
0
|
|
|
|
|
0
|
$self->_check_grammar(); |
2756
|
|
|
|
|
|
|
} |
2757
|
|
|
|
|
|
|
|
2758
|
0
|
0
|
0
|
|
|
0
|
unless ($ERRORS or $isimplicit or $Parse::RecDescent::_Runtime::compiling) |
|
|
|
0
|
|
|
|
|
2759
|
|
|
|
|
|
|
{ |
2760
|
0
|
|
|
|
|
0
|
my $code = $self->_code(); |
2761
|
0
|
0
|
|
|
|
0
|
if (defined $::RD_TRACE) |
2762
|
|
|
|
|
|
|
{ |
2763
|
0
|
0
|
|
|
|
0
|
my $mode = ($nextnamespace eq "namespace000002") ? '>' : '>>'; |
2764
|
0
|
|
|
|
|
0
|
print STDERR "printing code (", length($code),") to RD_TRACE\n"; |
2765
|
0
|
|
|
|
|
0
|
local *TRACE_FILE; |
2766
|
0
|
0
|
0
|
|
|
0
|
open TRACE_FILE, $mode, "RD_TRACE" |
2767
|
|
|
|
|
|
|
and print TRACE_FILE "my \$ERRORS;\n$code" |
2768
|
|
|
|
|
|
|
and close TRACE_FILE; |
2769
|
|
|
|
|
|
|
} |
2770
|
|
|
|
|
|
|
|
2771
|
0
|
0
|
|
|
|
0
|
unless ( eval "$code 1" ) |
2772
|
|
|
|
|
|
|
{ |
2773
|
0
|
|
|
|
|
0
|
_error("Internal error in generated parser code!"); |
2774
|
0
|
|
|
|
|
0
|
$@ =~ s/at grammar/in grammar at/; |
2775
|
0
|
|
|
|
|
0
|
_hint($@); |
2776
|
|
|
|
|
|
|
} |
2777
|
|
|
|
|
|
|
} |
2778
|
|
|
|
|
|
|
|
2779
|
0
|
0
|
0
|
|
|
0
|
if ($ERRORS and !_verbosity("HINT")) |
2780
|
|
|
|
|
|
|
{ |
2781
|
0
|
0
|
|
|
|
0
|
local $::RD_HINT = defined $::RD_HINT ? $::RD_HINT : 1; |
2782
|
0
|
|
|
|
|
0
|
_hint('Set $::RD_HINT (or -RD_HINT if you\'re using "perl -s") |
2783
|
|
|
|
|
|
|
for hints on fixing these problems. Use $::RD_HINT = 0 |
2784
|
|
|
|
|
|
|
to disable this message.'); |
2785
|
|
|
|
|
|
|
} |
2786
|
0
|
0
|
|
|
|
0
|
if ($ERRORS) { $ERRORS=0; return } |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
2787
|
0
|
|
|
|
|
0
|
return $self; |
2788
|
|
|
|
|
|
|
} |
2789
|
|
|
|
|
|
|
|
2790
|
|
|
|
|
|
|
|
2791
|
|
|
|
|
|
|
sub _addstartcode($$) |
2792
|
|
|
|
|
|
|
{ |
2793
|
0
|
|
|
0
|
|
0
|
my ($self, $code) = @_; |
2794
|
0
|
|
|
|
|
0
|
$code =~ s/\A\s*\{(.*)\}\Z/$1/s; |
2795
|
|
|
|
|
|
|
|
2796
|
0
|
|
|
|
|
0
|
$self->{"startcode"} .= "$code;\n"; |
2797
|
|
|
|
|
|
|
} |
2798
|
|
|
|
|
|
|
|
2799
|
|
|
|
|
|
|
# CHECK FOR GRAMMAR PROBLEMS.... |
2800
|
|
|
|
|
|
|
|
2801
|
|
|
|
|
|
|
sub _check_insatiable($$$$) |
2802
|
|
|
|
|
|
|
{ |
2803
|
0
|
|
|
0
|
|
0
|
my ($subrule,$repspec,$grammar,$line) = @_; |
2804
|
0
|
|
|
|
|
0
|
pos($grammar)=pos($_[2]); |
2805
|
0
|
0
|
0
|
|
|
0
|
return if $grammar =~ m/$OPTIONAL/gco || $grammar =~ m/$ANY/gco; |
2806
|
0
|
|
|
|
|
0
|
my $min = 1; |
2807
|
0
|
0
|
0
|
|
|
0
|
if ( $grammar =~ m/$MANY/gco |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
2808
|
|
|
|
|
|
|
|| $grammar =~ m/$EXACTLY/gco |
2809
|
|
|
|
|
|
|
|| $grammar =~ m/$ATMOST/gco |
2810
|
0
|
|
|
|
|
0
|
|| $grammar =~ m/$BETWEEN/gco && do { $min=$2; 1 } |
|
0
|
|
|
|
|
0
|
|
2811
|
0
|
|
|
|
|
0
|
|| $grammar =~ m/$ATLEAST/gco && do { $min=$2; 1 } |
|
0
|
|
|
|
|
0
|
|
2812
|
|
|
|
|
|
|
|| $grammar =~ m/$SUBRULE(?!\s*:)/gco |
2813
|
|
|
|
|
|
|
) |
2814
|
|
|
|
|
|
|
{ |
2815
|
0
|
0
|
0
|
|
|
0
|
return unless $1 eq $subrule && $min > 0; |
2816
|
0
|
|
|
|
|
0
|
my $current_match = substr($grammar, $-[0], $+[0] - $-[0]); |
2817
|
0
|
0
|
|
|
|
0
|
_warn(3,"Subrule sequence \"$subrule($repspec) $current_match\" will |
2818
|
|
|
|
|
|
|
(almost certainly) fail.",$line) |
2819
|
|
|
|
|
|
|
and |
2820
|
|
|
|
|
|
|
_hint("Unless subrule \"$subrule\" performs some cunning |
2821
|
|
|
|
|
|
|
lookahead, the repetition \"$subrule($repspec)\" will |
2822
|
|
|
|
|
|
|
insatiably consume as many matches of \"$subrule\" as it |
2823
|
|
|
|
|
|
|
can, leaving none to match the \"$current_match\" that follows."); |
2824
|
|
|
|
|
|
|
} |
2825
|
|
|
|
|
|
|
} |
2826
|
|
|
|
|
|
|
|
2827
|
|
|
|
|
|
|
sub _check_grammar ($) |
2828
|
|
|
|
|
|
|
{ |
2829
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
2830
|
0
|
|
|
|
|
0
|
my $rules = $self->{"rules"}; |
2831
|
0
|
|
|
|
|
0
|
my $rule; |
2832
|
0
|
|
|
|
|
0
|
foreach $rule ( values %$rules ) |
2833
|
|
|
|
|
|
|
{ |
2834
|
0
|
0
|
|
|
|
0
|
next if ! $rule->{"changed"}; |
2835
|
|
|
|
|
|
|
|
2836
|
|
|
|
|
|
|
# CHECK FOR UNDEFINED RULES |
2837
|
|
|
|
|
|
|
|
2838
|
0
|
|
|
|
|
0
|
my $call; |
2839
|
0
|
|
|
|
|
0
|
foreach $call ( @{$rule->{"calls"}} ) |
|
0
|
|
|
|
|
0
|
|
2840
|
|
|
|
|
|
|
{ |
2841
|
0
|
0
|
0
|
|
|
0
|
if (!defined ${$rules}{$call} |
|
0
|
|
|
|
|
0
|
|
2842
|
0
|
|
|
|
|
0
|
&&!defined &{"Parse::RecDescent::_Runtime::$call"}) |
2843
|
|
|
|
|
|
|
{ |
2844
|
0
|
0
|
|
|
|
0
|
if (!defined $::RD_AUTOSTUB) |
2845
|
|
|
|
|
|
|
{ |
2846
|
0
|
0
|
|
|
|
0
|
_warn(3,"Undefined (sub)rule \"$call\" |
2847
|
|
|
|
|
|
|
used in a production.") |
2848
|
|
|
|
|
|
|
and |
2849
|
|
|
|
|
|
|
_hint("Will you be providing this rule |
2850
|
|
|
|
|
|
|
later, or did you perhaps |
2851
|
|
|
|
|
|
|
misspell \"$call\"? Otherwise |
2852
|
|
|
|
|
|
|
it will be treated as an |
2853
|
|
|
|
|
|
|
immediate <reject>."); |
2854
|
0
|
|
|
|
|
0
|
eval "sub $self->{namespace}::$call {undef}"; |
2855
|
|
|
|
|
|
|
} |
2856
|
|
|
|
|
|
|
else # EXPERIMENTAL |
2857
|
|
|
|
|
|
|
{ |
2858
|
0
|
|
|
|
|
0
|
my $rule = qq{'$call'}; |
2859
|
0
|
0
|
0
|
|
|
0
|
if ($::RD_AUTOSTUB and $::RD_AUTOSTUB ne "1") { |
2860
|
0
|
|
|
|
|
0
|
$rule = $::RD_AUTOSTUB; |
2861
|
|
|
|
|
|
|
} |
2862
|
0
|
0
|
|
|
|
0
|
_warn(1,"Autogenerating rule: $call") |
2863
|
|
|
|
|
|
|
and |
2864
|
|
|
|
|
|
|
_hint("A call was made to a subrule |
2865
|
|
|
|
|
|
|
named \"$call\", but no such |
2866
|
|
|
|
|
|
|
rule was specified. However, |
2867
|
|
|
|
|
|
|
since \$::RD_AUTOSTUB |
2868
|
|
|
|
|
|
|
was defined, a rule stub |
2869
|
|
|
|
|
|
|
($call : $rule) was |
2870
|
|
|
|
|
|
|
automatically created."); |
2871
|
|
|
|
|
|
|
|
2872
|
0
|
|
|
|
|
0
|
$self->_generate("$call: $rule",0,1); |
2873
|
|
|
|
|
|
|
} |
2874
|
|
|
|
|
|
|
} |
2875
|
|
|
|
|
|
|
} |
2876
|
|
|
|
|
|
|
|
2877
|
|
|
|
|
|
|
# CHECK FOR LEFT RECURSION |
2878
|
|
|
|
|
|
|
|
2879
|
0
|
0
|
|
|
|
0
|
if ($rule->isleftrec($rules)) |
2880
|
|
|
|
|
|
|
{ |
2881
|
0
|
|
|
|
|
0
|
_error("Rule \"$rule->{name}\" is left-recursive."); |
2882
|
0
|
|
|
|
|
0
|
_hint("Redesign the grammar so it's not left-recursive. |
2883
|
|
|
|
|
|
|
That will probably mean you need to re-implement |
2884
|
|
|
|
|
|
|
repetitions using the '(s)' notation. |
2885
|
|
|
|
|
|
|
For example: \"$rule->{name}(s)\"."); |
2886
|
0
|
|
|
|
|
0
|
next; |
2887
|
|
|
|
|
|
|
} |
2888
|
|
|
|
|
|
|
|
2889
|
|
|
|
|
|
|
# CHECK FOR PRODUCTIONS FOLLOWING EMPTY PRODUCTIONS |
2890
|
|
|
|
|
|
|
{ |
2891
|
0
|
|
|
|
|
0
|
my $hasempty; |
|
0
|
|
|
|
|
0
|
|
2892
|
|
|
|
|
|
|
my $prod; |
2893
|
0
|
|
|
|
|
0
|
foreach $prod ( @{$rule->{"prods"}} ) { |
|
0
|
|
|
|
|
0
|
|
2894
|
0
|
0
|
|
|
|
0
|
if ($hasempty) { |
2895
|
0
|
|
|
|
|
0
|
_error("Production " . $prod->describe . " for \"$rule->{name}\" |
2896
|
|
|
|
|
|
|
will never be reached (preceding empty production will |
2897
|
|
|
|
|
|
|
always match first)."); |
2898
|
0
|
|
|
|
|
0
|
_hint("Reorder the grammar so that the empty production |
2899
|
|
|
|
|
|
|
is last in the list or productions."); |
2900
|
0
|
|
|
|
|
0
|
last; |
2901
|
|
|
|
|
|
|
} |
2902
|
0
|
|
0
|
|
|
0
|
$hasempty ||= $prod->isempty(); |
2903
|
|
|
|
|
|
|
} |
2904
|
|
|
|
|
|
|
} |
2905
|
|
|
|
|
|
|
} |
2906
|
|
|
|
|
|
|
} |
2907
|
|
|
|
|
|
|
|
2908
|
|
|
|
|
|
|
# GENERATE ACTUAL PARSER CODE |
2909
|
|
|
|
|
|
|
|
2910
|
|
|
|
|
|
|
sub _code($) |
2911
|
|
|
|
|
|
|
{ |
2912
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
2913
|
0
|
0
|
|
|
|
0
|
my $initial_skip = defined($self->{skip}) ? $self->{skip} : $skip; |
2914
|
|
|
|
|
|
|
|
2915
|
0
|
|
|
|
|
0
|
my $code = qq! |
2916
|
|
|
|
|
|
|
package $self->{namespace}; |
2917
|
|
|
|
|
|
|
use strict; |
2918
|
|
|
|
|
|
|
use vars qw(\$skip \$AUTOLOAD $self->{localvars} ); |
2919
|
|
|
|
|
|
|
\@$self->{namespace}\::ISA = (); |
2920
|
|
|
|
|
|
|
\$skip = '$initial_skip'; |
2921
|
|
|
|
|
|
|
$self->{startcode} |
2922
|
|
|
|
|
|
|
|
2923
|
|
|
|
|
|
|
{ |
2924
|
|
|
|
|
|
|
local \$SIG{__WARN__} = sub {0}; |
2925
|
|
|
|
|
|
|
# PRETEND TO BE IN Parse::RecDescent::_Runtime NAMESPACE |
2926
|
|
|
|
|
|
|
*$self->{namespace}::AUTOLOAD = sub |
2927
|
|
|
|
|
|
|
{ |
2928
|
|
|
|
|
|
|
no strict 'refs'; |
2929
|
|
|
|
|
|
|
! |
2930
|
|
|
|
|
|
|
# This generated code uses ${"AUTOLOAD"} rather than $AUTOLOAD in |
2931
|
|
|
|
|
|
|
# order to avoid the circular reference documented here: |
2932
|
|
|
|
|
|
|
# https://rt.perl.org/rt3/Public/Bug/Display.html?id=110248 |
2933
|
|
|
|
|
|
|
# As a result of the investigation of |
2934
|
|
|
|
|
|
|
# https://rt.cpan.org/Ticket/Display.html?id=53710 |
2935
|
|
|
|
|
|
|
. qq! |
2936
|
|
|
|
|
|
|
\${"AUTOLOAD"} =~ s/^$self->{namespace}/Parse::RecDescent::_Runtime/; |
2937
|
|
|
|
|
|
|
goto &{\${"AUTOLOAD"}}; |
2938
|
|
|
|
|
|
|
} |
2939
|
|
|
|
|
|
|
} |
2940
|
|
|
|
|
|
|
|
2941
|
|
|
|
|
|
|
!; |
2942
|
0
|
|
|
|
|
0
|
$code .= "push \@$self->{namespace}\::ISA, 'Parse::RecDescent::_Runtime';"; |
2943
|
0
|
|
|
|
|
0
|
$self->{"startcode"} = ''; |
2944
|
|
|
|
|
|
|
|
2945
|
0
|
|
|
|
|
0
|
my $rule; |
2946
|
0
|
|
|
|
|
0
|
foreach $rule ( values %{$self->{"rules"}} ) |
|
0
|
|
|
|
|
0
|
|
2947
|
|
|
|
|
|
|
{ |
2948
|
0
|
0
|
|
|
|
0
|
if ($rule->{"changed"}) |
2949
|
|
|
|
|
|
|
{ |
2950
|
0
|
|
|
|
|
0
|
$code .= $rule->code($self->{"namespace"},$self); |
2951
|
0
|
|
|
|
|
0
|
$rule->{"changed"} = 0; |
2952
|
|
|
|
|
|
|
} |
2953
|
|
|
|
|
|
|
} |
2954
|
|
|
|
|
|
|
|
2955
|
0
|
|
|
|
|
0
|
return $code; |
2956
|
|
|
|
|
|
|
} |
2957
|
|
|
|
|
|
|
|
2958
|
|
|
|
|
|
|
|
2959
|
|
|
|
|
|
|
# EXECUTING A PARSE.... |
2960
|
|
|
|
|
|
|
|
2961
|
|
|
|
|
|
|
sub AUTOLOAD # ($parser, $text; $linenum, @args) |
2962
|
|
|
|
|
|
|
{ |
2963
|
14
|
50
|
|
14
|
|
58
|
croak "Could not find method: $AUTOLOAD\n" unless ref $_[0]; |
2964
|
14
|
|
33
|
|
|
59
|
my $class = ref($_[0]) || $_[0]; |
2965
|
14
|
50
|
|
|
|
66
|
my $text = ref($_[1]) eq 'SCALAR' ? ${$_[1]} : "$_[1]"; |
|
0
|
|
|
|
|
0
|
|
2966
|
14
|
|
|
|
|
110
|
$_[0]->{lastlinenum} = _linecount($text); |
2967
|
14
|
50
|
50
|
|
|
83
|
$_[0]->{lastlinenum} += ($_[2]||0) if @_ > 2; |
2968
|
14
|
|
|
|
|
45
|
$_[0]->{offsetlinenum} = $_[0]->{lastlinenum}; |
2969
|
14
|
|
|
|
|
38
|
$_[0]->{fulltext} = $text; |
2970
|
14
|
|
|
|
|
43
|
$_[0]->{fulltextlen} = length $text; |
2971
|
14
|
|
|
|
|
43
|
$_[0]->{linecounter_cache} = {}; |
2972
|
14
|
|
|
|
|
36
|
$_[0]->{deferred} = []; |
2973
|
14
|
|
|
|
|
41
|
$_[0]->{errors} = []; |
2974
|
14
|
|
|
|
|
83
|
my @args = @_[3..$#_]; |
2975
|
14
|
|
|
14
|
|
102
|
my $args = sub { [ @args ] }; |
|
14
|
|
|
|
|
86
|
|
2976
|
|
|
|
|
|
|
|
2977
|
14
|
|
|
|
|
153
|
$AUTOLOAD =~ s/$class/$_[0]->{namespace}/; |
2978
|
2
|
|
|
2
|
|
34
|
no strict "refs"; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
3708
|
|
2979
|
|
|
|
|
|
|
|
2980
|
14
|
|
33
|
|
|
60
|
local $::RD_WARN = $::RD_WARN || $_[0]->{__WARN__}; |
2981
|
14
|
|
33
|
|
|
76
|
local $::RD_HINT = $::RD_HINT || $_[0]->{__HINT__}; |
2982
|
14
|
|
33
|
|
|
58
|
local $::RD_TRACE = $::RD_TRACE || $_[0]->{__TRACE__}; |
2983
|
|
|
|
|
|
|
|
2984
|
14
|
50
|
|
|
|
115
|
croak "Unknown starting rule ($AUTOLOAD) called\n" |
2985
|
|
|
|
|
|
|
unless defined &$AUTOLOAD; |
2986
|
14
|
|
|
|
|
42
|
my $retval = &{$AUTOLOAD}( |
|
14
|
|
|
|
|
91
|
|
2987
|
|
|
|
|
|
|
$_[0], # $parser |
2988
|
|
|
|
|
|
|
$text, # $text |
2989
|
|
|
|
|
|
|
undef, # $repeating |
2990
|
|
|
|
|
|
|
undef, # $_noactions |
2991
|
|
|
|
|
|
|
$args, # \@args |
2992
|
|
|
|
|
|
|
undef, # $_itempos |
2993
|
|
|
|
|
|
|
); |
2994
|
|
|
|
|
|
|
|
2995
|
|
|
|
|
|
|
|
2996
|
14
|
100
|
|
|
|
54
|
if (defined $retval) |
2997
|
|
|
|
|
|
|
{ |
2998
|
12
|
|
|
|
|
29
|
foreach ( @{$_[0]->{deferred}} ) { &$_; } |
|
12
|
|
|
|
|
66
|
|
|
0
|
|
|
|
|
0
|
|
2999
|
|
|
|
|
|
|
} |
3000
|
|
|
|
|
|
|
else |
3001
|
|
|
|
|
|
|
{ |
3002
|
2
|
|
|
|
|
4
|
foreach ( @{$_[0]->{errors}} ) { _error(@$_); } |
|
2
|
|
|
|
|
11
|
|
|
0
|
|
|
|
|
0
|
|
3003
|
|
|
|
|
|
|
} |
3004
|
|
|
|
|
|
|
|
3005
|
14
|
50
|
|
|
|
63
|
if (ref $_[1] eq 'SCALAR') { ${$_[1]} = $text } |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
3006
|
|
|
|
|
|
|
|
3007
|
14
|
|
|
|
|
31
|
$ERRORS = 0; |
3008
|
14
|
|
|
|
|
146
|
return $retval; |
3009
|
|
|
|
|
|
|
} |
3010
|
|
|
|
|
|
|
|
3011
|
|
|
|
|
|
|
sub _parserepeat($$$$$$$$$) # RETURNS A REF TO AN ARRAY OF MATCHES |
3012
|
|
|
|
|
|
|
{ |
3013
|
0
|
|
|
0
|
|
0
|
my ($parser, $text, $prod, $min, $max, $_noactions, $expectation, $argcode, $_itempos) = @_; |
3014
|
0
|
|
|
|
|
0
|
my @tokens = (); |
3015
|
|
|
|
|
|
|
|
3016
|
0
|
|
|
|
|
0
|
my $itemposfirst; |
3017
|
|
|
|
|
|
|
my $reps; |
3018
|
0
|
|
|
|
|
0
|
for ($reps=0; $reps<$max;) |
3019
|
|
|
|
|
|
|
{ |
3020
|
0
|
|
|
|
|
0
|
$expectation->at($text); |
3021
|
0
|
|
|
|
|
0
|
my $_savetext = $text; |
3022
|
0
|
|
|
|
|
0
|
my $prevtextlen = length $text; |
3023
|
0
|
|
|
|
|
0
|
my $_tok; |
3024
|
0
|
0
|
|
|
|
0
|
if (! defined ($_tok = &$prod($parser,$text,1,$_noactions,$argcode,$_itempos))) |
3025
|
|
|
|
|
|
|
{ |
3026
|
0
|
|
|
|
|
0
|
$text = $_savetext; |
3027
|
0
|
|
|
|
|
0
|
last; |
3028
|
|
|
|
|
|
|
} |
3029
|
|
|
|
|
|
|
|
3030
|
0
|
0
|
0
|
|
|
0
|
if (defined($_itempos) and !defined($itemposfirst)) |
3031
|
|
|
|
|
|
|
{ |
3032
|
0
|
|
|
|
|
0
|
$itemposfirst = Parse::RecDescent::_Runtime::Production::_duplicate_itempos($_itempos); |
3033
|
|
|
|
|
|
|
} |
3034
|
|
|
|
|
|
|
|
3035
|
0
|
0
|
|
|
|
0
|
push @tokens, $_tok if defined $_tok; |
3036
|
0
|
0
|
0
|
|
|
0
|
last if ++$reps >= $min and $prevtextlen == length $text; |
3037
|
|
|
|
|
|
|
} |
3038
|
|
|
|
|
|
|
|
3039
|
0
|
0
|
|
|
|
0
|
do { $expectation->failed(); return undef} if $reps<$min; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
3040
|
|
|
|
|
|
|
|
3041
|
0
|
0
|
|
|
|
0
|
if (defined $itemposfirst) |
3042
|
|
|
|
|
|
|
{ |
3043
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::Production::_update_itempos($_itempos, $itemposfirst, undef, [qw(from)]); |
3044
|
|
|
|
|
|
|
} |
3045
|
|
|
|
|
|
|
|
3046
|
0
|
|
|
|
|
0
|
$_[1] = $text; |
3047
|
0
|
|
|
|
|
0
|
return [@tokens]; |
3048
|
|
|
|
|
|
|
} |
3049
|
|
|
|
|
|
|
|
3050
|
|
|
|
|
|
|
sub set_autoflush { |
3051
|
0
|
|
|
0
|
|
0
|
my $orig_selected = select $_[0]; |
3052
|
0
|
|
|
|
|
0
|
$| = 1; |
3053
|
0
|
|
|
|
|
0
|
select $orig_selected; |
3054
|
0
|
|
|
|
|
0
|
return; |
3055
|
|
|
|
|
|
|
} |
3056
|
|
|
|
|
|
|
|
3057
|
|
|
|
|
|
|
# ERROR REPORTING.... |
3058
|
|
|
|
|
|
|
|
3059
|
|
|
|
|
|
|
sub _write_ERROR { |
3060
|
0
|
|
|
0
|
|
0
|
my ($errorprefix, $errortext) = @_; |
3061
|
0
|
0
|
|
|
|
0
|
return if $errortext !~ /\S/; |
3062
|
0
|
|
|
|
|
0
|
$errorprefix =~ s/\s+\Z//; |
3063
|
0
|
|
|
|
|
0
|
local $^A = q{}; |
3064
|
|
|
|
|
|
|
|
3065
|
0
|
|
|
|
|
0
|
formline(<<'END_FORMAT', $errorprefix, $errortext); |
3066
|
|
|
|
|
|
|
@>>>>>>>>>>>>>>>>>>>>: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
3067
|
|
|
|
|
|
|
END_FORMAT |
3068
|
0
|
|
|
|
|
0
|
formline(<<'END_FORMAT', $errortext); |
3069
|
|
|
|
|
|
|
~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
3070
|
|
|
|
|
|
|
END_FORMAT |
3071
|
0
|
|
|
|
|
0
|
print {*STDERR} $^A; |
|
0
|
|
|
|
|
0
|
|
3072
|
|
|
|
|
|
|
} |
3073
|
|
|
|
|
|
|
|
3074
|
|
|
|
|
|
|
# TRACING |
3075
|
|
|
|
|
|
|
|
3076
|
|
|
|
|
|
|
my $TRACE_FORMAT = <<'END_FORMAT'; |
3077
|
|
|
|
|
|
|
@>|@|||||||||@^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<| |
3078
|
|
|
|
|
|
|
| ~~ |^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<| |
3079
|
|
|
|
|
|
|
END_FORMAT |
3080
|
|
|
|
|
|
|
|
3081
|
|
|
|
|
|
|
my $TRACECONTEXT_FORMAT = <<'END_FORMAT'; |
3082
|
|
|
|
|
|
|
@>|@|||||||||@ |^<<<<<<<<<<<<<<<<<<<<<<<<<<< |
3083
|
|
|
|
|
|
|
| ~~ | |^<<<<<<<<<<<<<<<<<<<<<<<<<<< |
3084
|
|
|
|
|
|
|
END_FORMAT |
3085
|
|
|
|
|
|
|
|
3086
|
|
|
|
|
|
|
sub _write_TRACE { |
3087
|
0
|
|
|
0
|
|
0
|
my ($tracelevel, $tracerulename, $tracemsg) = @_; |
3088
|
0
|
0
|
|
|
|
0
|
return if $tracemsg !~ /\S/; |
3089
|
0
|
|
|
|
|
0
|
$tracemsg =~ s/\s*\Z//; |
3090
|
0
|
|
|
|
|
0
|
local $^A = q{}; |
3091
|
0
|
|
|
|
|
0
|
my $bar = '|'; |
3092
|
0
|
|
|
|
|
0
|
formline($TRACE_FORMAT, $tracelevel, $tracerulename, $bar, $tracemsg, $tracemsg); |
3093
|
0
|
|
|
|
|
0
|
print {*STDERR} $^A; |
|
0
|
|
|
|
|
0
|
|
3094
|
|
|
|
|
|
|
} |
3095
|
|
|
|
|
|
|
|
3096
|
|
|
|
|
|
|
sub _write_TRACECONTEXT { |
3097
|
0
|
|
|
0
|
|
0
|
my ($tracelevel, $tracerulename, $tracecontext) = @_; |
3098
|
0
|
0
|
|
|
|
0
|
return if $tracecontext !~ /\S/; |
3099
|
0
|
|
|
|
|
0
|
$tracecontext =~ s/\s*\Z//; |
3100
|
0
|
|
|
|
|
0
|
local $^A = q{}; |
3101
|
0
|
|
|
|
|
0
|
my $bar = '|'; |
3102
|
0
|
|
|
|
|
0
|
formline($TRACECONTEXT_FORMAT, $tracelevel, $tracerulename, $bar, $tracecontext, $tracecontext); |
3103
|
0
|
|
|
|
|
0
|
print {*STDERR} $^A; |
|
0
|
|
|
|
|
0
|
|
3104
|
|
|
|
|
|
|
} |
3105
|
|
|
|
|
|
|
|
3106
|
|
|
|
|
|
|
sub _verbosity($) |
3107
|
|
|
|
|
|
|
{ |
3108
|
0
|
0
|
0
|
0
|
|
0
|
defined $::RD_TRACE |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
3109
|
|
|
|
|
|
|
or defined $::RD_HINT and $::RD_HINT and $_[0] =~ /ERRORS|WARN|HINT/ |
3110
|
|
|
|
|
|
|
or defined $::RD_WARN and $::RD_WARN and $_[0] =~ /ERRORS|WARN/ |
3111
|
|
|
|
|
|
|
or defined $::RD_ERRORS and $::RD_ERRORS and $_[0] =~ /ERRORS/ |
3112
|
|
|
|
|
|
|
} |
3113
|
|
|
|
|
|
|
|
3114
|
|
|
|
|
|
|
sub _error($;$) |
3115
|
|
|
|
|
|
|
{ |
3116
|
0
|
|
|
0
|
|
0
|
$ERRORS++; |
3117
|
0
|
0
|
|
|
|
0
|
return 0 if ! _verbosity("ERRORS"); |
3118
|
0
|
|
|
|
|
0
|
my $errortext = $_[0]; |
3119
|
0
|
0
|
|
|
|
0
|
my $errorprefix = "ERROR" . ($_[1] ? " (line $_[1])" : ""); |
3120
|
0
|
|
|
|
|
0
|
$errortext =~ s/\s+/ /g; |
3121
|
0
|
0
|
|
|
|
0
|
print {*STDERR} "\n" if _verbosity("WARN"); |
|
0
|
|
|
|
|
0
|
|
3122
|
0
|
|
|
|
|
0
|
_write_ERROR($errorprefix, $errortext); |
3123
|
0
|
|
|
|
|
0
|
return 1; |
3124
|
|
|
|
|
|
|
} |
3125
|
|
|
|
|
|
|
|
3126
|
|
|
|
|
|
|
sub _warn($$;$) |
3127
|
|
|
|
|
|
|
{ |
3128
|
0
|
0
|
0
|
0
|
|
0
|
return 0 unless _verbosity("WARN") && ($::RD_HINT || $_[0] >= ($::RD_WARN||1)); |
|
|
|
0
|
|
|
|
|
3129
|
0
|
|
|
|
|
0
|
my $errortext = $_[1]; |
3130
|
0
|
0
|
|
|
|
0
|
my $errorprefix = "Warning" . ($_[2] ? " (line $_[2])" : ""); |
3131
|
0
|
0
|
|
|
|
0
|
print {*STDERR} "\n" if _verbosity("HINT"); |
|
0
|
|
|
|
|
0
|
|
3132
|
0
|
|
|
|
|
0
|
$errortext =~ s/\s+/ /g; |
3133
|
0
|
|
|
|
|
0
|
_write_ERROR($errorprefix, $errortext); |
3134
|
0
|
|
|
|
|
0
|
return 1; |
3135
|
|
|
|
|
|
|
} |
3136
|
|
|
|
|
|
|
|
3137
|
|
|
|
|
|
|
sub _hint($) |
3138
|
|
|
|
|
|
|
{ |
3139
|
0
|
0
|
|
0
|
|
0
|
return 0 unless $::RD_HINT; |
3140
|
0
|
|
|
|
|
0
|
my $errortext = $_[0]; |
3141
|
0
|
0
|
|
|
|
0
|
my $errorprefix = "Hint" . ($_[1] ? " (line $_[1])" : ""); |
3142
|
0
|
|
|
|
|
0
|
$errortext =~ s/\s+/ /g; |
3143
|
0
|
|
|
|
|
0
|
_write_ERROR($errorprefix, $errortext); |
3144
|
0
|
|
|
|
|
0
|
return 1; |
3145
|
|
|
|
|
|
|
} |
3146
|
|
|
|
|
|
|
|
3147
|
|
|
|
|
|
|
sub _tracemax($) |
3148
|
|
|
|
|
|
|
{ |
3149
|
0
|
0
|
0
|
0
|
|
0
|
if (defined $::RD_TRACE |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
3150
|
|
|
|
|
|
|
&& $::RD_TRACE =~ /\d+/ |
3151
|
|
|
|
|
|
|
&& $::RD_TRACE>1 |
3152
|
|
|
|
|
|
|
&& $::RD_TRACE+10<length($_[0])) |
3153
|
|
|
|
|
|
|
{ |
3154
|
0
|
|
|
|
|
0
|
my $count = length($_[0]) - $::RD_TRACE; |
3155
|
0
|
|
|
|
|
0
|
return substr($_[0],0,$::RD_TRACE/2) |
3156
|
|
|
|
|
|
|
. "...<$count>..." |
3157
|
|
|
|
|
|
|
. substr($_[0],-$::RD_TRACE/2); |
3158
|
|
|
|
|
|
|
} |
3159
|
|
|
|
|
|
|
else |
3160
|
|
|
|
|
|
|
{ |
3161
|
0
|
|
|
|
|
0
|
return substr($_[0],0,500); |
3162
|
|
|
|
|
|
|
} |
3163
|
|
|
|
|
|
|
} |
3164
|
|
|
|
|
|
|
|
3165
|
|
|
|
|
|
|
sub _tracefirst($) |
3166
|
|
|
|
|
|
|
{ |
3167
|
0
|
0
|
0
|
0
|
|
0
|
if (defined $::RD_TRACE |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
3168
|
|
|
|
|
|
|
&& $::RD_TRACE =~ /\d+/ |
3169
|
|
|
|
|
|
|
&& $::RD_TRACE>1 |
3170
|
|
|
|
|
|
|
&& $::RD_TRACE+10<length($_[0])) |
3171
|
|
|
|
|
|
|
{ |
3172
|
0
|
|
|
|
|
0
|
my $count = length($_[0]) - $::RD_TRACE; |
3173
|
0
|
|
|
|
|
0
|
return substr($_[0],0,$::RD_TRACE) . "...<+$count>"; |
3174
|
|
|
|
|
|
|
} |
3175
|
|
|
|
|
|
|
else |
3176
|
|
|
|
|
|
|
{ |
3177
|
0
|
|
|
|
|
0
|
return substr($_[0],0,500); |
3178
|
|
|
|
|
|
|
} |
3179
|
|
|
|
|
|
|
} |
3180
|
|
|
|
|
|
|
|
3181
|
|
|
|
|
|
|
my $lastcontext = ''; |
3182
|
|
|
|
|
|
|
my $lastrulename = ''; |
3183
|
|
|
|
|
|
|
my $lastlevel = ''; |
3184
|
|
|
|
|
|
|
|
3185
|
|
|
|
|
|
|
sub _trace($;$$$) |
3186
|
|
|
|
|
|
|
{ |
3187
|
0
|
|
|
0
|
|
0
|
my $tracemsg = $_[0]; |
3188
|
0
|
|
0
|
|
|
0
|
my $tracecontext = $_[1]||$lastcontext; |
3189
|
0
|
|
0
|
|
|
0
|
my $tracerulename = $_[2]||$lastrulename; |
3190
|
0
|
|
0
|
|
|
0
|
my $tracelevel = $_[3]||$lastlevel; |
3191
|
0
|
0
|
|
|
|
0
|
if ($tracerulename) { $lastrulename = $tracerulename } |
|
0
|
|
|
|
|
0
|
|
3192
|
0
|
0
|
|
|
|
0
|
if ($tracelevel) { $lastlevel = $tracelevel } |
|
0
|
|
|
|
|
0
|
|
3193
|
|
|
|
|
|
|
|
3194
|
0
|
|
|
|
|
0
|
$tracecontext =~ s/\n/\\n/g; |
3195
|
0
|
|
|
|
|
0
|
$tracecontext =~ s/\s+/ /g; |
3196
|
0
|
|
|
|
|
0
|
$tracerulename = qq{$tracerulename}; |
3197
|
0
|
|
|
|
|
0
|
_write_TRACE($tracelevel, $tracerulename, $tracemsg); |
3198
|
0
|
0
|
|
|
|
0
|
if ($tracecontext ne $lastcontext) |
3199
|
|
|
|
|
|
|
{ |
3200
|
0
|
0
|
|
|
|
0
|
if ($tracecontext) |
3201
|
|
|
|
|
|
|
{ |
3202
|
0
|
|
|
|
|
0
|
$lastcontext = _tracefirst($tracecontext); |
3203
|
0
|
|
|
|
|
0
|
$tracecontext = qq{"$tracecontext"}; |
3204
|
|
|
|
|
|
|
} |
3205
|
|
|
|
|
|
|
else |
3206
|
|
|
|
|
|
|
{ |
3207
|
0
|
|
|
|
|
0
|
$tracecontext = qq{<NO TEXT LEFT>}; |
3208
|
|
|
|
|
|
|
} |
3209
|
0
|
|
|
|
|
0
|
_write_TRACECONTEXT($tracelevel, $tracerulename, $tracecontext); |
3210
|
|
|
|
|
|
|
} |
3211
|
|
|
|
|
|
|
} |
3212
|
|
|
|
|
|
|
|
3213
|
|
|
|
|
|
|
sub _matchtracemessage |
3214
|
|
|
|
|
|
|
{ |
3215
|
0
|
|
|
0
|
|
0
|
my ($self, $reject) = @_; |
3216
|
|
|
|
|
|
|
|
3217
|
0
|
|
|
|
|
0
|
my $prefix = ''; |
3218
|
0
|
|
|
|
|
0
|
my $postfix = ''; |
3219
|
0
|
|
|
|
|
0
|
my $matched = not $reject; |
3220
|
0
|
|
|
|
|
0
|
my @t = ("Matched", "Didn't match"); |
3221
|
0
|
0
|
0
|
|
|
0
|
if (exists $self->{lookahead} and $self->{lookahead}) |
3222
|
|
|
|
|
|
|
{ |
3223
|
0
|
0
|
|
|
|
0
|
$postfix = $reject ? "(reject)" : "(keep)"; |
3224
|
0
|
|
|
|
|
0
|
$prefix = "..."; |
3225
|
0
|
0
|
|
|
|
0
|
if ($self->{lookahead} < 0) |
3226
|
|
|
|
|
|
|
{ |
3227
|
0
|
|
|
|
|
0
|
$prefix .= '!'; |
3228
|
0
|
|
|
|
|
0
|
$matched = not $matched; |
3229
|
|
|
|
|
|
|
} |
3230
|
|
|
|
|
|
|
} |
3231
|
0
|
0
|
|
|
|
0
|
$prefix . ($matched ? $t[0] : $t[1]) . $postfix; |
3232
|
|
|
|
|
|
|
} |
3233
|
|
|
|
|
|
|
|
3234
|
|
|
|
|
|
|
sub _parseunneg($$$$$) |
3235
|
|
|
|
|
|
|
{ |
3236
|
0
|
|
|
0
|
|
0
|
_parse($_[0],$_[1],$_[3],$_[4]); |
3237
|
0
|
0
|
|
|
|
0
|
if ($_[2]<0) |
3238
|
|
|
|
|
|
|
{ |
3239
|
0
|
|
|
|
|
0
|
_error("Can't negate \"$_[4]\".",$_[3]); |
3240
|
0
|
|
|
|
|
0
|
_hint("You can't negate $_[0]. Remove the \"...!\" before |
3241
|
|
|
|
|
|
|
\"$_[4]\"."); |
3242
|
0
|
|
|
|
|
0
|
return 0; |
3243
|
|
|
|
|
|
|
} |
3244
|
0
|
|
|
|
|
0
|
return 1; |
3245
|
|
|
|
|
|
|
} |
3246
|
|
|
|
|
|
|
|
3247
|
|
|
|
|
|
|
sub _parse($$$$) |
3248
|
|
|
|
|
|
|
{ |
3249
|
0
|
|
|
0
|
|
0
|
my $what = $_[3]; |
3250
|
0
|
|
|
|
|
0
|
$what =~ s/^\s+//; |
3251
|
0
|
0
|
|
|
|
0
|
if ($_[1]) |
3252
|
|
|
|
|
|
|
{ |
3253
|
0
|
0
|
|
|
|
0
|
_warn(3,"Found $_[0] ($what) after an unconditional <error>",$_[2]) |
3254
|
|
|
|
|
|
|
and |
3255
|
|
|
|
|
|
|
_hint("An unconditional <error> always causes the |
3256
|
|
|
|
|
|
|
production containing it to immediately fail. |
3257
|
|
|
|
|
|
|
\u$_[0] that follows an <error> |
3258
|
|
|
|
|
|
|
will never be reached. Did you mean to use |
3259
|
|
|
|
|
|
|
<error?> instead?"); |
3260
|
|
|
|
|
|
|
} |
3261
|
|
|
|
|
|
|
|
3262
|
0
|
0
|
|
|
|
0
|
return if ! _verbosity("TRACE"); |
3263
|
0
|
|
|
|
|
0
|
my $errortext = "Treating \"$what\" as $_[0]"; |
3264
|
0
|
|
|
|
|
0
|
my $errorprefix = "Parse::RecDescent::_Runtime"; |
3265
|
0
|
|
|
|
|
0
|
$errortext =~ s/\s+/ /g; |
3266
|
0
|
|
|
|
|
0
|
_write_ERROR($errorprefix, $errortext); |
3267
|
|
|
|
|
|
|
} |
3268
|
|
|
|
|
|
|
|
3269
|
|
|
|
|
|
|
sub _linecount($) { |
3270
|
14
|
|
50
|
14
|
|
164
|
scalar substr($_[0], pos $_[0]||0) =~ tr/\n// |
3271
|
|
|
|
|
|
|
} |
3272
|
|
|
|
|
|
|
|
3273
|
|
|
|
|
|
|
|
3274
|
|
|
|
|
|
|
package main; |
3275
|
|
|
|
|
|
|
|
3276
|
2
|
|
|
2
|
|
17
|
use vars qw ( $RD_ERRORS $RD_WARN $RD_HINT $RD_TRACE $RD_CHECK ); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
273
|
|
3277
|
|
|
|
|
|
|
$::RD_CHECK = 1; |
3278
|
|
|
|
|
|
|
$::RD_ERRORS = 1; |
3279
|
|
|
|
|
|
|
$::RD_WARN = 3; |
3280
|
|
|
|
|
|
|
|
3281
|
|
|
|
|
|
|
1; |
3282
|
|
|
|
|
|
|
|
3283
|
|
|
|
|
|
|
} |
3284
|
|
|
|
|
|
|
|
3285
|
|
|
|
|
|
|
package Treex::Core::ScenarioParser; |
3286
|
|
|
|
|
|
|
|
3287
|
|
|
|
|
|
|
{ my $ERRORS; |
3288
|
|
|
|
|
|
|
|
3289
|
|
|
|
|
|
|
|
3290
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser; |
3291
|
2
|
|
|
2
|
|
17
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
67
|
|
3292
|
2
|
|
|
2
|
|
15
|
use vars qw($skip $AUTOLOAD ); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
156
|
|
3293
|
|
|
|
|
|
|
@Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::ISA = (); |
3294
|
|
|
|
|
|
|
$skip = '\s*'; |
3295
|
|
|
|
|
|
|
|
3296
|
2
|
|
|
2
|
|
15
|
use File::Slurp; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
179
|
|
3297
|
2
|
|
|
2
|
|
13
|
use File::Basename; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
116
|
|
3298
|
2
|
|
|
2
|
|
13
|
use Treex::Core::Log; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
132
|
|
3299
|
|
|
|
|
|
|
## no critic (Miscellanea::ProhibitUnrestrictedNoCritic) |
3300
|
|
|
|
|
|
|
## no critic Generated code follows |
3301
|
2
|
|
|
2
|
|
15
|
no warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
168
|
|
3302
|
|
|
|
|
|
|
; |
3303
|
|
|
|
|
|
|
|
3304
|
|
|
|
|
|
|
|
3305
|
|
|
|
|
|
|
{ |
3306
|
|
|
|
|
|
|
local $SIG{__WARN__} = sub {0}; |
3307
|
|
|
|
|
|
|
# PRETEND TO BE IN Parse::RecDescent::_Runtime NAMESPACE |
3308
|
|
|
|
|
|
|
*Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::AUTOLOAD = sub |
3309
|
|
|
|
|
|
|
{ |
3310
|
2
|
|
|
2
|
|
16
|
no strict 'refs'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
285
|
|
3311
|
|
|
|
|
|
|
|
3312
|
0
|
|
|
0
|
|
0
|
${"AUTOLOAD"} =~ s/^Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser/Parse::RecDescent::_Runtime/; |
|
0
|
|
|
|
|
0
|
|
3313
|
0
|
|
|
|
|
0
|
goto &{${"AUTOLOAD"}}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
3314
|
|
|
|
|
|
|
} |
3315
|
|
|
|
|
|
|
} |
3316
|
|
|
|
|
|
|
|
3317
|
|
|
|
|
|
|
push @Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::ISA, 'Parse::RecDescent::_Runtime'; |
3318
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
3319
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PNOTQUOTED |
3320
|
|
|
|
|
|
|
{ |
3321
|
38
|
|
|
38
|
|
70
|
my $thisparser = $_[0]; |
3322
|
2
|
|
|
2
|
|
13
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
1146
|
|
3323
|
38
|
|
50
|
|
|
110
|
local $tracelevel = ($tracelevel||0)+1; |
3324
|
38
|
|
|
|
|
65
|
$ERRORS = 0; |
3325
|
38
|
|
|
|
|
93
|
my $thisrule = $thisparser->{"rules"}{"PNOTQUOTED"}; |
3326
|
|
|
|
|
|
|
|
3327
|
38
|
50
|
|
|
|
91
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [PNOTQUOTED]}, |
3328
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3329
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3330
|
|
|
|
|
|
|
$tracelevel) |
3331
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3332
|
|
|
|
|
|
|
|
3333
|
|
|
|
|
|
|
|
3334
|
38
|
|
|
|
|
58
|
my $err_at = @{$thisparser->{errors}}; |
|
38
|
|
|
|
|
83
|
|
3335
|
|
|
|
|
|
|
|
3336
|
38
|
|
|
|
|
113
|
my $score; |
3337
|
|
|
|
|
|
|
my $score_return; |
3338
|
38
|
|
|
|
|
0
|
my $_tok; |
3339
|
38
|
|
|
|
|
59
|
my $return = undef; |
3340
|
38
|
|
|
|
|
58
|
my $_matched=0; |
3341
|
38
|
|
|
|
|
67
|
my $commit=0; |
3342
|
38
|
|
|
|
|
73
|
my @item = (); |
3343
|
38
|
|
|
|
|
110
|
my %item = (); |
3344
|
38
|
|
|
|
|
71
|
my $repeating = $_[2]; |
3345
|
38
|
|
|
|
|
126
|
my $_noactions = $_[3]; |
3346
|
38
|
50
|
|
|
|
113
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
38
|
|
|
|
|
61
|
|
|
38
|
|
|
|
|
86
|
|
3347
|
38
|
|
|
|
|
77
|
my $_itempos = $_[5]; |
3348
|
38
|
50
|
|
|
|
123
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
3349
|
38
|
|
|
|
|
97
|
my $text; |
3350
|
|
|
|
|
|
|
my $lastsep; |
3351
|
38
|
|
|
|
|
0
|
my $current_match; |
3352
|
38
|
|
|
|
|
238
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/\\S+/, or EMPTY}); |
3353
|
38
|
|
|
|
|
124
|
$expectation->at($_[1]); |
3354
|
|
|
|
|
|
|
|
3355
|
38
|
|
|
|
|
65
|
my $thisline; |
3356
|
38
|
|
|
|
|
129
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
3357
|
|
|
|
|
|
|
|
3358
|
|
|
|
|
|
|
|
3359
|
|
|
|
|
|
|
|
3360
|
38
|
|
33
|
|
|
174
|
while (!$_matched && !$commit) |
3361
|
|
|
|
|
|
|
{ |
3362
|
|
|
|
|
|
|
|
3363
|
38
|
50
|
|
|
|
107
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/\\S+/]}, |
3364
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3365
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3366
|
|
|
|
|
|
|
$tracelevel) |
3367
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3368
|
38
|
|
|
|
|
86
|
my $thisprod = $thisrule->{"prods"}[0]; |
3369
|
38
|
|
|
|
|
89
|
$text = $_[1]; |
3370
|
38
|
|
|
|
|
63
|
my $_savetext; |
3371
|
38
|
|
|
|
|
81
|
@item = (q{PNOTQUOTED}); |
3372
|
38
|
|
|
|
|
140
|
%item = (__RULE__ => q{PNOTQUOTED}); |
3373
|
38
|
|
|
|
|
77
|
my $repcount = 0; |
3374
|
|
|
|
|
|
|
|
3375
|
|
|
|
|
|
|
|
3376
|
38
|
50
|
|
|
|
109
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/\\S+/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
3377
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3378
|
|
|
|
|
|
|
$tracelevel) |
3379
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3380
|
38
|
|
|
|
|
82
|
undef $lastsep; |
3381
|
38
|
|
|
|
|
108
|
$expectation->is(q{})->at($text); |
3382
|
|
|
|
|
|
|
|
3383
|
|
|
|
|
|
|
|
3384
|
38
|
50
|
33
|
|
|
248
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\S+)/) |
|
38
|
50
|
|
|
|
355
|
|
3385
|
|
|
|
|
|
|
{ |
3386
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
3387
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
3388
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
3389
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3390
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3391
|
|
|
|
|
|
|
|
3392
|
0
|
|
|
|
|
0
|
last; |
3393
|
|
|
|
|
|
|
} |
3394
|
38
|
|
|
|
|
207
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
3395
|
38
|
|
|
|
|
148
|
substr($text,0,length($current_match),q{}); |
3396
|
38
|
50
|
|
|
|
103
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
3397
|
|
|
|
|
|
|
. $current_match . q{])}, |
3398
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3399
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3400
|
38
|
|
|
|
|
112
|
push @item, $item{__PATTERN1__}=$current_match; |
3401
|
|
|
|
|
|
|
|
3402
|
|
|
|
|
|
|
|
3403
|
38
|
50
|
|
|
|
103
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
3404
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3405
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3406
|
|
|
|
|
|
|
$tracelevel) |
3407
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3408
|
|
|
|
|
|
|
|
3409
|
|
|
|
|
|
|
|
3410
|
38
|
50
|
|
|
|
93
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1]}; |
|
38
|
|
|
|
|
88
|
|
3411
|
38
|
50
|
|
|
|
211
|
unless (defined $_tok) |
3412
|
|
|
|
|
|
|
{ |
3413
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
3414
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3415
|
0
|
|
|
|
|
0
|
last; |
3416
|
|
|
|
|
|
|
} |
3417
|
38
|
50
|
|
|
|
102
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
3418
|
|
|
|
|
|
|
. $_tok . q{])}, |
3419
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3420
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3421
|
38
|
|
|
|
|
71
|
push @item, $_tok; |
3422
|
38
|
|
|
|
|
94
|
$item{__ACTION1__}=$_tok; |
3423
|
|
|
|
|
|
|
|
3424
|
|
|
|
|
|
|
|
3425
|
38
|
50
|
|
|
|
96
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/\\S+/]<<}, |
3426
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3427
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3428
|
|
|
|
|
|
|
$tracelevel) |
3429
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3430
|
|
|
|
|
|
|
|
3431
|
|
|
|
|
|
|
|
3432
|
|
|
|
|
|
|
|
3433
|
38
|
|
|
|
|
66
|
$_matched = 1; |
3434
|
38
|
|
|
|
|
76
|
last; |
3435
|
|
|
|
|
|
|
} |
3436
|
|
|
|
|
|
|
|
3437
|
|
|
|
|
|
|
|
3438
|
38
|
|
33
|
|
|
108
|
while (!$_matched && !$commit) |
3439
|
|
|
|
|
|
|
{ |
3440
|
|
|
|
|
|
|
|
3441
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [EMPTY]}, |
3442
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3443
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3444
|
|
|
|
|
|
|
$tracelevel) |
3445
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3446
|
0
|
|
|
|
|
0
|
my $thisprod = $thisrule->{"prods"}[1]; |
3447
|
0
|
|
|
|
|
0
|
$text = $_[1]; |
3448
|
0
|
|
|
|
|
0
|
my $_savetext; |
3449
|
0
|
|
|
|
|
0
|
@item = (q{PNOTQUOTED}); |
3450
|
0
|
|
|
|
|
0
|
%item = (__RULE__ => q{PNOTQUOTED}); |
3451
|
0
|
|
|
|
|
0
|
my $repcount = 0; |
3452
|
|
|
|
|
|
|
|
3453
|
|
|
|
|
|
|
|
3454
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [EMPTY]}, |
3455
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3456
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3457
|
|
|
|
|
|
|
$tracelevel) |
3458
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3459
|
2
|
|
|
2
|
|
18
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
83
|
|
|
2
|
|
|
|
|
980
|
|
|
0
|
|
|
|
|
0
|
|
3460
|
0
|
|
|
|
|
0
|
$expectation->is(q{})->at($text); |
3461
|
0
|
0
|
|
0
|
|
0
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::EMPTY($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
0
|
|
|
|
|
0
|
|
3462
|
|
|
|
|
|
|
{ |
3463
|
|
|
|
|
|
|
|
3464
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [EMPTY]>>}, |
3465
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3466
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3467
|
|
|
|
|
|
|
$tracelevel) |
3468
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3469
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
3470
|
0
|
|
|
|
|
0
|
last; |
3471
|
|
|
|
|
|
|
} |
3472
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [EMPTY]<< (return value: [} |
3473
|
|
|
|
|
|
|
. $_tok . q{]}, |
3474
|
|
|
|
|
|
|
|
3475
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3476
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3477
|
|
|
|
|
|
|
$tracelevel) |
3478
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3479
|
0
|
|
|
|
|
0
|
$item{q{EMPTY}} = $_tok; |
3480
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
3481
|
|
|
|
|
|
|
|
3482
|
|
|
|
|
|
|
} |
3483
|
|
|
|
|
|
|
|
3484
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
3485
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3486
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3487
|
|
|
|
|
|
|
$tracelevel) |
3488
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3489
|
|
|
|
|
|
|
|
3490
|
|
|
|
|
|
|
|
3491
|
0
|
0
|
|
|
|
0
|
$_tok = ($_noactions) ? 0 : do {$return = ''}; |
|
0
|
|
|
|
|
0
|
|
3492
|
0
|
0
|
|
|
|
0
|
unless (defined $_tok) |
3493
|
|
|
|
|
|
|
{ |
3494
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
3495
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3496
|
0
|
|
|
|
|
0
|
last; |
3497
|
|
|
|
|
|
|
} |
3498
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
3499
|
|
|
|
|
|
|
. $_tok . q{])}, |
3500
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3501
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3502
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
3503
|
0
|
|
|
|
|
0
|
$item{__ACTION1__}=$_tok; |
3504
|
|
|
|
|
|
|
|
3505
|
|
|
|
|
|
|
|
3506
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [EMPTY]<<}, |
3507
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3508
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3509
|
|
|
|
|
|
|
$tracelevel) |
3510
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3511
|
|
|
|
|
|
|
|
3512
|
|
|
|
|
|
|
|
3513
|
|
|
|
|
|
|
|
3514
|
0
|
|
|
|
|
0
|
$_matched = 1; |
3515
|
0
|
|
|
|
|
0
|
last; |
3516
|
|
|
|
|
|
|
} |
3517
|
|
|
|
|
|
|
|
3518
|
|
|
|
|
|
|
|
3519
|
38
|
50
|
33
|
|
|
127
|
unless ( $_matched || defined($score) ) |
3520
|
|
|
|
|
|
|
{ |
3521
|
|
|
|
|
|
|
|
3522
|
|
|
|
|
|
|
|
3523
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
3524
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
3525
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3526
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3527
|
|
|
|
|
|
|
$tracelevel) |
3528
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3529
|
0
|
|
|
|
|
0
|
return undef; |
3530
|
|
|
|
|
|
|
} |
3531
|
38
|
50
|
33
|
|
|
121
|
if (!defined($return) && defined($score)) |
3532
|
|
|
|
|
|
|
{ |
3533
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
3534
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3535
|
|
|
|
|
|
|
$tracelevel) |
3536
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3537
|
0
|
|
|
|
|
0
|
$return = $score_return; |
3538
|
|
|
|
|
|
|
} |
3539
|
38
|
|
|
|
|
80
|
splice @{$thisparser->{errors}}, $err_at; |
|
38
|
|
|
|
|
105
|
|
3540
|
38
|
50
|
|
|
|
105
|
$return = $item[$#item] unless defined $return; |
3541
|
38
|
50
|
|
|
|
98
|
if (defined $::RD_TRACE) |
3542
|
|
|
|
|
|
|
{ |
3543
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
3544
|
|
|
|
|
|
|
$return . q{])}, "", |
3545
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3546
|
|
|
|
|
|
|
$tracelevel); |
3547
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
3548
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
3549
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3550
|
|
|
|
|
|
|
, q{PNOTQUOTED}, |
3551
|
|
|
|
|
|
|
$tracelevel) |
3552
|
|
|
|
|
|
|
} |
3553
|
38
|
|
|
|
|
82
|
$_[1] = $text; |
3554
|
38
|
|
|
|
|
241
|
return $return; |
3555
|
|
|
|
|
|
|
} |
3556
|
|
|
|
|
|
|
|
3557
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
3558
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAMS |
3559
|
|
|
|
|
|
|
{ |
3560
|
89
|
|
|
89
|
|
181
|
my $thisparser = $_[0]; |
3561
|
2
|
|
|
2
|
|
15
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
578
|
|
3562
|
89
|
|
50
|
|
|
271
|
local $tracelevel = ($tracelevel||0)+1; |
3563
|
89
|
|
|
|
|
154
|
$ERRORS = 0; |
3564
|
89
|
|
|
|
|
203
|
my $thisrule = $thisparser->{"rules"}{"PARAMS"}; |
3565
|
|
|
|
|
|
|
|
3566
|
89
|
50
|
|
|
|
225
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [PARAMS]}, |
3567
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3568
|
|
|
|
|
|
|
q{PARAMS}, |
3569
|
|
|
|
|
|
|
$tracelevel) |
3570
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3571
|
|
|
|
|
|
|
|
3572
|
|
|
|
|
|
|
|
3573
|
89
|
|
|
|
|
143
|
my $err_at = @{$thisparser->{errors}}; |
|
89
|
|
|
|
|
195
|
|
3574
|
|
|
|
|
|
|
|
3575
|
89
|
|
|
|
|
253
|
my $score; |
3576
|
|
|
|
|
|
|
my $score_return; |
3577
|
89
|
|
|
|
|
0
|
my $_tok; |
3578
|
89
|
|
|
|
|
163
|
my $return = undef; |
3579
|
89
|
|
|
|
|
174
|
my $_matched=0; |
3580
|
89
|
|
|
|
|
146
|
my $commit=0; |
3581
|
89
|
|
|
|
|
173
|
my @item = (); |
3582
|
89
|
|
|
|
|
178
|
my %item = (); |
3583
|
89
|
|
|
|
|
139
|
my $repeating = $_[2]; |
3584
|
89
|
|
|
|
|
161
|
my $_noactions = $_[3]; |
3585
|
89
|
50
|
|
|
|
238
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
89
|
|
|
|
|
138
|
|
|
89
|
|
|
|
|
186
|
|
3586
|
89
|
|
|
|
|
175
|
my $_itempos = $_[5]; |
3587
|
89
|
50
|
|
|
|
301
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
3588
|
89
|
|
|
|
|
246
|
my $text; |
3589
|
|
|
|
|
|
|
my $lastsep; |
3590
|
89
|
|
|
|
|
0
|
my $current_match; |
3591
|
89
|
|
|
|
|
219
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{PARAM}); |
3592
|
89
|
|
|
|
|
256
|
$expectation->at($_[1]); |
3593
|
|
|
|
|
|
|
|
3594
|
89
|
|
|
|
|
131
|
my $thisline; |
3595
|
89
|
|
|
|
|
330
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
3596
|
|
|
|
|
|
|
|
3597
|
|
|
|
|
|
|
|
3598
|
|
|
|
|
|
|
|
3599
|
89
|
|
33
|
|
|
380
|
while (!$_matched && !$commit) |
3600
|
|
|
|
|
|
|
{ |
3601
|
|
|
|
|
|
|
|
3602
|
89
|
50
|
|
|
|
270
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [PARAM PARAMS]}, |
3603
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3604
|
|
|
|
|
|
|
q{PARAMS}, |
3605
|
|
|
|
|
|
|
$tracelevel) |
3606
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3607
|
89
|
|
|
|
|
218
|
my $thisprod = $thisrule->{"prods"}[0]; |
3608
|
89
|
|
|
|
|
165
|
$text = $_[1]; |
3609
|
89
|
|
|
|
|
142
|
my $_savetext; |
3610
|
89
|
|
|
|
|
211
|
@item = (q{PARAMS}); |
3611
|
89
|
|
|
|
|
213
|
%item = (__RULE__ => q{PARAMS}); |
3612
|
89
|
|
|
|
|
156
|
my $repcount = 0; |
3613
|
|
|
|
|
|
|
|
3614
|
|
|
|
|
|
|
|
3615
|
89
|
50
|
|
|
|
231
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PARAM]}, |
3616
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3617
|
|
|
|
|
|
|
q{PARAMS}, |
3618
|
|
|
|
|
|
|
$tracelevel) |
3619
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3620
|
2
|
|
|
2
|
|
74
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
281
|
|
|
89
|
|
|
|
|
159
|
|
3621
|
89
|
|
|
|
|
233
|
$expectation->is(q{})->at($text); |
3622
|
89
|
100
|
|
89
|
|
399
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAM($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
89
|
|
|
|
|
216
|
|
3623
|
|
|
|
|
|
|
{ |
3624
|
|
|
|
|
|
|
|
3625
|
61
|
50
|
|
|
|
179
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PARAM]>>}, |
3626
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3627
|
|
|
|
|
|
|
q{PARAMS}, |
3628
|
|
|
|
|
|
|
$tracelevel) |
3629
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3630
|
61
|
|
|
|
|
182
|
$expectation->failed(); |
3631
|
61
|
|
|
|
|
123
|
last; |
3632
|
|
|
|
|
|
|
} |
3633
|
28
|
50
|
|
|
|
114
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PARAM]<< (return value: [} |
3634
|
|
|
|
|
|
|
. $_tok . q{]}, |
3635
|
|
|
|
|
|
|
|
3636
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3637
|
|
|
|
|
|
|
q{PARAMS}, |
3638
|
|
|
|
|
|
|
$tracelevel) |
3639
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3640
|
28
|
|
|
|
|
66
|
$item{q{PARAM}} = $_tok; |
3641
|
28
|
|
|
|
|
58
|
push @item, $_tok; |
3642
|
|
|
|
|
|
|
|
3643
|
|
|
|
|
|
|
} |
3644
|
|
|
|
|
|
|
|
3645
|
28
|
50
|
|
|
|
81
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PARAMS]}, |
3646
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3647
|
|
|
|
|
|
|
q{PARAMS}, |
3648
|
|
|
|
|
|
|
$tracelevel) |
3649
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3650
|
2
|
|
|
2
|
|
19
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
724
|
|
|
28
|
|
|
|
|
51
|
|
3651
|
28
|
|
|
|
|
83
|
$expectation->is(q{PARAMS})->at($text); |
3652
|
28
|
100
|
|
28
|
|
161
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAMS($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
28
|
|
|
|
|
72
|
|
3653
|
|
|
|
|
|
|
{ |
3654
|
|
|
|
|
|
|
|
3655
|
26
|
50
|
|
|
|
80
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PARAMS]>>}, |
3656
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3657
|
|
|
|
|
|
|
q{PARAMS}, |
3658
|
|
|
|
|
|
|
$tracelevel) |
3659
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3660
|
26
|
|
|
|
|
77
|
$expectation->failed(); |
3661
|
26
|
|
|
|
|
44
|
last; |
3662
|
|
|
|
|
|
|
} |
3663
|
2
|
50
|
|
|
|
10
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PARAMS]<< (return value: [} |
3664
|
|
|
|
|
|
|
. $_tok . q{]}, |
3665
|
|
|
|
|
|
|
|
3666
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3667
|
|
|
|
|
|
|
q{PARAMS}, |
3668
|
|
|
|
|
|
|
$tracelevel) |
3669
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3670
|
2
|
|
|
|
|
7
|
$item{q{PARAMS}} = $_tok; |
3671
|
2
|
|
|
|
|
6
|
push @item, $_tok; |
3672
|
|
|
|
|
|
|
|
3673
|
|
|
|
|
|
|
} |
3674
|
|
|
|
|
|
|
|
3675
|
2
|
50
|
|
|
|
7
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
3676
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3677
|
|
|
|
|
|
|
q{PARAMS}, |
3678
|
|
|
|
|
|
|
$tracelevel) |
3679
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3680
|
|
|
|
|
|
|
|
3681
|
|
|
|
|
|
|
|
3682
|
2
|
50
|
|
|
|
6
|
$_tok = ($_noactions) ? 0 : do {$return = [$item{PARAM}, @{$item{PARAMS}}]}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
6
|
|
3683
|
2
|
50
|
|
|
|
6
|
unless (defined $_tok) |
3684
|
|
|
|
|
|
|
{ |
3685
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
3686
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3687
|
0
|
|
|
|
|
0
|
last; |
3688
|
|
|
|
|
|
|
} |
3689
|
2
|
50
|
|
|
|
7
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
3690
|
|
|
|
|
|
|
. $_tok . q{])}, |
3691
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3692
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3693
|
2
|
|
|
|
|
4
|
push @item, $_tok; |
3694
|
2
|
|
|
|
|
5
|
$item{__ACTION1__}=$_tok; |
3695
|
|
|
|
|
|
|
|
3696
|
|
|
|
|
|
|
|
3697
|
2
|
50
|
|
|
|
5
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [PARAM PARAMS]<<}, |
3698
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3699
|
|
|
|
|
|
|
q{PARAMS}, |
3700
|
|
|
|
|
|
|
$tracelevel) |
3701
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3702
|
|
|
|
|
|
|
|
3703
|
|
|
|
|
|
|
|
3704
|
|
|
|
|
|
|
|
3705
|
2
|
|
|
|
|
4
|
$_matched = 1; |
3706
|
2
|
|
|
|
|
4
|
last; |
3707
|
|
|
|
|
|
|
} |
3708
|
|
|
|
|
|
|
|
3709
|
|
|
|
|
|
|
|
3710
|
89
|
|
66
|
|
|
421
|
while (!$_matched && !$commit) |
3711
|
|
|
|
|
|
|
{ |
3712
|
|
|
|
|
|
|
|
3713
|
87
|
50
|
|
|
|
235
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [PARAM]}, |
3714
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3715
|
|
|
|
|
|
|
q{PARAMS}, |
3716
|
|
|
|
|
|
|
$tracelevel) |
3717
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3718
|
87
|
|
|
|
|
211
|
my $thisprod = $thisrule->{"prods"}[1]; |
3719
|
87
|
|
|
|
|
172
|
$text = $_[1]; |
3720
|
87
|
|
|
|
|
142
|
my $_savetext; |
3721
|
87
|
|
|
|
|
224
|
@item = (q{PARAMS}); |
3722
|
87
|
|
|
|
|
248
|
%item = (__RULE__ => q{PARAMS}); |
3723
|
87
|
|
|
|
|
156
|
my $repcount = 0; |
3724
|
|
|
|
|
|
|
|
3725
|
|
|
|
|
|
|
|
3726
|
87
|
50
|
|
|
|
242
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PARAM]}, |
3727
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3728
|
|
|
|
|
|
|
q{PARAMS}, |
3729
|
|
|
|
|
|
|
$tracelevel) |
3730
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3731
|
2
|
|
|
2
|
|
17
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
934
|
|
|
87
|
|
|
|
|
142
|
|
3732
|
87
|
|
|
|
|
208
|
$expectation->is(q{})->at($text); |
3733
|
87
|
100
|
|
87
|
|
361
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAM($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
87
|
|
|
|
|
194
|
|
3734
|
|
|
|
|
|
|
{ |
3735
|
|
|
|
|
|
|
|
3736
|
61
|
50
|
|
|
|
191
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PARAM]>>}, |
3737
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3738
|
|
|
|
|
|
|
q{PARAMS}, |
3739
|
|
|
|
|
|
|
$tracelevel) |
3740
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3741
|
61
|
|
|
|
|
179
|
$expectation->failed(); |
3742
|
61
|
|
|
|
|
112
|
last; |
3743
|
|
|
|
|
|
|
} |
3744
|
26
|
50
|
|
|
|
104
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PARAM]<< (return value: [} |
3745
|
|
|
|
|
|
|
. $_tok . q{]}, |
3746
|
|
|
|
|
|
|
|
3747
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3748
|
|
|
|
|
|
|
q{PARAMS}, |
3749
|
|
|
|
|
|
|
$tracelevel) |
3750
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3751
|
26
|
|
|
|
|
63
|
$item{q{PARAM}} = $_tok; |
3752
|
26
|
|
|
|
|
54
|
push @item, $_tok; |
3753
|
|
|
|
|
|
|
|
3754
|
|
|
|
|
|
|
} |
3755
|
|
|
|
|
|
|
|
3756
|
26
|
50
|
|
|
|
74
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
3757
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3758
|
|
|
|
|
|
|
q{PARAMS}, |
3759
|
|
|
|
|
|
|
$tracelevel) |
3760
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3761
|
|
|
|
|
|
|
|
3762
|
|
|
|
|
|
|
|
3763
|
26
|
50
|
|
|
|
74
|
$_tok = ($_noactions) ? 0 : do {$return = [$item{PARAM}]}; |
|
26
|
|
|
|
|
75
|
|
3764
|
26
|
50
|
|
|
|
84
|
unless (defined $_tok) |
3765
|
|
|
|
|
|
|
{ |
3766
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
3767
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3768
|
0
|
|
|
|
|
0
|
last; |
3769
|
|
|
|
|
|
|
} |
3770
|
26
|
50
|
|
|
|
76
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
3771
|
|
|
|
|
|
|
. $_tok . q{])}, |
3772
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3773
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3774
|
26
|
|
|
|
|
53
|
push @item, $_tok; |
3775
|
26
|
|
|
|
|
72
|
$item{__ACTION1__}=$_tok; |
3776
|
|
|
|
|
|
|
|
3777
|
|
|
|
|
|
|
|
3778
|
26
|
50
|
|
|
|
77
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [PARAM]<<}, |
3779
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3780
|
|
|
|
|
|
|
q{PARAMS}, |
3781
|
|
|
|
|
|
|
$tracelevel) |
3782
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3783
|
|
|
|
|
|
|
|
3784
|
|
|
|
|
|
|
|
3785
|
|
|
|
|
|
|
|
3786
|
26
|
|
|
|
|
50
|
$_matched = 1; |
3787
|
26
|
|
|
|
|
44
|
last; |
3788
|
|
|
|
|
|
|
} |
3789
|
|
|
|
|
|
|
|
3790
|
|
|
|
|
|
|
|
3791
|
89
|
100
|
66
|
|
|
705
|
unless ( $_matched || defined($score) ) |
3792
|
|
|
|
|
|
|
{ |
3793
|
|
|
|
|
|
|
|
3794
|
|
|
|
|
|
|
|
3795
|
61
|
|
|
|
|
127
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
3796
|
61
|
50
|
|
|
|
148
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
3797
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3798
|
|
|
|
|
|
|
q{PARAMS}, |
3799
|
|
|
|
|
|
|
$tracelevel) |
3800
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3801
|
61
|
|
|
|
|
336
|
return undef; |
3802
|
|
|
|
|
|
|
} |
3803
|
28
|
50
|
33
|
|
|
111
|
if (!defined($return) && defined($score)) |
3804
|
|
|
|
|
|
|
{ |
3805
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
3806
|
|
|
|
|
|
|
q{PARAMS}, |
3807
|
|
|
|
|
|
|
$tracelevel) |
3808
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3809
|
0
|
|
|
|
|
0
|
$return = $score_return; |
3810
|
|
|
|
|
|
|
} |
3811
|
28
|
|
|
|
|
49
|
splice @{$thisparser->{errors}}, $err_at; |
|
28
|
|
|
|
|
70
|
|
3812
|
28
|
50
|
|
|
|
84
|
$return = $item[$#item] unless defined $return; |
3813
|
28
|
50
|
|
|
|
89
|
if (defined $::RD_TRACE) |
3814
|
|
|
|
|
|
|
{ |
3815
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
3816
|
|
|
|
|
|
|
$return . q{])}, "", |
3817
|
|
|
|
|
|
|
q{PARAMS}, |
3818
|
|
|
|
|
|
|
$tracelevel); |
3819
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
3820
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
3821
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3822
|
|
|
|
|
|
|
, q{PARAMS}, |
3823
|
|
|
|
|
|
|
$tracelevel) |
3824
|
|
|
|
|
|
|
} |
3825
|
28
|
|
|
|
|
74
|
$_[1] = $text; |
3826
|
28
|
|
|
|
|
195
|
return $return; |
3827
|
|
|
|
|
|
|
} |
3828
|
|
|
|
|
|
|
|
3829
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
3830
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAM |
3831
|
|
|
|
|
|
|
{ |
3832
|
176
|
|
|
176
|
|
342
|
my $thisparser = $_[0]; |
3833
|
2
|
|
|
2
|
|
15
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
665
|
|
3834
|
176
|
|
50
|
|
|
514
|
local $tracelevel = ($tracelevel||0)+1; |
3835
|
176
|
|
|
|
|
282
|
$ERRORS = 0; |
3836
|
176
|
|
|
|
|
366
|
my $thisrule = $thisparser->{"rules"}{"PARAM"}; |
3837
|
|
|
|
|
|
|
|
3838
|
176
|
50
|
|
|
|
413
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [PARAM]}, |
3839
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3840
|
|
|
|
|
|
|
q{PARAM}, |
3841
|
|
|
|
|
|
|
$tracelevel) |
3842
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3843
|
|
|
|
|
|
|
|
3844
|
|
|
|
|
|
|
|
3845
|
176
|
|
|
|
|
279
|
my $err_at = @{$thisparser->{errors}}; |
|
176
|
|
|
|
|
383
|
|
3846
|
|
|
|
|
|
|
|
3847
|
176
|
|
|
|
|
456
|
my $score; |
3848
|
|
|
|
|
|
|
my $score_return; |
3849
|
176
|
|
|
|
|
0
|
my $_tok; |
3850
|
176
|
|
|
|
|
286
|
my $return = undef; |
3851
|
176
|
|
|
|
|
281
|
my $_matched=0; |
3852
|
176
|
|
|
|
|
268
|
my $commit=0; |
3853
|
176
|
|
|
|
|
332
|
my @item = (); |
3854
|
176
|
|
|
|
|
344
|
my %item = (); |
3855
|
176
|
|
|
|
|
280
|
my $repeating = $_[2]; |
3856
|
176
|
|
|
|
|
258
|
my $_noactions = $_[3]; |
3857
|
176
|
50
|
|
|
|
452
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
176
|
|
|
|
|
278
|
|
|
176
|
|
|
|
|
354
|
|
3858
|
176
|
|
|
|
|
305
|
my $_itempos = $_[5]; |
3859
|
176
|
50
|
|
|
|
536
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
3860
|
176
|
|
|
|
|
444
|
my $text; |
3861
|
|
|
|
|
|
|
my $lastsep; |
3862
|
176
|
|
|
|
|
0
|
my $current_match; |
3863
|
176
|
|
|
|
|
408
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{PNAME}); |
3864
|
176
|
|
|
|
|
466
|
$expectation->at($_[1]); |
3865
|
|
|
|
|
|
|
|
3866
|
176
|
|
|
|
|
256
|
my $thisline; |
3867
|
176
|
|
|
|
|
540
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
3868
|
|
|
|
|
|
|
|
3869
|
|
|
|
|
|
|
|
3870
|
|
|
|
|
|
|
|
3871
|
176
|
|
33
|
|
|
708
|
while (!$_matched && !$commit) |
3872
|
|
|
|
|
|
|
{ |
3873
|
176
|
50
|
|
|
|
495
|
local $skip = defined($skip) ? $skip : $Parse::RecDescent::_Runtime::skip; |
3874
|
176
|
50
|
|
|
|
408
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [PNAME '=' <skip: qr//> PVALUE]}, |
3875
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3876
|
|
|
|
|
|
|
q{PARAM}, |
3877
|
|
|
|
|
|
|
$tracelevel) |
3878
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3879
|
176
|
|
|
|
|
372
|
my $thisprod = $thisrule->{"prods"}[0]; |
3880
|
176
|
|
|
|
|
326
|
$text = $_[1]; |
3881
|
176
|
|
|
|
|
311
|
my $_savetext; |
3882
|
176
|
|
|
|
|
346
|
@item = (q{PARAM}); |
3883
|
176
|
|
|
|
|
389
|
%item = (__RULE__ => q{PARAM}); |
3884
|
176
|
|
|
|
|
284
|
my $repcount = 0; |
3885
|
|
|
|
|
|
|
|
3886
|
|
|
|
|
|
|
|
3887
|
176
|
50
|
|
|
|
405
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PNAME]}, |
3888
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3889
|
|
|
|
|
|
|
q{PARAM}, |
3890
|
|
|
|
|
|
|
$tracelevel) |
3891
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3892
|
2
|
|
|
2
|
|
14
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
829
|
|
|
176
|
|
|
|
|
260
|
|
3893
|
176
|
|
|
|
|
409
|
$expectation->is(q{})->at($text); |
3894
|
176
|
100
|
|
176
|
|
707
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
176
|
|
|
|
|
396
|
|
3895
|
|
|
|
|
|
|
{ |
3896
|
|
|
|
|
|
|
|
3897
|
70
|
50
|
|
|
|
195
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PNAME]>>}, |
3898
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3899
|
|
|
|
|
|
|
q{PARAM}, |
3900
|
|
|
|
|
|
|
$tracelevel) |
3901
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3902
|
70
|
|
|
|
|
199
|
$expectation->failed(); |
3903
|
70
|
|
|
|
|
176
|
last; |
3904
|
|
|
|
|
|
|
} |
3905
|
106
|
50
|
|
|
|
380
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PNAME]<< (return value: [} |
3906
|
|
|
|
|
|
|
. $_tok . q{]}, |
3907
|
|
|
|
|
|
|
|
3908
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3909
|
|
|
|
|
|
|
q{PARAM}, |
3910
|
|
|
|
|
|
|
$tracelevel) |
3911
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3912
|
106
|
|
|
|
|
210
|
$item{q{PNAME}} = $_tok; |
3913
|
106
|
|
|
|
|
199
|
push @item, $_tok; |
3914
|
|
|
|
|
|
|
|
3915
|
|
|
|
|
|
|
} |
3916
|
|
|
|
|
|
|
|
3917
|
106
|
50
|
|
|
|
230
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: ['=']}, |
3918
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3919
|
|
|
|
|
|
|
q{PARAM}, |
3920
|
|
|
|
|
|
|
$tracelevel) |
3921
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3922
|
106
|
|
|
|
|
178
|
undef $lastsep; |
3923
|
106
|
|
|
|
|
257
|
$expectation->is(q{'='})->at($text); |
3924
|
|
|
|
|
|
|
|
3925
|
|
|
|
|
|
|
|
3926
|
106
|
50
|
66
|
|
|
542
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\=/) |
|
106
|
100
|
|
|
|
812
|
|
3927
|
|
|
|
|
|
|
{ |
3928
|
52
|
50
|
|
|
|
170
|
$text = $lastsep . $text if defined $lastsep; |
3929
|
|
|
|
|
|
|
|
3930
|
52
|
|
|
|
|
150
|
$expectation->failed(); |
3931
|
52
|
50
|
|
|
|
117
|
Parse::RecDescent::_Runtime::_trace(qq{<<Didn't match terminal>>}, |
3932
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3933
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3934
|
52
|
|
|
|
|
111
|
last; |
3935
|
|
|
|
|
|
|
} |
3936
|
54
|
|
|
|
|
295
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
3937
|
54
|
|
|
|
|
164
|
substr($text,0,length($current_match),q{}); |
3938
|
54
|
50
|
|
|
|
140
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
3939
|
|
|
|
|
|
|
. $current_match . q{])}, |
3940
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3941
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3942
|
54
|
|
|
|
|
142
|
push @item, $item{__STRING1__}=$current_match; |
3943
|
|
|
|
|
|
|
|
3944
|
|
|
|
|
|
|
|
3945
|
|
|
|
|
|
|
|
3946
|
|
|
|
|
|
|
|
3947
|
54
|
50
|
|
|
|
134
|
Parse::RecDescent::_Runtime::_trace(q{Trying directive: [<skip: qr//>]}, |
3948
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3949
|
|
|
|
|
|
|
q{PARAM}, |
3950
|
|
|
|
|
|
|
$tracelevel) |
3951
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3952
|
54
|
|
|
|
|
86
|
$_tok = do { my $oldskip = $skip; $skip= qr//; $oldskip }; |
|
54
|
|
|
|
|
92
|
|
|
54
|
|
|
|
|
213
|
|
|
54
|
|
|
|
|
175
|
|
3953
|
54
|
50
|
|
|
|
127
|
if (defined($_tok)) |
3954
|
|
|
|
|
|
|
{ |
3955
|
54
|
50
|
|
|
|
135
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched directive<< (return value: [} |
3956
|
|
|
|
|
|
|
. $_tok . q{])}, |
3957
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3958
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3959
|
|
|
|
|
|
|
} |
3960
|
|
|
|
|
|
|
else |
3961
|
|
|
|
|
|
|
{ |
3962
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match directive>>}, |
3963
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3964
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3965
|
|
|
|
|
|
|
} |
3966
|
|
|
|
|
|
|
|
3967
|
54
|
50
|
|
|
|
129
|
last unless defined $_tok; |
3968
|
54
|
|
|
|
|
137
|
push @item, $item{__DIRECTIVE1__}=$_tok; |
3969
|
|
|
|
|
|
|
|
3970
|
|
|
|
|
|
|
|
3971
|
54
|
50
|
|
|
|
135
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PVALUE]}, |
3972
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3973
|
|
|
|
|
|
|
q{PARAM}, |
3974
|
|
|
|
|
|
|
$tracelevel) |
3975
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3976
|
2
|
|
|
2
|
|
14
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
963
|
|
|
54
|
|
|
|
|
93
|
|
3977
|
54
|
|
|
|
|
130
|
$expectation->is(q{PVALUE})->at($text); |
3978
|
54
|
50
|
|
54
|
|
256
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PVALUE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
54
|
|
|
|
|
126
|
|
3979
|
|
|
|
|
|
|
{ |
3980
|
|
|
|
|
|
|
|
3981
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PVALUE]>>}, |
3982
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3983
|
|
|
|
|
|
|
q{PARAM}, |
3984
|
|
|
|
|
|
|
$tracelevel) |
3985
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3986
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
3987
|
0
|
|
|
|
|
0
|
last; |
3988
|
|
|
|
|
|
|
} |
3989
|
54
|
50
|
|
|
|
203
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PVALUE]<< (return value: [} |
3990
|
|
|
|
|
|
|
. $_tok . q{]}, |
3991
|
|
|
|
|
|
|
|
3992
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3993
|
|
|
|
|
|
|
q{PARAM}, |
3994
|
|
|
|
|
|
|
$tracelevel) |
3995
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3996
|
54
|
|
|
|
|
127
|
$item{q{PVALUE}} = $_tok; |
3997
|
54
|
|
|
|
|
122
|
push @item, $_tok; |
3998
|
|
|
|
|
|
|
|
3999
|
|
|
|
|
|
|
} |
4000
|
|
|
|
|
|
|
|
4001
|
54
|
50
|
|
|
|
134
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
4002
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4003
|
|
|
|
|
|
|
q{PARAM}, |
4004
|
|
|
|
|
|
|
$tracelevel) |
4005
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4006
|
|
|
|
|
|
|
|
4007
|
|
|
|
|
|
|
|
4008
|
54
|
50
|
|
|
|
119
|
$_tok = ($_noactions) ? 0 : do {$return = $item{PNAME}.'='.$item{PVALUE}}; |
|
54
|
|
|
|
|
197
|
|
4009
|
54
|
50
|
|
|
|
158
|
unless (defined $_tok) |
4010
|
|
|
|
|
|
|
{ |
4011
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
4012
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4013
|
0
|
|
|
|
|
0
|
last; |
4014
|
|
|
|
|
|
|
} |
4015
|
54
|
50
|
|
|
|
131
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
4016
|
|
|
|
|
|
|
. $_tok . q{])}, |
4017
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4018
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4019
|
54
|
|
|
|
|
89
|
push @item, $_tok; |
4020
|
54
|
|
|
|
|
114
|
$item{__ACTION1__}=$_tok; |
4021
|
|
|
|
|
|
|
|
4022
|
|
|
|
|
|
|
|
4023
|
54
|
50
|
|
|
|
140
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [PNAME '=' <skip: qr//> PVALUE]<<}, |
4024
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4025
|
|
|
|
|
|
|
q{PARAM}, |
4026
|
|
|
|
|
|
|
$tracelevel) |
4027
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4028
|
|
|
|
|
|
|
|
4029
|
|
|
|
|
|
|
|
4030
|
|
|
|
|
|
|
|
4031
|
54
|
|
|
|
|
89
|
$_matched = 1; |
4032
|
54
|
|
|
|
|
157
|
last; |
4033
|
|
|
|
|
|
|
} |
4034
|
|
|
|
|
|
|
|
4035
|
|
|
|
|
|
|
|
4036
|
176
|
100
|
66
|
|
|
850
|
unless ( $_matched || defined($score) ) |
4037
|
|
|
|
|
|
|
{ |
4038
|
|
|
|
|
|
|
|
4039
|
|
|
|
|
|
|
|
4040
|
122
|
|
|
|
|
245
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
4041
|
122
|
50
|
|
|
|
300
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
4042
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4043
|
|
|
|
|
|
|
q{PARAM}, |
4044
|
|
|
|
|
|
|
$tracelevel) |
4045
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4046
|
122
|
|
|
|
|
674
|
return undef; |
4047
|
|
|
|
|
|
|
} |
4048
|
54
|
50
|
33
|
|
|
178
|
if (!defined($return) && defined($score)) |
4049
|
|
|
|
|
|
|
{ |
4050
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
4051
|
|
|
|
|
|
|
q{PARAM}, |
4052
|
|
|
|
|
|
|
$tracelevel) |
4053
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4054
|
0
|
|
|
|
|
0
|
$return = $score_return; |
4055
|
|
|
|
|
|
|
} |
4056
|
54
|
|
|
|
|
96
|
splice @{$thisparser->{errors}}, $err_at; |
|
54
|
|
|
|
|
114
|
|
4057
|
54
|
50
|
|
|
|
163
|
$return = $item[$#item] unless defined $return; |
4058
|
54
|
50
|
|
|
|
139
|
if (defined $::RD_TRACE) |
4059
|
|
|
|
|
|
|
{ |
4060
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
4061
|
|
|
|
|
|
|
$return . q{])}, "", |
4062
|
|
|
|
|
|
|
q{PARAM}, |
4063
|
|
|
|
|
|
|
$tracelevel); |
4064
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
4065
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
4066
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4067
|
|
|
|
|
|
|
, q{PARAM}, |
4068
|
|
|
|
|
|
|
$tracelevel) |
4069
|
|
|
|
|
|
|
} |
4070
|
54
|
|
|
|
|
111
|
$_[1] = $text; |
4071
|
54
|
|
|
|
|
341
|
return $return; |
4072
|
|
|
|
|
|
|
} |
4073
|
|
|
|
|
|
|
|
4074
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
4075
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::LINE |
4076
|
|
|
|
|
|
|
{ |
4077
|
75
|
|
|
75
|
|
149
|
my $thisparser = $_[0]; |
4078
|
2
|
|
|
2
|
|
14
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
648
|
|
4079
|
75
|
|
50
|
|
|
233
|
local $tracelevel = ($tracelevel||0)+1; |
4080
|
75
|
|
|
|
|
167
|
$ERRORS = 0; |
4081
|
75
|
|
|
|
|
184
|
my $thisrule = $thisparser->{"rules"}{"LINE"}; |
4082
|
|
|
|
|
|
|
|
4083
|
75
|
50
|
|
|
|
196
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [LINE]}, |
4084
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4085
|
|
|
|
|
|
|
q{LINE}, |
4086
|
|
|
|
|
|
|
$tracelevel) |
4087
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4088
|
|
|
|
|
|
|
|
4089
|
|
|
|
|
|
|
|
4090
|
75
|
|
|
|
|
122
|
my $err_at = @{$thisparser->{errors}}; |
|
75
|
|
|
|
|
165
|
|
4091
|
|
|
|
|
|
|
|
4092
|
75
|
|
|
|
|
207
|
my $score; |
4093
|
|
|
|
|
|
|
my $score_return; |
4094
|
75
|
|
|
|
|
0
|
my $_tok; |
4095
|
75
|
|
|
|
|
126
|
my $return = undef; |
4096
|
75
|
|
|
|
|
128
|
my $_matched=0; |
4097
|
75
|
|
|
|
|
131
|
my $commit=0; |
4098
|
75
|
|
|
|
|
138
|
my @item = (); |
4099
|
75
|
|
|
|
|
155
|
my %item = (); |
4100
|
75
|
|
|
|
|
134
|
my $repeating = $_[2]; |
4101
|
75
|
|
|
|
|
138
|
my $_noactions = $_[3]; |
4102
|
75
|
50
|
|
|
|
192
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
75
|
|
|
|
|
221
|
|
|
75
|
|
|
|
|
161
|
|
4103
|
75
|
|
|
|
|
141
|
my $_itempos = $_[5]; |
4104
|
75
|
50
|
|
|
|
257
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
4105
|
75
|
|
|
|
|
219
|
my $text; |
4106
|
|
|
|
|
|
|
my $lastsep; |
4107
|
75
|
|
|
|
|
0
|
my $current_match; |
4108
|
75
|
|
|
|
|
206
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{BLOCK, or COMMENT}); |
4109
|
75
|
|
|
|
|
226
|
$expectation->at($_[1]); |
4110
|
|
|
|
|
|
|
|
4111
|
75
|
|
|
|
|
120
|
my $thisline; |
4112
|
75
|
|
|
|
|
226
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
4113
|
|
|
|
|
|
|
|
4114
|
|
|
|
|
|
|
|
4115
|
|
|
|
|
|
|
|
4116
|
75
|
|
33
|
|
|
339
|
while (!$_matched && !$commit) |
4117
|
|
|
|
|
|
|
{ |
4118
|
|
|
|
|
|
|
|
4119
|
75
|
50
|
|
|
|
201
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [BLOCK COMMENT]}, |
4120
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4121
|
|
|
|
|
|
|
q{LINE}, |
4122
|
|
|
|
|
|
|
$tracelevel) |
4123
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4124
|
75
|
|
|
|
|
182
|
my $thisprod = $thisrule->{"prods"}[0]; |
4125
|
75
|
|
|
|
|
141
|
$text = $_[1]; |
4126
|
75
|
|
|
|
|
112
|
my $_savetext; |
4127
|
75
|
|
|
|
|
156
|
@item = (q{LINE}); |
4128
|
75
|
|
|
|
|
200
|
%item = (__RULE__ => q{LINE}); |
4129
|
75
|
|
|
|
|
132
|
my $repcount = 0; |
4130
|
|
|
|
|
|
|
|
4131
|
|
|
|
|
|
|
|
4132
|
75
|
50
|
|
|
|
187
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [BLOCK]}, |
4133
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4134
|
|
|
|
|
|
|
q{LINE}, |
4135
|
|
|
|
|
|
|
$tracelevel) |
4136
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4137
|
2
|
|
|
2
|
|
15
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
297
|
|
|
75
|
|
|
|
|
173
|
|
4138
|
75
|
|
|
|
|
184
|
$expectation->is(q{})->at($text); |
4139
|
75
|
100
|
|
75
|
|
378
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BLOCK($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
75
|
|
|
|
|
170
|
|
4140
|
|
|
|
|
|
|
{ |
4141
|
|
|
|
|
|
|
|
4142
|
39
|
50
|
|
|
|
116
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [BLOCK]>>}, |
4143
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4144
|
|
|
|
|
|
|
q{LINE}, |
4145
|
|
|
|
|
|
|
$tracelevel) |
4146
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4147
|
39
|
|
|
|
|
125
|
$expectation->failed(); |
4148
|
39
|
|
|
|
|
71
|
last; |
4149
|
|
|
|
|
|
|
} |
4150
|
36
|
50
|
|
|
|
163
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [BLOCK]<< (return value: [} |
4151
|
|
|
|
|
|
|
. $_tok . q{]}, |
4152
|
|
|
|
|
|
|
|
4153
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4154
|
|
|
|
|
|
|
q{LINE}, |
4155
|
|
|
|
|
|
|
$tracelevel) |
4156
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4157
|
36
|
|
|
|
|
96
|
$item{q{BLOCK}} = $_tok; |
4158
|
36
|
|
|
|
|
84
|
push @item, $_tok; |
4159
|
|
|
|
|
|
|
|
4160
|
|
|
|
|
|
|
} |
4161
|
|
|
|
|
|
|
|
4162
|
36
|
50
|
|
|
|
113
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [COMMENT]}, |
4163
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4164
|
|
|
|
|
|
|
q{LINE}, |
4165
|
|
|
|
|
|
|
$tracelevel) |
4166
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4167
|
2
|
|
|
2
|
|
13
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
546
|
|
|
36
|
|
|
|
|
124
|
|
4168
|
36
|
|
|
|
|
107
|
$expectation->is(q{COMMENT})->at($text); |
4169
|
36
|
100
|
|
36
|
|
213
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::COMMENT($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
36
|
|
|
|
|
96
|
|
4170
|
|
|
|
|
|
|
{ |
4171
|
|
|
|
|
|
|
|
4172
|
26
|
50
|
|
|
|
77
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [COMMENT]>>}, |
4173
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4174
|
|
|
|
|
|
|
q{LINE}, |
4175
|
|
|
|
|
|
|
$tracelevel) |
4176
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4177
|
26
|
|
|
|
|
81
|
$expectation->failed(); |
4178
|
26
|
|
|
|
|
60
|
last; |
4179
|
|
|
|
|
|
|
} |
4180
|
10
|
50
|
|
|
|
40
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [COMMENT]<< (return value: [} |
4181
|
|
|
|
|
|
|
. $_tok . q{]}, |
4182
|
|
|
|
|
|
|
|
4183
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4184
|
|
|
|
|
|
|
q{LINE}, |
4185
|
|
|
|
|
|
|
$tracelevel) |
4186
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4187
|
10
|
|
|
|
|
30
|
$item{q{COMMENT}} = $_tok; |
4188
|
10
|
|
|
|
|
25
|
push @item, $_tok; |
4189
|
|
|
|
|
|
|
|
4190
|
|
|
|
|
|
|
} |
4191
|
|
|
|
|
|
|
|
4192
|
10
|
50
|
|
|
|
30
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
4193
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4194
|
|
|
|
|
|
|
q{LINE}, |
4195
|
|
|
|
|
|
|
$tracelevel) |
4196
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4197
|
|
|
|
|
|
|
|
4198
|
|
|
|
|
|
|
|
4199
|
10
|
50
|
|
|
|
31
|
$_tok = ($_noactions) ? 0 : do {$return = [@{$item{BLOCK}}]}; |
|
10
|
|
|
|
|
20
|
|
|
10
|
|
|
|
|
37
|
|
4200
|
10
|
50
|
|
|
|
34
|
unless (defined $_tok) |
4201
|
|
|
|
|
|
|
{ |
4202
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
4203
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4204
|
0
|
|
|
|
|
0
|
last; |
4205
|
|
|
|
|
|
|
} |
4206
|
10
|
50
|
|
|
|
32
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
4207
|
|
|
|
|
|
|
. $_tok . q{])}, |
4208
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4209
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4210
|
10
|
|
|
|
|
21
|
push @item, $_tok; |
4211
|
10
|
|
|
|
|
22
|
$item{__ACTION1__}=$_tok; |
4212
|
|
|
|
|
|
|
|
4213
|
|
|
|
|
|
|
|
4214
|
10
|
50
|
|
|
|
34
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [BLOCK COMMENT]<<}, |
4215
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4216
|
|
|
|
|
|
|
q{LINE}, |
4217
|
|
|
|
|
|
|
$tracelevel) |
4218
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4219
|
|
|
|
|
|
|
|
4220
|
|
|
|
|
|
|
|
4221
|
|
|
|
|
|
|
|
4222
|
10
|
|
|
|
|
16
|
$_matched = 1; |
4223
|
10
|
|
|
|
|
20
|
last; |
4224
|
|
|
|
|
|
|
} |
4225
|
|
|
|
|
|
|
|
4226
|
|
|
|
|
|
|
|
4227
|
75
|
|
66
|
|
|
377
|
while (!$_matched && !$commit) |
4228
|
|
|
|
|
|
|
{ |
4229
|
|
|
|
|
|
|
|
4230
|
65
|
50
|
|
|
|
192
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [BLOCK]}, |
4231
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4232
|
|
|
|
|
|
|
q{LINE}, |
4233
|
|
|
|
|
|
|
$tracelevel) |
4234
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4235
|
65
|
|
|
|
|
174
|
my $thisprod = $thisrule->{"prods"}[1]; |
4236
|
65
|
|
|
|
|
137
|
$text = $_[1]; |
4237
|
65
|
|
|
|
|
112
|
my $_savetext; |
4238
|
65
|
|
|
|
|
184
|
@item = (q{LINE}); |
4239
|
65
|
|
|
|
|
228
|
%item = (__RULE__ => q{LINE}); |
4240
|
65
|
|
|
|
|
141
|
my $repcount = 0; |
4241
|
|
|
|
|
|
|
|
4242
|
|
|
|
|
|
|
|
4243
|
65
|
50
|
|
|
|
190
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [BLOCK]}, |
4244
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4245
|
|
|
|
|
|
|
q{LINE}, |
4246
|
|
|
|
|
|
|
$tracelevel) |
4247
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4248
|
2
|
|
|
2
|
|
12
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
532
|
|
|
65
|
|
|
|
|
108
|
|
4249
|
65
|
|
|
|
|
158
|
$expectation->is(q{})->at($text); |
4250
|
65
|
100
|
|
65
|
|
297
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BLOCK($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
65
|
|
|
|
|
166
|
|
4251
|
|
|
|
|
|
|
{ |
4252
|
|
|
|
|
|
|
|
4253
|
39
|
50
|
|
|
|
108
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [BLOCK]>>}, |
4254
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4255
|
|
|
|
|
|
|
q{LINE}, |
4256
|
|
|
|
|
|
|
$tracelevel) |
4257
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4258
|
39
|
|
|
|
|
119
|
$expectation->failed(); |
4259
|
39
|
|
|
|
|
83
|
last; |
4260
|
|
|
|
|
|
|
} |
4261
|
26
|
50
|
|
|
|
130
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [BLOCK]<< (return value: [} |
4262
|
|
|
|
|
|
|
. $_tok . q{]}, |
4263
|
|
|
|
|
|
|
|
4264
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4265
|
|
|
|
|
|
|
q{LINE}, |
4266
|
|
|
|
|
|
|
$tracelevel) |
4267
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4268
|
26
|
|
|
|
|
64
|
$item{q{BLOCK}} = $_tok; |
4269
|
26
|
|
|
|
|
66
|
push @item, $_tok; |
4270
|
|
|
|
|
|
|
|
4271
|
|
|
|
|
|
|
} |
4272
|
|
|
|
|
|
|
|
4273
|
26
|
50
|
|
|
|
76
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
4274
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4275
|
|
|
|
|
|
|
q{LINE}, |
4276
|
|
|
|
|
|
|
$tracelevel) |
4277
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4278
|
|
|
|
|
|
|
|
4279
|
|
|
|
|
|
|
|
4280
|
26
|
50
|
|
|
|
69
|
$_tok = ($_noactions) ? 0 : do {$return = [@{$item{BLOCK}}]}; |
|
26
|
|
|
|
|
63
|
|
|
26
|
|
|
|
|
77
|
|
4281
|
26
|
50
|
|
|
|
82
|
unless (defined $_tok) |
4282
|
|
|
|
|
|
|
{ |
4283
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
4284
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4285
|
0
|
|
|
|
|
0
|
last; |
4286
|
|
|
|
|
|
|
} |
4287
|
26
|
50
|
|
|
|
83
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
4288
|
|
|
|
|
|
|
. $_tok . q{])}, |
4289
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4290
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4291
|
26
|
|
|
|
|
60
|
push @item, $_tok; |
4292
|
26
|
|
|
|
|
62
|
$item{__ACTION1__}=$_tok; |
4293
|
|
|
|
|
|
|
|
4294
|
|
|
|
|
|
|
|
4295
|
26
|
50
|
|
|
|
71
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [BLOCK]<<}, |
4296
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4297
|
|
|
|
|
|
|
q{LINE}, |
4298
|
|
|
|
|
|
|
$tracelevel) |
4299
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4300
|
|
|
|
|
|
|
|
4301
|
|
|
|
|
|
|
|
4302
|
|
|
|
|
|
|
|
4303
|
26
|
|
|
|
|
54
|
$_matched = 1; |
4304
|
26
|
|
|
|
|
49
|
last; |
4305
|
|
|
|
|
|
|
} |
4306
|
|
|
|
|
|
|
|
4307
|
|
|
|
|
|
|
|
4308
|
75
|
|
66
|
|
|
302
|
while (!$_matched && !$commit) |
4309
|
|
|
|
|
|
|
{ |
4310
|
|
|
|
|
|
|
|
4311
|
39
|
50
|
|
|
|
102
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [COMMENT]}, |
4312
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4313
|
|
|
|
|
|
|
q{LINE}, |
4314
|
|
|
|
|
|
|
$tracelevel) |
4315
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4316
|
39
|
|
|
|
|
84
|
my $thisprod = $thisrule->{"prods"}[2]; |
4317
|
39
|
|
|
|
|
71
|
$text = $_[1]; |
4318
|
39
|
|
|
|
|
61
|
my $_savetext; |
4319
|
39
|
|
|
|
|
101
|
@item = (q{LINE}); |
4320
|
39
|
|
|
|
|
97
|
%item = (__RULE__ => q{LINE}); |
4321
|
39
|
|
|
|
|
68
|
my $repcount = 0; |
4322
|
|
|
|
|
|
|
|
4323
|
|
|
|
|
|
|
|
4324
|
39
|
50
|
|
|
|
109
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [COMMENT]}, |
4325
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4326
|
|
|
|
|
|
|
q{LINE}, |
4327
|
|
|
|
|
|
|
$tracelevel) |
4328
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4329
|
2
|
|
|
2
|
|
13
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
852
|
|
|
39
|
|
|
|
|
69
|
|
4330
|
39
|
|
|
|
|
98
|
$expectation->is(q{})->at($text); |
4331
|
39
|
100
|
|
39
|
|
188
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::COMMENT($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
39
|
|
|
|
|
97
|
|
4332
|
|
|
|
|
|
|
{ |
4333
|
|
|
|
|
|
|
|
4334
|
28
|
50
|
|
|
|
85
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [COMMENT]>>}, |
4335
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4336
|
|
|
|
|
|
|
q{LINE}, |
4337
|
|
|
|
|
|
|
$tracelevel) |
4338
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4339
|
28
|
|
|
|
|
85
|
$expectation->failed(); |
4340
|
28
|
|
|
|
|
54
|
last; |
4341
|
|
|
|
|
|
|
} |
4342
|
11
|
50
|
|
|
|
53
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [COMMENT]<< (return value: [} |
4343
|
|
|
|
|
|
|
. $_tok . q{]}, |
4344
|
|
|
|
|
|
|
|
4345
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4346
|
|
|
|
|
|
|
q{LINE}, |
4347
|
|
|
|
|
|
|
$tracelevel) |
4348
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4349
|
11
|
|
|
|
|
25
|
$item{q{COMMENT}} = $_tok; |
4350
|
11
|
|
|
|
|
21
|
push @item, $_tok; |
4351
|
|
|
|
|
|
|
|
4352
|
|
|
|
|
|
|
} |
4353
|
|
|
|
|
|
|
|
4354
|
11
|
50
|
|
|
|
27
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
4355
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4356
|
|
|
|
|
|
|
q{LINE}, |
4357
|
|
|
|
|
|
|
$tracelevel) |
4358
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4359
|
|
|
|
|
|
|
|
4360
|
|
|
|
|
|
|
|
4361
|
11
|
50
|
|
|
|
26
|
$_tok = ($_noactions) ? 0 : do {$return = []}; |
|
11
|
|
|
|
|
25
|
|
4362
|
11
|
50
|
|
|
|
55
|
unless (defined $_tok) |
4363
|
|
|
|
|
|
|
{ |
4364
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
4365
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4366
|
0
|
|
|
|
|
0
|
last; |
4367
|
|
|
|
|
|
|
} |
4368
|
11
|
50
|
|
|
|
30
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
4369
|
|
|
|
|
|
|
. $_tok . q{])}, |
4370
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4371
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4372
|
11
|
|
|
|
|
23
|
push @item, $_tok; |
4373
|
11
|
|
|
|
|
18
|
$item{__ACTION1__}=$_tok; |
4374
|
|
|
|
|
|
|
|
4375
|
|
|
|
|
|
|
|
4376
|
11
|
50
|
|
|
|
28
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [COMMENT]<<}, |
4377
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4378
|
|
|
|
|
|
|
q{LINE}, |
4379
|
|
|
|
|
|
|
$tracelevel) |
4380
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4381
|
|
|
|
|
|
|
|
4382
|
|
|
|
|
|
|
|
4383
|
|
|
|
|
|
|
|
4384
|
11
|
|
|
|
|
15
|
$_matched = 1; |
4385
|
11
|
|
|
|
|
22
|
last; |
4386
|
|
|
|
|
|
|
} |
4387
|
|
|
|
|
|
|
|
4388
|
|
|
|
|
|
|
|
4389
|
75
|
100
|
66
|
|
|
335
|
unless ( $_matched || defined($score) ) |
4390
|
|
|
|
|
|
|
{ |
4391
|
|
|
|
|
|
|
|
4392
|
|
|
|
|
|
|
|
4393
|
28
|
|
|
|
|
60
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
4394
|
28
|
50
|
|
|
|
75
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
4395
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4396
|
|
|
|
|
|
|
q{LINE}, |
4397
|
|
|
|
|
|
|
$tracelevel) |
4398
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4399
|
28
|
|
|
|
|
172
|
return undef; |
4400
|
|
|
|
|
|
|
} |
4401
|
47
|
50
|
33
|
|
|
161
|
if (!defined($return) && defined($score)) |
4402
|
|
|
|
|
|
|
{ |
4403
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
4404
|
|
|
|
|
|
|
q{LINE}, |
4405
|
|
|
|
|
|
|
$tracelevel) |
4406
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4407
|
0
|
|
|
|
|
0
|
$return = $score_return; |
4408
|
|
|
|
|
|
|
} |
4409
|
47
|
|
|
|
|
89
|
splice @{$thisparser->{errors}}, $err_at; |
|
47
|
|
|
|
|
117
|
|
4410
|
47
|
50
|
|
|
|
132
|
$return = $item[$#item] unless defined $return; |
4411
|
47
|
50
|
|
|
|
143
|
if (defined $::RD_TRACE) |
4412
|
|
|
|
|
|
|
{ |
4413
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
4414
|
|
|
|
|
|
|
$return . q{])}, "", |
4415
|
|
|
|
|
|
|
q{LINE}, |
4416
|
|
|
|
|
|
|
$tracelevel); |
4417
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
4418
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
4419
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4420
|
|
|
|
|
|
|
, q{LINE}, |
4421
|
|
|
|
|
|
|
$tracelevel) |
4422
|
|
|
|
|
|
|
} |
4423
|
47
|
|
|
|
|
111
|
$_[1] = $text; |
4424
|
47
|
|
|
|
|
352
|
return $return; |
4425
|
|
|
|
|
|
|
} |
4426
|
|
|
|
|
|
|
|
4427
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
4428
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::EMPTY |
4429
|
|
|
|
|
|
|
{ |
4430
|
0
|
|
|
0
|
|
0
|
my $thisparser = $_[0]; |
4431
|
2
|
|
|
2
|
|
12
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
1146
|
|
4432
|
0
|
|
0
|
|
|
0
|
local $tracelevel = ($tracelevel||0)+1; |
4433
|
0
|
|
|
|
|
0
|
$ERRORS = 0; |
4434
|
0
|
|
|
|
|
0
|
my $thisrule = $thisparser->{"rules"}{"EMPTY"}; |
4435
|
|
|
|
|
|
|
|
4436
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [EMPTY]}, |
4437
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4438
|
|
|
|
|
|
|
q{EMPTY}, |
4439
|
|
|
|
|
|
|
$tracelevel) |
4440
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4441
|
|
|
|
|
|
|
|
4442
|
|
|
|
|
|
|
|
4443
|
0
|
|
|
|
|
0
|
my $err_at = @{$thisparser->{errors}}; |
|
0
|
|
|
|
|
0
|
|
4444
|
|
|
|
|
|
|
|
4445
|
0
|
|
|
|
|
0
|
my $score; |
4446
|
|
|
|
|
|
|
my $score_return; |
4447
|
0
|
|
|
|
|
0
|
my $_tok; |
4448
|
0
|
|
|
|
|
0
|
my $return = undef; |
4449
|
0
|
|
|
|
|
0
|
my $_matched=0; |
4450
|
0
|
|
|
|
|
0
|
my $commit=0; |
4451
|
0
|
|
|
|
|
0
|
my @item = (); |
4452
|
0
|
|
|
|
|
0
|
my %item = (); |
4453
|
0
|
|
|
|
|
0
|
my $repeating = $_[2]; |
4454
|
0
|
|
|
|
|
0
|
my $_noactions = $_[3]; |
4455
|
0
|
0
|
|
|
|
0
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
4456
|
0
|
|
|
|
|
0
|
my $_itempos = $_[5]; |
4457
|
0
|
0
|
|
|
|
0
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
4458
|
0
|
|
|
|
|
0
|
my $text; |
4459
|
|
|
|
|
|
|
my $lastsep; |
4460
|
0
|
|
|
|
|
0
|
my $current_match; |
4461
|
0
|
|
|
|
|
0
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{//}); |
4462
|
0
|
|
|
|
|
0
|
$expectation->at($_[1]); |
4463
|
|
|
|
|
|
|
|
4464
|
0
|
|
|
|
|
0
|
my $thisline; |
4465
|
0
|
|
|
|
|
0
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
4466
|
|
|
|
|
|
|
|
4467
|
|
|
|
|
|
|
|
4468
|
|
|
|
|
|
|
|
4469
|
0
|
|
0
|
|
|
0
|
while (!$_matched && !$commit) |
4470
|
|
|
|
|
|
|
{ |
4471
|
|
|
|
|
|
|
|
4472
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [//]}, |
4473
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4474
|
|
|
|
|
|
|
q{EMPTY}, |
4475
|
|
|
|
|
|
|
$tracelevel) |
4476
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4477
|
0
|
|
|
|
|
0
|
my $thisprod = $thisrule->{"prods"}[0]; |
4478
|
0
|
|
|
|
|
0
|
$text = $_[1]; |
4479
|
0
|
|
|
|
|
0
|
my $_savetext; |
4480
|
0
|
|
|
|
|
0
|
@item = (q{EMPTY}); |
4481
|
0
|
|
|
|
|
0
|
%item = (__RULE__ => q{EMPTY}); |
4482
|
0
|
|
|
|
|
0
|
my $repcount = 0; |
4483
|
|
|
|
|
|
|
|
4484
|
|
|
|
|
|
|
|
4485
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [//]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
4486
|
|
|
|
|
|
|
q{EMPTY}, |
4487
|
|
|
|
|
|
|
$tracelevel) |
4488
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4489
|
0
|
|
|
|
|
0
|
undef $lastsep; |
4490
|
0
|
|
|
|
|
0
|
$expectation->is(q{})->at($text); |
4491
|
|
|
|
|
|
|
|
4492
|
|
|
|
|
|
|
|
4493
|
0
|
0
|
0
|
|
|
0
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:)/) |
|
0
|
0
|
|
|
|
0
|
|
4494
|
|
|
|
|
|
|
{ |
4495
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
4496
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
4497
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
4498
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4499
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4500
|
|
|
|
|
|
|
|
4501
|
0
|
|
|
|
|
0
|
last; |
4502
|
|
|
|
|
|
|
} |
4503
|
0
|
|
|
|
|
0
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
4504
|
0
|
|
|
|
|
0
|
substr($text,0,length($current_match),q{}); |
4505
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
4506
|
|
|
|
|
|
|
. $current_match . q{])}, |
4507
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4508
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4509
|
0
|
|
|
|
|
0
|
push @item, $item{__PATTERN1__}=$current_match; |
4510
|
|
|
|
|
|
|
|
4511
|
|
|
|
|
|
|
|
4512
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [//]<<}, |
4513
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4514
|
|
|
|
|
|
|
q{EMPTY}, |
4515
|
|
|
|
|
|
|
$tracelevel) |
4516
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4517
|
|
|
|
|
|
|
|
4518
|
|
|
|
|
|
|
|
4519
|
|
|
|
|
|
|
|
4520
|
0
|
|
|
|
|
0
|
$_matched = 1; |
4521
|
0
|
|
|
|
|
0
|
last; |
4522
|
|
|
|
|
|
|
} |
4523
|
|
|
|
|
|
|
|
4524
|
|
|
|
|
|
|
|
4525
|
0
|
0
|
0
|
|
|
0
|
unless ( $_matched || defined($score) ) |
4526
|
|
|
|
|
|
|
{ |
4527
|
|
|
|
|
|
|
|
4528
|
|
|
|
|
|
|
|
4529
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
4530
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
4531
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4532
|
|
|
|
|
|
|
q{EMPTY}, |
4533
|
|
|
|
|
|
|
$tracelevel) |
4534
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4535
|
0
|
|
|
|
|
0
|
return undef; |
4536
|
|
|
|
|
|
|
} |
4537
|
0
|
0
|
0
|
|
|
0
|
if (!defined($return) && defined($score)) |
4538
|
|
|
|
|
|
|
{ |
4539
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
4540
|
|
|
|
|
|
|
q{EMPTY}, |
4541
|
|
|
|
|
|
|
$tracelevel) |
4542
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4543
|
0
|
|
|
|
|
0
|
$return = $score_return; |
4544
|
|
|
|
|
|
|
} |
4545
|
0
|
|
|
|
|
0
|
splice @{$thisparser->{errors}}, $err_at; |
|
0
|
|
|
|
|
0
|
|
4546
|
0
|
0
|
|
|
|
0
|
$return = $item[$#item] unless defined $return; |
4547
|
0
|
0
|
|
|
|
0
|
if (defined $::RD_TRACE) |
4548
|
|
|
|
|
|
|
{ |
4549
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
4550
|
|
|
|
|
|
|
$return . q{])}, "", |
4551
|
|
|
|
|
|
|
q{EMPTY}, |
4552
|
|
|
|
|
|
|
$tracelevel); |
4553
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
4554
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
4555
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4556
|
|
|
|
|
|
|
, q{EMPTY}, |
4557
|
|
|
|
|
|
|
$tracelevel) |
4558
|
|
|
|
|
|
|
} |
4559
|
0
|
|
|
|
|
0
|
$_[1] = $text; |
4560
|
0
|
|
|
|
|
0
|
return $return; |
4561
|
|
|
|
|
|
|
} |
4562
|
|
|
|
|
|
|
|
4563
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
4564
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BNAME |
4565
|
|
|
|
|
|
|
{ |
4566
|
336
|
|
|
336
|
|
611
|
my $thisparser = $_[0]; |
4567
|
2
|
|
|
2
|
|
15
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
763
|
|
4568
|
336
|
|
50
|
|
|
852
|
local $tracelevel = ($tracelevel||0)+1; |
4569
|
336
|
|
|
|
|
551
|
$ERRORS = 0; |
4570
|
336
|
|
|
|
|
680
|
my $thisrule = $thisparser->{"rules"}{"BNAME"}; |
4571
|
|
|
|
|
|
|
|
4572
|
336
|
50
|
|
|
|
724
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [BNAME]}, |
4573
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4574
|
|
|
|
|
|
|
q{BNAME}, |
4575
|
|
|
|
|
|
|
$tracelevel) |
4576
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4577
|
|
|
|
|
|
|
|
4578
|
|
|
|
|
|
|
|
4579
|
336
|
|
|
|
|
511
|
my $err_at = @{$thisparser->{errors}}; |
|
336
|
|
|
|
|
697
|
|
4580
|
|
|
|
|
|
|
|
4581
|
336
|
|
|
|
|
922
|
my $score; |
4582
|
|
|
|
|
|
|
my $score_return; |
4583
|
336
|
|
|
|
|
0
|
my $_tok; |
4584
|
336
|
|
|
|
|
504
|
my $return = undef; |
4585
|
336
|
|
|
|
|
509
|
my $_matched=0; |
4586
|
336
|
|
|
|
|
541
|
my $commit=0; |
4587
|
336
|
|
|
|
|
582
|
my @item = (); |
4588
|
336
|
|
|
|
|
638
|
my %item = (); |
4589
|
336
|
|
|
|
|
506
|
my $repeating = $_[2]; |
4590
|
336
|
|
|
|
|
491
|
my $_noactions = $_[3]; |
4591
|
336
|
50
|
|
|
|
746
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
336
|
|
|
|
|
499
|
|
|
336
|
|
|
|
|
667
|
|
4592
|
336
|
|
|
|
|
528
|
my $_itempos = $_[5]; |
4593
|
336
|
50
|
|
|
|
949
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
4594
|
336
|
|
|
|
|
872
|
my $text; |
4595
|
|
|
|
|
|
|
my $lastsep; |
4596
|
336
|
|
|
|
|
0
|
my $current_match; |
4597
|
336
|
|
|
|
|
743
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/[A-Z]\\w*::/, or /[A-Z]\\w*/}); |
4598
|
336
|
|
|
|
|
924
|
$expectation->at($_[1]); |
4599
|
|
|
|
|
|
|
|
4600
|
336
|
|
|
|
|
548
|
my $thisline; |
4601
|
336
|
|
|
|
|
1048
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
4602
|
|
|
|
|
|
|
|
4603
|
|
|
|
|
|
|
|
4604
|
|
|
|
|
|
|
|
4605
|
336
|
|
33
|
|
|
1218
|
while (!$_matched && !$commit) |
4606
|
|
|
|
|
|
|
{ |
4607
|
|
|
|
|
|
|
|
4608
|
336
|
50
|
|
|
|
738
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/[A-Z]\\w*::/ BNAME]}, |
4609
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4610
|
|
|
|
|
|
|
q{BNAME}, |
4611
|
|
|
|
|
|
|
$tracelevel) |
4612
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4613
|
336
|
|
|
|
|
692
|
my $thisprod = $thisrule->{"prods"}[0]; |
4614
|
336
|
|
|
|
|
629
|
$text = $_[1]; |
4615
|
336
|
|
|
|
|
534
|
my $_savetext; |
4616
|
336
|
|
|
|
|
640
|
@item = (q{BNAME}); |
4617
|
336
|
|
|
|
|
775
|
%item = (__RULE__ => q{BNAME}); |
4618
|
336
|
|
|
|
|
534
|
my $repcount = 0; |
4619
|
|
|
|
|
|
|
|
4620
|
|
|
|
|
|
|
|
4621
|
336
|
50
|
|
|
|
787
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/[A-Z]\\w*::/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
4622
|
|
|
|
|
|
|
q{BNAME}, |
4623
|
|
|
|
|
|
|
$tracelevel) |
4624
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4625
|
336
|
|
|
|
|
591
|
undef $lastsep; |
4626
|
336
|
|
|
|
|
722
|
$expectation->is(q{})->at($text); |
4627
|
|
|
|
|
|
|
|
4628
|
|
|
|
|
|
|
|
4629
|
336
|
100
|
66
|
|
|
1785
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[A-Z]\w*::)/) |
|
336
|
100
|
|
|
|
3043
|
|
4630
|
|
|
|
|
|
|
{ |
4631
|
252
|
50
|
|
|
|
831
|
$text = $lastsep . $text if defined $lastsep; |
4632
|
252
|
|
|
|
|
802
|
$expectation->failed(); |
4633
|
252
|
50
|
|
|
|
637
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
4634
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4635
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4636
|
|
|
|
|
|
|
|
4637
|
252
|
|
|
|
|
525
|
last; |
4638
|
|
|
|
|
|
|
} |
4639
|
84
|
|
|
|
|
515
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
4640
|
84
|
|
|
|
|
323
|
substr($text,0,length($current_match),q{}); |
4641
|
84
|
50
|
|
|
|
237
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
4642
|
|
|
|
|
|
|
. $current_match . q{])}, |
4643
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4644
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4645
|
84
|
|
|
|
|
238
|
push @item, $item{__PATTERN1__}=$current_match; |
4646
|
|
|
|
|
|
|
|
4647
|
|
|
|
|
|
|
|
4648
|
84
|
50
|
|
|
|
226
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [BNAME]}, |
4649
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4650
|
|
|
|
|
|
|
q{BNAME}, |
4651
|
|
|
|
|
|
|
$tracelevel) |
4652
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4653
|
2
|
|
|
2
|
|
14
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
1329
|
|
|
84
|
|
|
|
|
161
|
|
4654
|
84
|
|
|
|
|
207
|
$expectation->is(q{BNAME})->at($text); |
4655
|
84
|
50
|
|
84
|
|
413
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
84
|
|
|
|
|
212
|
|
4656
|
|
|
|
|
|
|
{ |
4657
|
|
|
|
|
|
|
|
4658
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [BNAME]>>}, |
4659
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4660
|
|
|
|
|
|
|
q{BNAME}, |
4661
|
|
|
|
|
|
|
$tracelevel) |
4662
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4663
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
4664
|
0
|
|
|
|
|
0
|
last; |
4665
|
|
|
|
|
|
|
} |
4666
|
84
|
50
|
|
|
|
366
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [BNAME]<< (return value: [} |
4667
|
|
|
|
|
|
|
. $_tok . q{]}, |
4668
|
|
|
|
|
|
|
|
4669
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4670
|
|
|
|
|
|
|
q{BNAME}, |
4671
|
|
|
|
|
|
|
$tracelevel) |
4672
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4673
|
84
|
|
|
|
|
214
|
$item{q{BNAME}} = $_tok; |
4674
|
84
|
|
|
|
|
168
|
push @item, $_tok; |
4675
|
|
|
|
|
|
|
|
4676
|
|
|
|
|
|
|
} |
4677
|
|
|
|
|
|
|
|
4678
|
84
|
50
|
|
|
|
232
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
4679
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4680
|
|
|
|
|
|
|
q{BNAME}, |
4681
|
|
|
|
|
|
|
$tracelevel) |
4682
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4683
|
|
|
|
|
|
|
|
4684
|
|
|
|
|
|
|
|
4685
|
84
|
50
|
|
|
|
178
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1].$item[2]}; |
|
84
|
|
|
|
|
220
|
|
4686
|
84
|
50
|
|
|
|
215
|
unless (defined $_tok) |
4687
|
|
|
|
|
|
|
{ |
4688
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
4689
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4690
|
0
|
|
|
|
|
0
|
last; |
4691
|
|
|
|
|
|
|
} |
4692
|
84
|
50
|
|
|
|
201
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
4693
|
|
|
|
|
|
|
. $_tok . q{])}, |
4694
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4695
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4696
|
84
|
|
|
|
|
166
|
push @item, $_tok; |
4697
|
84
|
|
|
|
|
180
|
$item{__ACTION1__}=$_tok; |
4698
|
|
|
|
|
|
|
|
4699
|
|
|
|
|
|
|
|
4700
|
84
|
50
|
|
|
|
223
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/[A-Z]\\w*::/ BNAME]<<}, |
4701
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4702
|
|
|
|
|
|
|
q{BNAME}, |
4703
|
|
|
|
|
|
|
$tracelevel) |
4704
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4705
|
|
|
|
|
|
|
|
4706
|
|
|
|
|
|
|
|
4707
|
|
|
|
|
|
|
|
4708
|
84
|
|
|
|
|
149
|
$_matched = 1; |
4709
|
84
|
|
|
|
|
166
|
last; |
4710
|
|
|
|
|
|
|
} |
4711
|
|
|
|
|
|
|
|
4712
|
|
|
|
|
|
|
|
4713
|
336
|
|
66
|
|
|
1187
|
while (!$_matched && !$commit) |
4714
|
|
|
|
|
|
|
{ |
4715
|
|
|
|
|
|
|
|
4716
|
252
|
50
|
|
|
|
591
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/[A-Z]\\w*/]}, |
4717
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4718
|
|
|
|
|
|
|
q{BNAME}, |
4719
|
|
|
|
|
|
|
$tracelevel) |
4720
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4721
|
252
|
|
|
|
|
517
|
my $thisprod = $thisrule->{"prods"}[1]; |
4722
|
252
|
|
|
|
|
463
|
$text = $_[1]; |
4723
|
252
|
|
|
|
|
435
|
my $_savetext; |
4724
|
252
|
|
|
|
|
553
|
@item = (q{BNAME}); |
4725
|
252
|
|
|
|
|
608
|
%item = (__RULE__ => q{BNAME}); |
4726
|
252
|
|
|
|
|
411
|
my $repcount = 0; |
4727
|
|
|
|
|
|
|
|
4728
|
|
|
|
|
|
|
|
4729
|
252
|
50
|
|
|
|
601
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/[A-Z]\\w*/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
4730
|
|
|
|
|
|
|
q{BNAME}, |
4731
|
|
|
|
|
|
|
$tracelevel) |
4732
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4733
|
252
|
|
|
|
|
437
|
undef $lastsep; |
4734
|
252
|
|
|
|
|
572
|
$expectation->is(q{})->at($text); |
4735
|
|
|
|
|
|
|
|
4736
|
|
|
|
|
|
|
|
4737
|
252
|
100
|
66
|
|
|
1034
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[A-Z]\w*)/) |
|
252
|
100
|
|
|
|
1835
|
|
4738
|
|
|
|
|
|
|
{ |
4739
|
156
|
50
|
|
|
|
483
|
$text = $lastsep . $text if defined $lastsep; |
4740
|
156
|
|
|
|
|
398
|
$expectation->failed(); |
4741
|
156
|
50
|
|
|
|
382
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
4742
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4743
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4744
|
|
|
|
|
|
|
|
4745
|
156
|
|
|
|
|
302
|
last; |
4746
|
|
|
|
|
|
|
} |
4747
|
96
|
|
|
|
|
498
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
4748
|
96
|
|
|
|
|
323
|
substr($text,0,length($current_match),q{}); |
4749
|
96
|
50
|
|
|
|
252
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
4750
|
|
|
|
|
|
|
. $current_match . q{])}, |
4751
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4752
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4753
|
96
|
|
|
|
|
298
|
push @item, $item{__PATTERN1__}=$current_match; |
4754
|
|
|
|
|
|
|
|
4755
|
|
|
|
|
|
|
|
4756
|
96
|
50
|
|
|
|
238
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
4757
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4758
|
|
|
|
|
|
|
q{BNAME}, |
4759
|
|
|
|
|
|
|
$tracelevel) |
4760
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4761
|
|
|
|
|
|
|
|
4762
|
|
|
|
|
|
|
|
4763
|
96
|
50
|
|
|
|
225
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1]}; |
|
96
|
|
|
|
|
227
|
|
4764
|
96
|
50
|
|
|
|
257
|
unless (defined $_tok) |
4765
|
|
|
|
|
|
|
{ |
4766
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
4767
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4768
|
0
|
|
|
|
|
0
|
last; |
4769
|
|
|
|
|
|
|
} |
4770
|
96
|
50
|
|
|
|
266
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
4771
|
|
|
|
|
|
|
. $_tok . q{])}, |
4772
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4773
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4774
|
96
|
|
|
|
|
184
|
push @item, $_tok; |
4775
|
96
|
|
|
|
|
231
|
$item{__ACTION1__}=$_tok; |
4776
|
|
|
|
|
|
|
|
4777
|
|
|
|
|
|
|
|
4778
|
96
|
50
|
|
|
|
233
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/[A-Z]\\w*/]<<}, |
4779
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4780
|
|
|
|
|
|
|
q{BNAME}, |
4781
|
|
|
|
|
|
|
$tracelevel) |
4782
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4783
|
|
|
|
|
|
|
|
4784
|
|
|
|
|
|
|
|
4785
|
|
|
|
|
|
|
|
4786
|
96
|
|
|
|
|
155
|
$_matched = 1; |
4787
|
96
|
|
|
|
|
193
|
last; |
4788
|
|
|
|
|
|
|
} |
4789
|
|
|
|
|
|
|
|
4790
|
|
|
|
|
|
|
|
4791
|
336
|
100
|
66
|
|
|
1159
|
unless ( $_matched || defined($score) ) |
4792
|
|
|
|
|
|
|
{ |
4793
|
|
|
|
|
|
|
|
4794
|
|
|
|
|
|
|
|
4795
|
156
|
|
|
|
|
294
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
4796
|
156
|
50
|
|
|
|
354
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
4797
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4798
|
|
|
|
|
|
|
q{BNAME}, |
4799
|
|
|
|
|
|
|
$tracelevel) |
4800
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4801
|
156
|
|
|
|
|
763
|
return undef; |
4802
|
|
|
|
|
|
|
} |
4803
|
180
|
50
|
33
|
|
|
508
|
if (!defined($return) && defined($score)) |
4804
|
|
|
|
|
|
|
{ |
4805
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
4806
|
|
|
|
|
|
|
q{BNAME}, |
4807
|
|
|
|
|
|
|
$tracelevel) |
4808
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4809
|
0
|
|
|
|
|
0
|
$return = $score_return; |
4810
|
|
|
|
|
|
|
} |
4811
|
180
|
|
|
|
|
280
|
splice @{$thisparser->{errors}}, $err_at; |
|
180
|
|
|
|
|
457
|
|
4812
|
180
|
50
|
|
|
|
481
|
$return = $item[$#item] unless defined $return; |
4813
|
180
|
50
|
|
|
|
444
|
if (defined $::RD_TRACE) |
4814
|
|
|
|
|
|
|
{ |
4815
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
4816
|
|
|
|
|
|
|
$return . q{])}, "", |
4817
|
|
|
|
|
|
|
q{BNAME}, |
4818
|
|
|
|
|
|
|
$tracelevel); |
4819
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
4820
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
4821
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4822
|
|
|
|
|
|
|
, q{BNAME}, |
4823
|
|
|
|
|
|
|
$tracelevel) |
4824
|
|
|
|
|
|
|
} |
4825
|
180
|
|
|
|
|
394
|
$_[1] = $text; |
4826
|
180
|
|
|
|
|
1150
|
return $return; |
4827
|
|
|
|
|
|
|
} |
4828
|
|
|
|
|
|
|
|
4829
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
4830
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SLASHEDDQUOTE |
4831
|
|
|
|
|
|
|
{ |
4832
|
16
|
|
|
16
|
|
28
|
my $thisparser = $_[0]; |
4833
|
2
|
|
|
2
|
|
13
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
1537
|
|
4834
|
16
|
|
50
|
|
|
44
|
local $tracelevel = ($tracelevel||0)+1; |
4835
|
16
|
|
|
|
|
26
|
$ERRORS = 0; |
4836
|
16
|
|
|
|
|
36
|
my $thisrule = $thisparser->{"rules"}{"SLASHEDDQUOTE"}; |
4837
|
|
|
|
|
|
|
|
4838
|
16
|
50
|
|
|
|
34
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [SLASHEDDQUOTE]}, |
4839
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4840
|
|
|
|
|
|
|
q{SLASHEDDQUOTE}, |
4841
|
|
|
|
|
|
|
$tracelevel) |
4842
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4843
|
|
|
|
|
|
|
|
4844
|
|
|
|
|
|
|
|
4845
|
16
|
|
|
|
|
26
|
my $err_at = @{$thisparser->{errors}}; |
|
16
|
|
|
|
|
26
|
|
4846
|
|
|
|
|
|
|
|
4847
|
16
|
|
|
|
|
44
|
my $score; |
4848
|
|
|
|
|
|
|
my $score_return; |
4849
|
16
|
|
|
|
|
0
|
my $_tok; |
4850
|
16
|
|
|
|
|
22
|
my $return = undef; |
4851
|
16
|
|
|
|
|
25
|
my $_matched=0; |
4852
|
16
|
|
|
|
|
25
|
my $commit=0; |
4853
|
16
|
|
|
|
|
31
|
my @item = (); |
4854
|
16
|
|
|
|
|
26
|
my %item = (); |
4855
|
16
|
|
|
|
|
24
|
my $repeating = $_[2]; |
4856
|
16
|
|
|
|
|
25
|
my $_noactions = $_[3]; |
4857
|
16
|
50
|
|
|
|
38
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
16
|
|
|
|
|
24
|
|
|
16
|
|
|
|
|
32
|
|
4858
|
16
|
|
|
|
|
27
|
my $_itempos = $_[5]; |
4859
|
16
|
50
|
|
|
|
45
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
4860
|
16
|
|
|
|
|
40
|
my $text; |
4861
|
|
|
|
|
|
|
my $lastsep; |
4862
|
16
|
|
|
|
|
0
|
my $current_match; |
4863
|
16
|
|
|
|
|
37
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/\\\\"/}); |
4864
|
16
|
|
|
|
|
41
|
$expectation->at($_[1]); |
4865
|
|
|
|
|
|
|
|
4866
|
16
|
|
|
|
|
20
|
my $thisline; |
4867
|
16
|
|
|
|
|
62
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
4868
|
|
|
|
|
|
|
|
4869
|
|
|
|
|
|
|
|
4870
|
|
|
|
|
|
|
|
4871
|
16
|
|
33
|
|
|
60
|
while (!$_matched && !$commit) |
4872
|
|
|
|
|
|
|
{ |
4873
|
|
|
|
|
|
|
|
4874
|
16
|
50
|
|
|
|
39
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/\\\\"/]}, |
4875
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4876
|
|
|
|
|
|
|
q{SLASHEDDQUOTE}, |
4877
|
|
|
|
|
|
|
$tracelevel) |
4878
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4879
|
16
|
|
|
|
|
34
|
my $thisprod = $thisrule->{"prods"}[0]; |
4880
|
16
|
|
|
|
|
27
|
$text = $_[1]; |
4881
|
16
|
|
|
|
|
23
|
my $_savetext; |
4882
|
16
|
|
|
|
|
36
|
@item = (q{SLASHEDDQUOTE}); |
4883
|
16
|
|
|
|
|
33
|
%item = (__RULE__ => q{SLASHEDDQUOTE}); |
4884
|
16
|
|
|
|
|
25
|
my $repcount = 0; |
4885
|
|
|
|
|
|
|
|
4886
|
|
|
|
|
|
|
|
4887
|
16
|
50
|
|
|
|
36
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/\\\\"/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
4888
|
|
|
|
|
|
|
q{SLASHEDDQUOTE}, |
4889
|
|
|
|
|
|
|
$tracelevel) |
4890
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4891
|
16
|
|
|
|
|
29
|
undef $lastsep; |
4892
|
16
|
|
|
|
|
28
|
$expectation->is(q{})->at($text); |
4893
|
|
|
|
|
|
|
|
4894
|
|
|
|
|
|
|
|
4895
|
16
|
50
|
66
|
|
|
91
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\\")/) |
|
16
|
100
|
|
|
|
120
|
|
4896
|
|
|
|
|
|
|
{ |
4897
|
8
|
50
|
|
|
|
26
|
$text = $lastsep . $text if defined $lastsep; |
4898
|
8
|
|
|
|
|
24
|
$expectation->failed(); |
4899
|
8
|
50
|
|
|
|
17
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
4900
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4901
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4902
|
|
|
|
|
|
|
|
4903
|
8
|
|
|
|
|
19
|
last; |
4904
|
|
|
|
|
|
|
} |
4905
|
8
|
|
|
|
|
35
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
4906
|
8
|
|
|
|
|
29
|
substr($text,0,length($current_match),q{}); |
4907
|
8
|
50
|
|
|
|
23
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
4908
|
|
|
|
|
|
|
. $current_match . q{])}, |
4909
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4910
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4911
|
8
|
|
|
|
|
19
|
push @item, $item{__PATTERN1__}=$current_match; |
4912
|
|
|
|
|
|
|
|
4913
|
|
|
|
|
|
|
|
4914
|
8
|
50
|
|
|
|
22
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
4915
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4916
|
|
|
|
|
|
|
q{SLASHEDDQUOTE}, |
4917
|
|
|
|
|
|
|
$tracelevel) |
4918
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4919
|
|
|
|
|
|
|
|
4920
|
|
|
|
|
|
|
|
4921
|
8
|
50
|
|
|
|
18
|
$_tok = ($_noactions) ? 0 : do {$return = '"'}; |
|
8
|
|
|
|
|
18
|
|
4922
|
8
|
50
|
|
|
|
20
|
unless (defined $_tok) |
4923
|
|
|
|
|
|
|
{ |
4924
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
4925
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4926
|
0
|
|
|
|
|
0
|
last; |
4927
|
|
|
|
|
|
|
} |
4928
|
8
|
50
|
|
|
|
19
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
4929
|
|
|
|
|
|
|
. $_tok . q{])}, |
4930
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4931
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4932
|
8
|
|
|
|
|
17
|
push @item, $_tok; |
4933
|
8
|
|
|
|
|
14
|
$item{__ACTION1__}=$_tok; |
4934
|
|
|
|
|
|
|
|
4935
|
|
|
|
|
|
|
|
4936
|
8
|
50
|
|
|
|
22
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/\\\\"/]<<}, |
4937
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4938
|
|
|
|
|
|
|
q{SLASHEDDQUOTE}, |
4939
|
|
|
|
|
|
|
$tracelevel) |
4940
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4941
|
|
|
|
|
|
|
|
4942
|
|
|
|
|
|
|
|
4943
|
|
|
|
|
|
|
|
4944
|
8
|
|
|
|
|
15
|
$_matched = 1; |
4945
|
8
|
|
|
|
|
17
|
last; |
4946
|
|
|
|
|
|
|
} |
4947
|
|
|
|
|
|
|
|
4948
|
|
|
|
|
|
|
|
4949
|
16
|
100
|
66
|
|
|
55
|
unless ( $_matched || defined($score) ) |
4950
|
|
|
|
|
|
|
{ |
4951
|
|
|
|
|
|
|
|
4952
|
|
|
|
|
|
|
|
4953
|
8
|
|
|
|
|
16
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
4954
|
8
|
50
|
|
|
|
19
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
4955
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4956
|
|
|
|
|
|
|
q{SLASHEDDQUOTE}, |
4957
|
|
|
|
|
|
|
$tracelevel) |
4958
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4959
|
8
|
|
|
|
|
39
|
return undef; |
4960
|
|
|
|
|
|
|
} |
4961
|
8
|
50
|
33
|
|
|
24
|
if (!defined($return) && defined($score)) |
4962
|
|
|
|
|
|
|
{ |
4963
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
4964
|
|
|
|
|
|
|
q{SLASHEDDQUOTE}, |
4965
|
|
|
|
|
|
|
$tracelevel) |
4966
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4967
|
0
|
|
|
|
|
0
|
$return = $score_return; |
4968
|
|
|
|
|
|
|
} |
4969
|
8
|
|
|
|
|
26
|
splice @{$thisparser->{errors}}, $err_at; |
|
8
|
|
|
|
|
17
|
|
4970
|
8
|
50
|
|
|
|
23
|
$return = $item[$#item] unless defined $return; |
4971
|
8
|
50
|
|
|
|
18
|
if (defined $::RD_TRACE) |
4972
|
|
|
|
|
|
|
{ |
4973
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
4974
|
|
|
|
|
|
|
$return . q{])}, "", |
4975
|
|
|
|
|
|
|
q{SLASHEDDQUOTE}, |
4976
|
|
|
|
|
|
|
$tracelevel); |
4977
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
4978
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
4979
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4980
|
|
|
|
|
|
|
, q{SLASHEDDQUOTE}, |
4981
|
|
|
|
|
|
|
$tracelevel) |
4982
|
|
|
|
|
|
|
} |
4983
|
8
|
|
|
|
|
15
|
$_[1] = $text; |
4984
|
8
|
|
|
|
|
44
|
return $return; |
4985
|
|
|
|
|
|
|
} |
4986
|
|
|
|
|
|
|
|
4987
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
4988
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::NOTDQUOTE |
4989
|
|
|
|
|
|
|
{ |
4990
|
24
|
|
|
24
|
|
42
|
my $thisparser = $_[0]; |
4991
|
2
|
|
|
2
|
|
20
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
1316
|
|
4992
|
24
|
|
50
|
|
|
58
|
local $tracelevel = ($tracelevel||0)+1; |
4993
|
24
|
|
|
|
|
43
|
$ERRORS = 0; |
4994
|
24
|
|
|
|
|
43
|
my $thisrule = $thisparser->{"rules"}{"NOTDQUOTE"}; |
4995
|
|
|
|
|
|
|
|
4996
|
24
|
50
|
|
|
|
54
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [NOTDQUOTE]}, |
4997
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4998
|
|
|
|
|
|
|
q{NOTDQUOTE}, |
4999
|
|
|
|
|
|
|
$tracelevel) |
5000
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5001
|
|
|
|
|
|
|
|
5002
|
|
|
|
|
|
|
|
5003
|
24
|
|
|
|
|
34
|
my $err_at = @{$thisparser->{errors}}; |
|
24
|
|
|
|
|
49
|
|
5004
|
|
|
|
|
|
|
|
5005
|
24
|
|
|
|
|
57
|
my $score; |
5006
|
|
|
|
|
|
|
my $score_return; |
5007
|
24
|
|
|
|
|
0
|
my $_tok; |
5008
|
24
|
|
|
|
|
39
|
my $return = undef; |
5009
|
24
|
|
|
|
|
34
|
my $_matched=0; |
5010
|
24
|
|
|
|
|
34
|
my $commit=0; |
5011
|
24
|
|
|
|
|
41
|
my @item = (); |
5012
|
24
|
|
|
|
|
37
|
my %item = (); |
5013
|
24
|
|
|
|
|
38
|
my $repeating = $_[2]; |
5014
|
24
|
|
|
|
|
35
|
my $_noactions = $_[3]; |
5015
|
24
|
50
|
|
|
|
50
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
24
|
|
|
|
|
38
|
|
|
24
|
|
|
|
|
45
|
|
5016
|
24
|
|
|
|
|
41
|
my $_itempos = $_[5]; |
5017
|
24
|
50
|
|
|
|
63
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
5018
|
24
|
|
|
|
|
58
|
my $text; |
5019
|
|
|
|
|
|
|
my $lastsep; |
5020
|
24
|
|
|
|
|
0
|
my $current_match; |
5021
|
24
|
|
|
|
|
53
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/[^"]*[^"\\\\]/}); |
5022
|
24
|
|
|
|
|
57
|
$expectation->at($_[1]); |
5023
|
|
|
|
|
|
|
|
5024
|
24
|
|
|
|
|
41
|
my $thisline; |
5025
|
24
|
|
|
|
|
58
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
5026
|
|
|
|
|
|
|
|
5027
|
|
|
|
|
|
|
|
5028
|
|
|
|
|
|
|
|
5029
|
24
|
|
33
|
|
|
99
|
while (!$_matched && !$commit) |
5030
|
|
|
|
|
|
|
{ |
5031
|
|
|
|
|
|
|
|
5032
|
24
|
50
|
|
|
|
59
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/[^"]*[^"\\\\]/]}, |
5033
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5034
|
|
|
|
|
|
|
q{NOTDQUOTE}, |
5035
|
|
|
|
|
|
|
$tracelevel) |
5036
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5037
|
24
|
|
|
|
|
48
|
my $thisprod = $thisrule->{"prods"}[0]; |
5038
|
24
|
|
|
|
|
38
|
$text = $_[1]; |
5039
|
24
|
|
|
|
|
38
|
my $_savetext; |
5040
|
24
|
|
|
|
|
42
|
@item = (q{NOTDQUOTE}); |
5041
|
24
|
|
|
|
|
51
|
%item = (__RULE__ => q{NOTDQUOTE}); |
5042
|
24
|
|
|
|
|
36
|
my $repcount = 0; |
5043
|
|
|
|
|
|
|
|
5044
|
|
|
|
|
|
|
|
5045
|
24
|
50
|
|
|
|
59
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/[^"]*[^"\\\\]/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
5046
|
|
|
|
|
|
|
q{NOTDQUOTE}, |
5047
|
|
|
|
|
|
|
$tracelevel) |
5048
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5049
|
24
|
|
|
|
|
40
|
undef $lastsep; |
5050
|
24
|
|
|
|
|
49
|
$expectation->is(q{})->at($text); |
5051
|
|
|
|
|
|
|
|
5052
|
|
|
|
|
|
|
|
5053
|
24
|
50
|
33
|
|
|
133
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[^"]*[^"\\])/) |
|
24
|
50
|
|
|
|
196
|
|
5054
|
|
|
|
|
|
|
{ |
5055
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
5056
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
5057
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
5058
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5059
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5060
|
|
|
|
|
|
|
|
5061
|
0
|
|
|
|
|
0
|
last; |
5062
|
|
|
|
|
|
|
} |
5063
|
24
|
|
|
|
|
111
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
5064
|
24
|
|
|
|
|
78
|
substr($text,0,length($current_match),q{}); |
5065
|
24
|
50
|
|
|
|
52
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
5066
|
|
|
|
|
|
|
. $current_match . q{])}, |
5067
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5068
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5069
|
24
|
|
|
|
|
56
|
push @item, $item{__PATTERN1__}=$current_match; |
5070
|
|
|
|
|
|
|
|
5071
|
|
|
|
|
|
|
|
5072
|
24
|
50
|
|
|
|
50
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/[^"]*[^"\\\\]/]<<}, |
5073
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5074
|
|
|
|
|
|
|
q{NOTDQUOTE}, |
5075
|
|
|
|
|
|
|
$tracelevel) |
5076
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5077
|
|
|
|
|
|
|
|
5078
|
|
|
|
|
|
|
|
5079
|
|
|
|
|
|
|
|
5080
|
24
|
|
|
|
|
36
|
$_matched = 1; |
5081
|
24
|
|
|
|
|
49
|
last; |
5082
|
|
|
|
|
|
|
} |
5083
|
|
|
|
|
|
|
|
5084
|
|
|
|
|
|
|
|
5085
|
24
|
50
|
33
|
|
|
63
|
unless ( $_matched || defined($score) ) |
5086
|
|
|
|
|
|
|
{ |
5087
|
|
|
|
|
|
|
|
5088
|
|
|
|
|
|
|
|
5089
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
5090
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
5091
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5092
|
|
|
|
|
|
|
q{NOTDQUOTE}, |
5093
|
|
|
|
|
|
|
$tracelevel) |
5094
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5095
|
0
|
|
|
|
|
0
|
return undef; |
5096
|
|
|
|
|
|
|
} |
5097
|
24
|
50
|
33
|
|
|
97
|
if (!defined($return) && defined($score)) |
5098
|
|
|
|
|
|
|
{ |
5099
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
5100
|
|
|
|
|
|
|
q{NOTDQUOTE}, |
5101
|
|
|
|
|
|
|
$tracelevel) |
5102
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5103
|
0
|
|
|
|
|
0
|
$return = $score_return; |
5104
|
|
|
|
|
|
|
} |
5105
|
24
|
|
|
|
|
37
|
splice @{$thisparser->{errors}}, $err_at; |
|
24
|
|
|
|
|
50
|
|
5106
|
24
|
50
|
|
|
|
70
|
$return = $item[$#item] unless defined $return; |
5107
|
24
|
50
|
|
|
|
56
|
if (defined $::RD_TRACE) |
5108
|
|
|
|
|
|
|
{ |
5109
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
5110
|
|
|
|
|
|
|
$return . q{])}, "", |
5111
|
|
|
|
|
|
|
q{NOTDQUOTE}, |
5112
|
|
|
|
|
|
|
$tracelevel); |
5113
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
5114
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
5115
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5116
|
|
|
|
|
|
|
, q{NOTDQUOTE}, |
5117
|
|
|
|
|
|
|
$tracelevel) |
5118
|
|
|
|
|
|
|
} |
5119
|
24
|
|
|
|
|
47
|
$_[1] = $text; |
5120
|
24
|
|
|
|
|
119
|
return $return; |
5121
|
|
|
|
|
|
|
} |
5122
|
|
|
|
|
|
|
|
5123
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
5124
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::NOTSQUOTE |
5125
|
|
|
|
|
|
|
{ |
5126
|
24
|
|
|
24
|
|
69
|
my $thisparser = $_[0]; |
5127
|
2
|
|
|
2
|
|
15
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1288
|
|
5128
|
24
|
|
50
|
|
|
59
|
local $tracelevel = ($tracelevel||0)+1; |
5129
|
24
|
|
|
|
|
40
|
$ERRORS = 0; |
5130
|
24
|
|
|
|
|
45
|
my $thisrule = $thisparser->{"rules"}{"NOTSQUOTE"}; |
5131
|
|
|
|
|
|
|
|
5132
|
24
|
50
|
|
|
|
51
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [NOTSQUOTE]}, |
5133
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5134
|
|
|
|
|
|
|
q{NOTSQUOTE}, |
5135
|
|
|
|
|
|
|
$tracelevel) |
5136
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5137
|
|
|
|
|
|
|
|
5138
|
|
|
|
|
|
|
|
5139
|
24
|
|
|
|
|
36
|
my $err_at = @{$thisparser->{errors}}; |
|
24
|
|
|
|
|
45
|
|
5140
|
|
|
|
|
|
|
|
5141
|
24
|
|
|
|
|
57
|
my $score; |
5142
|
|
|
|
|
|
|
my $score_return; |
5143
|
24
|
|
|
|
|
0
|
my $_tok; |
5144
|
24
|
|
|
|
|
33
|
my $return = undef; |
5145
|
24
|
|
|
|
|
36
|
my $_matched=0; |
5146
|
24
|
|
|
|
|
34
|
my $commit=0; |
5147
|
24
|
|
|
|
|
43
|
my @item = (); |
5148
|
24
|
|
|
|
|
40
|
my %item = (); |
5149
|
24
|
|
|
|
|
38
|
my $repeating = $_[2]; |
5150
|
24
|
|
|
|
|
34
|
my $_noactions = $_[3]; |
5151
|
24
|
50
|
|
|
|
62
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
24
|
|
|
|
|
38
|
|
|
24
|
|
|
|
|
49
|
|
5152
|
24
|
|
|
|
|
39
|
my $_itempos = $_[5]; |
5153
|
24
|
50
|
|
|
|
61
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
5154
|
24
|
|
|
|
|
61
|
my $text; |
5155
|
|
|
|
|
|
|
my $lastsep; |
5156
|
24
|
|
|
|
|
0
|
my $current_match; |
5157
|
24
|
|
|
|
|
50
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/[^']*[^'\\\\]/}); |
5158
|
24
|
|
|
|
|
61
|
$expectation->at($_[1]); |
5159
|
|
|
|
|
|
|
|
5160
|
24
|
|
|
|
|
38
|
my $thisline; |
5161
|
24
|
|
|
|
|
61
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
5162
|
|
|
|
|
|
|
|
5163
|
|
|
|
|
|
|
|
5164
|
|
|
|
|
|
|
|
5165
|
24
|
|
33
|
|
|
92
|
while (!$_matched && !$commit) |
5166
|
|
|
|
|
|
|
{ |
5167
|
|
|
|
|
|
|
|
5168
|
24
|
50
|
|
|
|
55
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/[^']*[^'\\\\]/]}, |
5169
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5170
|
|
|
|
|
|
|
q{NOTSQUOTE}, |
5171
|
|
|
|
|
|
|
$tracelevel) |
5172
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5173
|
24
|
|
|
|
|
45
|
my $thisprod = $thisrule->{"prods"}[0]; |
5174
|
24
|
|
|
|
|
41
|
$text = $_[1]; |
5175
|
24
|
|
|
|
|
36
|
my $_savetext; |
5176
|
24
|
|
|
|
|
47
|
@item = (q{NOTSQUOTE}); |
5177
|
24
|
|
|
|
|
47
|
%item = (__RULE__ => q{NOTSQUOTE}); |
5178
|
24
|
|
|
|
|
37
|
my $repcount = 0; |
5179
|
|
|
|
|
|
|
|
5180
|
|
|
|
|
|
|
|
5181
|
24
|
50
|
|
|
|
60
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/[^']*[^'\\\\]/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
5182
|
|
|
|
|
|
|
q{NOTSQUOTE}, |
5183
|
|
|
|
|
|
|
$tracelevel) |
5184
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5185
|
24
|
|
|
|
|
40
|
undef $lastsep; |
5186
|
24
|
|
|
|
|
55
|
$expectation->is(q{})->at($text); |
5187
|
|
|
|
|
|
|
|
5188
|
|
|
|
|
|
|
|
5189
|
24
|
50
|
33
|
|
|
140
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[^']*[^'\\])/) |
|
24
|
50
|
|
|
|
201
|
|
5190
|
|
|
|
|
|
|
{ |
5191
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
5192
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
5193
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
5194
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5195
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5196
|
|
|
|
|
|
|
|
5197
|
0
|
|
|
|
|
0
|
last; |
5198
|
|
|
|
|
|
|
} |
5199
|
24
|
|
|
|
|
116
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
5200
|
24
|
|
|
|
|
78
|
substr($text,0,length($current_match),q{}); |
5201
|
24
|
50
|
|
|
|
59
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
5202
|
|
|
|
|
|
|
. $current_match . q{])}, |
5203
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5204
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5205
|
24
|
|
|
|
|
53
|
push @item, $item{__PATTERN1__}=$current_match; |
5206
|
|
|
|
|
|
|
|
5207
|
|
|
|
|
|
|
|
5208
|
24
|
50
|
|
|
|
51
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/[^']*[^'\\\\]/]<<}, |
5209
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5210
|
|
|
|
|
|
|
q{NOTSQUOTE}, |
5211
|
|
|
|
|
|
|
$tracelevel) |
5212
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5213
|
|
|
|
|
|
|
|
5214
|
|
|
|
|
|
|
|
5215
|
|
|
|
|
|
|
|
5216
|
24
|
|
|
|
|
40
|
$_matched = 1; |
5217
|
24
|
|
|
|
|
45
|
last; |
5218
|
|
|
|
|
|
|
} |
5219
|
|
|
|
|
|
|
|
5220
|
|
|
|
|
|
|
|
5221
|
24
|
50
|
33
|
|
|
62
|
unless ( $_matched || defined($score) ) |
5222
|
|
|
|
|
|
|
{ |
5223
|
|
|
|
|
|
|
|
5224
|
|
|
|
|
|
|
|
5225
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
5226
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
5227
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5228
|
|
|
|
|
|
|
q{NOTSQUOTE}, |
5229
|
|
|
|
|
|
|
$tracelevel) |
5230
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5231
|
0
|
|
|
|
|
0
|
return undef; |
5232
|
|
|
|
|
|
|
} |
5233
|
24
|
50
|
33
|
|
|
96
|
if (!defined($return) && defined($score)) |
5234
|
|
|
|
|
|
|
{ |
5235
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
5236
|
|
|
|
|
|
|
q{NOTSQUOTE}, |
5237
|
|
|
|
|
|
|
$tracelevel) |
5238
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5239
|
0
|
|
|
|
|
0
|
$return = $score_return; |
5240
|
|
|
|
|
|
|
} |
5241
|
24
|
|
|
|
|
35
|
splice @{$thisparser->{errors}}, $err_at; |
|
24
|
|
|
|
|
50
|
|
5242
|
24
|
50
|
|
|
|
67
|
$return = $item[$#item] unless defined $return; |
5243
|
24
|
50
|
|
|
|
65
|
if (defined $::RD_TRACE) |
5244
|
|
|
|
|
|
|
{ |
5245
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
5246
|
|
|
|
|
|
|
$return . q{])}, "", |
5247
|
|
|
|
|
|
|
q{NOTSQUOTE}, |
5248
|
|
|
|
|
|
|
$tracelevel); |
5249
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
5250
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
5251
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5252
|
|
|
|
|
|
|
, q{NOTSQUOTE}, |
5253
|
|
|
|
|
|
|
$tracelevel) |
5254
|
|
|
|
|
|
|
} |
5255
|
24
|
|
|
|
|
39
|
$_[1] = $text; |
5256
|
24
|
|
|
|
|
119
|
return $return; |
5257
|
|
|
|
|
|
|
} |
5258
|
|
|
|
|
|
|
|
5259
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
5260
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::INCLUDE |
5261
|
|
|
|
|
|
|
{ |
5262
|
140
|
|
|
140
|
|
271
|
my $thisparser = $_[0]; |
5263
|
2
|
|
|
2
|
|
16
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
2339
|
|
5264
|
140
|
|
50
|
|
|
396
|
local $tracelevel = ($tracelevel||0)+1; |
5265
|
140
|
|
|
|
|
237
|
$ERRORS = 0; |
5266
|
140
|
|
|
|
|
297
|
my $thisrule = $thisparser->{"rules"}{"INCLUDE"}; |
5267
|
|
|
|
|
|
|
|
5268
|
140
|
50
|
|
|
|
349
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [INCLUDE]}, |
5269
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5270
|
|
|
|
|
|
|
q{INCLUDE}, |
5271
|
|
|
|
|
|
|
$tracelevel) |
5272
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5273
|
|
|
|
|
|
|
|
5274
|
|
|
|
|
|
|
|
5275
|
140
|
|
|
|
|
213
|
my $err_at = @{$thisparser->{errors}}; |
|
140
|
|
|
|
|
274
|
|
5276
|
|
|
|
|
|
|
|
5277
|
140
|
|
|
|
|
366
|
my $score; |
5278
|
|
|
|
|
|
|
my $score_return; |
5279
|
140
|
|
|
|
|
0
|
my $_tok; |
5280
|
140
|
|
|
|
|
239
|
my $return = undef; |
5281
|
140
|
|
|
|
|
211
|
my $_matched=0; |
5282
|
140
|
|
|
|
|
212
|
my $commit=0; |
5283
|
140
|
|
|
|
|
272
|
my @item = (); |
5284
|
140
|
|
|
|
|
253
|
my %item = (); |
5285
|
140
|
|
|
|
|
225
|
my $repeating = $_[2]; |
5286
|
140
|
|
|
|
|
276
|
my $_noactions = $_[3]; |
5287
|
140
|
50
|
|
|
|
329
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
140
|
|
|
|
|
232
|
|
|
140
|
|
|
|
|
349
|
|
5288
|
140
|
|
|
|
|
267
|
my $_itempos = $_[5]; |
5289
|
140
|
50
|
|
|
|
393
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
5290
|
140
|
|
|
|
|
356
|
my $text; |
5291
|
|
|
|
|
|
|
my $lastsep; |
5292
|
140
|
|
|
|
|
0
|
my $current_match; |
5293
|
140
|
|
|
|
|
352
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/\\/\\S+\\.scen/, or /[^\\/#]\\S+\\.scen/}); |
5294
|
140
|
|
|
|
|
391
|
$expectation->at($_[1]); |
5295
|
|
|
|
|
|
|
|
5296
|
140
|
|
|
|
|
194
|
my $thisline; |
5297
|
140
|
|
|
|
|
384
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
5298
|
|
|
|
|
|
|
|
5299
|
|
|
|
|
|
|
|
5300
|
|
|
|
|
|
|
|
5301
|
140
|
|
33
|
|
|
525
|
while (!$_matched && !$commit) |
5302
|
|
|
|
|
|
|
{ |
5303
|
|
|
|
|
|
|
|
5304
|
140
|
50
|
|
|
|
348
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/\\/\\S+\\.scen/]}, |
5305
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5306
|
|
|
|
|
|
|
q{INCLUDE}, |
5307
|
|
|
|
|
|
|
$tracelevel) |
5308
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5309
|
140
|
|
|
|
|
295
|
my $thisprod = $thisrule->{"prods"}[0]; |
5310
|
140
|
|
|
|
|
265
|
$text = $_[1]; |
5311
|
140
|
|
|
|
|
235
|
my $_savetext; |
5312
|
140
|
|
|
|
|
274
|
@item = (q{INCLUDE}); |
5313
|
140
|
|
|
|
|
306
|
%item = (__RULE__ => q{INCLUDE}); |
5314
|
140
|
|
|
|
|
231
|
my $repcount = 0; |
5315
|
|
|
|
|
|
|
|
5316
|
|
|
|
|
|
|
|
5317
|
140
|
50
|
|
|
|
323
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/\\/\\S+\\.scen/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
5318
|
|
|
|
|
|
|
q{INCLUDE}, |
5319
|
|
|
|
|
|
|
$tracelevel) |
5320
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5321
|
140
|
|
|
|
|
274
|
undef $lastsep; |
5322
|
140
|
|
|
|
|
336
|
$expectation->is(q{})->at($text); |
5323
|
|
|
|
|
|
|
|
5324
|
|
|
|
|
|
|
|
5325
|
140
|
100
|
33
|
|
|
916
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\/\S+\.scen)/) |
|
140
|
50
|
|
|
|
1360
|
|
5326
|
|
|
|
|
|
|
{ |
5327
|
140
|
50
|
|
|
|
457
|
$text = $lastsep . $text if defined $lastsep; |
5328
|
140
|
|
|
|
|
430
|
$expectation->failed(); |
5329
|
140
|
50
|
|
|
|
330
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
5330
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5331
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5332
|
|
|
|
|
|
|
|
5333
|
140
|
|
|
|
|
331
|
last; |
5334
|
|
|
|
|
|
|
} |
5335
|
0
|
|
|
|
|
0
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
5336
|
0
|
|
|
|
|
0
|
substr($text,0,length($current_match),q{}); |
5337
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
5338
|
|
|
|
|
|
|
. $current_match . q{])}, |
5339
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5340
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5341
|
0
|
|
|
|
|
0
|
push @item, $item{__PATTERN1__}=$current_match; |
5342
|
|
|
|
|
|
|
|
5343
|
|
|
|
|
|
|
|
5344
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
5345
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5346
|
|
|
|
|
|
|
q{INCLUDE}, |
5347
|
|
|
|
|
|
|
$tracelevel) |
5348
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5349
|
|
|
|
|
|
|
|
5350
|
|
|
|
|
|
|
|
5351
|
0
|
0
|
|
|
|
0
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1]}; |
|
0
|
|
|
|
|
0
|
|
5352
|
0
|
0
|
|
|
|
0
|
unless (defined $_tok) |
5353
|
|
|
|
|
|
|
{ |
5354
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
5355
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5356
|
0
|
|
|
|
|
0
|
last; |
5357
|
|
|
|
|
|
|
} |
5358
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
5359
|
|
|
|
|
|
|
. $_tok . q{])}, |
5360
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5361
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5362
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
5363
|
0
|
|
|
|
|
0
|
$item{__ACTION1__}=$_tok; |
5364
|
|
|
|
|
|
|
|
5365
|
|
|
|
|
|
|
|
5366
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/\\/\\S+\\.scen/]<<}, |
5367
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5368
|
|
|
|
|
|
|
q{INCLUDE}, |
5369
|
|
|
|
|
|
|
$tracelevel) |
5370
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5371
|
|
|
|
|
|
|
|
5372
|
|
|
|
|
|
|
|
5373
|
|
|
|
|
|
|
|
5374
|
0
|
|
|
|
|
0
|
$_matched = 1; |
5375
|
0
|
|
|
|
|
0
|
last; |
5376
|
|
|
|
|
|
|
} |
5377
|
|
|
|
|
|
|
|
5378
|
|
|
|
|
|
|
|
5379
|
140
|
|
33
|
|
|
574
|
while (!$_matched && !$commit) |
5380
|
|
|
|
|
|
|
{ |
5381
|
|
|
|
|
|
|
|
5382
|
140
|
50
|
|
|
|
341
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/[^\\/#]\\S+\\.scen/]}, |
5383
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5384
|
|
|
|
|
|
|
q{INCLUDE}, |
5385
|
|
|
|
|
|
|
$tracelevel) |
5386
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5387
|
140
|
|
|
|
|
259
|
my $thisprod = $thisrule->{"prods"}[1]; |
5388
|
140
|
|
|
|
|
279
|
$text = $_[1]; |
5389
|
140
|
|
|
|
|
214
|
my $_savetext; |
5390
|
140
|
|
|
|
|
313
|
@item = (q{INCLUDE}); |
5391
|
140
|
|
|
|
|
327
|
%item = (__RULE__ => q{INCLUDE}); |
5392
|
140
|
|
|
|
|
239
|
my $repcount = 0; |
5393
|
|
|
|
|
|
|
|
5394
|
|
|
|
|
|
|
|
5395
|
140
|
50
|
|
|
|
340
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/[^\\/#]\\S+\\.scen/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
5396
|
|
|
|
|
|
|
q{INCLUDE}, |
5397
|
|
|
|
|
|
|
$tracelevel) |
5398
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5399
|
140
|
|
|
|
|
255
|
undef $lastsep; |
5400
|
140
|
|
|
|
|
319
|
$expectation->is(q{})->at($text); |
5401
|
|
|
|
|
|
|
|
5402
|
|
|
|
|
|
|
|
5403
|
140
|
100
|
66
|
|
|
616
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[^\/#]\S+\.scen)/) |
|
140
|
100
|
|
|
|
1153
|
|
5404
|
|
|
|
|
|
|
{ |
5405
|
139
|
50
|
|
|
|
474
|
$text = $lastsep . $text if defined $lastsep; |
5406
|
139
|
|
|
|
|
417
|
$expectation->failed(); |
5407
|
139
|
50
|
|
|
|
354
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
5408
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5409
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5410
|
|
|
|
|
|
|
|
5411
|
139
|
|
|
|
|
303
|
last; |
5412
|
|
|
|
|
|
|
} |
5413
|
1
|
|
|
|
|
7
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
5414
|
1
|
|
|
|
|
4
|
substr($text,0,length($current_match),q{}); |
5415
|
1
|
50
|
|
|
|
5
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
5416
|
|
|
|
|
|
|
. $current_match . q{])}, |
5417
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5418
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5419
|
1
|
|
|
|
|
3
|
push @item, $item{__PATTERN1__}=$current_match; |
5420
|
|
|
|
|
|
|
|
5421
|
|
|
|
|
|
|
|
5422
|
1
|
50
|
|
|
|
3
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
5423
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5424
|
|
|
|
|
|
|
q{INCLUDE}, |
5425
|
|
|
|
|
|
|
$tracelevel) |
5426
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5427
|
|
|
|
|
|
|
|
5428
|
|
|
|
|
|
|
|
5429
|
1
|
50
|
|
|
|
4
|
$_tok = ($_noactions) ? 0 : do { my $from_file = $arg[0]; |
|
1
|
|
|
|
|
2
|
|
5430
|
1
|
50
|
|
|
|
5
|
if (length $from_file) { |
5431
|
1
|
|
|
|
|
56
|
$return = dirname($from_file) . "/$item[1]"; |
5432
|
|
|
|
|
|
|
} else { |
5433
|
0
|
|
|
|
|
0
|
$return = "./$item[1]"; |
5434
|
|
|
|
|
|
|
} |
5435
|
|
|
|
|
|
|
}; |
5436
|
1
|
50
|
|
|
|
6
|
unless (defined $_tok) |
5437
|
|
|
|
|
|
|
{ |
5438
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
5439
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5440
|
0
|
|
|
|
|
0
|
last; |
5441
|
|
|
|
|
|
|
} |
5442
|
1
|
50
|
|
|
|
3
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
5443
|
|
|
|
|
|
|
. $_tok . q{])}, |
5444
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5445
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5446
|
1
|
|
|
|
|
3
|
push @item, $_tok; |
5447
|
1
|
|
|
|
|
3
|
$item{__ACTION1__}=$_tok; |
5448
|
|
|
|
|
|
|
|
5449
|
|
|
|
|
|
|
|
5450
|
1
|
50
|
|
|
|
4
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/[^\\/#]\\S+\\.scen/]<<}, |
5451
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5452
|
|
|
|
|
|
|
q{INCLUDE}, |
5453
|
|
|
|
|
|
|
$tracelevel) |
5454
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5455
|
|
|
|
|
|
|
|
5456
|
|
|
|
|
|
|
|
5457
|
|
|
|
|
|
|
|
5458
|
1
|
|
|
|
|
2
|
$_matched = 1; |
5459
|
1
|
|
|
|
|
2
|
last; |
5460
|
|
|
|
|
|
|
} |
5461
|
|
|
|
|
|
|
|
5462
|
|
|
|
|
|
|
|
5463
|
140
|
100
|
66
|
|
|
615
|
unless ( $_matched || defined($score) ) |
5464
|
|
|
|
|
|
|
{ |
5465
|
|
|
|
|
|
|
|
5466
|
|
|
|
|
|
|
|
5467
|
139
|
|
|
|
|
262
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
5468
|
139
|
50
|
|
|
|
317
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
5469
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5470
|
|
|
|
|
|
|
q{INCLUDE}, |
5471
|
|
|
|
|
|
|
$tracelevel) |
5472
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5473
|
139
|
|
|
|
|
761
|
return undef; |
5474
|
|
|
|
|
|
|
} |
5475
|
1
|
50
|
33
|
|
|
5
|
if (!defined($return) && defined($score)) |
5476
|
|
|
|
|
|
|
{ |
5477
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
5478
|
|
|
|
|
|
|
q{INCLUDE}, |
5479
|
|
|
|
|
|
|
$tracelevel) |
5480
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5481
|
0
|
|
|
|
|
0
|
$return = $score_return; |
5482
|
|
|
|
|
|
|
} |
5483
|
1
|
|
|
|
|
6
|
splice @{$thisparser->{errors}}, $err_at; |
|
1
|
|
|
|
|
3
|
|
5484
|
1
|
50
|
|
|
|
5
|
$return = $item[$#item] unless defined $return; |
5485
|
1
|
50
|
|
|
|
4
|
if (defined $::RD_TRACE) |
5486
|
|
|
|
|
|
|
{ |
5487
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
5488
|
|
|
|
|
|
|
$return . q{])}, "", |
5489
|
|
|
|
|
|
|
q{INCLUDE}, |
5490
|
|
|
|
|
|
|
$tracelevel); |
5491
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
5492
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
5493
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5494
|
|
|
|
|
|
|
, q{INCLUDE}, |
5495
|
|
|
|
|
|
|
$tracelevel) |
5496
|
|
|
|
|
|
|
} |
5497
|
1
|
|
|
|
|
2
|
$_[1] = $text; |
5498
|
1
|
|
|
|
|
7
|
return $return; |
5499
|
|
|
|
|
|
|
} |
5500
|
|
|
|
|
|
|
|
5501
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
5502
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::EOF |
5503
|
|
|
|
|
|
|
{ |
5504
|
12
|
|
|
12
|
|
31
|
my $thisparser = $_[0]; |
5505
|
2
|
|
|
2
|
|
17
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
1361
|
|
5506
|
12
|
|
50
|
|
|
48
|
local $tracelevel = ($tracelevel||0)+1; |
5507
|
12
|
|
|
|
|
28
|
$ERRORS = 0; |
5508
|
12
|
|
|
|
|
35
|
my $thisrule = $thisparser->{"rules"}{"EOF"}; |
5509
|
|
|
|
|
|
|
|
5510
|
12
|
50
|
|
|
|
36
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [EOF]}, |
5511
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5512
|
|
|
|
|
|
|
q{EOF}, |
5513
|
|
|
|
|
|
|
$tracelevel) |
5514
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5515
|
|
|
|
|
|
|
|
5516
|
|
|
|
|
|
|
|
5517
|
12
|
|
|
|
|
24
|
my $err_at = @{$thisparser->{errors}}; |
|
12
|
|
|
|
|
34
|
|
5518
|
|
|
|
|
|
|
|
5519
|
12
|
|
|
|
|
42
|
my $score; |
5520
|
|
|
|
|
|
|
my $score_return; |
5521
|
12
|
|
|
|
|
0
|
my $_tok; |
5522
|
12
|
|
|
|
|
21
|
my $return = undef; |
5523
|
12
|
|
|
|
|
21
|
my $_matched=0; |
5524
|
12
|
|
|
|
|
18
|
my $commit=0; |
5525
|
12
|
|
|
|
|
28
|
my @item = (); |
5526
|
12
|
|
|
|
|
30
|
my %item = (); |
5527
|
12
|
|
|
|
|
27
|
my $repeating = $_[2]; |
5528
|
12
|
|
|
|
|
25
|
my $_noactions = $_[3]; |
5529
|
12
|
50
|
|
|
|
39
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
12
|
|
|
|
|
22
|
|
|
12
|
|
|
|
|
31
|
|
5530
|
12
|
|
|
|
|
29
|
my $_itempos = $_[5]; |
5531
|
12
|
50
|
|
|
|
50
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
5532
|
12
|
|
|
|
|
44
|
my $text; |
5533
|
|
|
|
|
|
|
my $lastsep; |
5534
|
12
|
|
|
|
|
0
|
my $current_match; |
5535
|
12
|
|
|
|
|
39
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/^\\Z/}); |
5536
|
12
|
|
|
|
|
47
|
$expectation->at($_[1]); |
5537
|
|
|
|
|
|
|
|
5538
|
12
|
|
|
|
|
22
|
my $thisline; |
5539
|
12
|
|
|
|
|
47
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
5540
|
|
|
|
|
|
|
|
5541
|
|
|
|
|
|
|
|
5542
|
|
|
|
|
|
|
|
5543
|
12
|
|
33
|
|
|
74
|
while (!$_matched && !$commit) |
5544
|
|
|
|
|
|
|
{ |
5545
|
|
|
|
|
|
|
|
5546
|
12
|
50
|
|
|
|
47
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/^\\Z/]}, |
5547
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5548
|
|
|
|
|
|
|
q{EOF}, |
5549
|
|
|
|
|
|
|
$tracelevel) |
5550
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5551
|
12
|
|
|
|
|
35
|
my $thisprod = $thisrule->{"prods"}[0]; |
5552
|
12
|
|
|
|
|
28
|
$text = $_[1]; |
5553
|
12
|
|
|
|
|
25
|
my $_savetext; |
5554
|
12
|
|
|
|
|
27
|
@item = (q{EOF}); |
5555
|
12
|
|
|
|
|
39
|
%item = (__RULE__ => q{EOF}); |
5556
|
12
|
|
|
|
|
26
|
my $repcount = 0; |
5557
|
|
|
|
|
|
|
|
5558
|
|
|
|
|
|
|
|
5559
|
12
|
50
|
|
|
|
58
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/^\\Z/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
5560
|
|
|
|
|
|
|
q{EOF}, |
5561
|
|
|
|
|
|
|
$tracelevel) |
5562
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5563
|
12
|
|
|
|
|
28
|
undef $lastsep; |
5564
|
12
|
|
|
|
|
32
|
$expectation->is(q{})->at($text); |
5565
|
|
|
|
|
|
|
|
5566
|
|
|
|
|
|
|
|
5567
|
12
|
100
|
33
|
|
|
161
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^\Z)/) |
|
12
|
50
|
|
|
|
131
|
|
5568
|
|
|
|
|
|
|
{ |
5569
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
5570
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
5571
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
5572
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5573
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5574
|
|
|
|
|
|
|
|
5575
|
0
|
|
|
|
|
0
|
last; |
5576
|
|
|
|
|
|
|
} |
5577
|
12
|
|
|
|
|
72
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
5578
|
12
|
|
|
|
|
48
|
substr($text,0,length($current_match),q{}); |
5579
|
12
|
50
|
|
|
|
51
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
5580
|
|
|
|
|
|
|
. $current_match . q{])}, |
5581
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5582
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5583
|
12
|
|
|
|
|
42
|
push @item, $item{__PATTERN1__}=$current_match; |
5584
|
|
|
|
|
|
|
|
5585
|
|
|
|
|
|
|
|
5586
|
12
|
50
|
|
|
|
38
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/^\\Z/]<<}, |
5587
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5588
|
|
|
|
|
|
|
q{EOF}, |
5589
|
|
|
|
|
|
|
$tracelevel) |
5590
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5591
|
|
|
|
|
|
|
|
5592
|
|
|
|
|
|
|
|
5593
|
|
|
|
|
|
|
|
5594
|
12
|
|
|
|
|
24
|
$_matched = 1; |
5595
|
12
|
|
|
|
|
33
|
last; |
5596
|
|
|
|
|
|
|
} |
5597
|
|
|
|
|
|
|
|
5598
|
|
|
|
|
|
|
|
5599
|
12
|
50
|
33
|
|
|
55
|
unless ( $_matched || defined($score) ) |
5600
|
|
|
|
|
|
|
{ |
5601
|
|
|
|
|
|
|
|
5602
|
|
|
|
|
|
|
|
5603
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
5604
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
5605
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5606
|
|
|
|
|
|
|
q{EOF}, |
5607
|
|
|
|
|
|
|
$tracelevel) |
5608
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5609
|
0
|
|
|
|
|
0
|
return undef; |
5610
|
|
|
|
|
|
|
} |
5611
|
12
|
50
|
33
|
|
|
73
|
if (!defined($return) && defined($score)) |
5612
|
|
|
|
|
|
|
{ |
5613
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
5614
|
|
|
|
|
|
|
q{EOF}, |
5615
|
|
|
|
|
|
|
$tracelevel) |
5616
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5617
|
0
|
|
|
|
|
0
|
$return = $score_return; |
5618
|
|
|
|
|
|
|
} |
5619
|
12
|
|
|
|
|
28
|
splice @{$thisparser->{errors}}, $err_at; |
|
12
|
|
|
|
|
35
|
|
5620
|
12
|
50
|
|
|
|
54
|
$return = $item[$#item] unless defined $return; |
5621
|
12
|
50
|
|
|
|
47
|
if (defined $::RD_TRACE) |
5622
|
|
|
|
|
|
|
{ |
5623
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
5624
|
|
|
|
|
|
|
$return . q{])}, "", |
5625
|
|
|
|
|
|
|
q{EOF}, |
5626
|
|
|
|
|
|
|
$tracelevel); |
5627
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
5628
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
5629
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5630
|
|
|
|
|
|
|
, q{EOF}, |
5631
|
|
|
|
|
|
|
$tracelevel) |
5632
|
|
|
|
|
|
|
} |
5633
|
12
|
|
|
|
|
29
|
$_[1] = $text; |
5634
|
12
|
|
|
|
|
79
|
return $return; |
5635
|
|
|
|
|
|
|
} |
5636
|
|
|
|
|
|
|
|
5637
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
5638
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PTICKED |
5639
|
|
|
|
|
|
|
{ |
5640
|
0
|
|
|
0
|
|
0
|
my $thisparser = $_[0]; |
5641
|
2
|
|
|
2
|
|
18
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
1341
|
|
5642
|
0
|
|
0
|
|
|
0
|
local $tracelevel = ($tracelevel||0)+1; |
5643
|
0
|
|
|
|
|
0
|
$ERRORS = 0; |
5644
|
0
|
|
|
|
|
0
|
my $thisrule = $thisparser->{"rules"}{"PTICKED"}; |
5645
|
|
|
|
|
|
|
|
5646
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [PTICKED]}, |
5647
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5648
|
|
|
|
|
|
|
q{PTICKED}, |
5649
|
|
|
|
|
|
|
$tracelevel) |
5650
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5651
|
|
|
|
|
|
|
|
5652
|
|
|
|
|
|
|
|
5653
|
0
|
|
|
|
|
0
|
my $err_at = @{$thisparser->{errors}}; |
|
0
|
|
|
|
|
0
|
|
5654
|
|
|
|
|
|
|
|
5655
|
0
|
|
|
|
|
0
|
my $score; |
5656
|
|
|
|
|
|
|
my $score_return; |
5657
|
0
|
|
|
|
|
0
|
my $_tok; |
5658
|
0
|
|
|
|
|
0
|
my $return = undef; |
5659
|
0
|
|
|
|
|
0
|
my $_matched=0; |
5660
|
0
|
|
|
|
|
0
|
my $commit=0; |
5661
|
0
|
|
|
|
|
0
|
my @item = (); |
5662
|
0
|
|
|
|
|
0
|
my %item = (); |
5663
|
0
|
|
|
|
|
0
|
my $repeating = $_[2]; |
5664
|
0
|
|
|
|
|
0
|
my $_noactions = $_[3]; |
5665
|
0
|
0
|
|
|
|
0
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
5666
|
0
|
|
|
|
|
0
|
my $_itempos = $_[5]; |
5667
|
0
|
0
|
|
|
|
0
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
5668
|
0
|
|
|
|
|
0
|
my $text; |
5669
|
|
|
|
|
|
|
my $lastsep; |
5670
|
0
|
|
|
|
|
0
|
my $current_match; |
5671
|
0
|
|
|
|
|
0
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/[^`]+/}); |
5672
|
0
|
|
|
|
|
0
|
$expectation->at($_[1]); |
5673
|
|
|
|
|
|
|
|
5674
|
0
|
|
|
|
|
0
|
my $thisline; |
5675
|
0
|
|
|
|
|
0
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
5676
|
|
|
|
|
|
|
|
5677
|
|
|
|
|
|
|
|
5678
|
|
|
|
|
|
|
|
5679
|
0
|
|
0
|
|
|
0
|
while (!$_matched && !$commit) |
5680
|
|
|
|
|
|
|
{ |
5681
|
|
|
|
|
|
|
|
5682
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/[^`]+/]}, |
5683
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5684
|
|
|
|
|
|
|
q{PTICKED}, |
5685
|
|
|
|
|
|
|
$tracelevel) |
5686
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5687
|
0
|
|
|
|
|
0
|
my $thisprod = $thisrule->{"prods"}[0]; |
5688
|
0
|
|
|
|
|
0
|
$text = $_[1]; |
5689
|
0
|
|
|
|
|
0
|
my $_savetext; |
5690
|
0
|
|
|
|
|
0
|
@item = (q{PTICKED}); |
5691
|
0
|
|
|
|
|
0
|
%item = (__RULE__ => q{PTICKED}); |
5692
|
0
|
|
|
|
|
0
|
my $repcount = 0; |
5693
|
|
|
|
|
|
|
|
5694
|
|
|
|
|
|
|
|
5695
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/[^`]+/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
5696
|
|
|
|
|
|
|
q{PTICKED}, |
5697
|
|
|
|
|
|
|
$tracelevel) |
5698
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5699
|
0
|
|
|
|
|
0
|
undef $lastsep; |
5700
|
0
|
|
|
|
|
0
|
$expectation->is(q{})->at($text); |
5701
|
|
|
|
|
|
|
|
5702
|
|
|
|
|
|
|
|
5703
|
0
|
0
|
0
|
|
|
0
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[^`]+)/) |
|
0
|
0
|
|
|
|
0
|
|
5704
|
|
|
|
|
|
|
{ |
5705
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
5706
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
5707
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
5708
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5709
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5710
|
|
|
|
|
|
|
|
5711
|
0
|
|
|
|
|
0
|
last; |
5712
|
|
|
|
|
|
|
} |
5713
|
0
|
|
|
|
|
0
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
5714
|
0
|
|
|
|
|
0
|
substr($text,0,length($current_match),q{}); |
5715
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
5716
|
|
|
|
|
|
|
. $current_match . q{])}, |
5717
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5718
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5719
|
0
|
|
|
|
|
0
|
push @item, $item{__PATTERN1__}=$current_match; |
5720
|
|
|
|
|
|
|
|
5721
|
|
|
|
|
|
|
|
5722
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
5723
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5724
|
|
|
|
|
|
|
q{PTICKED}, |
5725
|
|
|
|
|
|
|
$tracelevel) |
5726
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5727
|
|
|
|
|
|
|
|
5728
|
|
|
|
|
|
|
|
5729
|
0
|
0
|
|
|
|
0
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1]}; |
|
0
|
|
|
|
|
0
|
|
5730
|
0
|
0
|
|
|
|
0
|
unless (defined $_tok) |
5731
|
|
|
|
|
|
|
{ |
5732
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
5733
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5734
|
0
|
|
|
|
|
0
|
last; |
5735
|
|
|
|
|
|
|
} |
5736
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
5737
|
|
|
|
|
|
|
. $_tok . q{])}, |
5738
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5739
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5740
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
5741
|
0
|
|
|
|
|
0
|
$item{__ACTION1__}=$_tok; |
5742
|
|
|
|
|
|
|
|
5743
|
|
|
|
|
|
|
|
5744
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/[^`]+/]<<}, |
5745
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5746
|
|
|
|
|
|
|
q{PTICKED}, |
5747
|
|
|
|
|
|
|
$tracelevel) |
5748
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5749
|
|
|
|
|
|
|
|
5750
|
|
|
|
|
|
|
|
5751
|
|
|
|
|
|
|
|
5752
|
0
|
|
|
|
|
0
|
$_matched = 1; |
5753
|
0
|
|
|
|
|
0
|
last; |
5754
|
|
|
|
|
|
|
} |
5755
|
|
|
|
|
|
|
|
5756
|
|
|
|
|
|
|
|
5757
|
0
|
0
|
0
|
|
|
0
|
unless ( $_matched || defined($score) ) |
5758
|
|
|
|
|
|
|
{ |
5759
|
|
|
|
|
|
|
|
5760
|
|
|
|
|
|
|
|
5761
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
5762
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
5763
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5764
|
|
|
|
|
|
|
q{PTICKED}, |
5765
|
|
|
|
|
|
|
$tracelevel) |
5766
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5767
|
0
|
|
|
|
|
0
|
return undef; |
5768
|
|
|
|
|
|
|
} |
5769
|
0
|
0
|
0
|
|
|
0
|
if (!defined($return) && defined($score)) |
5770
|
|
|
|
|
|
|
{ |
5771
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
5772
|
|
|
|
|
|
|
q{PTICKED}, |
5773
|
|
|
|
|
|
|
$tracelevel) |
5774
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5775
|
0
|
|
|
|
|
0
|
$return = $score_return; |
5776
|
|
|
|
|
|
|
} |
5777
|
0
|
|
|
|
|
0
|
splice @{$thisparser->{errors}}, $err_at; |
|
0
|
|
|
|
|
0
|
|
5778
|
0
|
0
|
|
|
|
0
|
$return = $item[$#item] unless defined $return; |
5779
|
0
|
0
|
|
|
|
0
|
if (defined $::RD_TRACE) |
5780
|
|
|
|
|
|
|
{ |
5781
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
5782
|
|
|
|
|
|
|
$return . q{])}, "", |
5783
|
|
|
|
|
|
|
q{PTICKED}, |
5784
|
|
|
|
|
|
|
$tracelevel); |
5785
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
5786
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
5787
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5788
|
|
|
|
|
|
|
, q{PTICKED}, |
5789
|
|
|
|
|
|
|
$tracelevel) |
5790
|
|
|
|
|
|
|
} |
5791
|
0
|
|
|
|
|
0
|
$_[1] = $text; |
5792
|
0
|
|
|
|
|
0
|
return $return; |
5793
|
|
|
|
|
|
|
} |
5794
|
|
|
|
|
|
|
|
5795
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
5796
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SPACE |
5797
|
|
|
|
|
|
|
{ |
5798
|
0
|
|
|
0
|
|
0
|
my $thisparser = $_[0]; |
5799
|
2
|
|
|
2
|
|
16
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
1352
|
|
5800
|
0
|
|
0
|
|
|
0
|
local $tracelevel = ($tracelevel||0)+1; |
5801
|
0
|
|
|
|
|
0
|
$ERRORS = 0; |
5802
|
0
|
|
|
|
|
0
|
my $thisrule = $thisparser->{"rules"}{"SPACE"}; |
5803
|
|
|
|
|
|
|
|
5804
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [SPACE]}, |
5805
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5806
|
|
|
|
|
|
|
q{SPACE}, |
5807
|
|
|
|
|
|
|
$tracelevel) |
5808
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5809
|
|
|
|
|
|
|
|
5810
|
|
|
|
|
|
|
|
5811
|
0
|
|
|
|
|
0
|
my $err_at = @{$thisparser->{errors}}; |
|
0
|
|
|
|
|
0
|
|
5812
|
|
|
|
|
|
|
|
5813
|
0
|
|
|
|
|
0
|
my $score; |
5814
|
|
|
|
|
|
|
my $score_return; |
5815
|
0
|
|
|
|
|
0
|
my $_tok; |
5816
|
0
|
|
|
|
|
0
|
my $return = undef; |
5817
|
0
|
|
|
|
|
0
|
my $_matched=0; |
5818
|
0
|
|
|
|
|
0
|
my $commit=0; |
5819
|
0
|
|
|
|
|
0
|
my @item = (); |
5820
|
0
|
|
|
|
|
0
|
my %item = (); |
5821
|
0
|
|
|
|
|
0
|
my $repeating = $_[2]; |
5822
|
0
|
|
|
|
|
0
|
my $_noactions = $_[3]; |
5823
|
0
|
0
|
|
|
|
0
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
5824
|
0
|
|
|
|
|
0
|
my $_itempos = $_[5]; |
5825
|
0
|
0
|
|
|
|
0
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
5826
|
0
|
|
|
|
|
0
|
my $text; |
5827
|
|
|
|
|
|
|
my $lastsep; |
5828
|
0
|
|
|
|
|
0
|
my $current_match; |
5829
|
0
|
|
|
|
|
0
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/\\s+/}); |
5830
|
0
|
|
|
|
|
0
|
$expectation->at($_[1]); |
5831
|
|
|
|
|
|
|
|
5832
|
0
|
|
|
|
|
0
|
my $thisline; |
5833
|
0
|
|
|
|
|
0
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
5834
|
|
|
|
|
|
|
|
5835
|
|
|
|
|
|
|
|
5836
|
|
|
|
|
|
|
|
5837
|
0
|
|
0
|
|
|
0
|
while (!$_matched && !$commit) |
5838
|
|
|
|
|
|
|
{ |
5839
|
|
|
|
|
|
|
|
5840
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/\\s+/]}, |
5841
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5842
|
|
|
|
|
|
|
q{SPACE}, |
5843
|
|
|
|
|
|
|
$tracelevel) |
5844
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5845
|
0
|
|
|
|
|
0
|
my $thisprod = $thisrule->{"prods"}[0]; |
5846
|
0
|
|
|
|
|
0
|
$text = $_[1]; |
5847
|
0
|
|
|
|
|
0
|
my $_savetext; |
5848
|
0
|
|
|
|
|
0
|
@item = (q{SPACE}); |
5849
|
0
|
|
|
|
|
0
|
%item = (__RULE__ => q{SPACE}); |
5850
|
0
|
|
|
|
|
0
|
my $repcount = 0; |
5851
|
|
|
|
|
|
|
|
5852
|
|
|
|
|
|
|
|
5853
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/\\s+/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
5854
|
|
|
|
|
|
|
q{SPACE}, |
5855
|
|
|
|
|
|
|
$tracelevel) |
5856
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5857
|
0
|
|
|
|
|
0
|
undef $lastsep; |
5858
|
0
|
|
|
|
|
0
|
$expectation->is(q{})->at($text); |
5859
|
|
|
|
|
|
|
|
5860
|
|
|
|
|
|
|
|
5861
|
0
|
0
|
0
|
|
|
0
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\s+)/) |
|
0
|
0
|
|
|
|
0
|
|
5862
|
|
|
|
|
|
|
{ |
5863
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
5864
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
5865
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
5866
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5867
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5868
|
|
|
|
|
|
|
|
5869
|
0
|
|
|
|
|
0
|
last; |
5870
|
|
|
|
|
|
|
} |
5871
|
0
|
|
|
|
|
0
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
5872
|
0
|
|
|
|
|
0
|
substr($text,0,length($current_match),q{}); |
5873
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
5874
|
|
|
|
|
|
|
. $current_match . q{])}, |
5875
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5876
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5877
|
0
|
|
|
|
|
0
|
push @item, $item{__PATTERN1__}=$current_match; |
5878
|
|
|
|
|
|
|
|
5879
|
|
|
|
|
|
|
|
5880
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
5881
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5882
|
|
|
|
|
|
|
q{SPACE}, |
5883
|
|
|
|
|
|
|
$tracelevel) |
5884
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5885
|
|
|
|
|
|
|
|
5886
|
|
|
|
|
|
|
|
5887
|
0
|
0
|
|
|
|
0
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1]}; |
|
0
|
|
|
|
|
0
|
|
5888
|
0
|
0
|
|
|
|
0
|
unless (defined $_tok) |
5889
|
|
|
|
|
|
|
{ |
5890
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
5891
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5892
|
0
|
|
|
|
|
0
|
last; |
5893
|
|
|
|
|
|
|
} |
5894
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
5895
|
|
|
|
|
|
|
. $_tok . q{])}, |
5896
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5897
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5898
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
5899
|
0
|
|
|
|
|
0
|
$item{__ACTION1__}=$_tok; |
5900
|
|
|
|
|
|
|
|
5901
|
|
|
|
|
|
|
|
5902
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/\\s+/]<<}, |
5903
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5904
|
|
|
|
|
|
|
q{SPACE}, |
5905
|
|
|
|
|
|
|
$tracelevel) |
5906
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5907
|
|
|
|
|
|
|
|
5908
|
|
|
|
|
|
|
|
5909
|
|
|
|
|
|
|
|
5910
|
0
|
|
|
|
|
0
|
$_matched = 1; |
5911
|
0
|
|
|
|
|
0
|
last; |
5912
|
|
|
|
|
|
|
} |
5913
|
|
|
|
|
|
|
|
5914
|
|
|
|
|
|
|
|
5915
|
0
|
0
|
0
|
|
|
0
|
unless ( $_matched || defined($score) ) |
5916
|
|
|
|
|
|
|
{ |
5917
|
|
|
|
|
|
|
|
5918
|
|
|
|
|
|
|
|
5919
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
5920
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
5921
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5922
|
|
|
|
|
|
|
q{SPACE}, |
5923
|
|
|
|
|
|
|
$tracelevel) |
5924
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5925
|
0
|
|
|
|
|
0
|
return undef; |
5926
|
|
|
|
|
|
|
} |
5927
|
0
|
0
|
0
|
|
|
0
|
if (!defined($return) && defined($score)) |
5928
|
|
|
|
|
|
|
{ |
5929
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
5930
|
|
|
|
|
|
|
q{SPACE}, |
5931
|
|
|
|
|
|
|
$tracelevel) |
5932
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5933
|
0
|
|
|
|
|
0
|
$return = $score_return; |
5934
|
|
|
|
|
|
|
} |
5935
|
0
|
|
|
|
|
0
|
splice @{$thisparser->{errors}}, $err_at; |
|
0
|
|
|
|
|
0
|
|
5936
|
0
|
0
|
|
|
|
0
|
$return = $item[$#item] unless defined $return; |
5937
|
0
|
0
|
|
|
|
0
|
if (defined $::RD_TRACE) |
5938
|
|
|
|
|
|
|
{ |
5939
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
5940
|
|
|
|
|
|
|
$return . q{])}, "", |
5941
|
|
|
|
|
|
|
q{SPACE}, |
5942
|
|
|
|
|
|
|
$tracelevel); |
5943
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
5944
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
5945
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5946
|
|
|
|
|
|
|
, q{SPACE}, |
5947
|
|
|
|
|
|
|
$tracelevel) |
5948
|
|
|
|
|
|
|
} |
5949
|
0
|
|
|
|
|
0
|
$_[1] = $text; |
5950
|
0
|
|
|
|
|
0
|
return $return; |
5951
|
|
|
|
|
|
|
} |
5952
|
|
|
|
|
|
|
|
5953
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
5954
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::TBNAME |
5955
|
|
|
|
|
|
|
{ |
5956
|
252
|
|
|
252
|
|
449
|
my $thisparser = $_[0]; |
5957
|
2
|
|
|
2
|
|
15
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
841
|
|
5958
|
252
|
|
50
|
|
|
624
|
local $tracelevel = ($tracelevel||0)+1; |
5959
|
252
|
|
|
|
|
434
|
$ERRORS = 0; |
5960
|
252
|
|
|
|
|
536
|
my $thisrule = $thisparser->{"rules"}{"TBNAME"}; |
5961
|
|
|
|
|
|
|
|
5962
|
252
|
50
|
|
|
|
628
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [TBNAME]}, |
5963
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5964
|
|
|
|
|
|
|
q{TBNAME}, |
5965
|
|
|
|
|
|
|
$tracelevel) |
5966
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5967
|
|
|
|
|
|
|
|
5968
|
|
|
|
|
|
|
|
5969
|
252
|
|
|
|
|
396
|
my $err_at = @{$thisparser->{errors}}; |
|
252
|
|
|
|
|
508
|
|
5970
|
|
|
|
|
|
|
|
5971
|
252
|
|
|
|
|
632
|
my $score; |
5972
|
|
|
|
|
|
|
my $score_return; |
5973
|
252
|
|
|
|
|
0
|
my $_tok; |
5974
|
252
|
|
|
|
|
392
|
my $return = undef; |
5975
|
252
|
|
|
|
|
376
|
my $_matched=0; |
5976
|
252
|
|
|
|
|
368
|
my $commit=0; |
5977
|
252
|
|
|
|
|
595
|
my @item = (); |
5978
|
252
|
|
|
|
|
466
|
my %item = (); |
5979
|
252
|
|
|
|
|
389
|
my $repeating = $_[2]; |
5980
|
252
|
|
|
|
|
394
|
my $_noactions = $_[3]; |
5981
|
252
|
50
|
|
|
|
571
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
252
|
|
|
|
|
400
|
|
|
252
|
|
|
|
|
505
|
|
5982
|
252
|
|
|
|
|
444
|
my $_itempos = $_[5]; |
5983
|
252
|
50
|
|
|
|
707
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
5984
|
252
|
|
|
|
|
642
|
my $text; |
5985
|
|
|
|
|
|
|
my $lastsep; |
5986
|
252
|
|
|
|
|
0
|
my $current_match; |
5987
|
252
|
|
|
|
|
567
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/::/, or BNAME}); |
5988
|
252
|
|
|
|
|
680
|
$expectation->at($_[1]); |
5989
|
|
|
|
|
|
|
|
5990
|
252
|
|
|
|
|
371
|
my $thisline; |
5991
|
252
|
|
|
|
|
839
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
5992
|
|
|
|
|
|
|
|
5993
|
|
|
|
|
|
|
|
5994
|
|
|
|
|
|
|
|
5995
|
252
|
|
33
|
|
|
957
|
while (!$_matched && !$commit) |
5996
|
|
|
|
|
|
|
{ |
5997
|
|
|
|
|
|
|
|
5998
|
252
|
50
|
|
|
|
663
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/::/ BNAME]}, |
5999
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6000
|
|
|
|
|
|
|
q{TBNAME}, |
6001
|
|
|
|
|
|
|
$tracelevel) |
6002
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6003
|
252
|
|
|
|
|
523
|
my $thisprod = $thisrule->{"prods"}[0]; |
6004
|
252
|
|
|
|
|
509
|
$text = $_[1]; |
6005
|
252
|
|
|
|
|
415
|
my $_savetext; |
6006
|
252
|
|
|
|
|
477
|
@item = (q{TBNAME}); |
6007
|
252
|
|
|
|
|
544
|
%item = (__RULE__ => q{TBNAME}); |
6008
|
252
|
|
|
|
|
420
|
my $repcount = 0; |
6009
|
|
|
|
|
|
|
|
6010
|
|
|
|
|
|
|
|
6011
|
252
|
50
|
|
|
|
575
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/::/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
6012
|
|
|
|
|
|
|
q{TBNAME}, |
6013
|
|
|
|
|
|
|
$tracelevel) |
6014
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6015
|
252
|
|
|
|
|
440
|
undef $lastsep; |
6016
|
252
|
|
|
|
|
576
|
$expectation->is(q{})->at($text); |
6017
|
|
|
|
|
|
|
|
6018
|
|
|
|
|
|
|
|
6019
|
252
|
100
|
66
|
|
|
1437
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:::)/) |
|
252
|
100
|
|
|
|
2113
|
|
6020
|
|
|
|
|
|
|
{ |
6021
|
248
|
50
|
|
|
|
785
|
$text = $lastsep . $text if defined $lastsep; |
6022
|
248
|
|
|
|
|
680
|
$expectation->failed(); |
6023
|
248
|
50
|
|
|
|
607
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
6024
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6025
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6026
|
|
|
|
|
|
|
|
6027
|
248
|
|
|
|
|
545
|
last; |
6028
|
|
|
|
|
|
|
} |
6029
|
4
|
|
|
|
|
21
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
6030
|
4
|
|
|
|
|
13
|
substr($text,0,length($current_match),q{}); |
6031
|
4
|
50
|
|
|
|
30
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
6032
|
|
|
|
|
|
|
. $current_match . q{])}, |
6033
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6034
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6035
|
4
|
|
|
|
|
11
|
push @item, $item{__PATTERN1__}=$current_match; |
6036
|
|
|
|
|
|
|
|
6037
|
|
|
|
|
|
|
|
6038
|
4
|
50
|
|
|
|
14
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [BNAME]}, |
6039
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6040
|
|
|
|
|
|
|
q{TBNAME}, |
6041
|
|
|
|
|
|
|
$tracelevel) |
6042
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6043
|
2
|
|
|
2
|
|
14
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
686
|
|
|
4
|
|
|
|
|
6
|
|
6044
|
4
|
|
|
|
|
14
|
$expectation->is(q{BNAME})->at($text); |
6045
|
4
|
50
|
|
4
|
|
23
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
4
|
|
|
|
|
10
|
|
6046
|
|
|
|
|
|
|
{ |
6047
|
|
|
|
|
|
|
|
6048
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [BNAME]>>}, |
6049
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6050
|
|
|
|
|
|
|
q{TBNAME}, |
6051
|
|
|
|
|
|
|
$tracelevel) |
6052
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6053
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
6054
|
0
|
|
|
|
|
0
|
last; |
6055
|
|
|
|
|
|
|
} |
6056
|
4
|
50
|
|
|
|
15
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [BNAME]<< (return value: [} |
6057
|
|
|
|
|
|
|
. $_tok . q{]}, |
6058
|
|
|
|
|
|
|
|
6059
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6060
|
|
|
|
|
|
|
q{TBNAME}, |
6061
|
|
|
|
|
|
|
$tracelevel) |
6062
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6063
|
4
|
|
|
|
|
11
|
$item{q{BNAME}} = $_tok; |
6064
|
4
|
|
|
|
|
8
|
push @item, $_tok; |
6065
|
|
|
|
|
|
|
|
6066
|
|
|
|
|
|
|
} |
6067
|
|
|
|
|
|
|
|
6068
|
4
|
50
|
|
|
|
10
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
6069
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6070
|
|
|
|
|
|
|
q{TBNAME}, |
6071
|
|
|
|
|
|
|
$tracelevel) |
6072
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6073
|
|
|
|
|
|
|
|
6074
|
|
|
|
|
|
|
|
6075
|
4
|
50
|
|
|
|
10
|
$_tok = ($_noactions) ? 0 : do {$return = $item{BNAME}}; |
|
4
|
|
|
|
|
10
|
|
6076
|
4
|
50
|
|
|
|
10
|
unless (defined $_tok) |
6077
|
|
|
|
|
|
|
{ |
6078
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
6079
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6080
|
0
|
|
|
|
|
0
|
last; |
6081
|
|
|
|
|
|
|
} |
6082
|
4
|
50
|
|
|
|
10
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
6083
|
|
|
|
|
|
|
. $_tok . q{])}, |
6084
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6085
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6086
|
4
|
|
|
|
|
8
|
push @item, $_tok; |
6087
|
4
|
|
|
|
|
10
|
$item{__ACTION1__}=$_tok; |
6088
|
|
|
|
|
|
|
|
6089
|
|
|
|
|
|
|
|
6090
|
4
|
50
|
|
|
|
11
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/::/ BNAME]<<}, |
6091
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6092
|
|
|
|
|
|
|
q{TBNAME}, |
6093
|
|
|
|
|
|
|
$tracelevel) |
6094
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6095
|
|
|
|
|
|
|
|
6096
|
|
|
|
|
|
|
|
6097
|
|
|
|
|
|
|
|
6098
|
4
|
|
|
|
|
6
|
$_matched = 1; |
6099
|
4
|
|
|
|
|
9
|
last; |
6100
|
|
|
|
|
|
|
} |
6101
|
|
|
|
|
|
|
|
6102
|
|
|
|
|
|
|
|
6103
|
252
|
|
66
|
|
|
908
|
while (!$_matched && !$commit) |
6104
|
|
|
|
|
|
|
{ |
6105
|
|
|
|
|
|
|
|
6106
|
248
|
50
|
|
|
|
571
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [BNAME]}, |
6107
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6108
|
|
|
|
|
|
|
q{TBNAME}, |
6109
|
|
|
|
|
|
|
$tracelevel) |
6110
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6111
|
248
|
|
|
|
|
495
|
my $thisprod = $thisrule->{"prods"}[1]; |
6112
|
248
|
|
|
|
|
475
|
$text = $_[1]; |
6113
|
248
|
|
|
|
|
369
|
my $_savetext; |
6114
|
248
|
|
|
|
|
547
|
@item = (q{TBNAME}); |
6115
|
248
|
|
|
|
|
559
|
%item = (__RULE__ => q{TBNAME}); |
6116
|
248
|
|
|
|
|
398
|
my $repcount = 0; |
6117
|
|
|
|
|
|
|
|
6118
|
|
|
|
|
|
|
|
6119
|
248
|
50
|
|
|
|
567
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [BNAME]}, |
6120
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6121
|
|
|
|
|
|
|
q{TBNAME}, |
6122
|
|
|
|
|
|
|
$tracelevel) |
6123
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6124
|
2
|
|
|
2
|
|
17
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
911
|
|
|
248
|
|
|
|
|
469
|
|
6125
|
248
|
|
|
|
|
537
|
$expectation->is(q{})->at($text); |
6126
|
248
|
100
|
|
248
|
|
1024
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
248
|
|
|
|
|
545
|
|
6127
|
|
|
|
|
|
|
{ |
6128
|
|
|
|
|
|
|
|
6129
|
156
|
50
|
|
|
|
400
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [BNAME]>>}, |
6130
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6131
|
|
|
|
|
|
|
q{TBNAME}, |
6132
|
|
|
|
|
|
|
$tracelevel) |
6133
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6134
|
156
|
|
|
|
|
392
|
$expectation->failed(); |
6135
|
156
|
|
|
|
|
267
|
last; |
6136
|
|
|
|
|
|
|
} |
6137
|
92
|
50
|
|
|
|
358
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [BNAME]<< (return value: [} |
6138
|
|
|
|
|
|
|
. $_tok . q{]}, |
6139
|
|
|
|
|
|
|
|
6140
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6141
|
|
|
|
|
|
|
q{TBNAME}, |
6142
|
|
|
|
|
|
|
$tracelevel) |
6143
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6144
|
92
|
|
|
|
|
218
|
$item{q{BNAME}} = $_tok; |
6145
|
92
|
|
|
|
|
192
|
push @item, $_tok; |
6146
|
|
|
|
|
|
|
|
6147
|
|
|
|
|
|
|
} |
6148
|
|
|
|
|
|
|
|
6149
|
92
|
50
|
|
|
|
276
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
6150
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6151
|
|
|
|
|
|
|
q{TBNAME}, |
6152
|
|
|
|
|
|
|
$tracelevel) |
6153
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6154
|
|
|
|
|
|
|
|
6155
|
|
|
|
|
|
|
|
6156
|
92
|
50
|
|
|
|
222
|
$_tok = ($_noactions) ? 0 : do {$return = "Treex::Block::$item{BNAME}"}; |
|
92
|
|
|
|
|
296
|
|
6157
|
92
|
50
|
|
|
|
243
|
unless (defined $_tok) |
6158
|
|
|
|
|
|
|
{ |
6159
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
6160
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6161
|
0
|
|
|
|
|
0
|
last; |
6162
|
|
|
|
|
|
|
} |
6163
|
92
|
50
|
|
|
|
241
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
6164
|
|
|
|
|
|
|
. $_tok . q{])}, |
6165
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6166
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6167
|
92
|
|
|
|
|
191
|
push @item, $_tok; |
6168
|
92
|
|
|
|
|
182
|
$item{__ACTION1__}=$_tok; |
6169
|
|
|
|
|
|
|
|
6170
|
|
|
|
|
|
|
|
6171
|
92
|
50
|
|
|
|
215
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [BNAME]<<}, |
6172
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6173
|
|
|
|
|
|
|
q{TBNAME}, |
6174
|
|
|
|
|
|
|
$tracelevel) |
6175
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6176
|
|
|
|
|
|
|
|
6177
|
|
|
|
|
|
|
|
6178
|
|
|
|
|
|
|
|
6179
|
92
|
|
|
|
|
146
|
$_matched = 1; |
6180
|
92
|
|
|
|
|
174
|
last; |
6181
|
|
|
|
|
|
|
} |
6182
|
|
|
|
|
|
|
|
6183
|
|
|
|
|
|
|
|
6184
|
252
|
100
|
66
|
|
|
1102
|
unless ( $_matched || defined($score) ) |
6185
|
|
|
|
|
|
|
{ |
6186
|
|
|
|
|
|
|
|
6187
|
|
|
|
|
|
|
|
6188
|
156
|
|
|
|
|
287
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
6189
|
156
|
50
|
|
|
|
345
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
6190
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6191
|
|
|
|
|
|
|
q{TBNAME}, |
6192
|
|
|
|
|
|
|
$tracelevel) |
6193
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6194
|
156
|
|
|
|
|
712
|
return undef; |
6195
|
|
|
|
|
|
|
} |
6196
|
96
|
50
|
33
|
|
|
295
|
if (!defined($return) && defined($score)) |
6197
|
|
|
|
|
|
|
{ |
6198
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
6199
|
|
|
|
|
|
|
q{TBNAME}, |
6200
|
|
|
|
|
|
|
$tracelevel) |
6201
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6202
|
0
|
|
|
|
|
0
|
$return = $score_return; |
6203
|
|
|
|
|
|
|
} |
6204
|
96
|
|
|
|
|
144
|
splice @{$thisparser->{errors}}, $err_at; |
|
96
|
|
|
|
|
216
|
|
6205
|
96
|
50
|
|
|
|
286
|
$return = $item[$#item] unless defined $return; |
6206
|
96
|
50
|
|
|
|
236
|
if (defined $::RD_TRACE) |
6207
|
|
|
|
|
|
|
{ |
6208
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
6209
|
|
|
|
|
|
|
$return . q{])}, "", |
6210
|
|
|
|
|
|
|
q{TBNAME}, |
6211
|
|
|
|
|
|
|
$tracelevel); |
6212
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
6213
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
6214
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6215
|
|
|
|
|
|
|
, q{TBNAME}, |
6216
|
|
|
|
|
|
|
$tracelevel) |
6217
|
|
|
|
|
|
|
} |
6218
|
96
|
|
|
|
|
185
|
$_[1] = $text; |
6219
|
96
|
|
|
|
|
573
|
return $return; |
6220
|
|
|
|
|
|
|
} |
6221
|
|
|
|
|
|
|
|
6222
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
6223
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BLOCK |
6224
|
|
|
|
|
|
|
{ |
6225
|
140
|
|
|
140
|
|
281
|
my $thisparser = $_[0]; |
6226
|
2
|
|
|
2
|
|
15
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
531
|
|
6227
|
140
|
|
50
|
|
|
457
|
local $tracelevel = ($tracelevel||0)+1; |
6228
|
140
|
|
|
|
|
264
|
$ERRORS = 0; |
6229
|
140
|
|
|
|
|
320
|
my $thisrule = $thisparser->{"rules"}{"BLOCK"}; |
6230
|
|
|
|
|
|
|
|
6231
|
140
|
50
|
|
|
|
338
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [BLOCK]}, |
6232
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6233
|
|
|
|
|
|
|
q{BLOCK}, |
6234
|
|
|
|
|
|
|
$tracelevel) |
6235
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6236
|
|
|
|
|
|
|
|
6237
|
|
|
|
|
|
|
|
6238
|
140
|
|
|
|
|
203
|
my $err_at = @{$thisparser->{errors}}; |
|
140
|
|
|
|
|
273
|
|
6239
|
|
|
|
|
|
|
|
6240
|
140
|
|
|
|
|
374
|
my $score; |
6241
|
|
|
|
|
|
|
my $score_return; |
6242
|
140
|
|
|
|
|
0
|
my $_tok; |
6243
|
140
|
|
|
|
|
219
|
my $return = undef; |
6244
|
140
|
|
|
|
|
239
|
my $_matched=0; |
6245
|
140
|
|
|
|
|
254
|
my $commit=0; |
6246
|
140
|
|
|
|
|
242
|
my @item = (); |
6247
|
140
|
|
|
|
|
256
|
my %item = (); |
6248
|
140
|
|
|
|
|
256
|
my $repeating = $_[2]; |
6249
|
140
|
|
|
|
|
258
|
my $_noactions = $_[3]; |
6250
|
140
|
50
|
|
|
|
312
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
140
|
|
|
|
|
231
|
|
|
140
|
|
|
|
|
294
|
|
6251
|
140
|
|
|
|
|
242
|
my $_itempos = $_[5]; |
6252
|
140
|
50
|
|
|
|
437
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
6253
|
140
|
|
|
|
|
389
|
my $text; |
6254
|
|
|
|
|
|
|
my $lastsep; |
6255
|
140
|
|
|
|
|
0
|
my $current_match; |
6256
|
140
|
|
|
|
|
327
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{INCLUDE, or SCENMODULE, or TBNAME}); |
6257
|
140
|
|
|
|
|
371
|
$expectation->at($_[1]); |
6258
|
|
|
|
|
|
|
|
6259
|
140
|
|
|
|
|
249
|
my $thisline; |
6260
|
140
|
|
|
|
|
425
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
6261
|
|
|
|
|
|
|
|
6262
|
|
|
|
|
|
|
|
6263
|
|
|
|
|
|
|
|
6264
|
140
|
|
33
|
|
|
551
|
while (!$_matched && !$commit) |
6265
|
|
|
|
|
|
|
{ |
6266
|
|
|
|
|
|
|
|
6267
|
140
|
50
|
|
|
|
380
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [INCLUDE]}, |
6268
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6269
|
|
|
|
|
|
|
q{BLOCK}, |
6270
|
|
|
|
|
|
|
$tracelevel) |
6271
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6272
|
140
|
|
|
|
|
283
|
my $thisprod = $thisrule->{"prods"}[0]; |
6273
|
140
|
|
|
|
|
251
|
$text = $_[1]; |
6274
|
140
|
|
|
|
|
252
|
my $_savetext; |
6275
|
140
|
|
|
|
|
297
|
@item = (q{BLOCK}); |
6276
|
140
|
|
|
|
|
375
|
%item = (__RULE__ => q{BLOCK}); |
6277
|
140
|
|
|
|
|
230
|
my $repcount = 0; |
6278
|
|
|
|
|
|
|
|
6279
|
|
|
|
|
|
|
|
6280
|
140
|
50
|
|
|
|
355
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [INCLUDE]}, |
6281
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6282
|
|
|
|
|
|
|
q{BLOCK}, |
6283
|
|
|
|
|
|
|
$tracelevel) |
6284
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6285
|
2
|
|
|
2
|
|
14
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
676
|
|
|
140
|
|
|
|
|
242
|
|
6286
|
140
|
|
|
|
|
312
|
$expectation->is(q{})->at($text); |
6287
|
140
|
100
|
|
140
|
|
581
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::INCLUDE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
140
|
|
|
|
|
362
|
|
6288
|
|
|
|
|
|
|
{ |
6289
|
|
|
|
|
|
|
|
6290
|
139
|
50
|
|
|
|
341
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [INCLUDE]>>}, |
6291
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6292
|
|
|
|
|
|
|
q{BLOCK}, |
6293
|
|
|
|
|
|
|
$tracelevel) |
6294
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6295
|
139
|
|
|
|
|
378
|
$expectation->failed(); |
6296
|
139
|
|
|
|
|
282
|
last; |
6297
|
|
|
|
|
|
|
} |
6298
|
1
|
50
|
|
|
|
6
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [INCLUDE]<< (return value: [} |
6299
|
|
|
|
|
|
|
. $_tok . q{]}, |
6300
|
|
|
|
|
|
|
|
6301
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6302
|
|
|
|
|
|
|
q{BLOCK}, |
6303
|
|
|
|
|
|
|
$tracelevel) |
6304
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6305
|
1
|
|
|
|
|
2
|
$item{q{INCLUDE}} = $_tok; |
6306
|
1
|
|
|
|
|
3
|
push @item, $_tok; |
6307
|
|
|
|
|
|
|
|
6308
|
|
|
|
|
|
|
} |
6309
|
|
|
|
|
|
|
|
6310
|
1
|
50
|
|
|
|
3
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
6311
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6312
|
|
|
|
|
|
|
q{BLOCK}, |
6313
|
|
|
|
|
|
|
$tracelevel) |
6314
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6315
|
|
|
|
|
|
|
|
6316
|
|
|
|
|
|
|
|
6317
|
1
|
50
|
|
|
|
4
|
$_tok = ($_noactions) ? 0 : do { |
6318
|
1
|
|
|
|
|
8
|
my $included = read_file( $item{INCLUDE}, binmode => ':utf8' ); |
6319
|
1
|
|
|
|
|
299
|
my $result = $thisparser->startrule( $included, 1, $item{INCLUDE} ); |
6320
|
1
|
50
|
33
|
|
|
10
|
if (defined $result and ref $result eq 'ARRAY') { |
6321
|
1
|
|
|
|
|
5
|
$return = [@$result]; |
6322
|
|
|
|
|
|
|
} else { |
6323
|
0
|
|
|
|
|
0
|
$return = undef; |
6324
|
|
|
|
|
|
|
} |
6325
|
|
|
|
|
|
|
}; |
6326
|
1
|
50
|
|
|
|
3
|
unless (defined $_tok) |
6327
|
|
|
|
|
|
|
{ |
6328
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
6329
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6330
|
0
|
|
|
|
|
0
|
last; |
6331
|
|
|
|
|
|
|
} |
6332
|
1
|
50
|
|
|
|
4
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
6333
|
|
|
|
|
|
|
. $_tok . q{])}, |
6334
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6335
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6336
|
1
|
|
|
|
|
3
|
push @item, $_tok; |
6337
|
1
|
|
|
|
|
4
|
$item{__ACTION1__}=$_tok; |
6338
|
|
|
|
|
|
|
|
6339
|
|
|
|
|
|
|
|
6340
|
1
|
50
|
|
|
|
4
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [INCLUDE]<<}, |
6341
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6342
|
|
|
|
|
|
|
q{BLOCK}, |
6343
|
|
|
|
|
|
|
$tracelevel) |
6344
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6345
|
|
|
|
|
|
|
|
6346
|
|
|
|
|
|
|
|
6347
|
|
|
|
|
|
|
|
6348
|
1
|
|
|
|
|
2
|
$_matched = 1; |
6349
|
1
|
|
|
|
|
3
|
last; |
6350
|
|
|
|
|
|
|
} |
6351
|
|
|
|
|
|
|
|
6352
|
|
|
|
|
|
|
|
6353
|
140
|
|
66
|
|
|
665
|
while (!$_matched && !$commit) |
6354
|
|
|
|
|
|
|
{ |
6355
|
|
|
|
|
|
|
|
6356
|
139
|
50
|
|
|
|
324
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [SCENMODULE PARAMS]}, |
6357
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6358
|
|
|
|
|
|
|
q{BLOCK}, |
6359
|
|
|
|
|
|
|
$tracelevel) |
6360
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6361
|
139
|
|
|
|
|
278
|
my $thisprod = $thisrule->{"prods"}[1]; |
6362
|
139
|
|
|
|
|
255
|
$text = $_[1]; |
6363
|
139
|
|
|
|
|
219
|
my $_savetext; |
6364
|
139
|
|
|
|
|
329
|
@item = (q{BLOCK}); |
6365
|
139
|
|
|
|
|
323
|
%item = (__RULE__ => q{BLOCK}); |
6366
|
139
|
|
|
|
|
252
|
my $repcount = 0; |
6367
|
|
|
|
|
|
|
|
6368
|
|
|
|
|
|
|
|
6369
|
139
|
50
|
|
|
|
354
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [SCENMODULE]}, |
6370
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6371
|
|
|
|
|
|
|
q{BLOCK}, |
6372
|
|
|
|
|
|
|
$tracelevel) |
6373
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6374
|
2
|
|
|
2
|
|
15
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
361
|
|
|
139
|
|
|
|
|
222
|
|
6375
|
139
|
|
|
|
|
321
|
$expectation->is(q{})->at($text); |
6376
|
139
|
50
|
|
139
|
|
639
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SCENMODULE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
139
|
|
|
|
|
302
|
|
6377
|
|
|
|
|
|
|
{ |
6378
|
|
|
|
|
|
|
|
6379
|
139
|
50
|
|
|
|
346
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [SCENMODULE]>>}, |
6380
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6381
|
|
|
|
|
|
|
q{BLOCK}, |
6382
|
|
|
|
|
|
|
$tracelevel) |
6383
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6384
|
139
|
|
|
|
|
402
|
$expectation->failed(); |
6385
|
139
|
|
|
|
|
267
|
last; |
6386
|
|
|
|
|
|
|
} |
6387
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [SCENMODULE]<< (return value: [} |
6388
|
|
|
|
|
|
|
. $_tok . q{]}, |
6389
|
|
|
|
|
|
|
|
6390
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6391
|
|
|
|
|
|
|
q{BLOCK}, |
6392
|
|
|
|
|
|
|
$tracelevel) |
6393
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6394
|
0
|
|
|
|
|
0
|
$item{q{SCENMODULE}} = $_tok; |
6395
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
6396
|
|
|
|
|
|
|
|
6397
|
|
|
|
|
|
|
} |
6398
|
|
|
|
|
|
|
|
6399
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PARAMS]}, |
6400
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6401
|
|
|
|
|
|
|
q{BLOCK}, |
6402
|
|
|
|
|
|
|
$tracelevel) |
6403
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6404
|
2
|
|
|
2
|
|
17
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
973
|
|
|
0
|
|
|
|
|
0
|
|
6405
|
0
|
|
|
|
|
0
|
$expectation->is(q{PARAMS})->at($text); |
6406
|
0
|
0
|
|
0
|
|
0
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAMS($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
0
|
|
|
|
|
0
|
|
6407
|
|
|
|
|
|
|
{ |
6408
|
|
|
|
|
|
|
|
6409
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PARAMS]>>}, |
6410
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6411
|
|
|
|
|
|
|
q{BLOCK}, |
6412
|
|
|
|
|
|
|
$tracelevel) |
6413
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6414
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
6415
|
0
|
|
|
|
|
0
|
last; |
6416
|
|
|
|
|
|
|
} |
6417
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PARAMS]<< (return value: [} |
6418
|
|
|
|
|
|
|
. $_tok . q{]}, |
6419
|
|
|
|
|
|
|
|
6420
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6421
|
|
|
|
|
|
|
q{BLOCK}, |
6422
|
|
|
|
|
|
|
$tracelevel) |
6423
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6424
|
0
|
|
|
|
|
0
|
$item{q{PARAMS}} = $_tok; |
6425
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
6426
|
|
|
|
|
|
|
|
6427
|
|
|
|
|
|
|
} |
6428
|
|
|
|
|
|
|
|
6429
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
6430
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6431
|
|
|
|
|
|
|
q{BLOCK}, |
6432
|
|
|
|
|
|
|
$tracelevel) |
6433
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6434
|
|
|
|
|
|
|
|
6435
|
|
|
|
|
|
|
|
6436
|
0
|
0
|
|
|
|
0
|
$_tok = ($_noactions) ? 0 : do { |
6437
|
0
|
|
|
|
|
0
|
my $modulename = $item{SCENMODULE}; |
6438
|
0
|
0
|
|
|
|
0
|
eval "use $modulename; 1;" or die "Can't use $modulename !\n$@\n"; |
6439
|
0
|
|
|
|
|
0
|
my %params = map {my ($name,$value) = split /=/, $_, 2; ($name, $value)} @{$item{PARAMS}}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
6440
|
0
|
|
|
|
|
0
|
my $scenmod = $modulename->new(\%params); |
6441
|
0
|
|
|
|
|
0
|
my $string = $scenmod->get_scenario_string(); |
6442
|
0
|
|
|
|
|
0
|
my $result = $thisparser->startrule( $string, 0, '' ); |
6443
|
0
|
0
|
0
|
|
|
0
|
if (defined $result and ref $result eq 'ARRAY') { |
6444
|
0
|
|
|
|
|
0
|
$return = [@$result]; |
6445
|
|
|
|
|
|
|
} else { |
6446
|
0
|
|
|
|
|
0
|
log_fatal "Syntax error in '$modulename' scenario:\n<BEGIN SCENARIO>\n$string\n<END SCENARIO>"; |
6447
|
|
|
|
|
|
|
} |
6448
|
|
|
|
|
|
|
}; |
6449
|
0
|
0
|
|
|
|
0
|
unless (defined $_tok) |
6450
|
|
|
|
|
|
|
{ |
6451
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
6452
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6453
|
0
|
|
|
|
|
0
|
last; |
6454
|
|
|
|
|
|
|
} |
6455
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
6456
|
|
|
|
|
|
|
. $_tok . q{])}, |
6457
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6458
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6459
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
6460
|
0
|
|
|
|
|
0
|
$item{__ACTION1__}=$_tok; |
6461
|
|
|
|
|
|
|
|
6462
|
|
|
|
|
|
|
|
6463
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [SCENMODULE PARAMS]<<}, |
6464
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6465
|
|
|
|
|
|
|
q{BLOCK}, |
6466
|
|
|
|
|
|
|
$tracelevel) |
6467
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6468
|
|
|
|
|
|
|
|
6469
|
|
|
|
|
|
|
|
6470
|
|
|
|
|
|
|
|
6471
|
0
|
|
|
|
|
0
|
$_matched = 1; |
6472
|
0
|
|
|
|
|
0
|
last; |
6473
|
|
|
|
|
|
|
} |
6474
|
|
|
|
|
|
|
|
6475
|
|
|
|
|
|
|
|
6476
|
140
|
|
66
|
|
|
712
|
while (!$_matched && !$commit) |
6477
|
|
|
|
|
|
|
{ |
6478
|
|
|
|
|
|
|
|
6479
|
139
|
50
|
|
|
|
359
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [SCENMODULE]}, |
6480
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6481
|
|
|
|
|
|
|
q{BLOCK}, |
6482
|
|
|
|
|
|
|
$tracelevel) |
6483
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6484
|
139
|
|
|
|
|
304
|
my $thisprod = $thisrule->{"prods"}[2]; |
6485
|
139
|
|
|
|
|
241
|
$text = $_[1]; |
6486
|
139
|
|
|
|
|
212
|
my $_savetext; |
6487
|
139
|
|
|
|
|
329
|
@item = (q{BLOCK}); |
6488
|
139
|
|
|
|
|
351
|
%item = (__RULE__ => q{BLOCK}); |
6489
|
139
|
|
|
|
|
267
|
my $repcount = 0; |
6490
|
|
|
|
|
|
|
|
6491
|
|
|
|
|
|
|
|
6492
|
139
|
50
|
|
|
|
349
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [SCENMODULE]}, |
6493
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6494
|
|
|
|
|
|
|
q{BLOCK}, |
6495
|
|
|
|
|
|
|
$tracelevel) |
6496
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6497
|
2
|
|
|
2
|
|
14
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
688
|
|
|
139
|
|
|
|
|
247
|
|
6498
|
139
|
|
|
|
|
324
|
$expectation->is(q{})->at($text); |
6499
|
139
|
50
|
|
139
|
|
614
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SCENMODULE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
139
|
|
|
|
|
324
|
|
6500
|
|
|
|
|
|
|
{ |
6501
|
|
|
|
|
|
|
|
6502
|
139
|
50
|
|
|
|
365
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [SCENMODULE]>>}, |
6503
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6504
|
|
|
|
|
|
|
q{BLOCK}, |
6505
|
|
|
|
|
|
|
$tracelevel) |
6506
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6507
|
139
|
|
|
|
|
369
|
$expectation->failed(); |
6508
|
139
|
|
|
|
|
234
|
last; |
6509
|
|
|
|
|
|
|
} |
6510
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [SCENMODULE]<< (return value: [} |
6511
|
|
|
|
|
|
|
. $_tok . q{]}, |
6512
|
|
|
|
|
|
|
|
6513
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6514
|
|
|
|
|
|
|
q{BLOCK}, |
6515
|
|
|
|
|
|
|
$tracelevel) |
6516
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6517
|
0
|
|
|
|
|
0
|
$item{q{SCENMODULE}} = $_tok; |
6518
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
6519
|
|
|
|
|
|
|
|
6520
|
|
|
|
|
|
|
} |
6521
|
|
|
|
|
|
|
|
6522
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
6523
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6524
|
|
|
|
|
|
|
q{BLOCK}, |
6525
|
|
|
|
|
|
|
$tracelevel) |
6526
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6527
|
|
|
|
|
|
|
|
6528
|
|
|
|
|
|
|
|
6529
|
0
|
0
|
|
|
|
0
|
$_tok = ($_noactions) ? 0 : do { |
6530
|
0
|
|
|
|
|
0
|
my $modulename = $item{SCENMODULE}; |
6531
|
0
|
0
|
|
|
|
0
|
eval "use $modulename; 1;" or die "Can't use $modulename !\n$@\n"; |
6532
|
0
|
|
|
|
|
0
|
my $scenmod = $modulename->new(); |
6533
|
0
|
|
|
|
|
0
|
my $string = $scenmod->get_scenario_string(); |
6534
|
0
|
|
|
|
|
0
|
my $result = $thisparser->startrule( $string, 0, '' ); |
6535
|
0
|
0
|
0
|
|
|
0
|
if (defined $result and ref $result eq 'ARRAY') { |
6536
|
0
|
|
|
|
|
0
|
$return = [@$result]; |
6537
|
|
|
|
|
|
|
} else { |
6538
|
0
|
|
|
|
|
0
|
log_fatal "Syntax error in '$modulename' scenario:\n<BEGIN SCENARIO>\n$string\n<END SCENARIO>"; |
6539
|
|
|
|
|
|
|
} |
6540
|
|
|
|
|
|
|
}; |
6541
|
0
|
0
|
|
|
|
0
|
unless (defined $_tok) |
6542
|
|
|
|
|
|
|
{ |
6543
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
6544
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6545
|
0
|
|
|
|
|
0
|
last; |
6546
|
|
|
|
|
|
|
} |
6547
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
6548
|
|
|
|
|
|
|
. $_tok . q{])}, |
6549
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6550
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6551
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
6552
|
0
|
|
|
|
|
0
|
$item{__ACTION1__}=$_tok; |
6553
|
|
|
|
|
|
|
|
6554
|
|
|
|
|
|
|
|
6555
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [SCENMODULE]<<}, |
6556
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6557
|
|
|
|
|
|
|
q{BLOCK}, |
6558
|
|
|
|
|
|
|
$tracelevel) |
6559
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6560
|
|
|
|
|
|
|
|
6561
|
|
|
|
|
|
|
|
6562
|
|
|
|
|
|
|
|
6563
|
0
|
|
|
|
|
0
|
$_matched = 1; |
6564
|
0
|
|
|
|
|
0
|
last; |
6565
|
|
|
|
|
|
|
} |
6566
|
|
|
|
|
|
|
|
6567
|
|
|
|
|
|
|
|
6568
|
140
|
|
66
|
|
|
655
|
while (!$_matched && !$commit) |
6569
|
|
|
|
|
|
|
{ |
6570
|
|
|
|
|
|
|
|
6571
|
139
|
50
|
|
|
|
340
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [TBNAME PARAMS]}, |
6572
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6573
|
|
|
|
|
|
|
q{BLOCK}, |
6574
|
|
|
|
|
|
|
$tracelevel) |
6575
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6576
|
139
|
|
|
|
|
276
|
my $thisprod = $thisrule->{"prods"}[3]; |
6577
|
139
|
|
|
|
|
252
|
$text = $_[1]; |
6578
|
139
|
|
|
|
|
203
|
my $_savetext; |
6579
|
139
|
|
|
|
|
379
|
@item = (q{BLOCK}); |
6580
|
139
|
|
|
|
|
345
|
%item = (__RULE__ => q{BLOCK}); |
6581
|
139
|
|
|
|
|
254
|
my $repcount = 0; |
6582
|
|
|
|
|
|
|
|
6583
|
|
|
|
|
|
|
|
6584
|
139
|
50
|
|
|
|
350
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [TBNAME]}, |
6585
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6586
|
|
|
|
|
|
|
q{BLOCK}, |
6587
|
|
|
|
|
|
|
$tracelevel) |
6588
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6589
|
2
|
|
|
2
|
|
16
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
392
|
|
|
139
|
|
|
|
|
229
|
|
6590
|
139
|
|
|
|
|
325
|
$expectation->is(q{})->at($text); |
6591
|
139
|
100
|
|
139
|
|
617
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::TBNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
139
|
|
|
|
|
308
|
|
6592
|
|
|
|
|
|
|
{ |
6593
|
|
|
|
|
|
|
|
6594
|
78
|
50
|
|
|
|
189
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [TBNAME]>>}, |
6595
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6596
|
|
|
|
|
|
|
q{BLOCK}, |
6597
|
|
|
|
|
|
|
$tracelevel) |
6598
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6599
|
78
|
|
|
|
|
197
|
$expectation->failed(); |
6600
|
78
|
|
|
|
|
160
|
last; |
6601
|
|
|
|
|
|
|
} |
6602
|
61
|
50
|
|
|
|
240
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [TBNAME]<< (return value: [} |
6603
|
|
|
|
|
|
|
. $_tok . q{]}, |
6604
|
|
|
|
|
|
|
|
6605
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6606
|
|
|
|
|
|
|
q{BLOCK}, |
6607
|
|
|
|
|
|
|
$tracelevel) |
6608
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6609
|
61
|
|
|
|
|
150
|
$item{q{TBNAME}} = $_tok; |
6610
|
61
|
|
|
|
|
124
|
push @item, $_tok; |
6611
|
|
|
|
|
|
|
|
6612
|
|
|
|
|
|
|
} |
6613
|
|
|
|
|
|
|
|
6614
|
61
|
50
|
|
|
|
169
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PARAMS]}, |
6615
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6616
|
|
|
|
|
|
|
q{BLOCK}, |
6617
|
|
|
|
|
|
|
$tracelevel) |
6618
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6619
|
2
|
|
|
2
|
|
14
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
576
|
|
|
61
|
|
|
|
|
108
|
|
6620
|
61
|
|
|
|
|
192
|
$expectation->is(q{PARAMS})->at($text); |
6621
|
61
|
100
|
|
61
|
|
350
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAMS($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
61
|
|
|
|
|
149
|
|
6622
|
|
|
|
|
|
|
{ |
6623
|
|
|
|
|
|
|
|
6624
|
35
|
50
|
|
|
|
103
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PARAMS]>>}, |
6625
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6626
|
|
|
|
|
|
|
q{BLOCK}, |
6627
|
|
|
|
|
|
|
$tracelevel) |
6628
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6629
|
35
|
|
|
|
|
95
|
$expectation->failed(); |
6630
|
35
|
|
|
|
|
71
|
last; |
6631
|
|
|
|
|
|
|
} |
6632
|
26
|
50
|
|
|
|
128
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PARAMS]<< (return value: [} |
6633
|
|
|
|
|
|
|
. $_tok . q{]}, |
6634
|
|
|
|
|
|
|
|
6635
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6636
|
|
|
|
|
|
|
q{BLOCK}, |
6637
|
|
|
|
|
|
|
$tracelevel) |
6638
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6639
|
26
|
|
|
|
|
64
|
$item{q{PARAMS}} = $_tok; |
6640
|
26
|
|
|
|
|
64
|
push @item, $_tok; |
6641
|
|
|
|
|
|
|
|
6642
|
|
|
|
|
|
|
} |
6643
|
|
|
|
|
|
|
|
6644
|
26
|
50
|
|
|
|
72
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
6645
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6646
|
|
|
|
|
|
|
q{BLOCK}, |
6647
|
|
|
|
|
|
|
$tracelevel) |
6648
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6649
|
|
|
|
|
|
|
|
6650
|
|
|
|
|
|
|
|
6651
|
26
|
50
|
|
|
|
75
|
$_tok = ($_noactions) ? 0 : do {$return = [{ |
6652
|
|
|
|
|
|
|
block_name=>$item{TBNAME}, |
6653
|
|
|
|
|
|
|
block_parameters=>$item{PARAMS}, |
6654
|
26
|
|
|
|
|
122
|
}] |
6655
|
|
|
|
|
|
|
}; |
6656
|
26
|
50
|
|
|
|
83
|
unless (defined $_tok) |
6657
|
|
|
|
|
|
|
{ |
6658
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
6659
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6660
|
0
|
|
|
|
|
0
|
last; |
6661
|
|
|
|
|
|
|
} |
6662
|
26
|
50
|
|
|
|
72
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
6663
|
|
|
|
|
|
|
. $_tok . q{])}, |
6664
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6665
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6666
|
26
|
|
|
|
|
48
|
push @item, $_tok; |
6667
|
26
|
|
|
|
|
52
|
$item{__ACTION1__}=$_tok; |
6668
|
|
|
|
|
|
|
|
6669
|
|
|
|
|
|
|
|
6670
|
26
|
50
|
|
|
|
76
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [TBNAME PARAMS]<<}, |
6671
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6672
|
|
|
|
|
|
|
q{BLOCK}, |
6673
|
|
|
|
|
|
|
$tracelevel) |
6674
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6675
|
|
|
|
|
|
|
|
6676
|
|
|
|
|
|
|
|
6677
|
|
|
|
|
|
|
|
6678
|
26
|
|
|
|
|
48
|
$_matched = 1; |
6679
|
26
|
|
|
|
|
63
|
last; |
6680
|
|
|
|
|
|
|
} |
6681
|
|
|
|
|
|
|
|
6682
|
|
|
|
|
|
|
|
6683
|
140
|
|
66
|
|
|
643
|
while (!$_matched && !$commit) |
6684
|
|
|
|
|
|
|
{ |
6685
|
|
|
|
|
|
|
|
6686
|
113
|
50
|
|
|
|
299
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [TBNAME]}, |
6687
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6688
|
|
|
|
|
|
|
q{BLOCK}, |
6689
|
|
|
|
|
|
|
$tracelevel) |
6690
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6691
|
113
|
|
|
|
|
238
|
my $thisprod = $thisrule->{"prods"}[4]; |
6692
|
113
|
|
|
|
|
197
|
$text = $_[1]; |
6693
|
113
|
|
|
|
|
190
|
my $_savetext; |
6694
|
113
|
|
|
|
|
253
|
@item = (q{BLOCK}); |
6695
|
113
|
|
|
|
|
268
|
%item = (__RULE__ => q{BLOCK}); |
6696
|
113
|
|
|
|
|
204
|
my $repcount = 0; |
6697
|
|
|
|
|
|
|
|
6698
|
|
|
|
|
|
|
|
6699
|
113
|
50
|
|
|
|
279
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [TBNAME]}, |
6700
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6701
|
|
|
|
|
|
|
q{BLOCK}, |
6702
|
|
|
|
|
|
|
$tracelevel) |
6703
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6704
|
2
|
|
|
2
|
|
13
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1078
|
|
|
113
|
|
|
|
|
183
|
|
6705
|
113
|
|
|
|
|
274
|
$expectation->is(q{})->at($text); |
6706
|
113
|
100
|
|
113
|
|
438
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::TBNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
113
|
|
|
|
|
239
|
|
6707
|
|
|
|
|
|
|
{ |
6708
|
|
|
|
|
|
|
|
6709
|
78
|
50
|
|
|
|
192
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [TBNAME]>>}, |
6710
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6711
|
|
|
|
|
|
|
q{BLOCK}, |
6712
|
|
|
|
|
|
|
$tracelevel) |
6713
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6714
|
78
|
|
|
|
|
203
|
$expectation->failed(); |
6715
|
78
|
|
|
|
|
146
|
last; |
6716
|
|
|
|
|
|
|
} |
6717
|
35
|
50
|
|
|
|
136
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [TBNAME]<< (return value: [} |
6718
|
|
|
|
|
|
|
. $_tok . q{]}, |
6719
|
|
|
|
|
|
|
|
6720
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6721
|
|
|
|
|
|
|
q{BLOCK}, |
6722
|
|
|
|
|
|
|
$tracelevel) |
6723
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6724
|
35
|
|
|
|
|
95
|
$item{q{TBNAME}} = $_tok; |
6725
|
35
|
|
|
|
|
76
|
push @item, $_tok; |
6726
|
|
|
|
|
|
|
|
6727
|
|
|
|
|
|
|
} |
6728
|
|
|
|
|
|
|
|
6729
|
35
|
50
|
|
|
|
107
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
6730
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6731
|
|
|
|
|
|
|
q{BLOCK}, |
6732
|
|
|
|
|
|
|
$tracelevel) |
6733
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6734
|
|
|
|
|
|
|
|
6735
|
|
|
|
|
|
|
|
6736
|
35
|
50
|
|
|
|
92
|
$_tok = ($_noactions) ? 0 : do {$return = [{ |
6737
|
|
|
|
|
|
|
block_name=>$item{TBNAME}, |
6738
|
35
|
|
|
|
|
177
|
block_parameters=>[], |
6739
|
|
|
|
|
|
|
}] |
6740
|
|
|
|
|
|
|
}; |
6741
|
35
|
50
|
|
|
|
109
|
unless (defined $_tok) |
6742
|
|
|
|
|
|
|
{ |
6743
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
6744
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6745
|
0
|
|
|
|
|
0
|
last; |
6746
|
|
|
|
|
|
|
} |
6747
|
35
|
50
|
|
|
|
112
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
6748
|
|
|
|
|
|
|
. $_tok . q{])}, |
6749
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6750
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6751
|
35
|
|
|
|
|
69
|
push @item, $_tok; |
6752
|
35
|
|
|
|
|
78
|
$item{__ACTION1__}=$_tok; |
6753
|
|
|
|
|
|
|
|
6754
|
|
|
|
|
|
|
|
6755
|
35
|
50
|
|
|
|
92
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [TBNAME]<<}, |
6756
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6757
|
|
|
|
|
|
|
q{BLOCK}, |
6758
|
|
|
|
|
|
|
$tracelevel) |
6759
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6760
|
|
|
|
|
|
|
|
6761
|
|
|
|
|
|
|
|
6762
|
|
|
|
|
|
|
|
6763
|
35
|
|
|
|
|
65
|
$_matched = 1; |
6764
|
35
|
|
|
|
|
62
|
last; |
6765
|
|
|
|
|
|
|
} |
6766
|
|
|
|
|
|
|
|
6767
|
|
|
|
|
|
|
|
6768
|
140
|
100
|
66
|
|
|
592
|
unless ( $_matched || defined($score) ) |
6769
|
|
|
|
|
|
|
{ |
6770
|
|
|
|
|
|
|
|
6771
|
|
|
|
|
|
|
|
6772
|
78
|
|
|
|
|
156
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
6773
|
78
|
50
|
|
|
|
202
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
6774
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6775
|
|
|
|
|
|
|
q{BLOCK}, |
6776
|
|
|
|
|
|
|
$tracelevel) |
6777
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6778
|
78
|
|
|
|
|
377
|
return undef; |
6779
|
|
|
|
|
|
|
} |
6780
|
62
|
50
|
33
|
|
|
240
|
if (!defined($return) && defined($score)) |
6781
|
|
|
|
|
|
|
{ |
6782
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
6783
|
|
|
|
|
|
|
q{BLOCK}, |
6784
|
|
|
|
|
|
|
$tracelevel) |
6785
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6786
|
0
|
|
|
|
|
0
|
$return = $score_return; |
6787
|
|
|
|
|
|
|
} |
6788
|
62
|
|
|
|
|
106
|
splice @{$thisparser->{errors}}, $err_at; |
|
62
|
|
|
|
|
150
|
|
6789
|
62
|
50
|
|
|
|
182
|
$return = $item[$#item] unless defined $return; |
6790
|
62
|
50
|
|
|
|
157
|
if (defined $::RD_TRACE) |
6791
|
|
|
|
|
|
|
{ |
6792
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
6793
|
|
|
|
|
|
|
$return . q{])}, "", |
6794
|
|
|
|
|
|
|
q{BLOCK}, |
6795
|
|
|
|
|
|
|
$tracelevel); |
6796
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
6797
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
6798
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6799
|
|
|
|
|
|
|
, q{BLOCK}, |
6800
|
|
|
|
|
|
|
$tracelevel) |
6801
|
|
|
|
|
|
|
} |
6802
|
62
|
|
|
|
|
134
|
$_[1] = $text; |
6803
|
62
|
|
|
|
|
425
|
return $return; |
6804
|
|
|
|
|
|
|
} |
6805
|
|
|
|
|
|
|
|
6806
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
6807
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::COMMENT |
6808
|
|
|
|
|
|
|
{ |
6809
|
75
|
|
|
75
|
|
158
|
my $thisparser = $_[0]; |
6810
|
2
|
|
|
2
|
|
14
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
1424
|
|
6811
|
75
|
|
50
|
|
|
242
|
local $tracelevel = ($tracelevel||0)+1; |
6812
|
75
|
|
|
|
|
147
|
$ERRORS = 0; |
6813
|
75
|
|
|
|
|
176
|
my $thisrule = $thisparser->{"rules"}{"COMMENT"}; |
6814
|
|
|
|
|
|
|
|
6815
|
75
|
50
|
|
|
|
196
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [COMMENT]}, |
6816
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6817
|
|
|
|
|
|
|
q{COMMENT}, |
6818
|
|
|
|
|
|
|
$tracelevel) |
6819
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6820
|
|
|
|
|
|
|
|
6821
|
|
|
|
|
|
|
|
6822
|
75
|
|
|
|
|
132
|
my $err_at = @{$thisparser->{errors}}; |
|
75
|
|
|
|
|
176
|
|
6823
|
|
|
|
|
|
|
|
6824
|
75
|
|
|
|
|
222
|
my $score; |
6825
|
|
|
|
|
|
|
my $score_return; |
6826
|
75
|
|
|
|
|
0
|
my $_tok; |
6827
|
75
|
|
|
|
|
119
|
my $return = undef; |
6828
|
75
|
|
|
|
|
134
|
my $_matched=0; |
6829
|
75
|
|
|
|
|
115
|
my $commit=0; |
6830
|
75
|
|
|
|
|
165
|
my @item = (); |
6831
|
75
|
|
|
|
|
144
|
my %item = (); |
6832
|
75
|
|
|
|
|
129
|
my $repeating = $_[2]; |
6833
|
75
|
|
|
|
|
125
|
my $_noactions = $_[3]; |
6834
|
75
|
50
|
|
|
|
187
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
75
|
|
|
|
|
130
|
|
|
75
|
|
|
|
|
158
|
|
6835
|
75
|
|
|
|
|
148
|
my $_itempos = $_[5]; |
6836
|
75
|
50
|
|
|
|
268
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
6837
|
75
|
|
|
|
|
217
|
my $text; |
6838
|
|
|
|
|
|
|
my $lastsep; |
6839
|
75
|
|
|
|
|
0
|
my $current_match; |
6840
|
75
|
|
|
|
|
194
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/#[^\\n]*/}); |
6841
|
75
|
|
|
|
|
224
|
$expectation->at($_[1]); |
6842
|
|
|
|
|
|
|
|
6843
|
75
|
|
|
|
|
125
|
my $thisline; |
6844
|
75
|
|
|
|
|
260
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
6845
|
|
|
|
|
|
|
|
6846
|
|
|
|
|
|
|
|
6847
|
|
|
|
|
|
|
|
6848
|
75
|
|
33
|
|
|
332
|
while (!$_matched && !$commit) |
6849
|
|
|
|
|
|
|
{ |
6850
|
|
|
|
|
|
|
|
6851
|
75
|
50
|
|
|
|
221
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/#[^\\n]*/]}, |
6852
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6853
|
|
|
|
|
|
|
q{COMMENT}, |
6854
|
|
|
|
|
|
|
$tracelevel) |
6855
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6856
|
75
|
|
|
|
|
184
|
my $thisprod = $thisrule->{"prods"}[0]; |
6857
|
75
|
|
|
|
|
142
|
$text = $_[1]; |
6858
|
75
|
|
|
|
|
129
|
my $_savetext; |
6859
|
75
|
|
|
|
|
183
|
@item = (q{COMMENT}); |
6860
|
75
|
|
|
|
|
189
|
%item = (__RULE__ => q{COMMENT}); |
6861
|
75
|
|
|
|
|
155
|
my $repcount = 0; |
6862
|
|
|
|
|
|
|
|
6863
|
|
|
|
|
|
|
|
6864
|
75
|
50
|
|
|
|
222
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/#[^\\n]*/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
6865
|
|
|
|
|
|
|
q{COMMENT}, |
6866
|
|
|
|
|
|
|
$tracelevel) |
6867
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6868
|
75
|
|
|
|
|
164
|
undef $lastsep; |
6869
|
75
|
|
|
|
|
187
|
$expectation->is(q{})->at($text); |
6870
|
|
|
|
|
|
|
|
6871
|
|
|
|
|
|
|
|
6872
|
75
|
100
|
66
|
|
|
535
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:#[^\n]*)/) |
|
75
|
100
|
|
|
|
706
|
|
6873
|
|
|
|
|
|
|
{ |
6874
|
54
|
50
|
|
|
|
207
|
$text = $lastsep . $text if defined $lastsep; |
6875
|
54
|
|
|
|
|
186
|
$expectation->failed(); |
6876
|
54
|
50
|
|
|
|
148
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
6877
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6878
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6879
|
|
|
|
|
|
|
|
6880
|
54
|
|
|
|
|
130
|
last; |
6881
|
|
|
|
|
|
|
} |
6882
|
21
|
|
|
|
|
140
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
6883
|
21
|
|
|
|
|
82
|
substr($text,0,length($current_match),q{}); |
6884
|
21
|
50
|
|
|
|
69
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
6885
|
|
|
|
|
|
|
. $current_match . q{])}, |
6886
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6887
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6888
|
21
|
|
|
|
|
55
|
push @item, $item{__PATTERN1__}=$current_match; |
6889
|
|
|
|
|
|
|
|
6890
|
|
|
|
|
|
|
|
6891
|
21
|
50
|
|
|
|
79
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
6892
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6893
|
|
|
|
|
|
|
q{COMMENT}, |
6894
|
|
|
|
|
|
|
$tracelevel) |
6895
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6896
|
|
|
|
|
|
|
|
6897
|
|
|
|
|
|
|
|
6898
|
21
|
50
|
|
|
|
57
|
$_tok = ($_noactions) ? 0 : do {$return = ''}; |
|
21
|
|
|
|
|
42
|
|
6899
|
21
|
50
|
|
|
|
62
|
unless (defined $_tok) |
6900
|
|
|
|
|
|
|
{ |
6901
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
6902
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6903
|
0
|
|
|
|
|
0
|
last; |
6904
|
|
|
|
|
|
|
} |
6905
|
21
|
50
|
|
|
|
50
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
6906
|
|
|
|
|
|
|
. $_tok . q{])}, |
6907
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6908
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6909
|
21
|
|
|
|
|
38
|
push @item, $_tok; |
6910
|
21
|
|
|
|
|
40
|
$item{__ACTION1__}=$_tok; |
6911
|
|
|
|
|
|
|
|
6912
|
|
|
|
|
|
|
|
6913
|
21
|
50
|
|
|
|
48
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/#[^\\n]*/]<<}, |
6914
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6915
|
|
|
|
|
|
|
q{COMMENT}, |
6916
|
|
|
|
|
|
|
$tracelevel) |
6917
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6918
|
|
|
|
|
|
|
|
6919
|
|
|
|
|
|
|
|
6920
|
|
|
|
|
|
|
|
6921
|
21
|
|
|
|
|
34
|
$_matched = 1; |
6922
|
21
|
|
|
|
|
43
|
last; |
6923
|
|
|
|
|
|
|
} |
6924
|
|
|
|
|
|
|
|
6925
|
|
|
|
|
|
|
|
6926
|
75
|
100
|
66
|
|
|
330
|
unless ( $_matched || defined($score) ) |
6927
|
|
|
|
|
|
|
{ |
6928
|
|
|
|
|
|
|
|
6929
|
|
|
|
|
|
|
|
6930
|
54
|
|
|
|
|
112
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
6931
|
54
|
50
|
|
|
|
150
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
6932
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6933
|
|
|
|
|
|
|
q{COMMENT}, |
6934
|
|
|
|
|
|
|
$tracelevel) |
6935
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6936
|
54
|
|
|
|
|
315
|
return undef; |
6937
|
|
|
|
|
|
|
} |
6938
|
21
|
50
|
33
|
|
|
70
|
if (!defined($return) && defined($score)) |
6939
|
|
|
|
|
|
|
{ |
6940
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
6941
|
|
|
|
|
|
|
q{COMMENT}, |
6942
|
|
|
|
|
|
|
$tracelevel) |
6943
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6944
|
0
|
|
|
|
|
0
|
$return = $score_return; |
6945
|
|
|
|
|
|
|
} |
6946
|
21
|
|
|
|
|
32
|
splice @{$thisparser->{errors}}, $err_at; |
|
21
|
|
|
|
|
59
|
|
6947
|
21
|
50
|
|
|
|
57
|
$return = $item[$#item] unless defined $return; |
6948
|
21
|
50
|
|
|
|
61
|
if (defined $::RD_TRACE) |
6949
|
|
|
|
|
|
|
{ |
6950
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
6951
|
|
|
|
|
|
|
$return . q{])}, "", |
6952
|
|
|
|
|
|
|
q{COMMENT}, |
6953
|
|
|
|
|
|
|
$tracelevel); |
6954
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
6955
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
6956
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6957
|
|
|
|
|
|
|
, q{COMMENT}, |
6958
|
|
|
|
|
|
|
$tracelevel) |
6959
|
|
|
|
|
|
|
} |
6960
|
21
|
|
|
|
|
200
|
$_[1] = $text; |
6961
|
21
|
|
|
|
|
132
|
return $return; |
6962
|
|
|
|
|
|
|
} |
6963
|
|
|
|
|
|
|
|
6964
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
6965
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::startrule |
6966
|
|
|
|
|
|
|
{ |
6967
|
14
|
|
|
14
|
|
34
|
my $thisparser = $_[0]; |
6968
|
2
|
|
|
2
|
|
16
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
490
|
|
6969
|
14
|
|
100
|
|
|
73
|
local $tracelevel = ($tracelevel||0)+1; |
6970
|
14
|
|
|
|
|
36
|
$ERRORS = 0; |
6971
|
14
|
|
|
|
|
37
|
my $thisrule = $thisparser->{"rules"}{"startrule"}; |
6972
|
|
|
|
|
|
|
|
6973
|
14
|
50
|
|
|
|
44
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [startrule]}, |
6974
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6975
|
|
|
|
|
|
|
q{startrule}, |
6976
|
|
|
|
|
|
|
$tracelevel) |
6977
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6978
|
|
|
|
|
|
|
|
6979
|
|
|
|
|
|
|
|
6980
|
14
|
|
|
|
|
27
|
my $err_at = @{$thisparser->{errors}}; |
|
14
|
|
|
|
|
43
|
|
6981
|
|
|
|
|
|
|
|
6982
|
14
|
|
|
|
|
47
|
my $score; |
6983
|
|
|
|
|
|
|
my $score_return; |
6984
|
14
|
|
|
|
|
0
|
my $_tok; |
6985
|
14
|
|
|
|
|
28
|
my $return = undef; |
6986
|
14
|
|
|
|
|
28
|
my $_matched=0; |
6987
|
14
|
|
|
|
|
25
|
my $commit=0; |
6988
|
14
|
|
|
|
|
32
|
my @item = (); |
6989
|
14
|
|
|
|
|
37
|
my %item = (); |
6990
|
14
|
|
|
|
|
29
|
my $repeating = $_[2]; |
6991
|
14
|
|
|
|
|
36
|
my $_noactions = $_[3]; |
6992
|
14
|
50
|
|
|
|
44
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
14
|
|
|
|
|
29
|
|
|
14
|
|
|
|
|
43
|
|
6993
|
14
|
|
|
|
|
33
|
my $_itempos = $_[5]; |
6994
|
14
|
50
|
|
|
|
68
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
6995
|
14
|
|
|
|
|
63
|
my $text; |
6996
|
|
|
|
|
|
|
my $lastsep; |
6997
|
14
|
|
|
|
|
0
|
my $current_match; |
6998
|
14
|
|
|
|
|
99
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{SCEN}); |
6999
|
14
|
|
|
|
|
65
|
$expectation->at($_[1]); |
7000
|
|
|
|
|
|
|
|
7001
|
14
|
|
|
|
|
26
|
my $thisline; |
7002
|
14
|
|
|
|
|
97
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
7003
|
|
|
|
|
|
|
|
7004
|
|
|
|
|
|
|
|
7005
|
|
|
|
|
|
|
|
7006
|
14
|
|
33
|
|
|
82
|
while (!$_matched && !$commit) |
7007
|
|
|
|
|
|
|
{ |
7008
|
|
|
|
|
|
|
|
7009
|
14
|
50
|
|
|
|
41
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [SCEN EOF]}, |
7010
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7011
|
|
|
|
|
|
|
q{startrule}, |
7012
|
|
|
|
|
|
|
$tracelevel) |
7013
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7014
|
14
|
|
|
|
|
49
|
my $thisprod = $thisrule->{"prods"}[0]; |
7015
|
14
|
|
|
|
|
46
|
$text = $_[1]; |
7016
|
14
|
|
|
|
|
28
|
my $_savetext; |
7017
|
14
|
|
|
|
|
42
|
@item = (q{startrule}); |
7018
|
14
|
|
|
|
|
48
|
%item = (__RULE__ => q{startrule}); |
7019
|
14
|
|
|
|
|
45
|
my $repcount = 0; |
7020
|
|
|
|
|
|
|
|
7021
|
|
|
|
|
|
|
|
7022
|
14
|
50
|
|
|
|
49
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [SCEN]}, |
7023
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7024
|
|
|
|
|
|
|
q{startrule}, |
7025
|
|
|
|
|
|
|
$tracelevel) |
7026
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7027
|
2
|
|
|
2
|
|
14
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
265
|
|
|
14
|
|
|
|
|
28
|
|
7028
|
14
|
|
|
|
|
47
|
$expectation->is(q{})->at($text); |
7029
|
14
|
100
|
|
14
|
|
91
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SCEN($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
14
|
|
|
|
|
40
|
|
7030
|
|
|
|
|
|
|
{ |
7031
|
|
|
|
|
|
|
|
7032
|
2
|
50
|
|
|
|
9
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [SCEN]>>}, |
7033
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7034
|
|
|
|
|
|
|
q{startrule}, |
7035
|
|
|
|
|
|
|
$tracelevel) |
7036
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7037
|
2
|
|
|
|
|
7
|
$expectation->failed(); |
7038
|
2
|
|
|
|
|
5
|
last; |
7039
|
|
|
|
|
|
|
} |
7040
|
12
|
50
|
|
|
|
68
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [SCEN]<< (return value: [} |
7041
|
|
|
|
|
|
|
. $_tok . q{]}, |
7042
|
|
|
|
|
|
|
|
7043
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7044
|
|
|
|
|
|
|
q{startrule}, |
7045
|
|
|
|
|
|
|
$tracelevel) |
7046
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7047
|
12
|
|
|
|
|
37
|
$item{q{SCEN}} = $_tok; |
7048
|
12
|
|
|
|
|
31
|
push @item, $_tok; |
7049
|
|
|
|
|
|
|
|
7050
|
|
|
|
|
|
|
} |
7051
|
|
|
|
|
|
|
|
7052
|
12
|
50
|
|
|
|
39
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [EOF]}, |
7053
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7054
|
|
|
|
|
|
|
q{startrule}, |
7055
|
|
|
|
|
|
|
$tracelevel) |
7056
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7057
|
2
|
|
|
2
|
|
13
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
789
|
|
|
12
|
|
|
|
|
26
|
|
7058
|
12
|
|
|
|
|
43
|
$expectation->is(q{EOF})->at($text); |
7059
|
12
|
50
|
|
12
|
|
78
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::EOF($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
12
|
|
|
|
|
38
|
|
7060
|
|
|
|
|
|
|
{ |
7061
|
|
|
|
|
|
|
|
7062
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [EOF]>>}, |
7063
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7064
|
|
|
|
|
|
|
q{startrule}, |
7065
|
|
|
|
|
|
|
$tracelevel) |
7066
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7067
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
7068
|
0
|
|
|
|
|
0
|
last; |
7069
|
|
|
|
|
|
|
} |
7070
|
12
|
50
|
|
|
|
57
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [EOF]<< (return value: [} |
7071
|
|
|
|
|
|
|
. $_tok . q{]}, |
7072
|
|
|
|
|
|
|
|
7073
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7074
|
|
|
|
|
|
|
q{startrule}, |
7075
|
|
|
|
|
|
|
$tracelevel) |
7076
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7077
|
12
|
|
|
|
|
40
|
$item{q{EOF}} = $_tok; |
7078
|
12
|
|
|
|
|
28
|
push @item, $_tok; |
7079
|
|
|
|
|
|
|
|
7080
|
|
|
|
|
|
|
} |
7081
|
|
|
|
|
|
|
|
7082
|
12
|
50
|
|
|
|
55
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
7083
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7084
|
|
|
|
|
|
|
q{startrule}, |
7085
|
|
|
|
|
|
|
$tracelevel) |
7086
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7087
|
|
|
|
|
|
|
|
7088
|
|
|
|
|
|
|
|
7089
|
12
|
50
|
|
|
|
44
|
$_tok = ($_noactions) ? 0 : do {$return = $item{SCEN}}; |
|
12
|
|
|
|
|
34
|
|
7090
|
12
|
50
|
|
|
|
44
|
unless (defined $_tok) |
7091
|
|
|
|
|
|
|
{ |
7092
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
7093
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7094
|
0
|
|
|
|
|
0
|
last; |
7095
|
|
|
|
|
|
|
} |
7096
|
12
|
50
|
|
|
|
40
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
7097
|
|
|
|
|
|
|
. $_tok . q{])}, |
7098
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7099
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7100
|
12
|
|
|
|
|
23
|
push @item, $_tok; |
7101
|
12
|
|
|
|
|
34
|
$item{__ACTION1__}=$_tok; |
7102
|
|
|
|
|
|
|
|
7103
|
|
|
|
|
|
|
|
7104
|
12
|
50
|
|
|
|
42
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [SCEN EOF]<<}, |
7105
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7106
|
|
|
|
|
|
|
q{startrule}, |
7107
|
|
|
|
|
|
|
$tracelevel) |
7108
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7109
|
|
|
|
|
|
|
|
7110
|
|
|
|
|
|
|
|
7111
|
|
|
|
|
|
|
|
7112
|
12
|
|
|
|
|
24
|
$_matched = 1; |
7113
|
12
|
|
|
|
|
30
|
last; |
7114
|
|
|
|
|
|
|
} |
7115
|
|
|
|
|
|
|
|
7116
|
|
|
|
|
|
|
|
7117
|
14
|
100
|
66
|
|
|
73
|
unless ( $_matched || defined($score) ) |
7118
|
|
|
|
|
|
|
{ |
7119
|
|
|
|
|
|
|
|
7120
|
|
|
|
|
|
|
|
7121
|
2
|
|
|
|
|
7
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
7122
|
2
|
50
|
|
|
|
8
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
7123
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7124
|
|
|
|
|
|
|
q{startrule}, |
7125
|
|
|
|
|
|
|
$tracelevel) |
7126
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7127
|
2
|
|
|
|
|
14
|
return undef; |
7128
|
|
|
|
|
|
|
} |
7129
|
12
|
50
|
33
|
|
|
64
|
if (!defined($return) && defined($score)) |
7130
|
|
|
|
|
|
|
{ |
7131
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
7132
|
|
|
|
|
|
|
q{startrule}, |
7133
|
|
|
|
|
|
|
$tracelevel) |
7134
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7135
|
0
|
|
|
|
|
0
|
$return = $score_return; |
7136
|
|
|
|
|
|
|
} |
7137
|
12
|
|
|
|
|
23
|
splice @{$thisparser->{errors}}, $err_at; |
|
12
|
|
|
|
|
34
|
|
7138
|
12
|
50
|
|
|
|
45
|
$return = $item[$#item] unless defined $return; |
7139
|
12
|
50
|
|
|
|
43
|
if (defined $::RD_TRACE) |
7140
|
|
|
|
|
|
|
{ |
7141
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
7142
|
|
|
|
|
|
|
$return . q{])}, "", |
7143
|
|
|
|
|
|
|
q{startrule}, |
7144
|
|
|
|
|
|
|
$tracelevel); |
7145
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
7146
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
7147
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7148
|
|
|
|
|
|
|
, q{startrule}, |
7149
|
|
|
|
|
|
|
$tracelevel) |
7150
|
|
|
|
|
|
|
} |
7151
|
12
|
|
|
|
|
37
|
$_[1] = $text; |
7152
|
12
|
|
|
|
|
97
|
return $return; |
7153
|
|
|
|
|
|
|
} |
7154
|
|
|
|
|
|
|
|
7155
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
7156
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SCEN |
7157
|
|
|
|
|
|
|
{ |
7158
|
49
|
|
|
49
|
|
115
|
my $thisparser = $_[0]; |
7159
|
2
|
|
|
2
|
|
16
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
482
|
|
7160
|
49
|
|
50
|
|
|
158
|
local $tracelevel = ($tracelevel||0)+1; |
7161
|
49
|
|
|
|
|
99
|
$ERRORS = 0; |
7162
|
49
|
|
|
|
|
117
|
my $thisrule = $thisparser->{"rules"}{"SCEN"}; |
7163
|
|
|
|
|
|
|
|
7164
|
49
|
50
|
|
|
|
158
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [SCEN]}, |
7165
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7166
|
|
|
|
|
|
|
q{SCEN}, |
7167
|
|
|
|
|
|
|
$tracelevel) |
7168
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7169
|
|
|
|
|
|
|
|
7170
|
|
|
|
|
|
|
|
7171
|
49
|
|
|
|
|
82
|
my $err_at = @{$thisparser->{errors}}; |
|
49
|
|
|
|
|
116
|
|
7172
|
|
|
|
|
|
|
|
7173
|
49
|
|
|
|
|
136
|
my $score; |
7174
|
|
|
|
|
|
|
my $score_return; |
7175
|
49
|
|
|
|
|
0
|
my $_tok; |
7176
|
49
|
|
|
|
|
83
|
my $return = undef; |
7177
|
49
|
|
|
|
|
86
|
my $_matched=0; |
7178
|
49
|
|
|
|
|
92
|
my $commit=0; |
7179
|
49
|
|
|
|
|
88
|
my @item = (); |
7180
|
49
|
|
|
|
|
111
|
my %item = (); |
7181
|
49
|
|
|
|
|
85
|
my $repeating = $_[2]; |
7182
|
49
|
|
|
|
|
98
|
my $_noactions = $_[3]; |
7183
|
49
|
50
|
|
|
|
135
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
49
|
|
|
|
|
82
|
|
|
49
|
|
|
|
|
115
|
|
7184
|
49
|
|
|
|
|
97
|
my $_itempos = $_[5]; |
7185
|
49
|
50
|
|
|
|
185
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
7186
|
49
|
|
|
|
|
135
|
my $text; |
7187
|
|
|
|
|
|
|
my $lastsep; |
7188
|
49
|
|
|
|
|
0
|
my $current_match; |
7189
|
49
|
|
|
|
|
145
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{LINE}); |
7190
|
49
|
|
|
|
|
143
|
$expectation->at($_[1]); |
7191
|
|
|
|
|
|
|
|
7192
|
49
|
|
|
|
|
99
|
my $thisline; |
7193
|
49
|
|
|
|
|
175
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
7194
|
|
|
|
|
|
|
|
7195
|
|
|
|
|
|
|
|
7196
|
|
|
|
|
|
|
|
7197
|
49
|
|
33
|
|
|
255
|
while (!$_matched && !$commit) |
7198
|
|
|
|
|
|
|
{ |
7199
|
|
|
|
|
|
|
|
7200
|
49
|
50
|
|
|
|
149
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [LINE SCEN]}, |
7201
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7202
|
|
|
|
|
|
|
q{SCEN}, |
7203
|
|
|
|
|
|
|
$tracelevel) |
7204
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7205
|
49
|
|
|
|
|
118
|
my $thisprod = $thisrule->{"prods"}[0]; |
7206
|
49
|
|
|
|
|
109
|
$text = $_[1]; |
7207
|
49
|
|
|
|
|
83
|
my $_savetext; |
7208
|
49
|
|
|
|
|
126
|
@item = (q{SCEN}); |
7209
|
49
|
|
|
|
|
124
|
%item = (__RULE__ => q{SCEN}); |
7210
|
49
|
|
|
|
|
100
|
my $repcount = 0; |
7211
|
|
|
|
|
|
|
|
7212
|
|
|
|
|
|
|
|
7213
|
49
|
50
|
|
|
|
138
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [LINE]}, |
7214
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7215
|
|
|
|
|
|
|
q{SCEN}, |
7216
|
|
|
|
|
|
|
$tracelevel) |
7217
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7218
|
2
|
|
|
2
|
|
14
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
254
|
|
|
49
|
|
|
|
|
79
|
|
7219
|
49
|
|
|
|
|
133
|
$expectation->is(q{})->at($text); |
7220
|
49
|
100
|
|
10
|
|
276
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::LINE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
49
|
|
|
|
|
141
|
|
7221
|
|
|
|
|
|
|
{ |
7222
|
|
|
|
|
|
|
|
7223
|
14
|
50
|
|
|
|
44
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [LINE]>>}, |
7224
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7225
|
|
|
|
|
|
|
q{SCEN}, |
7226
|
|
|
|
|
|
|
$tracelevel) |
7227
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7228
|
14
|
|
|
|
|
45
|
$expectation->failed(); |
7229
|
14
|
|
|
|
|
27
|
last; |
7230
|
|
|
|
|
|
|
} |
7231
|
35
|
50
|
|
|
|
465
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [LINE]<< (return value: [} |
7232
|
|
|
|
|
|
|
. $_tok . q{]}, |
7233
|
|
|
|
|
|
|
|
7234
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7235
|
|
|
|
|
|
|
q{SCEN}, |
7236
|
|
|
|
|
|
|
$tracelevel) |
7237
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7238
|
35
|
|
|
|
|
91
|
$item{q{LINE}} = $_tok; |
7239
|
35
|
|
|
|
|
68
|
push @item, $_tok; |
7240
|
|
|
|
|
|
|
|
7241
|
|
|
|
|
|
|
} |
7242
|
|
|
|
|
|
|
|
7243
|
35
|
50
|
|
|
|
104
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [SCEN]}, |
7244
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7245
|
|
|
|
|
|
|
q{SCEN}, |
7246
|
|
|
|
|
|
|
$tracelevel) |
7247
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7248
|
2
|
|
|
2
|
|
12
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
571
|
|
|
35
|
|
|
|
|
52
|
|
7249
|
35
|
|
|
|
|
123
|
$expectation->is(q{SCEN})->at($text); |
7250
|
35
|
100
|
|
7
|
|
278
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SCEN($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
35
|
|
|
|
|
88
|
|
7251
|
|
|
|
|
|
|
{ |
7252
|
|
|
|
|
|
|
|
7253
|
12
|
50
|
|
|
|
40
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [SCEN]>>}, |
7254
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7255
|
|
|
|
|
|
|
q{SCEN}, |
7256
|
|
|
|
|
|
|
$tracelevel) |
7257
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7258
|
12
|
|
|
|
|
43
|
$expectation->failed(); |
7259
|
12
|
|
|
|
|
25
|
last; |
7260
|
|
|
|
|
|
|
} |
7261
|
23
|
50
|
|
|
|
99
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [SCEN]<< (return value: [} |
7262
|
|
|
|
|
|
|
. $_tok . q{]}, |
7263
|
|
|
|
|
|
|
|
7264
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7265
|
|
|
|
|
|
|
q{SCEN}, |
7266
|
|
|
|
|
|
|
$tracelevel) |
7267
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7268
|
23
|
|
|
|
|
56
|
$item{q{SCEN}} = $_tok; |
7269
|
23
|
|
|
|
|
46
|
push @item, $_tok; |
7270
|
|
|
|
|
|
|
|
7271
|
|
|
|
|
|
|
} |
7272
|
|
|
|
|
|
|
|
7273
|
23
|
50
|
|
|
|
64
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
7274
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7275
|
|
|
|
|
|
|
q{SCEN}, |
7276
|
|
|
|
|
|
|
$tracelevel) |
7277
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7278
|
|
|
|
|
|
|
|
7279
|
|
|
|
|
|
|
|
7280
|
23
|
50
|
|
|
|
52
|
$_tok = ($_noactions) ? 0 : do {$return = [@{$item{LINE}},@{$item{SCEN}}]}; |
|
23
|
|
|
|
|
36
|
|
|
23
|
|
|
|
|
55
|
|
|
23
|
|
|
|
|
60
|
|
7281
|
23
|
50
|
|
|
|
65
|
unless (defined $_tok) |
7282
|
|
|
|
|
|
|
{ |
7283
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
7284
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7285
|
0
|
|
|
|
|
0
|
last; |
7286
|
|
|
|
|
|
|
} |
7287
|
23
|
50
|
|
|
|
54
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
7288
|
|
|
|
|
|
|
. $_tok . q{])}, |
7289
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7290
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7291
|
23
|
|
|
|
|
45
|
push @item, $_tok; |
7292
|
23
|
|
|
|
|
45
|
$item{__ACTION1__}=$_tok; |
7293
|
|
|
|
|
|
|
|
7294
|
|
|
|
|
|
|
|
7295
|
23
|
50
|
|
|
|
59
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [LINE SCEN]<<}, |
7296
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7297
|
|
|
|
|
|
|
q{SCEN}, |
7298
|
|
|
|
|
|
|
$tracelevel) |
7299
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7300
|
|
|
|
|
|
|
|
7301
|
|
|
|
|
|
|
|
7302
|
|
|
|
|
|
|
|
7303
|
23
|
|
|
|
|
40
|
$_matched = 1; |
7304
|
23
|
|
|
|
|
46
|
last; |
7305
|
|
|
|
|
|
|
} |
7306
|
|
|
|
|
|
|
|
7307
|
|
|
|
|
|
|
|
7308
|
49
|
|
66
|
|
|
215
|
while (!$_matched && !$commit) |
7309
|
|
|
|
|
|
|
{ |
7310
|
|
|
|
|
|
|
|
7311
|
26
|
50
|
|
|
|
76
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [LINE]}, |
7312
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7313
|
|
|
|
|
|
|
q{SCEN}, |
7314
|
|
|
|
|
|
|
$tracelevel) |
7315
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7316
|
26
|
|
|
|
|
79
|
my $thisprod = $thisrule->{"prods"}[1]; |
7317
|
26
|
|
|
|
|
61
|
$text = $_[1]; |
7318
|
26
|
|
|
|
|
42
|
my $_savetext; |
7319
|
26
|
|
|
|
|
74
|
@item = (q{SCEN}); |
7320
|
26
|
|
|
|
|
91
|
%item = (__RULE__ => q{SCEN}); |
7321
|
26
|
|
|
|
|
57
|
my $repcount = 0; |
7322
|
|
|
|
|
|
|
|
7323
|
|
|
|
|
|
|
|
7324
|
26
|
50
|
|
|
|
73
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [LINE]}, |
7325
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7326
|
|
|
|
|
|
|
q{SCEN}, |
7327
|
|
|
|
|
|
|
$tracelevel) |
7328
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7329
|
2
|
|
|
2
|
|
12
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
833
|
|
|
26
|
|
|
|
|
57
|
|
7330
|
26
|
|
|
|
|
74
|
$expectation->is(q{})->at($text); |
7331
|
26
|
100
|
|
6
|
|
140
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::LINE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
26
|
|
|
|
|
178
|
|
7332
|
|
|
|
|
|
|
{ |
7333
|
|
|
|
|
|
|
|
7334
|
14
|
50
|
|
|
|
53
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [LINE]>>}, |
7335
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7336
|
|
|
|
|
|
|
q{SCEN}, |
7337
|
|
|
|
|
|
|
$tracelevel) |
7338
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7339
|
14
|
|
|
|
|
50
|
$expectation->failed(); |
7340
|
14
|
|
|
|
|
29
|
last; |
7341
|
|
|
|
|
|
|
} |
7342
|
12
|
50
|
|
|
|
70
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [LINE]<< (return value: [} |
7343
|
|
|
|
|
|
|
. $_tok . q{]}, |
7344
|
|
|
|
|
|
|
|
7345
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7346
|
|
|
|
|
|
|
q{SCEN}, |
7347
|
|
|
|
|
|
|
$tracelevel) |
7348
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7349
|
12
|
|
|
|
|
40
|
$item{q{LINE}} = $_tok; |
7350
|
12
|
|
|
|
|
27
|
push @item, $_tok; |
7351
|
|
|
|
|
|
|
|
7352
|
|
|
|
|
|
|
} |
7353
|
|
|
|
|
|
|
|
7354
|
12
|
50
|
|
|
|
46
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
7355
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7356
|
|
|
|
|
|
|
q{SCEN}, |
7357
|
|
|
|
|
|
|
$tracelevel) |
7358
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7359
|
|
|
|
|
|
|
|
7360
|
|
|
|
|
|
|
|
7361
|
12
|
50
|
|
|
|
37
|
$_tok = ($_noactions) ? 0 : do {$return = [@{$item{LINE}}]}; |
|
12
|
|
|
|
|
44
|
|
|
12
|
|
|
|
|
39
|
|
7362
|
12
|
50
|
|
|
|
40
|
unless (defined $_tok) |
7363
|
|
|
|
|
|
|
{ |
7364
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
7365
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7366
|
0
|
|
|
|
|
0
|
last; |
7367
|
|
|
|
|
|
|
} |
7368
|
12
|
50
|
|
|
|
38
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
7369
|
|
|
|
|
|
|
. $_tok . q{])}, |
7370
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7371
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7372
|
12
|
|
|
|
|
27
|
push @item, $_tok; |
7373
|
12
|
|
|
|
|
28
|
$item{__ACTION1__}=$_tok; |
7374
|
|
|
|
|
|
|
|
7375
|
|
|
|
|
|
|
|
7376
|
12
|
50
|
|
|
|
44
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [LINE]<<}, |
7377
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7378
|
|
|
|
|
|
|
q{SCEN}, |
7379
|
|
|
|
|
|
|
$tracelevel) |
7380
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7381
|
|
|
|
|
|
|
|
7382
|
|
|
|
|
|
|
|
7383
|
|
|
|
|
|
|
|
7384
|
12
|
|
|
|
|
26
|
$_matched = 1; |
7385
|
12
|
|
|
|
|
26
|
last; |
7386
|
|
|
|
|
|
|
} |
7387
|
|
|
|
|
|
|
|
7388
|
|
|
|
|
|
|
|
7389
|
49
|
100
|
66
|
|
|
194
|
unless ( $_matched || defined($score) ) |
7390
|
|
|
|
|
|
|
{ |
7391
|
|
|
|
|
|
|
|
7392
|
|
|
|
|
|
|
|
7393
|
14
|
|
|
|
|
121
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
7394
|
14
|
50
|
|
|
|
56
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
7395
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7396
|
|
|
|
|
|
|
q{SCEN}, |
7397
|
|
|
|
|
|
|
$tracelevel) |
7398
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7399
|
14
|
|
|
|
|
116
|
return undef; |
7400
|
|
|
|
|
|
|
} |
7401
|
35
|
50
|
33
|
|
|
103
|
if (!defined($return) && defined($score)) |
7402
|
|
|
|
|
|
|
{ |
7403
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
7404
|
|
|
|
|
|
|
q{SCEN}, |
7405
|
|
|
|
|
|
|
$tracelevel) |
7406
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7407
|
0
|
|
|
|
|
0
|
$return = $score_return; |
7408
|
|
|
|
|
|
|
} |
7409
|
35
|
|
|
|
|
58
|
splice @{$thisparser->{errors}}, $err_at; |
|
35
|
|
|
|
|
104
|
|
7410
|
35
|
50
|
|
|
|
93
|
$return = $item[$#item] unless defined $return; |
7411
|
35
|
50
|
|
|
|
107
|
if (defined $::RD_TRACE) |
7412
|
|
|
|
|
|
|
{ |
7413
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
7414
|
|
|
|
|
|
|
$return . q{])}, "", |
7415
|
|
|
|
|
|
|
q{SCEN}, |
7416
|
|
|
|
|
|
|
$tracelevel); |
7417
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
7418
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
7419
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7420
|
|
|
|
|
|
|
, q{SCEN}, |
7421
|
|
|
|
|
|
|
$tracelevel) |
7422
|
|
|
|
|
|
|
} |
7423
|
35
|
|
|
|
|
79
|
$_[1] = $text; |
7424
|
35
|
|
|
|
|
283
|
return $return; |
7425
|
|
|
|
|
|
|
} |
7426
|
|
|
|
|
|
|
|
7427
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
7428
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SCENMODULE |
7429
|
|
|
|
|
|
|
{ |
7430
|
278
|
|
|
278
|
|
505
|
my $thisparser = $_[0]; |
7431
|
2
|
|
|
2
|
|
13
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
732
|
|
7432
|
278
|
|
50
|
|
|
695
|
local $tracelevel = ($tracelevel||0)+1; |
7433
|
278
|
|
|
|
|
438
|
$ERRORS = 0; |
7434
|
278
|
|
|
|
|
596
|
my $thisrule = $thisparser->{"rules"}{"SCENMODULE"}; |
7435
|
|
|
|
|
|
|
|
7436
|
278
|
50
|
|
|
|
667
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [SCENMODULE]}, |
7437
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7438
|
|
|
|
|
|
|
q{SCENMODULE}, |
7439
|
|
|
|
|
|
|
$tracelevel) |
7440
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7441
|
|
|
|
|
|
|
|
7442
|
|
|
|
|
|
|
|
7443
|
278
|
|
|
|
|
415
|
my $err_at = @{$thisparser->{errors}}; |
|
278
|
|
|
|
|
538
|
|
7444
|
|
|
|
|
|
|
|
7445
|
278
|
|
|
|
|
717
|
my $score; |
7446
|
|
|
|
|
|
|
my $score_return; |
7447
|
278
|
|
|
|
|
0
|
my $_tok; |
7448
|
278
|
|
|
|
|
462
|
my $return = undef; |
7449
|
278
|
|
|
|
|
403
|
my $_matched=0; |
7450
|
278
|
|
|
|
|
451
|
my $commit=0; |
7451
|
278
|
|
|
|
|
499
|
my @item = (); |
7452
|
278
|
|
|
|
|
506
|
my %item = (); |
7453
|
278
|
|
|
|
|
444
|
my $repeating = $_[2]; |
7454
|
278
|
|
|
|
|
458
|
my $_noactions = $_[3]; |
7455
|
278
|
50
|
|
|
|
625
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
278
|
|
|
|
|
428
|
|
|
278
|
|
|
|
|
579
|
|
7456
|
278
|
|
|
|
|
466
|
my $_itempos = $_[5]; |
7457
|
278
|
50
|
|
|
|
850
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
7458
|
278
|
|
|
|
|
659
|
my $text; |
7459
|
|
|
|
|
|
|
my $lastsep; |
7460
|
278
|
|
|
|
|
0
|
my $current_match; |
7461
|
278
|
|
|
|
|
646
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/Scen::/}); |
7462
|
278
|
|
|
|
|
765
|
$expectation->at($_[1]); |
7463
|
|
|
|
|
|
|
|
7464
|
278
|
|
|
|
|
398
|
my $thisline; |
7465
|
278
|
|
|
|
|
971
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
7466
|
|
|
|
|
|
|
|
7467
|
|
|
|
|
|
|
|
7468
|
|
|
|
|
|
|
|
7469
|
278
|
|
33
|
|
|
1050
|
while (!$_matched && !$commit) |
7470
|
|
|
|
|
|
|
{ |
7471
|
|
|
|
|
|
|
|
7472
|
278
|
50
|
|
|
|
663
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/Scen::/ BNAME]}, |
7473
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7474
|
|
|
|
|
|
|
q{SCENMODULE}, |
7475
|
|
|
|
|
|
|
$tracelevel) |
7476
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7477
|
278
|
|
|
|
|
545
|
my $thisprod = $thisrule->{"prods"}[0]; |
7478
|
278
|
|
|
|
|
465
|
$text = $_[1]; |
7479
|
278
|
|
|
|
|
521
|
my $_savetext; |
7480
|
278
|
|
|
|
|
571
|
@item = (q{SCENMODULE}); |
7481
|
278
|
|
|
|
|
586
|
%item = (__RULE__ => q{SCENMODULE}); |
7482
|
278
|
|
|
|
|
445
|
my $repcount = 0; |
7483
|
|
|
|
|
|
|
|
7484
|
|
|
|
|
|
|
|
7485
|
278
|
50
|
|
|
|
623
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/Scen::/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
7486
|
|
|
|
|
|
|
q{SCENMODULE}, |
7487
|
|
|
|
|
|
|
$tracelevel) |
7488
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7489
|
278
|
|
|
|
|
472
|
undef $lastsep; |
7490
|
278
|
|
|
|
|
607
|
$expectation->is(q{})->at($text); |
7491
|
|
|
|
|
|
|
|
7492
|
|
|
|
|
|
|
|
7493
|
278
|
100
|
33
|
|
|
1589
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:Scen::)/) |
|
278
|
50
|
|
|
|
2244
|
|
7494
|
|
|
|
|
|
|
{ |
7495
|
278
|
50
|
|
|
|
919
|
$text = $lastsep . $text if defined $lastsep; |
7496
|
278
|
|
|
|
|
758
|
$expectation->failed(); |
7497
|
278
|
50
|
|
|
|
602
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
7498
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7499
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7500
|
|
|
|
|
|
|
|
7501
|
278
|
|
|
|
|
557
|
last; |
7502
|
|
|
|
|
|
|
} |
7503
|
0
|
|
|
|
|
0
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
7504
|
0
|
|
|
|
|
0
|
substr($text,0,length($current_match),q{}); |
7505
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
7506
|
|
|
|
|
|
|
. $current_match . q{])}, |
7507
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7508
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7509
|
0
|
|
|
|
|
0
|
push @item, $item{__PATTERN1__}=$current_match; |
7510
|
|
|
|
|
|
|
|
7511
|
|
|
|
|
|
|
|
7512
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [BNAME]}, |
7513
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7514
|
|
|
|
|
|
|
q{SCENMODULE}, |
7515
|
|
|
|
|
|
|
$tracelevel) |
7516
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7517
|
2
|
|
|
2
|
|
15
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
912
|
|
|
0
|
|
|
|
|
0
|
|
7518
|
0
|
|
|
|
|
0
|
$expectation->is(q{BNAME})->at($text); |
7519
|
0
|
0
|
|
0
|
|
0
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
0
|
|
|
|
|
0
|
|
7520
|
|
|
|
|
|
|
{ |
7521
|
|
|
|
|
|
|
|
7522
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [BNAME]>>}, |
7523
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7524
|
|
|
|
|
|
|
q{SCENMODULE}, |
7525
|
|
|
|
|
|
|
$tracelevel) |
7526
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7527
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
7528
|
0
|
|
|
|
|
0
|
last; |
7529
|
|
|
|
|
|
|
} |
7530
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [BNAME]<< (return value: [} |
7531
|
|
|
|
|
|
|
. $_tok . q{]}, |
7532
|
|
|
|
|
|
|
|
7533
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7534
|
|
|
|
|
|
|
q{SCENMODULE}, |
7535
|
|
|
|
|
|
|
$tracelevel) |
7536
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7537
|
0
|
|
|
|
|
0
|
$item{q{BNAME}} = $_tok; |
7538
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
7539
|
|
|
|
|
|
|
|
7540
|
|
|
|
|
|
|
} |
7541
|
|
|
|
|
|
|
|
7542
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
7543
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7544
|
|
|
|
|
|
|
q{SCENMODULE}, |
7545
|
|
|
|
|
|
|
$tracelevel) |
7546
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7547
|
|
|
|
|
|
|
|
7548
|
|
|
|
|
|
|
|
7549
|
0
|
0
|
|
|
|
0
|
$_tok = ($_noactions) ? 0 : do { $return = "Treex::Scen::$item{BNAME}"}; |
|
0
|
|
|
|
|
0
|
|
7550
|
0
|
0
|
|
|
|
0
|
unless (defined $_tok) |
7551
|
|
|
|
|
|
|
{ |
7552
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
7553
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7554
|
0
|
|
|
|
|
0
|
last; |
7555
|
|
|
|
|
|
|
} |
7556
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
7557
|
|
|
|
|
|
|
. $_tok . q{])}, |
7558
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7559
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7560
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
7561
|
0
|
|
|
|
|
0
|
$item{__ACTION1__}=$_tok; |
7562
|
|
|
|
|
|
|
|
7563
|
|
|
|
|
|
|
|
7564
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/Scen::/ BNAME]<<}, |
7565
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7566
|
|
|
|
|
|
|
q{SCENMODULE}, |
7567
|
|
|
|
|
|
|
$tracelevel) |
7568
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7569
|
|
|
|
|
|
|
|
7570
|
|
|
|
|
|
|
|
7571
|
|
|
|
|
|
|
|
7572
|
0
|
|
|
|
|
0
|
$_matched = 1; |
7573
|
0
|
|
|
|
|
0
|
last; |
7574
|
|
|
|
|
|
|
} |
7575
|
|
|
|
|
|
|
|
7576
|
|
|
|
|
|
|
|
7577
|
278
|
50
|
33
|
|
|
1158
|
unless ( $_matched || defined($score) ) |
7578
|
|
|
|
|
|
|
{ |
7579
|
|
|
|
|
|
|
|
7580
|
|
|
|
|
|
|
|
7581
|
278
|
|
|
|
|
499
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
7582
|
278
|
50
|
|
|
|
634
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
7583
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7584
|
|
|
|
|
|
|
q{SCENMODULE}, |
7585
|
|
|
|
|
|
|
$tracelevel) |
7586
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7587
|
278
|
|
|
|
|
1366
|
return undef; |
7588
|
|
|
|
|
|
|
} |
7589
|
0
|
0
|
0
|
|
|
0
|
if (!defined($return) && defined($score)) |
7590
|
|
|
|
|
|
|
{ |
7591
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
7592
|
|
|
|
|
|
|
q{SCENMODULE}, |
7593
|
|
|
|
|
|
|
$tracelevel) |
7594
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7595
|
0
|
|
|
|
|
0
|
$return = $score_return; |
7596
|
|
|
|
|
|
|
} |
7597
|
0
|
|
|
|
|
0
|
splice @{$thisparser->{errors}}, $err_at; |
|
0
|
|
|
|
|
0
|
|
7598
|
0
|
0
|
|
|
|
0
|
$return = $item[$#item] unless defined $return; |
7599
|
0
|
0
|
|
|
|
0
|
if (defined $::RD_TRACE) |
7600
|
|
|
|
|
|
|
{ |
7601
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
7602
|
|
|
|
|
|
|
$return . q{])}, "", |
7603
|
|
|
|
|
|
|
q{SCENMODULE}, |
7604
|
|
|
|
|
|
|
$tracelevel); |
7605
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
7606
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
7607
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7608
|
|
|
|
|
|
|
, q{SCENMODULE}, |
7609
|
|
|
|
|
|
|
$tracelevel) |
7610
|
|
|
|
|
|
|
} |
7611
|
0
|
|
|
|
|
0
|
$_[1] = $text; |
7612
|
0
|
|
|
|
|
0
|
return $return; |
7613
|
|
|
|
|
|
|
} |
7614
|
|
|
|
|
|
|
|
7615
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
7616
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PVALUE |
7617
|
|
|
|
|
|
|
{ |
7618
|
54
|
|
|
54
|
|
96
|
my $thisparser = $_[0]; |
7619
|
2
|
|
|
2
|
|
15
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
738
|
|
7620
|
54
|
|
50
|
|
|
155
|
local $tracelevel = ($tracelevel||0)+1; |
7621
|
54
|
|
|
|
|
92
|
$ERRORS = 0; |
7622
|
54
|
|
|
|
|
126
|
my $thisrule = $thisparser->{"rules"}{"PVALUE"}; |
7623
|
|
|
|
|
|
|
|
7624
|
54
|
50
|
|
|
|
151
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [PVALUE]}, |
7625
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7626
|
|
|
|
|
|
|
q{PVALUE}, |
7627
|
|
|
|
|
|
|
$tracelevel) |
7628
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7629
|
|
|
|
|
|
|
|
7630
|
|
|
|
|
|
|
|
7631
|
54
|
|
|
|
|
100
|
my $err_at = @{$thisparser->{errors}}; |
|
54
|
|
|
|
|
112
|
|
7632
|
|
|
|
|
|
|
|
7633
|
54
|
|
|
|
|
142
|
my $score; |
7634
|
|
|
|
|
|
|
my $score_return; |
7635
|
54
|
|
|
|
|
0
|
my $_tok; |
7636
|
54
|
|
|
|
|
95
|
my $return = undef; |
7637
|
54
|
|
|
|
|
89
|
my $_matched=0; |
7638
|
54
|
|
|
|
|
86
|
my $commit=0; |
7639
|
54
|
|
|
|
|
112
|
my @item = (); |
7640
|
54
|
|
|
|
|
127
|
my %item = (); |
7641
|
54
|
|
|
|
|
90
|
my $repeating = $_[2]; |
7642
|
54
|
|
|
|
|
109
|
my $_noactions = $_[3]; |
7643
|
54
|
50
|
|
|
|
157
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
54
|
|
|
|
|
82
|
|
|
54
|
|
|
|
|
112
|
|
7644
|
54
|
|
|
|
|
91
|
my $_itempos = $_[5]; |
7645
|
54
|
50
|
|
|
|
164
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
7646
|
54
|
|
|
|
|
224
|
my $text; |
7647
|
|
|
|
|
|
|
my $lastsep; |
7648
|
54
|
|
|
|
|
0
|
my $current_match; |
7649
|
54
|
|
|
|
|
144
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/'/, or /"/, or /`/, or PNOTQUOTED}); |
7650
|
54
|
|
|
|
|
149
|
$expectation->at($_[1]); |
7651
|
|
|
|
|
|
|
|
7652
|
54
|
|
|
|
|
83
|
my $thisline; |
7653
|
54
|
|
|
|
|
180
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
7654
|
|
|
|
|
|
|
|
7655
|
|
|
|
|
|
|
|
7656
|
|
|
|
|
|
|
|
7657
|
54
|
|
33
|
|
|
235
|
while (!$_matched && !$commit) |
7658
|
|
|
|
|
|
|
{ |
7659
|
|
|
|
|
|
|
|
7660
|
54
|
50
|
|
|
|
151
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/'/ PSQUOTE /'/]}, |
7661
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7662
|
|
|
|
|
|
|
q{PVALUE}, |
7663
|
|
|
|
|
|
|
$tracelevel) |
7664
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7665
|
54
|
|
|
|
|
120
|
my $thisprod = $thisrule->{"prods"}[0]; |
7666
|
54
|
|
|
|
|
115
|
$text = $_[1]; |
7667
|
54
|
|
|
|
|
78
|
my $_savetext; |
7668
|
54
|
|
|
|
|
109
|
@item = (q{PVALUE}); |
7669
|
54
|
|
|
|
|
128
|
%item = (__RULE__ => q{PVALUE}); |
7670
|
54
|
|
|
|
|
98
|
my $repcount = 0; |
7671
|
|
|
|
|
|
|
|
7672
|
|
|
|
|
|
|
|
7673
|
54
|
50
|
|
|
|
128
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/'/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
7674
|
|
|
|
|
|
|
q{PVALUE}, |
7675
|
|
|
|
|
|
|
$tracelevel) |
7676
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7677
|
54
|
|
|
|
|
142
|
undef $lastsep; |
7678
|
54
|
|
|
|
|
120
|
$expectation->is(q{})->at($text); |
7679
|
|
|
|
|
|
|
|
7680
|
|
|
|
|
|
|
|
7681
|
54
|
50
|
66
|
|
|
317
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:')/) |
|
54
|
100
|
|
|
|
457
|
|
7682
|
|
|
|
|
|
|
{ |
7683
|
46
|
50
|
|
|
|
146
|
$text = $lastsep . $text if defined $lastsep; |
7684
|
46
|
|
|
|
|
133
|
$expectation->failed(); |
7685
|
46
|
50
|
|
|
|
105
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
7686
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7687
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7688
|
|
|
|
|
|
|
|
7689
|
46
|
|
|
|
|
106
|
last; |
7690
|
|
|
|
|
|
|
} |
7691
|
8
|
|
|
|
|
38
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
7692
|
8
|
|
|
|
|
25
|
substr($text,0,length($current_match),q{}); |
7693
|
8
|
50
|
|
|
|
22
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
7694
|
|
|
|
|
|
|
. $current_match . q{])}, |
7695
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7696
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7697
|
8
|
|
|
|
|
22
|
push @item, $item{__PATTERN1__}=$current_match; |
7698
|
|
|
|
|
|
|
|
7699
|
|
|
|
|
|
|
|
7700
|
8
|
50
|
|
|
|
20
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PSQUOTE]}, |
7701
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7702
|
|
|
|
|
|
|
q{PVALUE}, |
7703
|
|
|
|
|
|
|
$tracelevel) |
7704
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7705
|
2
|
|
|
2
|
|
22
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
1311
|
|
|
8
|
|
|
|
|
14
|
|
7706
|
8
|
|
|
|
|
20
|
$expectation->is(q{PSQUOTE})->at($text); |
7707
|
8
|
50
|
|
8
|
|
35
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PSQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
8
|
|
|
|
|
18
|
|
7708
|
|
|
|
|
|
|
{ |
7709
|
|
|
|
|
|
|
|
7710
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PSQUOTE]>>}, |
7711
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7712
|
|
|
|
|
|
|
q{PVALUE}, |
7713
|
|
|
|
|
|
|
$tracelevel) |
7714
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7715
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
7716
|
0
|
|
|
|
|
0
|
last; |
7717
|
|
|
|
|
|
|
} |
7718
|
8
|
50
|
|
|
|
25
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PSQUOTE]<< (return value: [} |
7719
|
|
|
|
|
|
|
. $_tok . q{]}, |
7720
|
|
|
|
|
|
|
|
7721
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7722
|
|
|
|
|
|
|
q{PVALUE}, |
7723
|
|
|
|
|
|
|
$tracelevel) |
7724
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7725
|
8
|
|
|
|
|
18
|
$item{q{PSQUOTE}} = $_tok; |
7726
|
8
|
|
|
|
|
14
|
push @item, $_tok; |
7727
|
|
|
|
|
|
|
|
7728
|
|
|
|
|
|
|
} |
7729
|
|
|
|
|
|
|
|
7730
|
8
|
50
|
|
|
|
21
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/'/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
7731
|
|
|
|
|
|
|
q{PVALUE}, |
7732
|
|
|
|
|
|
|
$tracelevel) |
7733
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7734
|
8
|
|
|
|
|
15
|
undef $lastsep; |
7735
|
8
|
|
|
|
|
17
|
$expectation->is(q{/'/})->at($text); |
7736
|
|
|
|
|
|
|
|
7737
|
|
|
|
|
|
|
|
7738
|
8
|
50
|
33
|
|
|
41
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:')/) |
|
8
|
50
|
|
|
|
65
|
|
7739
|
|
|
|
|
|
|
{ |
7740
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
7741
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
7742
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
7743
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7744
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7745
|
|
|
|
|
|
|
|
7746
|
0
|
|
|
|
|
0
|
last; |
7747
|
|
|
|
|
|
|
} |
7748
|
8
|
|
|
|
|
38
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
7749
|
8
|
|
|
|
|
24
|
substr($text,0,length($current_match),q{}); |
7750
|
8
|
50
|
|
|
|
21
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
7751
|
|
|
|
|
|
|
. $current_match . q{])}, |
7752
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7753
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7754
|
8
|
|
|
|
|
25
|
push @item, $item{__PATTERN2__}=$current_match; |
7755
|
|
|
|
|
|
|
|
7756
|
|
|
|
|
|
|
|
7757
|
8
|
50
|
|
|
|
20
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
7758
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7759
|
|
|
|
|
|
|
q{PVALUE}, |
7760
|
|
|
|
|
|
|
$tracelevel) |
7761
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7762
|
|
|
|
|
|
|
|
7763
|
|
|
|
|
|
|
|
7764
|
8
|
50
|
|
|
|
17
|
$_tok = ($_noactions) ? 0 : do {$return = $item{PSQUOTE}}; |
|
8
|
|
|
|
|
18
|
|
7765
|
8
|
50
|
|
|
|
22
|
unless (defined $_tok) |
7766
|
|
|
|
|
|
|
{ |
7767
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
7768
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7769
|
0
|
|
|
|
|
0
|
last; |
7770
|
|
|
|
|
|
|
} |
7771
|
8
|
50
|
|
|
|
19
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
7772
|
|
|
|
|
|
|
. $_tok . q{])}, |
7773
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7774
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7775
|
8
|
|
|
|
|
15
|
push @item, $_tok; |
7776
|
8
|
|
|
|
|
18
|
$item{__ACTION1__}=$_tok; |
7777
|
|
|
|
|
|
|
|
7778
|
|
|
|
|
|
|
|
7779
|
8
|
50
|
|
|
|
29
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/'/ PSQUOTE /'/]<<}, |
7780
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7781
|
|
|
|
|
|
|
q{PVALUE}, |
7782
|
|
|
|
|
|
|
$tracelevel) |
7783
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7784
|
|
|
|
|
|
|
|
7785
|
|
|
|
|
|
|
|
7786
|
|
|
|
|
|
|
|
7787
|
8
|
|
|
|
|
17
|
$_matched = 1; |
7788
|
8
|
|
|
|
|
17
|
last; |
7789
|
|
|
|
|
|
|
} |
7790
|
|
|
|
|
|
|
|
7791
|
|
|
|
|
|
|
|
7792
|
54
|
|
66
|
|
|
201
|
while (!$_matched && !$commit) |
7793
|
|
|
|
|
|
|
{ |
7794
|
|
|
|
|
|
|
|
7795
|
46
|
50
|
|
|
|
119
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/"/ PDQUOTE /"/]}, |
7796
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7797
|
|
|
|
|
|
|
q{PVALUE}, |
7798
|
|
|
|
|
|
|
$tracelevel) |
7799
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7800
|
46
|
|
|
|
|
95
|
my $thisprod = $thisrule->{"prods"}[1]; |
7801
|
46
|
|
|
|
|
90
|
$text = $_[1]; |
7802
|
46
|
|
|
|
|
72
|
my $_savetext; |
7803
|
46
|
|
|
|
|
120
|
@item = (q{PVALUE}); |
7804
|
46
|
|
|
|
|
115
|
%item = (__RULE__ => q{PVALUE}); |
7805
|
46
|
|
|
|
|
81
|
my $repcount = 0; |
7806
|
|
|
|
|
|
|
|
7807
|
|
|
|
|
|
|
|
7808
|
46
|
50
|
|
|
|
109
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/"/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
7809
|
|
|
|
|
|
|
q{PVALUE}, |
7810
|
|
|
|
|
|
|
$tracelevel) |
7811
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7812
|
46
|
|
|
|
|
81
|
undef $lastsep; |
7813
|
46
|
|
|
|
|
157
|
$expectation->is(q{})->at($text); |
7814
|
|
|
|
|
|
|
|
7815
|
|
|
|
|
|
|
|
7816
|
46
|
50
|
66
|
|
|
229
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:")/) |
|
46
|
100
|
|
|
|
415
|
|
7817
|
|
|
|
|
|
|
{ |
7818
|
38
|
50
|
|
|
|
141
|
$text = $lastsep . $text if defined $lastsep; |
7819
|
38
|
|
|
|
|
126
|
$expectation->failed(); |
7820
|
38
|
50
|
|
|
|
130
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
7821
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7822
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7823
|
|
|
|
|
|
|
|
7824
|
38
|
|
|
|
|
303
|
last; |
7825
|
|
|
|
|
|
|
} |
7826
|
8
|
|
|
|
|
42
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
7827
|
8
|
|
|
|
|
28
|
substr($text,0,length($current_match),q{}); |
7828
|
8
|
50
|
|
|
|
21
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
7829
|
|
|
|
|
|
|
. $current_match . q{])}, |
7830
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7831
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7832
|
8
|
|
|
|
|
19
|
push @item, $item{__PATTERN1__}=$current_match; |
7833
|
|
|
|
|
|
|
|
7834
|
|
|
|
|
|
|
|
7835
|
8
|
50
|
|
|
|
22
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PDQUOTE]}, |
7836
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7837
|
|
|
|
|
|
|
q{PVALUE}, |
7838
|
|
|
|
|
|
|
$tracelevel) |
7839
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7840
|
2
|
|
|
2
|
|
15
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
1044
|
|
|
8
|
|
|
|
|
14
|
|
7841
|
8
|
|
|
|
|
19
|
$expectation->is(q{PDQUOTE})->at($text); |
7842
|
8
|
50
|
|
8
|
|
39
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PDQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
8
|
|
|
|
|
19
|
|
7843
|
|
|
|
|
|
|
{ |
7844
|
|
|
|
|
|
|
|
7845
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PDQUOTE]>>}, |
7846
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7847
|
|
|
|
|
|
|
q{PVALUE}, |
7848
|
|
|
|
|
|
|
$tracelevel) |
7849
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7850
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
7851
|
0
|
|
|
|
|
0
|
last; |
7852
|
|
|
|
|
|
|
} |
7853
|
8
|
50
|
|
|
|
27
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PDQUOTE]<< (return value: [} |
7854
|
|
|
|
|
|
|
. $_tok . q{]}, |
7855
|
|
|
|
|
|
|
|
7856
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7857
|
|
|
|
|
|
|
q{PVALUE}, |
7858
|
|
|
|
|
|
|
$tracelevel) |
7859
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7860
|
8
|
|
|
|
|
17
|
$item{q{PDQUOTE}} = $_tok; |
7861
|
8
|
|
|
|
|
16
|
push @item, $_tok; |
7862
|
|
|
|
|
|
|
|
7863
|
|
|
|
|
|
|
} |
7864
|
|
|
|
|
|
|
|
7865
|
8
|
50
|
|
|
|
21
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/"/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
7866
|
|
|
|
|
|
|
q{PVALUE}, |
7867
|
|
|
|
|
|
|
$tracelevel) |
7868
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7869
|
8
|
|
|
|
|
14
|
undef $lastsep; |
7870
|
8
|
|
|
|
|
20
|
$expectation->is(q{/"/})->at($text); |
7871
|
|
|
|
|
|
|
|
7872
|
|
|
|
|
|
|
|
7873
|
8
|
50
|
33
|
|
|
43
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:")/) |
|
8
|
50
|
|
|
|
75
|
|
7874
|
|
|
|
|
|
|
{ |
7875
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
7876
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
7877
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
7878
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7879
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7880
|
|
|
|
|
|
|
|
7881
|
0
|
|
|
|
|
0
|
last; |
7882
|
|
|
|
|
|
|
} |
7883
|
8
|
|
|
|
|
36
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
7884
|
8
|
|
|
|
|
25
|
substr($text,0,length($current_match),q{}); |
7885
|
8
|
50
|
|
|
|
19
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
7886
|
|
|
|
|
|
|
. $current_match . q{])}, |
7887
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7888
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7889
|
8
|
|
|
|
|
26
|
push @item, $item{__PATTERN2__}=$current_match; |
7890
|
|
|
|
|
|
|
|
7891
|
|
|
|
|
|
|
|
7892
|
8
|
50
|
|
|
|
18
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
7893
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7894
|
|
|
|
|
|
|
q{PVALUE}, |
7895
|
|
|
|
|
|
|
$tracelevel) |
7896
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7897
|
|
|
|
|
|
|
|
7898
|
|
|
|
|
|
|
|
7899
|
8
|
50
|
|
|
|
19
|
$_tok = ($_noactions) ? 0 : do {$return = $item{PDQUOTE}}; |
|
8
|
|
|
|
|
16
|
|
7900
|
8
|
50
|
|
|
|
20
|
unless (defined $_tok) |
7901
|
|
|
|
|
|
|
{ |
7902
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
7903
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7904
|
0
|
|
|
|
|
0
|
last; |
7905
|
|
|
|
|
|
|
} |
7906
|
8
|
50
|
|
|
|
17
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
7907
|
|
|
|
|
|
|
. $_tok . q{])}, |
7908
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7909
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7910
|
8
|
|
|
|
|
16
|
push @item, $_tok; |
7911
|
8
|
|
|
|
|
14
|
$item{__ACTION1__}=$_tok; |
7912
|
|
|
|
|
|
|
|
7913
|
|
|
|
|
|
|
|
7914
|
8
|
50
|
|
|
|
18
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/"/ PDQUOTE /"/]<<}, |
7915
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7916
|
|
|
|
|
|
|
q{PVALUE}, |
7917
|
|
|
|
|
|
|
$tracelevel) |
7918
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7919
|
|
|
|
|
|
|
|
7920
|
|
|
|
|
|
|
|
7921
|
|
|
|
|
|
|
|
7922
|
8
|
|
|
|
|
14
|
$_matched = 1; |
7923
|
8
|
|
|
|
|
16
|
last; |
7924
|
|
|
|
|
|
|
} |
7925
|
|
|
|
|
|
|
|
7926
|
|
|
|
|
|
|
|
7927
|
54
|
|
66
|
|
|
212
|
while (!$_matched && !$commit) |
7928
|
|
|
|
|
|
|
{ |
7929
|
|
|
|
|
|
|
|
7930
|
38
|
50
|
|
|
|
96
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/`/ PTICKED /`/]}, |
7931
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7932
|
|
|
|
|
|
|
q{PVALUE}, |
7933
|
|
|
|
|
|
|
$tracelevel) |
7934
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7935
|
38
|
|
|
|
|
77
|
my $thisprod = $thisrule->{"prods"}[2]; |
7936
|
38
|
|
|
|
|
75
|
$text = $_[1]; |
7937
|
38
|
|
|
|
|
71
|
my $_savetext; |
7938
|
38
|
|
|
|
|
83
|
@item = (q{PVALUE}); |
7939
|
38
|
|
|
|
|
94
|
%item = (__RULE__ => q{PVALUE}); |
7940
|
38
|
|
|
|
|
67
|
my $repcount = 0; |
7941
|
|
|
|
|
|
|
|
7942
|
|
|
|
|
|
|
|
7943
|
38
|
50
|
|
|
|
103
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/`/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
7944
|
|
|
|
|
|
|
q{PVALUE}, |
7945
|
|
|
|
|
|
|
$tracelevel) |
7946
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7947
|
38
|
|
|
|
|
62
|
undef $lastsep; |
7948
|
38
|
|
|
|
|
90
|
$expectation->is(q{})->at($text); |
7949
|
|
|
|
|
|
|
|
7950
|
|
|
|
|
|
|
|
7951
|
38
|
50
|
33
|
|
|
183
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:`)/) |
|
38
|
50
|
|
|
|
326
|
|
7952
|
|
|
|
|
|
|
{ |
7953
|
38
|
50
|
|
|
|
120
|
$text = $lastsep . $text if defined $lastsep; |
7954
|
38
|
|
|
|
|
109
|
$expectation->failed(); |
7955
|
38
|
50
|
|
|
|
97
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
7956
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7957
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7958
|
|
|
|
|
|
|
|
7959
|
38
|
|
|
|
|
74
|
last; |
7960
|
|
|
|
|
|
|
} |
7961
|
0
|
|
|
|
|
0
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
7962
|
0
|
|
|
|
|
0
|
substr($text,0,length($current_match),q{}); |
7963
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
7964
|
|
|
|
|
|
|
. $current_match . q{])}, |
7965
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7966
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7967
|
0
|
|
|
|
|
0
|
push @item, $item{__PATTERN1__}=$current_match; |
7968
|
|
|
|
|
|
|
|
7969
|
|
|
|
|
|
|
|
7970
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PTICKED]}, |
7971
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7972
|
|
|
|
|
|
|
q{PVALUE}, |
7973
|
|
|
|
|
|
|
$tracelevel) |
7974
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7975
|
2
|
|
|
2
|
|
15
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
802
|
|
|
0
|
|
|
|
|
0
|
|
7976
|
0
|
|
|
|
|
0
|
$expectation->is(q{PTICKED})->at($text); |
7977
|
0
|
0
|
|
0
|
|
0
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PTICKED($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
0
|
|
|
|
|
0
|
|
7978
|
|
|
|
|
|
|
{ |
7979
|
|
|
|
|
|
|
|
7980
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PTICKED]>>}, |
7981
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7982
|
|
|
|
|
|
|
q{PVALUE}, |
7983
|
|
|
|
|
|
|
$tracelevel) |
7984
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7985
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
7986
|
0
|
|
|
|
|
0
|
last; |
7987
|
|
|
|
|
|
|
} |
7988
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PTICKED]<< (return value: [} |
7989
|
|
|
|
|
|
|
. $_tok . q{]}, |
7990
|
|
|
|
|
|
|
|
7991
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7992
|
|
|
|
|
|
|
q{PVALUE}, |
7993
|
|
|
|
|
|
|
$tracelevel) |
7994
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7995
|
0
|
|
|
|
|
0
|
$item{q{PTICKED}} = $_tok; |
7996
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
7997
|
|
|
|
|
|
|
|
7998
|
|
|
|
|
|
|
} |
7999
|
|
|
|
|
|
|
|
8000
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/`/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
8001
|
|
|
|
|
|
|
q{PVALUE}, |
8002
|
|
|
|
|
|
|
$tracelevel) |
8003
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8004
|
0
|
|
|
|
|
0
|
undef $lastsep; |
8005
|
0
|
|
|
|
|
0
|
$expectation->is(q{/`/})->at($text); |
8006
|
|
|
|
|
|
|
|
8007
|
|
|
|
|
|
|
|
8008
|
0
|
0
|
0
|
|
|
0
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:`)/) |
|
0
|
0
|
|
|
|
0
|
|
8009
|
|
|
|
|
|
|
{ |
8010
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
8011
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
8012
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
8013
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8014
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8015
|
|
|
|
|
|
|
|
8016
|
0
|
|
|
|
|
0
|
last; |
8017
|
|
|
|
|
|
|
} |
8018
|
0
|
|
|
|
|
0
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
8019
|
0
|
|
|
|
|
0
|
substr($text,0,length($current_match),q{}); |
8020
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
8021
|
|
|
|
|
|
|
. $current_match . q{])}, |
8022
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8023
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8024
|
0
|
|
|
|
|
0
|
push @item, $item{__PATTERN2__}=$current_match; |
8025
|
|
|
|
|
|
|
|
8026
|
|
|
|
|
|
|
|
8027
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
8028
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8029
|
|
|
|
|
|
|
q{PVALUE}, |
8030
|
|
|
|
|
|
|
$tracelevel) |
8031
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8032
|
|
|
|
|
|
|
|
8033
|
|
|
|
|
|
|
|
8034
|
0
|
0
|
|
|
|
0
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1].$item[2].$item[3]}; |
|
0
|
|
|
|
|
0
|
|
8035
|
0
|
0
|
|
|
|
0
|
unless (defined $_tok) |
8036
|
|
|
|
|
|
|
{ |
8037
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
8038
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8039
|
0
|
|
|
|
|
0
|
last; |
8040
|
|
|
|
|
|
|
} |
8041
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
8042
|
|
|
|
|
|
|
. $_tok . q{])}, |
8043
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8044
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8045
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
8046
|
0
|
|
|
|
|
0
|
$item{__ACTION1__}=$_tok; |
8047
|
|
|
|
|
|
|
|
8048
|
|
|
|
|
|
|
|
8049
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/`/ PTICKED /`/]<<}, |
8050
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8051
|
|
|
|
|
|
|
q{PVALUE}, |
8052
|
|
|
|
|
|
|
$tracelevel) |
8053
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8054
|
|
|
|
|
|
|
|
8055
|
|
|
|
|
|
|
|
8056
|
|
|
|
|
|
|
|
8057
|
0
|
|
|
|
|
0
|
$_matched = 1; |
8058
|
0
|
|
|
|
|
0
|
last; |
8059
|
|
|
|
|
|
|
} |
8060
|
|
|
|
|
|
|
|
8061
|
|
|
|
|
|
|
|
8062
|
54
|
|
66
|
|
|
207
|
while (!$_matched && !$commit) |
8063
|
|
|
|
|
|
|
{ |
8064
|
|
|
|
|
|
|
|
8065
|
38
|
50
|
|
|
|
94
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [PNOTQUOTED]}, |
8066
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8067
|
|
|
|
|
|
|
q{PVALUE}, |
8068
|
|
|
|
|
|
|
$tracelevel) |
8069
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8070
|
38
|
|
|
|
|
85
|
my $thisprod = $thisrule->{"prods"}[3]; |
8071
|
38
|
|
|
|
|
79
|
$text = $_[1]; |
8072
|
38
|
|
|
|
|
59
|
my $_savetext; |
8073
|
38
|
|
|
|
|
85
|
@item = (q{PVALUE}); |
8074
|
38
|
|
|
|
|
89
|
%item = (__RULE__ => q{PVALUE}); |
8075
|
38
|
|
|
|
|
80
|
my $repcount = 0; |
8076
|
|
|
|
|
|
|
|
8077
|
|
|
|
|
|
|
|
8078
|
38
|
50
|
|
|
|
99
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PNOTQUOTED]}, |
8079
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8080
|
|
|
|
|
|
|
q{PVALUE}, |
8081
|
|
|
|
|
|
|
$tracelevel) |
8082
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8083
|
2
|
|
|
2
|
|
14
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
1029
|
|
|
38
|
|
|
|
|
73
|
|
8084
|
38
|
|
|
|
|
90
|
$expectation->is(q{})->at($text); |
8085
|
38
|
50
|
|
38
|
|
199
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PNOTQUOTED($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
38
|
|
|
|
|
104
|
|
8086
|
|
|
|
|
|
|
{ |
8087
|
|
|
|
|
|
|
|
8088
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PNOTQUOTED]>>}, |
8089
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8090
|
|
|
|
|
|
|
q{PVALUE}, |
8091
|
|
|
|
|
|
|
$tracelevel) |
8092
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8093
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
8094
|
0
|
|
|
|
|
0
|
last; |
8095
|
|
|
|
|
|
|
} |
8096
|
38
|
50
|
|
|
|
152
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PNOTQUOTED]<< (return value: [} |
8097
|
|
|
|
|
|
|
. $_tok . q{]}, |
8098
|
|
|
|
|
|
|
|
8099
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8100
|
|
|
|
|
|
|
q{PVALUE}, |
8101
|
|
|
|
|
|
|
$tracelevel) |
8102
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8103
|
38
|
|
|
|
|
89
|
$item{q{PNOTQUOTED}} = $_tok; |
8104
|
38
|
|
|
|
|
76
|
push @item, $_tok; |
8105
|
|
|
|
|
|
|
|
8106
|
|
|
|
|
|
|
} |
8107
|
|
|
|
|
|
|
|
8108
|
38
|
50
|
|
|
|
139
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
8109
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8110
|
|
|
|
|
|
|
q{PVALUE}, |
8111
|
|
|
|
|
|
|
$tracelevel) |
8112
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8113
|
|
|
|
|
|
|
|
8114
|
|
|
|
|
|
|
|
8115
|
38
|
50
|
|
|
|
92
|
$_tok = ($_noactions) ? 0 : do {$return = $item{PNOTQUOTED}}; |
|
38
|
|
|
|
|
93
|
|
8116
|
38
|
50
|
|
|
|
101
|
unless (defined $_tok) |
8117
|
|
|
|
|
|
|
{ |
8118
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
8119
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8120
|
0
|
|
|
|
|
0
|
last; |
8121
|
|
|
|
|
|
|
} |
8122
|
38
|
50
|
|
|
|
98
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
8123
|
|
|
|
|
|
|
. $_tok . q{])}, |
8124
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8125
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8126
|
38
|
|
|
|
|
71
|
push @item, $_tok; |
8127
|
38
|
|
|
|
|
96
|
$item{__ACTION1__}=$_tok; |
8128
|
|
|
|
|
|
|
|
8129
|
|
|
|
|
|
|
|
8130
|
38
|
50
|
|
|
|
93
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [PNOTQUOTED]<<}, |
8131
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8132
|
|
|
|
|
|
|
q{PVALUE}, |
8133
|
|
|
|
|
|
|
$tracelevel) |
8134
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8135
|
|
|
|
|
|
|
|
8136
|
|
|
|
|
|
|
|
8137
|
|
|
|
|
|
|
|
8138
|
38
|
|
|
|
|
63
|
$_matched = 1; |
8139
|
38
|
|
|
|
|
72
|
last; |
8140
|
|
|
|
|
|
|
} |
8141
|
|
|
|
|
|
|
|
8142
|
|
|
|
|
|
|
|
8143
|
54
|
50
|
33
|
|
|
190
|
unless ( $_matched || defined($score) ) |
8144
|
|
|
|
|
|
|
{ |
8145
|
|
|
|
|
|
|
|
8146
|
|
|
|
|
|
|
|
8147
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
8148
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
8149
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8150
|
|
|
|
|
|
|
q{PVALUE}, |
8151
|
|
|
|
|
|
|
$tracelevel) |
8152
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8153
|
0
|
|
|
|
|
0
|
return undef; |
8154
|
|
|
|
|
|
|
} |
8155
|
54
|
50
|
33
|
|
|
168
|
if (!defined($return) && defined($score)) |
8156
|
|
|
|
|
|
|
{ |
8157
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
8158
|
|
|
|
|
|
|
q{PVALUE}, |
8159
|
|
|
|
|
|
|
$tracelevel) |
8160
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8161
|
0
|
|
|
|
|
0
|
$return = $score_return; |
8162
|
|
|
|
|
|
|
} |
8163
|
54
|
|
|
|
|
91
|
splice @{$thisparser->{errors}}, $err_at; |
|
54
|
|
|
|
|
112
|
|
8164
|
54
|
50
|
|
|
|
142
|
$return = $item[$#item] unless defined $return; |
8165
|
54
|
50
|
|
|
|
151
|
if (defined $::RD_TRACE) |
8166
|
|
|
|
|
|
|
{ |
8167
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
8168
|
|
|
|
|
|
|
$return . q{])}, "", |
8169
|
|
|
|
|
|
|
q{PVALUE}, |
8170
|
|
|
|
|
|
|
$tracelevel); |
8171
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
8172
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
8173
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8174
|
|
|
|
|
|
|
, q{PVALUE}, |
8175
|
|
|
|
|
|
|
$tracelevel) |
8176
|
|
|
|
|
|
|
} |
8177
|
54
|
|
|
|
|
129
|
$_[1] = $text; |
8178
|
54
|
|
|
|
|
334
|
return $return; |
8179
|
|
|
|
|
|
|
} |
8180
|
|
|
|
|
|
|
|
8181
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
8182
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PSQUOTE |
8183
|
|
|
|
|
|
|
{ |
8184
|
16
|
|
|
16
|
|
29
|
my $thisparser = $_[0]; |
8185
|
2
|
|
|
2
|
|
17
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
694
|
|
8186
|
16
|
|
50
|
|
|
43
|
local $tracelevel = ($tracelevel||0)+1; |
8187
|
16
|
|
|
|
|
27
|
$ERRORS = 0; |
8188
|
16
|
|
|
|
|
36
|
my $thisrule = $thisparser->{"rules"}{"PSQUOTE"}; |
8189
|
|
|
|
|
|
|
|
8190
|
16
|
50
|
|
|
|
35
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [PSQUOTE]}, |
8191
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8192
|
|
|
|
|
|
|
q{PSQUOTE}, |
8193
|
|
|
|
|
|
|
$tracelevel) |
8194
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8195
|
|
|
|
|
|
|
|
8196
|
|
|
|
|
|
|
|
8197
|
16
|
|
|
|
|
23
|
my $err_at = @{$thisparser->{errors}}; |
|
16
|
|
|
|
|
31
|
|
8198
|
|
|
|
|
|
|
|
8199
|
16
|
|
|
|
|
42
|
my $score; |
8200
|
|
|
|
|
|
|
my $score_return; |
8201
|
16
|
|
|
|
|
0
|
my $_tok; |
8202
|
16
|
|
|
|
|
24
|
my $return = undef; |
8203
|
16
|
|
|
|
|
22
|
my $_matched=0; |
8204
|
16
|
|
|
|
|
26
|
my $commit=0; |
8205
|
16
|
|
|
|
|
28
|
my @item = (); |
8206
|
16
|
|
|
|
|
33
|
my %item = (); |
8207
|
16
|
|
|
|
|
28
|
my $repeating = $_[2]; |
8208
|
16
|
|
|
|
|
22
|
my $_noactions = $_[3]; |
8209
|
16
|
50
|
|
|
|
37
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
16
|
|
|
|
|
21
|
|
|
16
|
|
|
|
|
32
|
|
8210
|
16
|
|
|
|
|
29
|
my $_itempos = $_[5]; |
8211
|
16
|
50
|
|
|
|
42
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
8212
|
16
|
|
|
|
|
42
|
my $text; |
8213
|
|
|
|
|
|
|
my $lastsep; |
8214
|
16
|
|
|
|
|
0
|
my $current_match; |
8215
|
16
|
|
|
|
|
35
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{NOTSQUOTE}); |
8216
|
16
|
|
|
|
|
43
|
$expectation->at($_[1]); |
8217
|
|
|
|
|
|
|
|
8218
|
16
|
|
|
|
|
27
|
my $thisline; |
8219
|
16
|
|
|
|
|
50
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
8220
|
|
|
|
|
|
|
|
8221
|
|
|
|
|
|
|
|
8222
|
|
|
|
|
|
|
|
8223
|
16
|
|
33
|
|
|
58
|
while (!$_matched && !$commit) |
8224
|
|
|
|
|
|
|
{ |
8225
|
|
|
|
|
|
|
|
8226
|
16
|
50
|
|
|
|
38
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [NOTSQUOTE SLASHEDSQUOTE PSQUOTE]}, |
8227
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8228
|
|
|
|
|
|
|
q{PSQUOTE}, |
8229
|
|
|
|
|
|
|
$tracelevel) |
8230
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8231
|
16
|
|
|
|
|
33
|
my $thisprod = $thisrule->{"prods"}[0]; |
8232
|
16
|
|
|
|
|
32
|
$text = $_[1]; |
8233
|
16
|
|
|
|
|
22
|
my $_savetext; |
8234
|
16
|
|
|
|
|
33
|
@item = (q{PSQUOTE}); |
8235
|
16
|
|
|
|
|
36
|
%item = (__RULE__ => q{PSQUOTE}); |
8236
|
16
|
|
|
|
|
26
|
my $repcount = 0; |
8237
|
|
|
|
|
|
|
|
8238
|
|
|
|
|
|
|
|
8239
|
16
|
50
|
|
|
|
38
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [NOTSQUOTE]}, |
8240
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8241
|
|
|
|
|
|
|
q{PSQUOTE}, |
8242
|
|
|
|
|
|
|
$tracelevel) |
8243
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8244
|
2
|
|
|
2
|
|
18
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
380
|
|
|
16
|
|
|
|
|
24
|
|
8245
|
16
|
|
|
|
|
36
|
$expectation->is(q{})->at($text); |
8246
|
16
|
50
|
|
16
|
|
72
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::NOTSQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
16
|
|
|
|
|
32
|
|
8247
|
|
|
|
|
|
|
{ |
8248
|
|
|
|
|
|
|
|
8249
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [NOTSQUOTE]>>}, |
8250
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8251
|
|
|
|
|
|
|
q{PSQUOTE}, |
8252
|
|
|
|
|
|
|
$tracelevel) |
8253
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8254
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
8255
|
0
|
|
|
|
|
0
|
last; |
8256
|
|
|
|
|
|
|
} |
8257
|
16
|
50
|
|
|
|
52
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [NOTSQUOTE]<< (return value: [} |
8258
|
|
|
|
|
|
|
. $_tok . q{]}, |
8259
|
|
|
|
|
|
|
|
8260
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8261
|
|
|
|
|
|
|
q{PSQUOTE}, |
8262
|
|
|
|
|
|
|
$tracelevel) |
8263
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8264
|
16
|
|
|
|
|
33
|
$item{q{NOTSQUOTE}} = $_tok; |
8265
|
16
|
|
|
|
|
29
|
push @item, $_tok; |
8266
|
|
|
|
|
|
|
|
8267
|
|
|
|
|
|
|
} |
8268
|
|
|
|
|
|
|
|
8269
|
16
|
50
|
|
|
|
36
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [SLASHEDSQUOTE]}, |
8270
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8271
|
|
|
|
|
|
|
q{PSQUOTE}, |
8272
|
|
|
|
|
|
|
$tracelevel) |
8273
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8274
|
2
|
|
|
2
|
|
16
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
409
|
|
|
16
|
|
|
|
|
25
|
|
8275
|
16
|
|
|
|
|
53
|
$expectation->is(q{SLASHEDSQUOTE})->at($text); |
8276
|
16
|
100
|
|
16
|
|
68
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SLASHEDSQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
16
|
|
|
|
|
35
|
|
8277
|
|
|
|
|
|
|
{ |
8278
|
|
|
|
|
|
|
|
8279
|
8
|
50
|
|
|
|
23
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [SLASHEDSQUOTE]>>}, |
8280
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8281
|
|
|
|
|
|
|
q{PSQUOTE}, |
8282
|
|
|
|
|
|
|
$tracelevel) |
8283
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8284
|
8
|
|
|
|
|
20
|
$expectation->failed(); |
8285
|
8
|
|
|
|
|
16
|
last; |
8286
|
|
|
|
|
|
|
} |
8287
|
8
|
50
|
|
|
|
26
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [SLASHEDSQUOTE]<< (return value: [} |
8288
|
|
|
|
|
|
|
. $_tok . q{]}, |
8289
|
|
|
|
|
|
|
|
8290
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8291
|
|
|
|
|
|
|
q{PSQUOTE}, |
8292
|
|
|
|
|
|
|
$tracelevel) |
8293
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8294
|
8
|
|
|
|
|
18
|
$item{q{SLASHEDSQUOTE}} = $_tok; |
8295
|
8
|
|
|
|
|
14
|
push @item, $_tok; |
8296
|
|
|
|
|
|
|
|
8297
|
|
|
|
|
|
|
} |
8298
|
|
|
|
|
|
|
|
8299
|
8
|
50
|
|
|
|
20
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PSQUOTE]}, |
8300
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8301
|
|
|
|
|
|
|
q{PSQUOTE}, |
8302
|
|
|
|
|
|
|
$tracelevel) |
8303
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8304
|
2
|
|
|
2
|
|
18
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
752
|
|
|
8
|
|
|
|
|
12
|
|
8305
|
8
|
|
|
|
|
20
|
$expectation->is(q{PSQUOTE})->at($text); |
8306
|
8
|
50
|
|
8
|
|
42
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PSQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
8
|
|
|
|
|
20
|
|
8307
|
|
|
|
|
|
|
{ |
8308
|
|
|
|
|
|
|
|
8309
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PSQUOTE]>>}, |
8310
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8311
|
|
|
|
|
|
|
q{PSQUOTE}, |
8312
|
|
|
|
|
|
|
$tracelevel) |
8313
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8314
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
8315
|
0
|
|
|
|
|
0
|
last; |
8316
|
|
|
|
|
|
|
} |
8317
|
8
|
50
|
|
|
|
26
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PSQUOTE]<< (return value: [} |
8318
|
|
|
|
|
|
|
. $_tok . q{]}, |
8319
|
|
|
|
|
|
|
|
8320
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8321
|
|
|
|
|
|
|
q{PSQUOTE}, |
8322
|
|
|
|
|
|
|
$tracelevel) |
8323
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8324
|
8
|
|
|
|
|
18
|
$item{q{PSQUOTE}} = $_tok; |
8325
|
8
|
|
|
|
|
13
|
push @item, $_tok; |
8326
|
|
|
|
|
|
|
|
8327
|
|
|
|
|
|
|
} |
8328
|
|
|
|
|
|
|
|
8329
|
8
|
50
|
|
|
|
22
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
8330
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8331
|
|
|
|
|
|
|
q{PSQUOTE}, |
8332
|
|
|
|
|
|
|
$tracelevel) |
8333
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8334
|
|
|
|
|
|
|
|
8335
|
|
|
|
|
|
|
|
8336
|
8
|
50
|
|
|
|
20
|
$_tok = ($_noactions) ? 0 : do {$return = $item{NOTSQUOTE}.$item{SLASHEDSQUOTE}.$item{PSQUOTE}}; |
|
8
|
|
|
|
|
23
|
|
8337
|
8
|
50
|
|
|
|
23
|
unless (defined $_tok) |
8338
|
|
|
|
|
|
|
{ |
8339
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
8340
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8341
|
0
|
|
|
|
|
0
|
last; |
8342
|
|
|
|
|
|
|
} |
8343
|
8
|
50
|
|
|
|
19
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
8344
|
|
|
|
|
|
|
. $_tok . q{])}, |
8345
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8346
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8347
|
8
|
|
|
|
|
16
|
push @item, $_tok; |
8348
|
8
|
|
|
|
|
15
|
$item{__ACTION1__}=$_tok; |
8349
|
|
|
|
|
|
|
|
8350
|
|
|
|
|
|
|
|
8351
|
8
|
50
|
|
|
|
18
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [NOTSQUOTE SLASHEDSQUOTE PSQUOTE]<<}, |
8352
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8353
|
|
|
|
|
|
|
q{PSQUOTE}, |
8354
|
|
|
|
|
|
|
$tracelevel) |
8355
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8356
|
|
|
|
|
|
|
|
8357
|
|
|
|
|
|
|
|
8358
|
|
|
|
|
|
|
|
8359
|
8
|
|
|
|
|
13
|
$_matched = 1; |
8360
|
8
|
|
|
|
|
16
|
last; |
8361
|
|
|
|
|
|
|
} |
8362
|
|
|
|
|
|
|
|
8363
|
|
|
|
|
|
|
|
8364
|
16
|
|
66
|
|
|
53
|
while (!$_matched && !$commit) |
8365
|
|
|
|
|
|
|
{ |
8366
|
|
|
|
|
|
|
|
8367
|
8
|
50
|
|
|
|
19
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [NOTSQUOTE]}, |
8368
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8369
|
|
|
|
|
|
|
q{PSQUOTE}, |
8370
|
|
|
|
|
|
|
$tracelevel) |
8371
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8372
|
8
|
|
|
|
|
17
|
my $thisprod = $thisrule->{"prods"}[1]; |
8373
|
8
|
|
|
|
|
16
|
$text = $_[1]; |
8374
|
8
|
|
|
|
|
11
|
my $_savetext; |
8375
|
8
|
|
|
|
|
21
|
@item = (q{PSQUOTE}); |
8376
|
8
|
|
|
|
|
20
|
%item = (__RULE__ => q{PSQUOTE}); |
8377
|
8
|
|
|
|
|
14
|
my $repcount = 0; |
8378
|
|
|
|
|
|
|
|
8379
|
|
|
|
|
|
|
|
8380
|
8
|
50
|
|
|
|
18
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [NOTSQUOTE]}, |
8381
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8382
|
|
|
|
|
|
|
q{PSQUOTE}, |
8383
|
|
|
|
|
|
|
$tracelevel) |
8384
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8385
|
2
|
|
|
2
|
|
19
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
980
|
|
|
8
|
|
|
|
|
12
|
|
8386
|
8
|
|
|
|
|
21
|
$expectation->is(q{})->at($text); |
8387
|
8
|
50
|
|
8
|
|
35
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::NOTSQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
8
|
|
|
|
|
18
|
|
8388
|
|
|
|
|
|
|
{ |
8389
|
|
|
|
|
|
|
|
8390
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [NOTSQUOTE]>>}, |
8391
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8392
|
|
|
|
|
|
|
q{PSQUOTE}, |
8393
|
|
|
|
|
|
|
$tracelevel) |
8394
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8395
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
8396
|
0
|
|
|
|
|
0
|
last; |
8397
|
|
|
|
|
|
|
} |
8398
|
8
|
50
|
|
|
|
26
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [NOTSQUOTE]<< (return value: [} |
8399
|
|
|
|
|
|
|
. $_tok . q{]}, |
8400
|
|
|
|
|
|
|
|
8401
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8402
|
|
|
|
|
|
|
q{PSQUOTE}, |
8403
|
|
|
|
|
|
|
$tracelevel) |
8404
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8405
|
8
|
|
|
|
|
19
|
$item{q{NOTSQUOTE}} = $_tok; |
8406
|
8
|
|
|
|
|
14
|
push @item, $_tok; |
8407
|
|
|
|
|
|
|
|
8408
|
|
|
|
|
|
|
} |
8409
|
|
|
|
|
|
|
|
8410
|
8
|
50
|
|
|
|
19
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [NOTSQUOTE]<<}, |
8411
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8412
|
|
|
|
|
|
|
q{PSQUOTE}, |
8413
|
|
|
|
|
|
|
$tracelevel) |
8414
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8415
|
|
|
|
|
|
|
|
8416
|
|
|
|
|
|
|
|
8417
|
|
|
|
|
|
|
|
8418
|
8
|
|
|
|
|
16
|
$_matched = 1; |
8419
|
8
|
|
|
|
|
14
|
last; |
8420
|
|
|
|
|
|
|
} |
8421
|
|
|
|
|
|
|
|
8422
|
|
|
|
|
|
|
|
8423
|
16
|
50
|
33
|
|
|
44
|
unless ( $_matched || defined($score) ) |
8424
|
|
|
|
|
|
|
{ |
8425
|
|
|
|
|
|
|
|
8426
|
|
|
|
|
|
|
|
8427
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
8428
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
8429
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8430
|
|
|
|
|
|
|
q{PSQUOTE}, |
8431
|
|
|
|
|
|
|
$tracelevel) |
8432
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8433
|
0
|
|
|
|
|
0
|
return undef; |
8434
|
|
|
|
|
|
|
} |
8435
|
16
|
50
|
66
|
|
|
54
|
if (!defined($return) && defined($score)) |
8436
|
|
|
|
|
|
|
{ |
8437
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
8438
|
|
|
|
|
|
|
q{PSQUOTE}, |
8439
|
|
|
|
|
|
|
$tracelevel) |
8440
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8441
|
0
|
|
|
|
|
0
|
$return = $score_return; |
8442
|
|
|
|
|
|
|
} |
8443
|
16
|
|
|
|
|
26
|
splice @{$thisparser->{errors}}, $err_at; |
|
16
|
|
|
|
|
33
|
|
8444
|
16
|
100
|
|
|
|
38
|
$return = $item[$#item] unless defined $return; |
8445
|
16
|
50
|
|
|
|
36
|
if (defined $::RD_TRACE) |
8446
|
|
|
|
|
|
|
{ |
8447
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
8448
|
|
|
|
|
|
|
$return . q{])}, "", |
8449
|
|
|
|
|
|
|
q{PSQUOTE}, |
8450
|
|
|
|
|
|
|
$tracelevel); |
8451
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
8452
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
8453
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8454
|
|
|
|
|
|
|
, q{PSQUOTE}, |
8455
|
|
|
|
|
|
|
$tracelevel) |
8456
|
|
|
|
|
|
|
} |
8457
|
16
|
|
|
|
|
28
|
$_[1] = $text; |
8458
|
16
|
|
|
|
|
81
|
return $return; |
8459
|
|
|
|
|
|
|
} |
8460
|
|
|
|
|
|
|
|
8461
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
8462
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SLASHEDSQUOTE |
8463
|
|
|
|
|
|
|
{ |
8464
|
16
|
|
|
16
|
|
27
|
my $thisparser = $_[0]; |
8465
|
2
|
|
|
2
|
|
19
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
2051
|
|
8466
|
16
|
|
50
|
|
|
41
|
local $tracelevel = ($tracelevel||0)+1; |
8467
|
16
|
|
|
|
|
28
|
$ERRORS = 0; |
8468
|
16
|
|
|
|
|
32
|
my $thisrule = $thisparser->{"rules"}{"SLASHEDSQUOTE"}; |
8469
|
|
|
|
|
|
|
|
8470
|
16
|
50
|
|
|
|
36
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [SLASHEDSQUOTE]}, |
8471
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8472
|
|
|
|
|
|
|
q{SLASHEDSQUOTE}, |
8473
|
|
|
|
|
|
|
$tracelevel) |
8474
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8475
|
|
|
|
|
|
|
|
8476
|
|
|
|
|
|
|
|
8477
|
16
|
|
|
|
|
23
|
my $err_at = @{$thisparser->{errors}}; |
|
16
|
|
|
|
|
29
|
|
8478
|
|
|
|
|
|
|
|
8479
|
16
|
|
|
|
|
43
|
my $score; |
8480
|
|
|
|
|
|
|
my $score_return; |
8481
|
16
|
|
|
|
|
0
|
my $_tok; |
8482
|
16
|
|
|
|
|
22
|
my $return = undef; |
8483
|
16
|
|
|
|
|
26
|
my $_matched=0; |
8484
|
16
|
|
|
|
|
22
|
my $commit=0; |
8485
|
16
|
|
|
|
|
29
|
my @item = (); |
8486
|
16
|
|
|
|
|
29
|
my %item = (); |
8487
|
16
|
|
|
|
|
27
|
my $repeating = $_[2]; |
8488
|
16
|
|
|
|
|
24
|
my $_noactions = $_[3]; |
8489
|
16
|
50
|
|
|
|
34
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
16
|
|
|
|
|
29
|
|
|
16
|
|
|
|
|
27
|
|
8490
|
16
|
|
|
|
|
28
|
my $_itempos = $_[5]; |
8491
|
16
|
50
|
|
|
|
43
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
8492
|
16
|
|
|
|
|
44
|
my $text; |
8493
|
|
|
|
|
|
|
my $lastsep; |
8494
|
16
|
|
|
|
|
0
|
my $current_match; |
8495
|
16
|
|
|
|
|
36
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/\\\\'/}); |
8496
|
16
|
|
|
|
|
43
|
$expectation->at($_[1]); |
8497
|
|
|
|
|
|
|
|
8498
|
16
|
|
|
|
|
22
|
my $thisline; |
8499
|
16
|
|
|
|
|
50
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
8500
|
|
|
|
|
|
|
|
8501
|
|
|
|
|
|
|
|
8502
|
|
|
|
|
|
|
|
8503
|
16
|
|
33
|
|
|
61
|
while (!$_matched && !$commit) |
8504
|
|
|
|
|
|
|
{ |
8505
|
|
|
|
|
|
|
|
8506
|
16
|
50
|
|
|
|
40
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/\\\\'/]}, |
8507
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8508
|
|
|
|
|
|
|
q{SLASHEDSQUOTE}, |
8509
|
|
|
|
|
|
|
$tracelevel) |
8510
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8511
|
16
|
|
|
|
|
33
|
my $thisprod = $thisrule->{"prods"}[0]; |
8512
|
16
|
|
|
|
|
26
|
$text = $_[1]; |
8513
|
16
|
|
|
|
|
25
|
my $_savetext; |
8514
|
16
|
|
|
|
|
28
|
@item = (q{SLASHEDSQUOTE}); |
8515
|
16
|
|
|
|
|
32
|
%item = (__RULE__ => q{SLASHEDSQUOTE}); |
8516
|
16
|
|
|
|
|
29
|
my $repcount = 0; |
8517
|
|
|
|
|
|
|
|
8518
|
|
|
|
|
|
|
|
8519
|
16
|
50
|
|
|
|
34
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/\\\\'/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
8520
|
|
|
|
|
|
|
q{SLASHEDSQUOTE}, |
8521
|
|
|
|
|
|
|
$tracelevel) |
8522
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8523
|
16
|
|
|
|
|
26
|
undef $lastsep; |
8524
|
16
|
|
|
|
|
33
|
$expectation->is(q{})->at($text); |
8525
|
|
|
|
|
|
|
|
8526
|
|
|
|
|
|
|
|
8527
|
16
|
50
|
66
|
|
|
85
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\\')/) |
|
16
|
100
|
|
|
|
118
|
|
8528
|
|
|
|
|
|
|
{ |
8529
|
8
|
50
|
|
|
|
32
|
$text = $lastsep . $text if defined $lastsep; |
8530
|
8
|
|
|
|
|
24
|
$expectation->failed(); |
8531
|
8
|
50
|
|
|
|
22
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
8532
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8533
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8534
|
|
|
|
|
|
|
|
8535
|
8
|
|
|
|
|
17
|
last; |
8536
|
|
|
|
|
|
|
} |
8537
|
8
|
|
|
|
|
38
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
8538
|
8
|
|
|
|
|
25
|
substr($text,0,length($current_match),q{}); |
8539
|
8
|
50
|
|
|
|
22
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
8540
|
|
|
|
|
|
|
. $current_match . q{])}, |
8541
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8542
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8543
|
8
|
|
|
|
|
20
|
push @item, $item{__PATTERN1__}=$current_match; |
8544
|
|
|
|
|
|
|
|
8545
|
|
|
|
|
|
|
|
8546
|
8
|
50
|
|
|
|
20
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
8547
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8548
|
|
|
|
|
|
|
q{SLASHEDSQUOTE}, |
8549
|
|
|
|
|
|
|
$tracelevel) |
8550
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8551
|
|
|
|
|
|
|
|
8552
|
|
|
|
|
|
|
|
8553
|
8
|
50
|
|
|
|
16
|
$_tok = ($_noactions) ? 0 : do {$return = "'"}; |
|
8
|
|
|
|
|
17
|
|
8554
|
8
|
50
|
|
|
|
31
|
unless (defined $_tok) |
8555
|
|
|
|
|
|
|
{ |
8556
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
8557
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8558
|
0
|
|
|
|
|
0
|
last; |
8559
|
|
|
|
|
|
|
} |
8560
|
8
|
50
|
|
|
|
23
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
8561
|
|
|
|
|
|
|
. $_tok . q{])}, |
8562
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8563
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8564
|
8
|
|
|
|
|
15
|
push @item, $_tok; |
8565
|
8
|
|
|
|
|
14
|
$item{__ACTION1__}=$_tok; |
8566
|
|
|
|
|
|
|
|
8567
|
|
|
|
|
|
|
|
8568
|
8
|
50
|
|
|
|
19
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/\\\\'/]<<}, |
8569
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8570
|
|
|
|
|
|
|
q{SLASHEDSQUOTE}, |
8571
|
|
|
|
|
|
|
$tracelevel) |
8572
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8573
|
|
|
|
|
|
|
|
8574
|
|
|
|
|
|
|
|
8575
|
|
|
|
|
|
|
|
8576
|
8
|
|
|
|
|
13
|
$_matched = 1; |
8577
|
8
|
|
|
|
|
14
|
last; |
8578
|
|
|
|
|
|
|
} |
8579
|
|
|
|
|
|
|
|
8580
|
|
|
|
|
|
|
|
8581
|
16
|
100
|
66
|
|
|
58
|
unless ( $_matched || defined($score) ) |
8582
|
|
|
|
|
|
|
{ |
8583
|
|
|
|
|
|
|
|
8584
|
|
|
|
|
|
|
|
8585
|
8
|
|
|
|
|
16
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
8586
|
8
|
50
|
|
|
|
19
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
8587
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8588
|
|
|
|
|
|
|
q{SLASHEDSQUOTE}, |
8589
|
|
|
|
|
|
|
$tracelevel) |
8590
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8591
|
8
|
|
|
|
|
38
|
return undef; |
8592
|
|
|
|
|
|
|
} |
8593
|
8
|
50
|
33
|
|
|
25
|
if (!defined($return) && defined($score)) |
8594
|
|
|
|
|
|
|
{ |
8595
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
8596
|
|
|
|
|
|
|
q{SLASHEDSQUOTE}, |
8597
|
|
|
|
|
|
|
$tracelevel) |
8598
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8599
|
0
|
|
|
|
|
0
|
$return = $score_return; |
8600
|
|
|
|
|
|
|
} |
8601
|
8
|
|
|
|
|
17
|
splice @{$thisparser->{errors}}, $err_at; |
|
8
|
|
|
|
|
16
|
|
8602
|
8
|
50
|
|
|
|
23
|
$return = $item[$#item] unless defined $return; |
8603
|
8
|
50
|
|
|
|
18
|
if (defined $::RD_TRACE) |
8604
|
|
|
|
|
|
|
{ |
8605
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
8606
|
|
|
|
|
|
|
$return . q{])}, "", |
8607
|
|
|
|
|
|
|
q{SLASHEDSQUOTE}, |
8608
|
|
|
|
|
|
|
$tracelevel); |
8609
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
8610
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
8611
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8612
|
|
|
|
|
|
|
, q{SLASHEDSQUOTE}, |
8613
|
|
|
|
|
|
|
$tracelevel) |
8614
|
|
|
|
|
|
|
} |
8615
|
8
|
|
|
|
|
16
|
$_[1] = $text; |
8616
|
8
|
|
|
|
|
43
|
return $return; |
8617
|
|
|
|
|
|
|
} |
8618
|
|
|
|
|
|
|
|
8619
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
8620
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PNAME |
8621
|
|
|
|
|
|
|
{ |
8622
|
176
|
|
|
176
|
|
309
|
my $thisparser = $_[0]; |
8623
|
2
|
|
|
2
|
|
19
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
2183
|
|
8624
|
176
|
|
50
|
|
|
479
|
local $tracelevel = ($tracelevel||0)+1; |
8625
|
176
|
|
|
|
|
269
|
$ERRORS = 0; |
8626
|
176
|
|
|
|
|
358
|
my $thisrule = $thisparser->{"rules"}{"PNAME"}; |
8627
|
|
|
|
|
|
|
|
8628
|
176
|
50
|
|
|
|
424
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [PNAME]}, |
8629
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8630
|
|
|
|
|
|
|
q{PNAME}, |
8631
|
|
|
|
|
|
|
$tracelevel) |
8632
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8633
|
|
|
|
|
|
|
|
8634
|
|
|
|
|
|
|
|
8635
|
176
|
|
|
|
|
266
|
my $err_at = @{$thisparser->{errors}}; |
|
176
|
|
|
|
|
332
|
|
8636
|
|
|
|
|
|
|
|
8637
|
176
|
|
|
|
|
464
|
my $score; |
8638
|
|
|
|
|
|
|
my $score_return; |
8639
|
176
|
|
|
|
|
0
|
my $_tok; |
8640
|
176
|
|
|
|
|
315
|
my $return = undef; |
8641
|
176
|
|
|
|
|
255
|
my $_matched=0; |
8642
|
176
|
|
|
|
|
256
|
my $commit=0; |
8643
|
176
|
|
|
|
|
303
|
my @item = (); |
8644
|
176
|
|
|
|
|
307
|
my %item = (); |
8645
|
176
|
|
|
|
|
281
|
my $repeating = $_[2]; |
8646
|
176
|
|
|
|
|
300
|
my $_noactions = $_[3]; |
8647
|
176
|
50
|
|
|
|
377
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
176
|
|
|
|
|
284
|
|
|
176
|
|
|
|
|
374
|
|
8648
|
176
|
|
|
|
|
296
|
my $_itempos = $_[5]; |
8649
|
176
|
50
|
|
|
|
491
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
8650
|
176
|
|
|
|
|
446
|
my $text; |
8651
|
|
|
|
|
|
|
my $lastsep; |
8652
|
176
|
|
|
|
|
0
|
my $current_match; |
8653
|
176
|
|
|
|
|
393
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/\\w+/}); |
8654
|
176
|
|
|
|
|
452
|
$expectation->at($_[1]); |
8655
|
|
|
|
|
|
|
|
8656
|
176
|
|
|
|
|
267
|
my $thisline; |
8657
|
176
|
|
|
|
|
510
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
8658
|
|
|
|
|
|
|
|
8659
|
|
|
|
|
|
|
|
8660
|
|
|
|
|
|
|
|
8661
|
176
|
|
33
|
|
|
664
|
while (!$_matched && !$commit) |
8662
|
|
|
|
|
|
|
{ |
8663
|
|
|
|
|
|
|
|
8664
|
176
|
50
|
|
|
|
417
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/\\w+/]}, |
8665
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8666
|
|
|
|
|
|
|
q{PNAME}, |
8667
|
|
|
|
|
|
|
$tracelevel) |
8668
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8669
|
176
|
|
|
|
|
360
|
my $thisprod = $thisrule->{"prods"}[0]; |
8670
|
176
|
|
|
|
|
307
|
$text = $_[1]; |
8671
|
176
|
|
|
|
|
272
|
my $_savetext; |
8672
|
176
|
|
|
|
|
327
|
@item = (q{PNAME}); |
8673
|
176
|
|
|
|
|
380
|
%item = (__RULE__ => q{PNAME}); |
8674
|
176
|
|
|
|
|
273
|
my $repcount = 0; |
8675
|
|
|
|
|
|
|
|
8676
|
|
|
|
|
|
|
|
8677
|
176
|
50
|
|
|
|
390
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/\\w+/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
8678
|
|
|
|
|
|
|
q{PNAME}, |
8679
|
|
|
|
|
|
|
$tracelevel) |
8680
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8681
|
176
|
|
|
|
|
310
|
undef $lastsep; |
8682
|
176
|
|
|
|
|
404
|
$expectation->is(q{})->at($text); |
8683
|
|
|
|
|
|
|
|
8684
|
|
|
|
|
|
|
|
8685
|
176
|
100
|
66
|
|
|
1124
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\w+)/) |
|
176
|
100
|
|
|
|
1578
|
|
8686
|
|
|
|
|
|
|
{ |
8687
|
70
|
50
|
|
|
|
257
|
$text = $lastsep . $text if defined $lastsep; |
8688
|
70
|
|
|
|
|
230
|
$expectation->failed(); |
8689
|
70
|
50
|
|
|
|
176
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
8690
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8691
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8692
|
|
|
|
|
|
|
|
8693
|
70
|
|
|
|
|
189
|
last; |
8694
|
|
|
|
|
|
|
} |
8695
|
106
|
|
|
|
|
587
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
8696
|
106
|
|
|
|
|
348
|
substr($text,0,length($current_match),q{}); |
8697
|
106
|
50
|
|
|
|
283
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
8698
|
|
|
|
|
|
|
. $current_match . q{])}, |
8699
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8700
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8701
|
106
|
|
|
|
|
255
|
push @item, $item{__PATTERN1__}=$current_match; |
8702
|
|
|
|
|
|
|
|
8703
|
|
|
|
|
|
|
|
8704
|
106
|
50
|
|
|
|
243
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
8705
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8706
|
|
|
|
|
|
|
q{PNAME}, |
8707
|
|
|
|
|
|
|
$tracelevel) |
8708
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8709
|
|
|
|
|
|
|
|
8710
|
|
|
|
|
|
|
|
8711
|
106
|
50
|
|
|
|
230
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1]}; |
|
106
|
|
|
|
|
238
|
|
8712
|
106
|
50
|
|
|
|
285
|
unless (defined $_tok) |
8713
|
|
|
|
|
|
|
{ |
8714
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
8715
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8716
|
0
|
|
|
|
|
0
|
last; |
8717
|
|
|
|
|
|
|
} |
8718
|
106
|
50
|
|
|
|
286
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
8719
|
|
|
|
|
|
|
. $_tok . q{])}, |
8720
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8721
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8722
|
106
|
|
|
|
|
188
|
push @item, $_tok; |
8723
|
106
|
|
|
|
|
196
|
$item{__ACTION1__}=$_tok; |
8724
|
|
|
|
|
|
|
|
8725
|
|
|
|
|
|
|
|
8726
|
106
|
50
|
|
|
|
270
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/\\w+/]<<}, |
8727
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8728
|
|
|
|
|
|
|
q{PNAME}, |
8729
|
|
|
|
|
|
|
$tracelevel) |
8730
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8731
|
|
|
|
|
|
|
|
8732
|
|
|
|
|
|
|
|
8733
|
|
|
|
|
|
|
|
8734
|
106
|
|
|
|
|
205
|
$_matched = 1; |
8735
|
106
|
|
|
|
|
235
|
last; |
8736
|
|
|
|
|
|
|
} |
8737
|
|
|
|
|
|
|
|
8738
|
|
|
|
|
|
|
|
8739
|
176
|
100
|
66
|
|
|
685
|
unless ( $_matched || defined($score) ) |
8740
|
|
|
|
|
|
|
{ |
8741
|
|
|
|
|
|
|
|
8742
|
|
|
|
|
|
|
|
8743
|
70
|
|
|
|
|
156
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
8744
|
70
|
50
|
|
|
|
176
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
8745
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8746
|
|
|
|
|
|
|
q{PNAME}, |
8747
|
|
|
|
|
|
|
$tracelevel) |
8748
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8749
|
70
|
|
|
|
|
679
|
return undef; |
8750
|
|
|
|
|
|
|
} |
8751
|
106
|
50
|
33
|
|
|
302
|
if (!defined($return) && defined($score)) |
8752
|
|
|
|
|
|
|
{ |
8753
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
8754
|
|
|
|
|
|
|
q{PNAME}, |
8755
|
|
|
|
|
|
|
$tracelevel) |
8756
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8757
|
0
|
|
|
|
|
0
|
$return = $score_return; |
8758
|
|
|
|
|
|
|
} |
8759
|
106
|
|
|
|
|
227
|
splice @{$thisparser->{errors}}, $err_at; |
|
106
|
|
|
|
|
254
|
|
8760
|
106
|
50
|
|
|
|
268
|
$return = $item[$#item] unless defined $return; |
8761
|
106
|
50
|
|
|
|
261
|
if (defined $::RD_TRACE) |
8762
|
|
|
|
|
|
|
{ |
8763
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
8764
|
|
|
|
|
|
|
$return . q{])}, "", |
8765
|
|
|
|
|
|
|
q{PNAME}, |
8766
|
|
|
|
|
|
|
$tracelevel); |
8767
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
8768
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
8769
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8770
|
|
|
|
|
|
|
, q{PNAME}, |
8771
|
|
|
|
|
|
|
$tracelevel) |
8772
|
|
|
|
|
|
|
} |
8773
|
106
|
|
|
|
|
229
|
$_[1] = $text; |
8774
|
106
|
|
|
|
|
622
|
return $return; |
8775
|
|
|
|
|
|
|
} |
8776
|
|
|
|
|
|
|
|
8777
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
8778
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PDQUOTE |
8779
|
|
|
|
|
|
|
{ |
8780
|
16
|
|
|
16
|
|
32
|
my $thisparser = $_[0]; |
8781
|
2
|
|
|
2
|
|
18
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
82
|
|
|
2
|
|
|
|
|
721
|
|
8782
|
16
|
|
50
|
|
|
40
|
local $tracelevel = ($tracelevel||0)+1; |
8783
|
16
|
|
|
|
|
29
|
$ERRORS = 0; |
8784
|
16
|
|
|
|
|
37
|
my $thisrule = $thisparser->{"rules"}{"PDQUOTE"}; |
8785
|
|
|
|
|
|
|
|
8786
|
16
|
50
|
|
|
|
37
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [PDQUOTE]}, |
8787
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8788
|
|
|
|
|
|
|
q{PDQUOTE}, |
8789
|
|
|
|
|
|
|
$tracelevel) |
8790
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8791
|
|
|
|
|
|
|
|
8792
|
|
|
|
|
|
|
|
8793
|
16
|
|
|
|
|
24
|
my $err_at = @{$thisparser->{errors}}; |
|
16
|
|
|
|
|
31
|
|
8794
|
|
|
|
|
|
|
|
8795
|
16
|
|
|
|
|
39
|
my $score; |
8796
|
|
|
|
|
|
|
my $score_return; |
8797
|
16
|
|
|
|
|
0
|
my $_tok; |
8798
|
16
|
|
|
|
|
23
|
my $return = undef; |
8799
|
16
|
|
|
|
|
27
|
my $_matched=0; |
8800
|
16
|
|
|
|
|
21
|
my $commit=0; |
8801
|
16
|
|
|
|
|
30
|
my @item = (); |
8802
|
16
|
|
|
|
|
28
|
my %item = (); |
8803
|
16
|
|
|
|
|
23
|
my $repeating = $_[2]; |
8804
|
16
|
|
|
|
|
27
|
my $_noactions = $_[3]; |
8805
|
16
|
50
|
|
|
|
36
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
16
|
|
|
|
|
23
|
|
|
16
|
|
|
|
|
30
|
|
8806
|
16
|
|
|
|
|
25
|
my $_itempos = $_[5]; |
8807
|
16
|
50
|
|
|
|
51
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
8808
|
16
|
|
|
|
|
40
|
my $text; |
8809
|
|
|
|
|
|
|
my $lastsep; |
8810
|
16
|
|
|
|
|
0
|
my $current_match; |
8811
|
16
|
|
|
|
|
38
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{NOTDQUOTE}); |
8812
|
16
|
|
|
|
|
42
|
$expectation->at($_[1]); |
8813
|
|
|
|
|
|
|
|
8814
|
16
|
|
|
|
|
24
|
my $thisline; |
8815
|
16
|
|
|
|
|
51
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
8816
|
|
|
|
|
|
|
|
8817
|
|
|
|
|
|
|
|
8818
|
|
|
|
|
|
|
|
8819
|
16
|
|
33
|
|
|
60
|
while (!$_matched && !$commit) |
8820
|
|
|
|
|
|
|
{ |
8821
|
|
|
|
|
|
|
|
8822
|
16
|
50
|
|
|
|
37
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [NOTDQUOTE SLASHEDDQUOTE PDQUOTE]}, |
8823
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8824
|
|
|
|
|
|
|
q{PDQUOTE}, |
8825
|
|
|
|
|
|
|
$tracelevel) |
8826
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8827
|
16
|
|
|
|
|
29
|
my $thisprod = $thisrule->{"prods"}[0]; |
8828
|
16
|
|
|
|
|
30
|
$text = $_[1]; |
8829
|
16
|
|
|
|
|
28
|
my $_savetext; |
8830
|
16
|
|
|
|
|
29
|
@item = (q{PDQUOTE}); |
8831
|
16
|
|
|
|
|
32
|
%item = (__RULE__ => q{PDQUOTE}); |
8832
|
16
|
|
|
|
|
27
|
my $repcount = 0; |
8833
|
|
|
|
|
|
|
|
8834
|
|
|
|
|
|
|
|
8835
|
16
|
50
|
|
|
|
38
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [NOTDQUOTE]}, |
8836
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8837
|
|
|
|
|
|
|
q{PDQUOTE}, |
8838
|
|
|
|
|
|
|
$tracelevel) |
8839
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8840
|
2
|
|
|
2
|
|
18
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
487
|
|
|
16
|
|
|
|
|
21
|
|
8841
|
16
|
|
|
|
|
35
|
$expectation->is(q{})->at($text); |
8842
|
16
|
50
|
|
16
|
|
67
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::NOTDQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
16
|
|
|
|
|
35
|
|
8843
|
|
|
|
|
|
|
{ |
8844
|
|
|
|
|
|
|
|
8845
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [NOTDQUOTE]>>}, |
8846
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8847
|
|
|
|
|
|
|
q{PDQUOTE}, |
8848
|
|
|
|
|
|
|
$tracelevel) |
8849
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8850
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
8851
|
0
|
|
|
|
|
0
|
last; |
8852
|
|
|
|
|
|
|
} |
8853
|
16
|
50
|
|
|
|
55
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [NOTDQUOTE]<< (return value: [} |
8854
|
|
|
|
|
|
|
. $_tok . q{]}, |
8855
|
|
|
|
|
|
|
|
8856
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8857
|
|
|
|
|
|
|
q{PDQUOTE}, |
8858
|
|
|
|
|
|
|
$tracelevel) |
8859
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8860
|
16
|
|
|
|
|
31
|
$item{q{NOTDQUOTE}} = $_tok; |
8861
|
16
|
|
|
|
|
28
|
push @item, $_tok; |
8862
|
|
|
|
|
|
|
|
8863
|
|
|
|
|
|
|
} |
8864
|
|
|
|
|
|
|
|
8865
|
16
|
50
|
|
|
|
34
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [SLASHEDDQUOTE]}, |
8866
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8867
|
|
|
|
|
|
|
q{PDQUOTE}, |
8868
|
|
|
|
|
|
|
$tracelevel) |
8869
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8870
|
2
|
|
|
2
|
|
18
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
424
|
|
|
16
|
|
|
|
|
23
|
|
8871
|
16
|
|
|
|
|
39
|
$expectation->is(q{SLASHEDDQUOTE})->at($text); |
8872
|
16
|
100
|
|
16
|
|
64
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SLASHEDDQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
16
|
|
|
|
|
36
|
|
8873
|
|
|
|
|
|
|
{ |
8874
|
|
|
|
|
|
|
|
8875
|
8
|
50
|
|
|
|
20
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [SLASHEDDQUOTE]>>}, |
8876
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8877
|
|
|
|
|
|
|
q{PDQUOTE}, |
8878
|
|
|
|
|
|
|
$tracelevel) |
8879
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8880
|
8
|
|
|
|
|
20
|
$expectation->failed(); |
8881
|
8
|
|
|
|
|
13
|
last; |
8882
|
|
|
|
|
|
|
} |
8883
|
8
|
50
|
|
|
|
27
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [SLASHEDDQUOTE]<< (return value: [} |
8884
|
|
|
|
|
|
|
. $_tok . q{]}, |
8885
|
|
|
|
|
|
|
|
8886
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8887
|
|
|
|
|
|
|
q{PDQUOTE}, |
8888
|
|
|
|
|
|
|
$tracelevel) |
8889
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8890
|
8
|
|
|
|
|
16
|
$item{q{SLASHEDDQUOTE}} = $_tok; |
8891
|
8
|
|
|
|
|
15
|
push @item, $_tok; |
8892
|
|
|
|
|
|
|
|
8893
|
|
|
|
|
|
|
} |
8894
|
|
|
|
|
|
|
|
8895
|
8
|
50
|
|
|
|
21
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PDQUOTE]}, |
8896
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8897
|
|
|
|
|
|
|
q{PDQUOTE}, |
8898
|
|
|
|
|
|
|
$tracelevel) |
8899
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8900
|
2
|
|
|
2
|
|
15
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
835
|
|
|
8
|
|
|
|
|
11
|
|
8901
|
8
|
|
|
|
|
84
|
$expectation->is(q{PDQUOTE})->at($text); |
8902
|
8
|
50
|
|
8
|
|
46
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PDQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
8
|
|
|
|
|
17
|
|
8903
|
|
|
|
|
|
|
{ |
8904
|
|
|
|
|
|
|
|
8905
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PDQUOTE]>>}, |
8906
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8907
|
|
|
|
|
|
|
q{PDQUOTE}, |
8908
|
|
|
|
|
|
|
$tracelevel) |
8909
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8910
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
8911
|
0
|
|
|
|
|
0
|
last; |
8912
|
|
|
|
|
|
|
} |
8913
|
8
|
50
|
|
|
|
26
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PDQUOTE]<< (return value: [} |
8914
|
|
|
|
|
|
|
. $_tok . q{]}, |
8915
|
|
|
|
|
|
|
|
8916
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8917
|
|
|
|
|
|
|
q{PDQUOTE}, |
8918
|
|
|
|
|
|
|
$tracelevel) |
8919
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8920
|
8
|
|
|
|
|
16
|
$item{q{PDQUOTE}} = $_tok; |
8921
|
8
|
|
|
|
|
14
|
push @item, $_tok; |
8922
|
|
|
|
|
|
|
|
8923
|
|
|
|
|
|
|
} |
8924
|
|
|
|
|
|
|
|
8925
|
8
|
50
|
|
|
|
21
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
8926
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8927
|
|
|
|
|
|
|
q{PDQUOTE}, |
8928
|
|
|
|
|
|
|
$tracelevel) |
8929
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8930
|
|
|
|
|
|
|
|
8931
|
|
|
|
|
|
|
|
8932
|
8
|
50
|
|
|
|
20
|
$_tok = ($_noactions) ? 0 : do {$return = $item{NOTDQUOTE}.$item{SLASHEDDQUOTE}.$item{PDQUOTE}}; |
|
8
|
|
|
|
|
24
|
|
8933
|
8
|
50
|
|
|
|
22
|
unless (defined $_tok) |
8934
|
|
|
|
|
|
|
{ |
8935
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
8936
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8937
|
0
|
|
|
|
|
0
|
last; |
8938
|
|
|
|
|
|
|
} |
8939
|
8
|
50
|
|
|
|
20
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
8940
|
|
|
|
|
|
|
. $_tok . q{])}, |
8941
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8942
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8943
|
8
|
|
|
|
|
15
|
push @item, $_tok; |
8944
|
8
|
|
|
|
|
16
|
$item{__ACTION1__}=$_tok; |
8945
|
|
|
|
|
|
|
|
8946
|
|
|
|
|
|
|
|
8947
|
8
|
50
|
|
|
|
20
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [NOTDQUOTE SLASHEDDQUOTE PDQUOTE]<<}, |
8948
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8949
|
|
|
|
|
|
|
q{PDQUOTE}, |
8950
|
|
|
|
|
|
|
$tracelevel) |
8951
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8952
|
|
|
|
|
|
|
|
8953
|
|
|
|
|
|
|
|
8954
|
|
|
|
|
|
|
|
8955
|
8
|
|
|
|
|
13
|
$_matched = 1; |
8956
|
8
|
|
|
|
|
13
|
last; |
8957
|
|
|
|
|
|
|
} |
8958
|
|
|
|
|
|
|
|
8959
|
|
|
|
|
|
|
|
8960
|
16
|
|
66
|
|
|
56
|
while (!$_matched && !$commit) |
8961
|
|
|
|
|
|
|
{ |
8962
|
|
|
|
|
|
|
|
8963
|
8
|
50
|
|
|
|
21
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [NOTDQUOTE]}, |
8964
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8965
|
|
|
|
|
|
|
q{PDQUOTE}, |
8966
|
|
|
|
|
|
|
$tracelevel) |
8967
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8968
|
8
|
|
|
|
|
17
|
my $thisprod = $thisrule->{"prods"}[1]; |
8969
|
8
|
|
|
|
|
15
|
$text = $_[1]; |
8970
|
8
|
|
|
|
|
13
|
my $_savetext; |
8971
|
8
|
|
|
|
|
18
|
@item = (q{PDQUOTE}); |
8972
|
8
|
|
|
|
|
22
|
%item = (__RULE__ => q{PDQUOTE}); |
8973
|
8
|
|
|
|
|
10
|
my $repcount = 0; |
8974
|
|
|
|
|
|
|
|
8975
|
|
|
|
|
|
|
|
8976
|
8
|
50
|
|
|
|
21
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [NOTDQUOTE]}, |
8977
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8978
|
|
|
|
|
|
|
q{PDQUOTE}, |
8979
|
|
|
|
|
|
|
$tracelevel) |
8980
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8981
|
2
|
|
|
2
|
|
28
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
9530
|
|
|
8
|
|
|
|
|
16
|
|
8982
|
8
|
|
|
|
|
19
|
$expectation->is(q{})->at($text); |
8983
|
8
|
50
|
|
8
|
|
33
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::NOTDQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
8
|
|
|
|
|
15
|
|
8984
|
|
|
|
|
|
|
{ |
8985
|
|
|
|
|
|
|
|
8986
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [NOTDQUOTE]>>}, |
8987
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8988
|
|
|
|
|
|
|
q{PDQUOTE}, |
8989
|
|
|
|
|
|
|
$tracelevel) |
8990
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8991
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
8992
|
0
|
|
|
|
|
0
|
last; |
8993
|
|
|
|
|
|
|
} |
8994
|
8
|
50
|
|
|
|
30
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [NOTDQUOTE]<< (return value: [} |
8995
|
|
|
|
|
|
|
. $_tok . q{]}, |
8996
|
|
|
|
|
|
|
|
8997
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8998
|
|
|
|
|
|
|
q{PDQUOTE}, |
8999
|
|
|
|
|
|
|
$tracelevel) |
9000
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
9001
|
8
|
|
|
|
|
18
|
$item{q{NOTDQUOTE}} = $_tok; |
9002
|
8
|
|
|
|
|
15
|
push @item, $_tok; |
9003
|
|
|
|
|
|
|
|
9004
|
|
|
|
|
|
|
} |
9005
|
|
|
|
|
|
|
|
9006
|
8
|
50
|
|
|
|
19
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [NOTDQUOTE]<<}, |
9007
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
9008
|
|
|
|
|
|
|
q{PDQUOTE}, |
9009
|
|
|
|
|
|
|
$tracelevel) |
9010
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
9011
|
|
|
|
|
|
|
|
9012
|
|
|
|
|
|
|
|
9013
|
|
|
|
|
|
|
|
9014
|
8
|
|
|
|
|
14
|
$_matched = 1; |
9015
|
8
|
|
|
|
|
14
|
last; |
9016
|
|
|
|
|
|
|
} |
9017
|
|
|
|
|
|
|
|
9018
|
|
|
|
|
|
|
|
9019
|
16
|
50
|
33
|
|
|
52
|
unless ( $_matched || defined($score) ) |
9020
|
|
|
|
|
|
|
{ |
9021
|
|
|
|
|
|
|
|
9022
|
|
|
|
|
|
|
|
9023
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
9024
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
9025
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
9026
|
|
|
|
|
|
|
q{PDQUOTE}, |
9027
|
|
|
|
|
|
|
$tracelevel) |
9028
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
9029
|
0
|
|
|
|
|
0
|
return undef; |
9030
|
|
|
|
|
|
|
} |
9031
|
16
|
50
|
66
|
|
|
55
|
if (!defined($return) && defined($score)) |
9032
|
|
|
|
|
|
|
{ |
9033
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
9034
|
|
|
|
|
|
|
q{PDQUOTE}, |
9035
|
|
|
|
|
|
|
$tracelevel) |
9036
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
9037
|
0
|
|
|
|
|
0
|
$return = $score_return; |
9038
|
|
|
|
|
|
|
} |
9039
|
16
|
|
|
|
|
25
|
splice @{$thisparser->{errors}}, $err_at; |
|
16
|
|
|
|
|
31
|
|
9040
|
16
|
100
|
|
|
|
40
|
$return = $item[$#item] unless defined $return; |
9041
|
16
|
50
|
|
|
|
37
|
if (defined $::RD_TRACE) |
9042
|
|
|
|
|
|
|
{ |
9043
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
9044
|
|
|
|
|
|
|
$return . q{])}, "", |
9045
|
|
|
|
|
|
|
q{PDQUOTE}, |
9046
|
|
|
|
|
|
|
$tracelevel); |
9047
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
9048
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
9049
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
9050
|
|
|
|
|
|
|
, q{PDQUOTE}, |
9051
|
|
|
|
|
|
|
$tracelevel) |
9052
|
|
|
|
|
|
|
} |
9053
|
16
|
|
|
|
|
31
|
$_[1] = $text; |
9054
|
16
|
|
|
|
|
80
|
return $return; |
9055
|
|
|
|
|
|
|
} |
9056
|
|
|
|
|
|
|
} |
9057
|
13
|
|
|
13
|
0
|
7116
|
package Treex::Core::ScenarioParser; sub new { my $self = bless( { |
9058
|
|
|
|
|
|
|
'rules' => { |
9059
|
|
|
|
|
|
|
'PNOTQUOTED' => bless( { |
9060
|
|
|
|
|
|
|
'vars' => '', |
9061
|
|
|
|
|
|
|
'name' => 'PNOTQUOTED', |
9062
|
|
|
|
|
|
|
'calls' => [ |
9063
|
|
|
|
|
|
|
'EMPTY' |
9064
|
|
|
|
|
|
|
], |
9065
|
|
|
|
|
|
|
'changed' => 0, |
9066
|
|
|
|
|
|
|
'impcount' => 0, |
9067
|
|
|
|
|
|
|
'opcount' => 0, |
9068
|
|
|
|
|
|
|
'line' => 90, |
9069
|
|
|
|
|
|
|
'prods' => [ |
9070
|
|
|
|
|
|
|
bless( { |
9071
|
|
|
|
|
|
|
'uncommit' => undef, |
9072
|
|
|
|
|
|
|
'number' => 0, |
9073
|
|
|
|
|
|
|
'actcount' => 1, |
9074
|
|
|
|
|
|
|
'patcount' => 1, |
9075
|
|
|
|
|
|
|
'strcount' => 0, |
9076
|
|
|
|
|
|
|
'items' => [ |
9077
|
|
|
|
|
|
|
bless( { |
9078
|
|
|
|
|
|
|
'pattern' => '\\S+', |
9079
|
|
|
|
|
|
|
'lookahead' => 0, |
9080
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9081
|
|
|
|
|
|
|
'line' => 90, |
9082
|
|
|
|
|
|
|
'ldelim' => '/', |
9083
|
|
|
|
|
|
|
'rdelim' => '/', |
9084
|
|
|
|
|
|
|
'mod' => '', |
9085
|
|
|
|
|
|
|
'description' => '/\\\\S+/' |
9086
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9087
|
|
|
|
|
|
|
bless( { |
9088
|
|
|
|
|
|
|
'code' => '{$return = $item[1]}', |
9089
|
|
|
|
|
|
|
'lookahead' => 0, |
9090
|
|
|
|
|
|
|
'line' => 90, |
9091
|
|
|
|
|
|
|
'hashname' => '__ACTION1__' |
9092
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9093
|
|
|
|
|
|
|
], |
9094
|
|
|
|
|
|
|
'line' => undef, |
9095
|
|
|
|
|
|
|
'dircount' => 0, |
9096
|
|
|
|
|
|
|
'error' => undef |
9097
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9098
|
|
|
|
|
|
|
bless( { |
9099
|
|
|
|
|
|
|
'actcount' => 1, |
9100
|
|
|
|
|
|
|
'patcount' => 0, |
9101
|
|
|
|
|
|
|
'uncommit' => undef, |
9102
|
|
|
|
|
|
|
'number' => 1, |
9103
|
|
|
|
|
|
|
'items' => [ |
9104
|
|
|
|
|
|
|
bless( { |
9105
|
|
|
|
|
|
|
'matchrule' => 0, |
9106
|
|
|
|
|
|
|
'line' => 91, |
9107
|
|
|
|
|
|
|
'lookahead' => 0, |
9108
|
|
|
|
|
|
|
'subrule' => 'EMPTY', |
9109
|
|
|
|
|
|
|
'implicit' => undef, |
9110
|
|
|
|
|
|
|
'argcode' => undef |
9111
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9112
|
|
|
|
|
|
|
bless( { |
9113
|
|
|
|
|
|
|
'code' => '{$return = \'\'}', |
9114
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9115
|
|
|
|
|
|
|
'line' => 91, |
9116
|
|
|
|
|
|
|
'lookahead' => 0 |
9117
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9118
|
|
|
|
|
|
|
], |
9119
|
|
|
|
|
|
|
'line' => undef, |
9120
|
|
|
|
|
|
|
'error' => undef, |
9121
|
|
|
|
|
|
|
'dircount' => 0, |
9122
|
|
|
|
|
|
|
'strcount' => 0 |
9123
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9124
|
|
|
|
|
|
|
] |
9125
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9126
|
|
|
|
|
|
|
'PARAMS' => bless( { |
9127
|
|
|
|
|
|
|
'name' => 'PARAMS', |
9128
|
|
|
|
|
|
|
'calls' => [ |
9129
|
|
|
|
|
|
|
'PARAM', |
9130
|
|
|
|
|
|
|
'PARAMS' |
9131
|
|
|
|
|
|
|
], |
9132
|
|
|
|
|
|
|
'changed' => 0, |
9133
|
|
|
|
|
|
|
'impcount' => 0, |
9134
|
|
|
|
|
|
|
'vars' => '', |
9135
|
|
|
|
|
|
|
'opcount' => 0, |
9136
|
|
|
|
|
|
|
'line' => 73, |
9137
|
|
|
|
|
|
|
'prods' => [ |
9138
|
|
|
|
|
|
|
bless( { |
9139
|
|
|
|
|
|
|
'strcount' => 0, |
9140
|
|
|
|
|
|
|
'line' => undef, |
9141
|
|
|
|
|
|
|
'items' => [ |
9142
|
|
|
|
|
|
|
bless( { |
9143
|
|
|
|
|
|
|
'argcode' => undef, |
9144
|
|
|
|
|
|
|
'implicit' => undef, |
9145
|
|
|
|
|
|
|
'line' => 73, |
9146
|
|
|
|
|
|
|
'lookahead' => 0, |
9147
|
|
|
|
|
|
|
'subrule' => 'PARAM', |
9148
|
|
|
|
|
|
|
'matchrule' => 0 |
9149
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9150
|
|
|
|
|
|
|
bless( { |
9151
|
|
|
|
|
|
|
'lookahead' => 0, |
9152
|
|
|
|
|
|
|
'subrule' => 'PARAMS', |
9153
|
|
|
|
|
|
|
'line' => 73, |
9154
|
|
|
|
|
|
|
'matchrule' => 0, |
9155
|
|
|
|
|
|
|
'argcode' => undef, |
9156
|
|
|
|
|
|
|
'implicit' => undef |
9157
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9158
|
|
|
|
|
|
|
bless( { |
9159
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9160
|
|
|
|
|
|
|
'line' => 73, |
9161
|
|
|
|
|
|
|
'lookahead' => 0, |
9162
|
|
|
|
|
|
|
'code' => '{$return = [$item{PARAM}, @{$item{PARAMS}}]}' |
9163
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9164
|
|
|
|
|
|
|
], |
9165
|
|
|
|
|
|
|
'error' => undef, |
9166
|
|
|
|
|
|
|
'dircount' => 0, |
9167
|
|
|
|
|
|
|
'uncommit' => undef, |
9168
|
|
|
|
|
|
|
'number' => 0, |
9169
|
|
|
|
|
|
|
'actcount' => 1, |
9170
|
|
|
|
|
|
|
'patcount' => 0 |
9171
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9172
|
|
|
|
|
|
|
bless( { |
9173
|
|
|
|
|
|
|
'actcount' => 1, |
9174
|
|
|
|
|
|
|
'patcount' => 0, |
9175
|
|
|
|
|
|
|
'uncommit' => undef, |
9176
|
|
|
|
|
|
|
'number' => 1, |
9177
|
|
|
|
|
|
|
'items' => [ |
9178
|
|
|
|
|
|
|
bless( { |
9179
|
|
|
|
|
|
|
'matchrule' => 0, |
9180
|
|
|
|
|
|
|
'subrule' => 'PARAM', |
9181
|
|
|
|
|
|
|
'lookahead' => 0, |
9182
|
|
|
|
|
|
|
'line' => 74, |
9183
|
|
|
|
|
|
|
'implicit' => undef, |
9184
|
|
|
|
|
|
|
'argcode' => undef |
9185
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9186
|
|
|
|
|
|
|
bless( { |
9187
|
|
|
|
|
|
|
'lookahead' => 0, |
9188
|
|
|
|
|
|
|
'line' => 74, |
9189
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9190
|
|
|
|
|
|
|
'code' => '{$return = [$item{PARAM}]}' |
9191
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9192
|
|
|
|
|
|
|
], |
9193
|
|
|
|
|
|
|
'line' => undef, |
9194
|
|
|
|
|
|
|
'dircount' => 0, |
9195
|
|
|
|
|
|
|
'error' => undef, |
9196
|
|
|
|
|
|
|
'strcount' => 0 |
9197
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9198
|
|
|
|
|
|
|
] |
9199
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9200
|
|
|
|
|
|
|
'PARAM' => bless( { |
9201
|
|
|
|
|
|
|
'vars' => '', |
9202
|
|
|
|
|
|
|
'name' => 'PARAM', |
9203
|
|
|
|
|
|
|
'calls' => [ |
9204
|
|
|
|
|
|
|
'PNAME', |
9205
|
|
|
|
|
|
|
'PVALUE' |
9206
|
|
|
|
|
|
|
], |
9207
|
|
|
|
|
|
|
'changed' => 0, |
9208
|
|
|
|
|
|
|
'impcount' => 0, |
9209
|
|
|
|
|
|
|
'opcount' => 0, |
9210
|
|
|
|
|
|
|
'line' => 75, |
9211
|
|
|
|
|
|
|
'prods' => [ |
9212
|
|
|
|
|
|
|
bless( { |
9213
|
|
|
|
|
|
|
'actcount' => 1, |
9214
|
|
|
|
|
|
|
'patcount' => 0, |
9215
|
|
|
|
|
|
|
'number' => 0, |
9216
|
|
|
|
|
|
|
'uncommit' => undef, |
9217
|
|
|
|
|
|
|
'error' => undef, |
9218
|
|
|
|
|
|
|
'dircount' => 1, |
9219
|
|
|
|
|
|
|
'items' => [ |
9220
|
|
|
|
|
|
|
bless( { |
9221
|
|
|
|
|
|
|
'matchrule' => 0, |
9222
|
|
|
|
|
|
|
'lookahead' => 0, |
9223
|
|
|
|
|
|
|
'subrule' => 'PNAME', |
9224
|
|
|
|
|
|
|
'line' => 75, |
9225
|
|
|
|
|
|
|
'implicit' => undef, |
9226
|
|
|
|
|
|
|
'argcode' => undef |
9227
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9228
|
|
|
|
|
|
|
bless( { |
9229
|
|
|
|
|
|
|
'description' => '\'=\'', |
9230
|
|
|
|
|
|
|
'pattern' => '=', |
9231
|
|
|
|
|
|
|
'lookahead' => 0, |
9232
|
|
|
|
|
|
|
'line' => 75, |
9233
|
|
|
|
|
|
|
'hashname' => '__STRING1__' |
9234
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Literal' ), |
9235
|
|
|
|
|
|
|
bless( { |
9236
|
|
|
|
|
|
|
'name' => '<skip: qr//>', |
9237
|
|
|
|
|
|
|
'code' => 'my $oldskip = $skip; $skip= qr//; $oldskip', |
9238
|
|
|
|
|
|
|
'hashname' => '__DIRECTIVE1__', |
9239
|
|
|
|
|
|
|
'line' => 75, |
9240
|
|
|
|
|
|
|
'lookahead' => 0 |
9241
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Directive' ), |
9242
|
|
|
|
|
|
|
bless( { |
9243
|
|
|
|
|
|
|
'argcode' => undef, |
9244
|
|
|
|
|
|
|
'implicit' => undef, |
9245
|
|
|
|
|
|
|
'lookahead' => 0, |
9246
|
|
|
|
|
|
|
'subrule' => 'PVALUE', |
9247
|
|
|
|
|
|
|
'line' => 75, |
9248
|
|
|
|
|
|
|
'matchrule' => 0 |
9249
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9250
|
|
|
|
|
|
|
bless( { |
9251
|
|
|
|
|
|
|
'code' => '{$return = $item{PNAME}.\'=\'.$item{PVALUE}}', |
9252
|
|
|
|
|
|
|
'line' => 75, |
9253
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9254
|
|
|
|
|
|
|
'lookahead' => 0 |
9255
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9256
|
|
|
|
|
|
|
], |
9257
|
|
|
|
|
|
|
'line' => undef, |
9258
|
|
|
|
|
|
|
'strcount' => 1 |
9259
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9260
|
|
|
|
|
|
|
] |
9261
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9262
|
|
|
|
|
|
|
'LINE' => bless( { |
9263
|
|
|
|
|
|
|
'vars' => '', |
9264
|
|
|
|
|
|
|
'name' => 'LINE', |
9265
|
|
|
|
|
|
|
'impcount' => 0, |
9266
|
|
|
|
|
|
|
'calls' => [ |
9267
|
|
|
|
|
|
|
'BLOCK', |
9268
|
|
|
|
|
|
|
'COMMENT' |
9269
|
|
|
|
|
|
|
], |
9270
|
|
|
|
|
|
|
'changed' => 0, |
9271
|
|
|
|
|
|
|
'line' => 12, |
9272
|
|
|
|
|
|
|
'opcount' => 0, |
9273
|
|
|
|
|
|
|
'prods' => [ |
9274
|
|
|
|
|
|
|
bless( { |
9275
|
|
|
|
|
|
|
'number' => 0, |
9276
|
|
|
|
|
|
|
'uncommit' => undef, |
9277
|
|
|
|
|
|
|
'patcount' => 0, |
9278
|
|
|
|
|
|
|
'actcount' => 1, |
9279
|
|
|
|
|
|
|
'strcount' => 0, |
9280
|
|
|
|
|
|
|
'error' => undef, |
9281
|
|
|
|
|
|
|
'dircount' => 0, |
9282
|
|
|
|
|
|
|
'line' => undef, |
9283
|
|
|
|
|
|
|
'items' => [ |
9284
|
|
|
|
|
|
|
bless( { |
9285
|
|
|
|
|
|
|
'implicit' => undef, |
9286
|
|
|
|
|
|
|
'argcode' => undef, |
9287
|
|
|
|
|
|
|
'matchrule' => 0, |
9288
|
|
|
|
|
|
|
'subrule' => 'BLOCK', |
9289
|
|
|
|
|
|
|
'lookahead' => 0, |
9290
|
|
|
|
|
|
|
'line' => 12 |
9291
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9292
|
|
|
|
|
|
|
bless( { |
9293
|
|
|
|
|
|
|
'matchrule' => 0, |
9294
|
|
|
|
|
|
|
'line' => 12, |
9295
|
|
|
|
|
|
|
'lookahead' => 0, |
9296
|
|
|
|
|
|
|
'subrule' => 'COMMENT', |
9297
|
|
|
|
|
|
|
'implicit' => undef, |
9298
|
|
|
|
|
|
|
'argcode' => undef |
9299
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9300
|
|
|
|
|
|
|
bless( { |
9301
|
|
|
|
|
|
|
'code' => '{$return = [@{$item{BLOCK}}]}', |
9302
|
|
|
|
|
|
|
'lookahead' => 0, |
9303
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9304
|
|
|
|
|
|
|
'line' => 12 |
9305
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9306
|
|
|
|
|
|
|
] |
9307
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9308
|
|
|
|
|
|
|
bless( { |
9309
|
|
|
|
|
|
|
'patcount' => 0, |
9310
|
|
|
|
|
|
|
'actcount' => 1, |
9311
|
|
|
|
|
|
|
'uncommit' => undef, |
9312
|
|
|
|
|
|
|
'number' => 1, |
9313
|
|
|
|
|
|
|
'items' => [ |
9314
|
|
|
|
|
|
|
bless( { |
9315
|
|
|
|
|
|
|
'implicit' => undef, |
9316
|
|
|
|
|
|
|
'argcode' => undef, |
9317
|
|
|
|
|
|
|
'matchrule' => 0, |
9318
|
|
|
|
|
|
|
'subrule' => 'BLOCK', |
9319
|
|
|
|
|
|
|
'lookahead' => 0, |
9320
|
|
|
|
|
|
|
'line' => 13 |
9321
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9322
|
|
|
|
|
|
|
bless( { |
9323
|
|
|
|
|
|
|
'code' => '{$return = [@{$item{BLOCK}}]}', |
9324
|
|
|
|
|
|
|
'line' => 13, |
9325
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9326
|
|
|
|
|
|
|
'lookahead' => 0 |
9327
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9328
|
|
|
|
|
|
|
], |
9329
|
|
|
|
|
|
|
'line' => undef, |
9330
|
|
|
|
|
|
|
'dircount' => 0, |
9331
|
|
|
|
|
|
|
'error' => undef, |
9332
|
|
|
|
|
|
|
'strcount' => 0 |
9333
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9334
|
|
|
|
|
|
|
bless( { |
9335
|
|
|
|
|
|
|
'patcount' => 0, |
9336
|
|
|
|
|
|
|
'actcount' => 1, |
9337
|
|
|
|
|
|
|
'number' => 2, |
9338
|
|
|
|
|
|
|
'uncommit' => undef, |
9339
|
|
|
|
|
|
|
'dircount' => 0, |
9340
|
|
|
|
|
|
|
'error' => undef, |
9341
|
|
|
|
|
|
|
'items' => [ |
9342
|
|
|
|
|
|
|
bless( { |
9343
|
|
|
|
|
|
|
'implicit' => undef, |
9344
|
|
|
|
|
|
|
'argcode' => undef, |
9345
|
|
|
|
|
|
|
'matchrule' => 0, |
9346
|
|
|
|
|
|
|
'lookahead' => 0, |
9347
|
|
|
|
|
|
|
'subrule' => 'COMMENT', |
9348
|
|
|
|
|
|
|
'line' => 14 |
9349
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9350
|
|
|
|
|
|
|
bless( { |
9351
|
|
|
|
|
|
|
'code' => '{$return = []}', |
9352
|
|
|
|
|
|
|
'lookahead' => 0, |
9353
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9354
|
|
|
|
|
|
|
'line' => 14 |
9355
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9356
|
|
|
|
|
|
|
], |
9357
|
|
|
|
|
|
|
'line' => undef, |
9358
|
|
|
|
|
|
|
'strcount' => 0 |
9359
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9360
|
|
|
|
|
|
|
] |
9361
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9362
|
|
|
|
|
|
|
'EMPTY' => bless( { |
9363
|
|
|
|
|
|
|
'line' => 95, |
9364
|
|
|
|
|
|
|
'opcount' => 0, |
9365
|
|
|
|
|
|
|
'prods' => [ |
9366
|
|
|
|
|
|
|
bless( { |
9367
|
|
|
|
|
|
|
'line' => undef, |
9368
|
|
|
|
|
|
|
'items' => [ |
9369
|
|
|
|
|
|
|
bless( { |
9370
|
|
|
|
|
|
|
'mod' => '', |
9371
|
|
|
|
|
|
|
'rdelim' => '/', |
9372
|
|
|
|
|
|
|
'description' => '//', |
9373
|
|
|
|
|
|
|
'line' => 95, |
9374
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9375
|
|
|
|
|
|
|
'lookahead' => 0, |
9376
|
|
|
|
|
|
|
'pattern' => '', |
9377
|
|
|
|
|
|
|
'ldelim' => '/' |
9378
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ) |
9379
|
|
|
|
|
|
|
], |
9380
|
|
|
|
|
|
|
'error' => undef, |
9381
|
|
|
|
|
|
|
'dircount' => 0, |
9382
|
|
|
|
|
|
|
'strcount' => 0, |
9383
|
|
|
|
|
|
|
'actcount' => 0, |
9384
|
|
|
|
|
|
|
'patcount' => 1, |
9385
|
|
|
|
|
|
|
'uncommit' => undef, |
9386
|
|
|
|
|
|
|
'number' => 0 |
9387
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9388
|
|
|
|
|
|
|
], |
9389
|
|
|
|
|
|
|
'name' => 'EMPTY', |
9390
|
|
|
|
|
|
|
'impcount' => 0, |
9391
|
|
|
|
|
|
|
'changed' => 0, |
9392
|
|
|
|
|
|
|
'calls' => [], |
9393
|
|
|
|
|
|
|
'vars' => '' |
9394
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9395
|
|
|
|
|
|
|
'BNAME' => bless( { |
9396
|
|
|
|
|
|
|
'line' => 70, |
9397
|
|
|
|
|
|
|
'opcount' => 0, |
9398
|
|
|
|
|
|
|
'prods' => [ |
9399
|
|
|
|
|
|
|
bless( { |
9400
|
|
|
|
|
|
|
'strcount' => 0, |
9401
|
|
|
|
|
|
|
'dircount' => 0, |
9402
|
|
|
|
|
|
|
'error' => undef, |
9403
|
|
|
|
|
|
|
'line' => undef, |
9404
|
|
|
|
|
|
|
'items' => [ |
9405
|
|
|
|
|
|
|
bless( { |
9406
|
|
|
|
|
|
|
'description' => '/[A-Z]\\\\w*::/', |
9407
|
|
|
|
|
|
|
'mod' => '', |
9408
|
|
|
|
|
|
|
'rdelim' => '/', |
9409
|
|
|
|
|
|
|
'ldelim' => '/', |
9410
|
|
|
|
|
|
|
'line' => 71, |
9411
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9412
|
|
|
|
|
|
|
'lookahead' => 0, |
9413
|
|
|
|
|
|
|
'pattern' => '[A-Z]\\w*::' |
9414
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9415
|
|
|
|
|
|
|
bless( { |
9416
|
|
|
|
|
|
|
'implicit' => undef, |
9417
|
|
|
|
|
|
|
'argcode' => undef, |
9418
|
|
|
|
|
|
|
'matchrule' => 0, |
9419
|
|
|
|
|
|
|
'line' => 71, |
9420
|
|
|
|
|
|
|
'subrule' => 'BNAME', |
9421
|
|
|
|
|
|
|
'lookahead' => 0 |
9422
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9423
|
|
|
|
|
|
|
bless( { |
9424
|
|
|
|
|
|
|
'code' => '{$return = $item[1].$item[2]}', |
9425
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9426
|
|
|
|
|
|
|
'line' => 71, |
9427
|
|
|
|
|
|
|
'lookahead' => 0 |
9428
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9429
|
|
|
|
|
|
|
], |
9430
|
|
|
|
|
|
|
'number' => 0, |
9431
|
|
|
|
|
|
|
'uncommit' => undef, |
9432
|
|
|
|
|
|
|
'actcount' => 1, |
9433
|
|
|
|
|
|
|
'patcount' => 1 |
9434
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9435
|
|
|
|
|
|
|
bless( { |
9436
|
|
|
|
|
|
|
'number' => 1, |
9437
|
|
|
|
|
|
|
'uncommit' => undef, |
9438
|
|
|
|
|
|
|
'actcount' => 1, |
9439
|
|
|
|
|
|
|
'patcount' => 1, |
9440
|
|
|
|
|
|
|
'strcount' => 0, |
9441
|
|
|
|
|
|
|
'dircount' => 0, |
9442
|
|
|
|
|
|
|
'error' => undef, |
9443
|
|
|
|
|
|
|
'items' => [ |
9444
|
|
|
|
|
|
|
bless( { |
9445
|
|
|
|
|
|
|
'ldelim' => '/', |
9446
|
|
|
|
|
|
|
'pattern' => '[A-Z]\\w*', |
9447
|
|
|
|
|
|
|
'lookahead' => 0, |
9448
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9449
|
|
|
|
|
|
|
'line' => 72, |
9450
|
|
|
|
|
|
|
'description' => '/[A-Z]\\\\w*/', |
9451
|
|
|
|
|
|
|
'rdelim' => '/', |
9452
|
|
|
|
|
|
|
'mod' => '' |
9453
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9454
|
|
|
|
|
|
|
bless( { |
9455
|
|
|
|
|
|
|
'lookahead' => 0, |
9456
|
|
|
|
|
|
|
'line' => 72, |
9457
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9458
|
|
|
|
|
|
|
'code' => '{$return = $item[1]}' |
9459
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9460
|
|
|
|
|
|
|
], |
9461
|
|
|
|
|
|
|
'line' => undef |
9462
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9463
|
|
|
|
|
|
|
], |
9464
|
|
|
|
|
|
|
'vars' => '', |
9465
|
|
|
|
|
|
|
'name' => 'BNAME', |
9466
|
|
|
|
|
|
|
'impcount' => 0, |
9467
|
|
|
|
|
|
|
'calls' => [ |
9468
|
|
|
|
|
|
|
'BNAME' |
9469
|
|
|
|
|
|
|
], |
9470
|
|
|
|
|
|
|
'changed' => 0 |
9471
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9472
|
|
|
|
|
|
|
'SLASHEDDQUOTE' => bless( { |
9473
|
|
|
|
|
|
|
'name' => 'SLASHEDDQUOTE', |
9474
|
|
|
|
|
|
|
'impcount' => 0, |
9475
|
|
|
|
|
|
|
'calls' => [], |
9476
|
|
|
|
|
|
|
'changed' => 0, |
9477
|
|
|
|
|
|
|
'vars' => '', |
9478
|
|
|
|
|
|
|
'line' => 88, |
9479
|
|
|
|
|
|
|
'opcount' => 0, |
9480
|
|
|
|
|
|
|
'prods' => [ |
9481
|
|
|
|
|
|
|
bless( { |
9482
|
|
|
|
|
|
|
'line' => undef, |
9483
|
|
|
|
|
|
|
'items' => [ |
9484
|
|
|
|
|
|
|
bless( { |
9485
|
|
|
|
|
|
|
'pattern' => '\\\\"', |
9486
|
|
|
|
|
|
|
'lookahead' => 0, |
9487
|
|
|
|
|
|
|
'line' => 88, |
9488
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9489
|
|
|
|
|
|
|
'ldelim' => '/', |
9490
|
|
|
|
|
|
|
'rdelim' => '/', |
9491
|
|
|
|
|
|
|
'mod' => '', |
9492
|
|
|
|
|
|
|
'description' => '/\\\\\\\\"/' |
9493
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9494
|
|
|
|
|
|
|
bless( { |
9495
|
|
|
|
|
|
|
'code' => '{$return = \'"\'}', |
9496
|
|
|
|
|
|
|
'lookahead' => 0, |
9497
|
|
|
|
|
|
|
'line' => 88, |
9498
|
|
|
|
|
|
|
'hashname' => '__ACTION1__' |
9499
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9500
|
|
|
|
|
|
|
], |
9501
|
|
|
|
|
|
|
'error' => undef, |
9502
|
|
|
|
|
|
|
'dircount' => 0, |
9503
|
|
|
|
|
|
|
'strcount' => 0, |
9504
|
|
|
|
|
|
|
'actcount' => 1, |
9505
|
|
|
|
|
|
|
'patcount' => 1, |
9506
|
|
|
|
|
|
|
'uncommit' => undef, |
9507
|
|
|
|
|
|
|
'number' => 0 |
9508
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9509
|
|
|
|
|
|
|
] |
9510
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9511
|
|
|
|
|
|
|
'NOTDQUOTE' => bless( { |
9512
|
|
|
|
|
|
|
'line' => 87, |
9513
|
|
|
|
|
|
|
'opcount' => 0, |
9514
|
|
|
|
|
|
|
'prods' => [ |
9515
|
|
|
|
|
|
|
bless( { |
9516
|
|
|
|
|
|
|
'error' => undef, |
9517
|
|
|
|
|
|
|
'dircount' => 0, |
9518
|
|
|
|
|
|
|
'line' => undef, |
9519
|
|
|
|
|
|
|
'items' => [ |
9520
|
|
|
|
|
|
|
bless( { |
9521
|
|
|
|
|
|
|
'line' => 87, |
9522
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9523
|
|
|
|
|
|
|
'pattern' => '[^"]*[^"\\\\]', |
9524
|
|
|
|
|
|
|
'lookahead' => 0, |
9525
|
|
|
|
|
|
|
'ldelim' => '/', |
9526
|
|
|
|
|
|
|
'mod' => '', |
9527
|
|
|
|
|
|
|
'rdelim' => '/', |
9528
|
|
|
|
|
|
|
'description' => '/[^"]*[^"\\\\\\\\]/' |
9529
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ) |
9530
|
|
|
|
|
|
|
], |
9531
|
|
|
|
|
|
|
'strcount' => 0, |
9532
|
|
|
|
|
|
|
'patcount' => 1, |
9533
|
|
|
|
|
|
|
'actcount' => 0, |
9534
|
|
|
|
|
|
|
'number' => 0, |
9535
|
|
|
|
|
|
|
'uncommit' => undef |
9536
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9537
|
|
|
|
|
|
|
], |
9538
|
|
|
|
|
|
|
'name' => 'NOTDQUOTE', |
9539
|
|
|
|
|
|
|
'impcount' => 0, |
9540
|
|
|
|
|
|
|
'calls' => [], |
9541
|
|
|
|
|
|
|
'changed' => 0, |
9542
|
|
|
|
|
|
|
'vars' => '' |
9543
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9544
|
|
|
|
|
|
|
'NOTSQUOTE' => bless( { |
9545
|
|
|
|
|
|
|
'calls' => [], |
9546
|
|
|
|
|
|
|
'changed' => 0, |
9547
|
|
|
|
|
|
|
'impcount' => 0, |
9548
|
|
|
|
|
|
|
'name' => 'NOTSQUOTE', |
9549
|
|
|
|
|
|
|
'vars' => '', |
9550
|
|
|
|
|
|
|
'prods' => [ |
9551
|
|
|
|
|
|
|
bless( { |
9552
|
|
|
|
|
|
|
'dircount' => 0, |
9553
|
|
|
|
|
|
|
'error' => undef, |
9554
|
|
|
|
|
|
|
'line' => undef, |
9555
|
|
|
|
|
|
|
'items' => [ |
9556
|
|
|
|
|
|
|
bless( { |
9557
|
|
|
|
|
|
|
'rdelim' => '/', |
9558
|
|
|
|
|
|
|
'mod' => '', |
9559
|
|
|
|
|
|
|
'description' => '/[^\']*[^\'\\\\\\\\]/', |
9560
|
|
|
|
|
|
|
'pattern' => '[^\']*[^\'\\\\]', |
9561
|
|
|
|
|
|
|
'lookahead' => 0, |
9562
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9563
|
|
|
|
|
|
|
'line' => 83, |
9564
|
|
|
|
|
|
|
'ldelim' => '/' |
9565
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ) |
9566
|
|
|
|
|
|
|
], |
9567
|
|
|
|
|
|
|
'strcount' => 0, |
9568
|
|
|
|
|
|
|
'actcount' => 0, |
9569
|
|
|
|
|
|
|
'patcount' => 1, |
9570
|
|
|
|
|
|
|
'number' => 0, |
9571
|
|
|
|
|
|
|
'uncommit' => undef |
9572
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9573
|
|
|
|
|
|
|
], |
9574
|
|
|
|
|
|
|
'opcount' => 0, |
9575
|
|
|
|
|
|
|
'line' => 83 |
9576
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9577
|
|
|
|
|
|
|
'INCLUDE' => bless( { |
9578
|
|
|
|
|
|
|
'prods' => [ |
9579
|
|
|
|
|
|
|
bless( { |
9580
|
|
|
|
|
|
|
'actcount' => 1, |
9581
|
|
|
|
|
|
|
'patcount' => 1, |
9582
|
|
|
|
|
|
|
'uncommit' => undef, |
9583
|
|
|
|
|
|
|
'number' => 0, |
9584
|
|
|
|
|
|
|
'line' => undef, |
9585
|
|
|
|
|
|
|
'items' => [ |
9586
|
|
|
|
|
|
|
bless( { |
9587
|
|
|
|
|
|
|
'description' => '/\\\\/\\\\S+\\\\.scen/', |
9588
|
|
|
|
|
|
|
'mod' => '', |
9589
|
|
|
|
|
|
|
'rdelim' => '/', |
9590
|
|
|
|
|
|
|
'ldelim' => '/', |
9591
|
|
|
|
|
|
|
'line' => 61, |
9592
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9593
|
|
|
|
|
|
|
'lookahead' => 0, |
9594
|
|
|
|
|
|
|
'pattern' => '\\/\\S+\\.scen' |
9595
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9596
|
|
|
|
|
|
|
bless( { |
9597
|
|
|
|
|
|
|
'code' => '{$return = $item[1]}', |
9598
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9599
|
|
|
|
|
|
|
'line' => 61, |
9600
|
|
|
|
|
|
|
'lookahead' => 0 |
9601
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9602
|
|
|
|
|
|
|
], |
9603
|
|
|
|
|
|
|
'error' => undef, |
9604
|
|
|
|
|
|
|
'dircount' => 0, |
9605
|
|
|
|
|
|
|
'strcount' => 0 |
9606
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9607
|
|
|
|
|
|
|
bless( { |
9608
|
|
|
|
|
|
|
'error' => undef, |
9609
|
|
|
|
|
|
|
'dircount' => 0, |
9610
|
|
|
|
|
|
|
'line' => undef, |
9611
|
|
|
|
|
|
|
'items' => [ |
9612
|
|
|
|
|
|
|
bless( { |
9613
|
|
|
|
|
|
|
'description' => '/[^\\\\/#]\\\\S+\\\\.scen/', |
9614
|
|
|
|
|
|
|
'rdelim' => '/', |
9615
|
|
|
|
|
|
|
'mod' => '', |
9616
|
|
|
|
|
|
|
'ldelim' => '/', |
9617
|
|
|
|
|
|
|
'lookahead' => 0, |
9618
|
|
|
|
|
|
|
'pattern' => '[^\\/#]\\S+\\.scen', |
9619
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9620
|
|
|
|
|
|
|
'line' => 62 |
9621
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9622
|
|
|
|
|
|
|
bless( { |
9623
|
|
|
|
|
|
|
'code' => '{ my $from_file = $arg[0]; |
9624
|
|
|
|
|
|
|
if (length $from_file) { |
9625
|
|
|
|
|
|
|
$return = dirname($from_file) . "/$item[1]"; |
9626
|
|
|
|
|
|
|
} else { |
9627
|
|
|
|
|
|
|
$return = "./$item[1]"; |
9628
|
|
|
|
|
|
|
} |
9629
|
|
|
|
|
|
|
}', |
9630
|
|
|
|
|
|
|
'line' => 62, |
9631
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9632
|
|
|
|
|
|
|
'lookahead' => 0 |
9633
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9634
|
|
|
|
|
|
|
], |
9635
|
|
|
|
|
|
|
'strcount' => 0, |
9636
|
|
|
|
|
|
|
'actcount' => 1, |
9637
|
|
|
|
|
|
|
'patcount' => 1, |
9638
|
|
|
|
|
|
|
'number' => 1, |
9639
|
|
|
|
|
|
|
'uncommit' => undef |
9640
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9641
|
|
|
|
|
|
|
], |
9642
|
|
|
|
|
|
|
'opcount' => 0, |
9643
|
|
|
|
|
|
|
'line' => 61, |
9644
|
|
|
|
|
|
|
'vars' => '', |
9645
|
|
|
|
|
|
|
'changed' => 0, |
9646
|
|
|
|
|
|
|
'calls' => [], |
9647
|
|
|
|
|
|
|
'impcount' => 0, |
9648
|
|
|
|
|
|
|
'name' => 'INCLUDE' |
9649
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9650
|
|
|
|
|
|
|
'EOF' => bless( { |
9651
|
|
|
|
|
|
|
'prods' => [ |
9652
|
|
|
|
|
|
|
bless( { |
9653
|
|
|
|
|
|
|
'patcount' => 1, |
9654
|
|
|
|
|
|
|
'actcount' => 0, |
9655
|
|
|
|
|
|
|
'uncommit' => undef, |
9656
|
|
|
|
|
|
|
'number' => 0, |
9657
|
|
|
|
|
|
|
'items' => [ |
9658
|
|
|
|
|
|
|
bless( { |
9659
|
|
|
|
|
|
|
'description' => '/^\\\\Z/', |
9660
|
|
|
|
|
|
|
'mod' => '', |
9661
|
|
|
|
|
|
|
'rdelim' => '/', |
9662
|
|
|
|
|
|
|
'ldelim' => '/', |
9663
|
|
|
|
|
|
|
'line' => 15, |
9664
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9665
|
|
|
|
|
|
|
'pattern' => '^\\Z', |
9666
|
|
|
|
|
|
|
'lookahead' => 0 |
9667
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ) |
9668
|
|
|
|
|
|
|
], |
9669
|
|
|
|
|
|
|
'line' => undef, |
9670
|
|
|
|
|
|
|
'error' => undef, |
9671
|
|
|
|
|
|
|
'dircount' => 0, |
9672
|
|
|
|
|
|
|
'strcount' => 0 |
9673
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9674
|
|
|
|
|
|
|
], |
9675
|
|
|
|
|
|
|
'line' => 15, |
9676
|
|
|
|
|
|
|
'opcount' => 0, |
9677
|
|
|
|
|
|
|
'impcount' => 0, |
9678
|
|
|
|
|
|
|
'calls' => [], |
9679
|
|
|
|
|
|
|
'changed' => 0, |
9680
|
|
|
|
|
|
|
'name' => 'EOF', |
9681
|
|
|
|
|
|
|
'vars' => '' |
9682
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9683
|
|
|
|
|
|
|
'PTICKED' => bless( { |
9684
|
|
|
|
|
|
|
'name' => 'PTICKED', |
9685
|
|
|
|
|
|
|
'changed' => 0, |
9686
|
|
|
|
|
|
|
'calls' => [], |
9687
|
|
|
|
|
|
|
'impcount' => 0, |
9688
|
|
|
|
|
|
|
'vars' => '', |
9689
|
|
|
|
|
|
|
'opcount' => 0, |
9690
|
|
|
|
|
|
|
'line' => 92, |
9691
|
|
|
|
|
|
|
'prods' => [ |
9692
|
|
|
|
|
|
|
bless( { |
9693
|
|
|
|
|
|
|
'line' => undef, |
9694
|
|
|
|
|
|
|
'items' => [ |
9695
|
|
|
|
|
|
|
bless( { |
9696
|
|
|
|
|
|
|
'ldelim' => '/', |
9697
|
|
|
|
|
|
|
'pattern' => '[^`]+', |
9698
|
|
|
|
|
|
|
'lookahead' => 0, |
9699
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9700
|
|
|
|
|
|
|
'line' => 92, |
9701
|
|
|
|
|
|
|
'description' => '/[^`]+/', |
9702
|
|
|
|
|
|
|
'rdelim' => '/', |
9703
|
|
|
|
|
|
|
'mod' => '' |
9704
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9705
|
|
|
|
|
|
|
bless( { |
9706
|
|
|
|
|
|
|
'line' => 92, |
9707
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9708
|
|
|
|
|
|
|
'lookahead' => 0, |
9709
|
|
|
|
|
|
|
'code' => '{$return = $item[1]}' |
9710
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9711
|
|
|
|
|
|
|
], |
9712
|
|
|
|
|
|
|
'error' => undef, |
9713
|
|
|
|
|
|
|
'dircount' => 0, |
9714
|
|
|
|
|
|
|
'strcount' => 0, |
9715
|
|
|
|
|
|
|
'patcount' => 1, |
9716
|
|
|
|
|
|
|
'actcount' => 1, |
9717
|
|
|
|
|
|
|
'uncommit' => undef, |
9718
|
|
|
|
|
|
|
'number' => 0 |
9719
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9720
|
|
|
|
|
|
|
] |
9721
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9722
|
|
|
|
|
|
|
'SPACE' => bless( { |
9723
|
|
|
|
|
|
|
'vars' => '', |
9724
|
|
|
|
|
|
|
'name' => 'SPACE', |
9725
|
|
|
|
|
|
|
'impcount' => 0, |
9726
|
|
|
|
|
|
|
'changed' => 0, |
9727
|
|
|
|
|
|
|
'calls' => [], |
9728
|
|
|
|
|
|
|
'line' => 94, |
9729
|
|
|
|
|
|
|
'opcount' => 0, |
9730
|
|
|
|
|
|
|
'prods' => [ |
9731
|
|
|
|
|
|
|
bless( { |
9732
|
|
|
|
|
|
|
'strcount' => 0, |
9733
|
|
|
|
|
|
|
'line' => undef, |
9734
|
|
|
|
|
|
|
'items' => [ |
9735
|
|
|
|
|
|
|
bless( { |
9736
|
|
|
|
|
|
|
'rdelim' => '/', |
9737
|
|
|
|
|
|
|
'mod' => '', |
9738
|
|
|
|
|
|
|
'description' => '/\\\\s+/', |
9739
|
|
|
|
|
|
|
'pattern' => '\\s+', |
9740
|
|
|
|
|
|
|
'lookahead' => 0, |
9741
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9742
|
|
|
|
|
|
|
'line' => 94, |
9743
|
|
|
|
|
|
|
'ldelim' => '/' |
9744
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9745
|
|
|
|
|
|
|
bless( { |
9746
|
|
|
|
|
|
|
'code' => '{$return = $item[1]}', |
9747
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9748
|
|
|
|
|
|
|
'line' => 94, |
9749
|
|
|
|
|
|
|
'lookahead' => 0 |
9750
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9751
|
|
|
|
|
|
|
], |
9752
|
|
|
|
|
|
|
'dircount' => 0, |
9753
|
|
|
|
|
|
|
'error' => undef, |
9754
|
|
|
|
|
|
|
'uncommit' => undef, |
9755
|
|
|
|
|
|
|
'number' => 0, |
9756
|
|
|
|
|
|
|
'actcount' => 1, |
9757
|
|
|
|
|
|
|
'patcount' => 1 |
9758
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9759
|
|
|
|
|
|
|
] |
9760
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9761
|
|
|
|
|
|
|
'TBNAME' => bless( { |
9762
|
|
|
|
|
|
|
'impcount' => 0, |
9763
|
|
|
|
|
|
|
'calls' => [ |
9764
|
|
|
|
|
|
|
'BNAME' |
9765
|
|
|
|
|
|
|
], |
9766
|
|
|
|
|
|
|
'changed' => 0, |
9767
|
|
|
|
|
|
|
'name' => 'TBNAME', |
9768
|
|
|
|
|
|
|
'vars' => '', |
9769
|
|
|
|
|
|
|
'prods' => [ |
9770
|
|
|
|
|
|
|
bless( { |
9771
|
|
|
|
|
|
|
'strcount' => 0, |
9772
|
|
|
|
|
|
|
'dircount' => 0, |
9773
|
|
|
|
|
|
|
'error' => undef, |
9774
|
|
|
|
|
|
|
'items' => [ |
9775
|
|
|
|
|
|
|
bless( { |
9776
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9777
|
|
|
|
|
|
|
'line' => 69, |
9778
|
|
|
|
|
|
|
'lookahead' => 0, |
9779
|
|
|
|
|
|
|
'pattern' => '::', |
9780
|
|
|
|
|
|
|
'ldelim' => '/', |
9781
|
|
|
|
|
|
|
'mod' => '', |
9782
|
|
|
|
|
|
|
'rdelim' => '/', |
9783
|
|
|
|
|
|
|
'description' => '/::/' |
9784
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9785
|
|
|
|
|
|
|
bless( { |
9786
|
|
|
|
|
|
|
'matchrule' => 0, |
9787
|
|
|
|
|
|
|
'line' => 69, |
9788
|
|
|
|
|
|
|
'subrule' => 'BNAME', |
9789
|
|
|
|
|
|
|
'lookahead' => 0, |
9790
|
|
|
|
|
|
|
'implicit' => undef, |
9791
|
|
|
|
|
|
|
'argcode' => undef |
9792
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9793
|
|
|
|
|
|
|
bless( { |
9794
|
|
|
|
|
|
|
'code' => '{$return = $item{BNAME}}', |
9795
|
|
|
|
|
|
|
'lookahead' => 0, |
9796
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9797
|
|
|
|
|
|
|
'line' => 69 |
9798
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9799
|
|
|
|
|
|
|
], |
9800
|
|
|
|
|
|
|
'line' => undef, |
9801
|
|
|
|
|
|
|
'number' => 0, |
9802
|
|
|
|
|
|
|
'uncommit' => undef, |
9803
|
|
|
|
|
|
|
'actcount' => 1, |
9804
|
|
|
|
|
|
|
'patcount' => 1 |
9805
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9806
|
|
|
|
|
|
|
bless( { |
9807
|
|
|
|
|
|
|
'number' => 1, |
9808
|
|
|
|
|
|
|
'uncommit' => undef, |
9809
|
|
|
|
|
|
|
'actcount' => 1, |
9810
|
|
|
|
|
|
|
'patcount' => 0, |
9811
|
|
|
|
|
|
|
'strcount' => 0, |
9812
|
|
|
|
|
|
|
'dircount' => 0, |
9813
|
|
|
|
|
|
|
'error' => undef, |
9814
|
|
|
|
|
|
|
'items' => [ |
9815
|
|
|
|
|
|
|
bless( { |
9816
|
|
|
|
|
|
|
'argcode' => undef, |
9817
|
|
|
|
|
|
|
'implicit' => undef, |
9818
|
|
|
|
|
|
|
'line' => 70, |
9819
|
|
|
|
|
|
|
'subrule' => 'BNAME', |
9820
|
|
|
|
|
|
|
'lookahead' => 0, |
9821
|
|
|
|
|
|
|
'matchrule' => 0 |
9822
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9823
|
|
|
|
|
|
|
bless( { |
9824
|
|
|
|
|
|
|
'code' => '{$return = "Treex::Block::$item{BNAME}"}', |
9825
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9826
|
|
|
|
|
|
|
'line' => 70, |
9827
|
|
|
|
|
|
|
'lookahead' => 0 |
9828
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9829
|
|
|
|
|
|
|
], |
9830
|
|
|
|
|
|
|
'line' => undef |
9831
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9832
|
|
|
|
|
|
|
], |
9833
|
|
|
|
|
|
|
'line' => 69, |
9834
|
|
|
|
|
|
|
'opcount' => 0 |
9835
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9836
|
|
|
|
|
|
|
'BLOCK' => bless( { |
9837
|
|
|
|
|
|
|
'vars' => '', |
9838
|
|
|
|
|
|
|
'impcount' => 0, |
9839
|
|
|
|
|
|
|
'changed' => 0, |
9840
|
|
|
|
|
|
|
'calls' => [ |
9841
|
|
|
|
|
|
|
'INCLUDE', |
9842
|
|
|
|
|
|
|
'SCENMODULE', |
9843
|
|
|
|
|
|
|
'PARAMS', |
9844
|
|
|
|
|
|
|
'TBNAME' |
9845
|
|
|
|
|
|
|
], |
9846
|
|
|
|
|
|
|
'name' => 'BLOCK', |
9847
|
|
|
|
|
|
|
'prods' => [ |
9848
|
|
|
|
|
|
|
bless( { |
9849
|
|
|
|
|
|
|
'number' => 0, |
9850
|
|
|
|
|
|
|
'uncommit' => undef, |
9851
|
|
|
|
|
|
|
'patcount' => 0, |
9852
|
|
|
|
|
|
|
'actcount' => 1, |
9853
|
|
|
|
|
|
|
'strcount' => 0, |
9854
|
|
|
|
|
|
|
'dircount' => 0, |
9855
|
|
|
|
|
|
|
'error' => undef, |
9856
|
|
|
|
|
|
|
'line' => undef, |
9857
|
|
|
|
|
|
|
'items' => [ |
9858
|
|
|
|
|
|
|
bless( { |
9859
|
|
|
|
|
|
|
'implicit' => undef, |
9860
|
|
|
|
|
|
|
'argcode' => undef, |
9861
|
|
|
|
|
|
|
'matchrule' => 0, |
9862
|
|
|
|
|
|
|
'line' => 16, |
9863
|
|
|
|
|
|
|
'subrule' => 'INCLUDE', |
9864
|
|
|
|
|
|
|
'lookahead' => 0 |
9865
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9866
|
|
|
|
|
|
|
bless( { |
9867
|
|
|
|
|
|
|
'code' => '{ |
9868
|
|
|
|
|
|
|
my $included = read_file( $item{INCLUDE}, binmode => \':utf8\' ); |
9869
|
|
|
|
|
|
|
my $result = $thisparser->startrule( $included, 1, $item{INCLUDE} ); |
9870
|
|
|
|
|
|
|
if (defined $result and ref $result eq \'ARRAY\') { |
9871
|
|
|
|
|
|
|
$return = [@$result]; |
9872
|
|
|
|
|
|
|
} else { |
9873
|
|
|
|
|
|
|
$return = undef; |
9874
|
|
|
|
|
|
|
} |
9875
|
|
|
|
|
|
|
}', |
9876
|
|
|
|
|
|
|
'line' => 16, |
9877
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9878
|
|
|
|
|
|
|
'lookahead' => 0 |
9879
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9880
|
|
|
|
|
|
|
] |
9881
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9882
|
|
|
|
|
|
|
bless( { |
9883
|
|
|
|
|
|
|
'patcount' => 0, |
9884
|
|
|
|
|
|
|
'actcount' => 1, |
9885
|
|
|
|
|
|
|
'uncommit' => undef, |
9886
|
|
|
|
|
|
|
'number' => 1, |
9887
|
|
|
|
|
|
|
'line' => undef, |
9888
|
|
|
|
|
|
|
'items' => [ |
9889
|
|
|
|
|
|
|
bless( { |
9890
|
|
|
|
|
|
|
'matchrule' => 0, |
9891
|
|
|
|
|
|
|
'line' => 25, |
9892
|
|
|
|
|
|
|
'lookahead' => 0, |
9893
|
|
|
|
|
|
|
'subrule' => 'SCENMODULE', |
9894
|
|
|
|
|
|
|
'implicit' => undef, |
9895
|
|
|
|
|
|
|
'argcode' => undef |
9896
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9897
|
|
|
|
|
|
|
bless( { |
9898
|
|
|
|
|
|
|
'matchrule' => 0, |
9899
|
|
|
|
|
|
|
'line' => 25, |
9900
|
|
|
|
|
|
|
'subrule' => 'PARAMS', |
9901
|
|
|
|
|
|
|
'lookahead' => 0, |
9902
|
|
|
|
|
|
|
'implicit' => undef, |
9903
|
|
|
|
|
|
|
'argcode' => undef |
9904
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9905
|
|
|
|
|
|
|
bless( { |
9906
|
|
|
|
|
|
|
'lookahead' => 0, |
9907
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9908
|
|
|
|
|
|
|
'line' => 25, |
9909
|
|
|
|
|
|
|
'code' => '{ |
9910
|
|
|
|
|
|
|
my $modulename = $item{SCENMODULE}; |
9911
|
|
|
|
|
|
|
eval "use $modulename; 1;" or die "Can\'t use $modulename !\\n$@\\n"; |
9912
|
|
|
|
|
|
|
my %params = map {my ($name,$value) = split /=/, $_, 2; ($name, $value)} @{$item{PARAMS}}; |
9913
|
|
|
|
|
|
|
my $scenmod = $modulename->new(\\%params); |
9914
|
|
|
|
|
|
|
my $string = $scenmod->get_scenario_string(); |
9915
|
|
|
|
|
|
|
my $result = $thisparser->startrule( $string, 0, \'\' ); |
9916
|
|
|
|
|
|
|
if (defined $result and ref $result eq \'ARRAY\') { |
9917
|
|
|
|
|
|
|
$return = [@$result]; |
9918
|
|
|
|
|
|
|
} else { |
9919
|
|
|
|
|
|
|
log_fatal "Syntax error in \'$modulename\' scenario:\\n<BEGIN SCENARIO>\\n$string\\n<END SCENARIO>"; |
9920
|
|
|
|
|
|
|
} |
9921
|
|
|
|
|
|
|
}' |
9922
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9923
|
|
|
|
|
|
|
], |
9924
|
|
|
|
|
|
|
'error' => undef, |
9925
|
|
|
|
|
|
|
'dircount' => 0, |
9926
|
|
|
|
|
|
|
'strcount' => 0 |
9927
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9928
|
|
|
|
|
|
|
bless( { |
9929
|
|
|
|
|
|
|
'actcount' => 1, |
9930
|
|
|
|
|
|
|
'patcount' => 0, |
9931
|
|
|
|
|
|
|
'uncommit' => undef, |
9932
|
|
|
|
|
|
|
'number' => 2, |
9933
|
|
|
|
|
|
|
'items' => [ |
9934
|
|
|
|
|
|
|
bless( { |
9935
|
|
|
|
|
|
|
'matchrule' => 0, |
9936
|
|
|
|
|
|
|
'lookahead' => 0, |
9937
|
|
|
|
|
|
|
'subrule' => 'SCENMODULE', |
9938
|
|
|
|
|
|
|
'line' => 38, |
9939
|
|
|
|
|
|
|
'implicit' => undef, |
9940
|
|
|
|
|
|
|
'argcode' => undef |
9941
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9942
|
|
|
|
|
|
|
bless( { |
9943
|
|
|
|
|
|
|
'line' => 38, |
9944
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9945
|
|
|
|
|
|
|
'lookahead' => 0, |
9946
|
|
|
|
|
|
|
'code' => '{ |
9947
|
|
|
|
|
|
|
my $modulename = $item{SCENMODULE}; |
9948
|
|
|
|
|
|
|
eval "use $modulename; 1;" or die "Can\'t use $modulename !\\n$@\\n"; |
9949
|
|
|
|
|
|
|
my $scenmod = $modulename->new(); |
9950
|
|
|
|
|
|
|
my $string = $scenmod->get_scenario_string(); |
9951
|
|
|
|
|
|
|
my $result = $thisparser->startrule( $string, 0, \'\' ); |
9952
|
|
|
|
|
|
|
if (defined $result and ref $result eq \'ARRAY\') { |
9953
|
|
|
|
|
|
|
$return = [@$result]; |
9954
|
|
|
|
|
|
|
} else { |
9955
|
|
|
|
|
|
|
log_fatal "Syntax error in \'$modulename\' scenario:\\n<BEGIN SCENARIO>\\n$string\\n<END SCENARIO>"; |
9956
|
|
|
|
|
|
|
} |
9957
|
|
|
|
|
|
|
}' |
9958
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9959
|
|
|
|
|
|
|
], |
9960
|
|
|
|
|
|
|
'line' => undef, |
9961
|
|
|
|
|
|
|
'error' => undef, |
9962
|
|
|
|
|
|
|
'dircount' => 0, |
9963
|
|
|
|
|
|
|
'strcount' => 0 |
9964
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9965
|
|
|
|
|
|
|
bless( { |
9966
|
|
|
|
|
|
|
'uncommit' => undef, |
9967
|
|
|
|
|
|
|
'number' => 3, |
9968
|
|
|
|
|
|
|
'actcount' => 1, |
9969
|
|
|
|
|
|
|
'patcount' => 0, |
9970
|
|
|
|
|
|
|
'strcount' => 0, |
9971
|
|
|
|
|
|
|
'items' => [ |
9972
|
|
|
|
|
|
|
bless( { |
9973
|
|
|
|
|
|
|
'argcode' => undef, |
9974
|
|
|
|
|
|
|
'implicit' => undef, |
9975
|
|
|
|
|
|
|
'line' => 50, |
9976
|
|
|
|
|
|
|
'subrule' => 'TBNAME', |
9977
|
|
|
|
|
|
|
'lookahead' => 0, |
9978
|
|
|
|
|
|
|
'matchrule' => 0 |
9979
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9980
|
|
|
|
|
|
|
bless( { |
9981
|
|
|
|
|
|
|
'line' => 50, |
9982
|
|
|
|
|
|
|
'subrule' => 'PARAMS', |
9983
|
|
|
|
|
|
|
'lookahead' => 0, |
9984
|
|
|
|
|
|
|
'matchrule' => 0, |
9985
|
|
|
|
|
|
|
'argcode' => undef, |
9986
|
|
|
|
|
|
|
'implicit' => undef |
9987
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9988
|
|
|
|
|
|
|
bless( { |
9989
|
|
|
|
|
|
|
'code' => '{$return = [{ |
9990
|
|
|
|
|
|
|
block_name=>$item{TBNAME}, |
9991
|
|
|
|
|
|
|
block_parameters=>$item{PARAMS}, |
9992
|
|
|
|
|
|
|
}] |
9993
|
|
|
|
|
|
|
}', |
9994
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9995
|
|
|
|
|
|
|
'line' => 50, |
9996
|
|
|
|
|
|
|
'lookahead' => 0 |
9997
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9998
|
|
|
|
|
|
|
], |
9999
|
|
|
|
|
|
|
'line' => undef, |
10000
|
|
|
|
|
|
|
'error' => undef, |
10001
|
|
|
|
|
|
|
'dircount' => 0 |
10002
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
10003
|
|
|
|
|
|
|
bless( { |
10004
|
|
|
|
|
|
|
'strcount' => 0, |
10005
|
|
|
|
|
|
|
'dircount' => 0, |
10006
|
|
|
|
|
|
|
'error' => undef, |
10007
|
|
|
|
|
|
|
'line' => undef, |
10008
|
|
|
|
|
|
|
'items' => [ |
10009
|
|
|
|
|
|
|
bless( { |
10010
|
|
|
|
|
|
|
'line' => 55, |
10011
|
|
|
|
|
|
|
'subrule' => 'TBNAME', |
10012
|
|
|
|
|
|
|
'lookahead' => 0, |
10013
|
|
|
|
|
|
|
'matchrule' => 0, |
10014
|
|
|
|
|
|
|
'argcode' => undef, |
10015
|
|
|
|
|
|
|
'implicit' => undef |
10016
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10017
|
|
|
|
|
|
|
bless( { |
10018
|
|
|
|
|
|
|
'lookahead' => 0, |
10019
|
|
|
|
|
|
|
'line' => 55, |
10020
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10021
|
|
|
|
|
|
|
'code' => '{$return = [{ |
10022
|
|
|
|
|
|
|
block_name=>$item{TBNAME}, |
10023
|
|
|
|
|
|
|
block_parameters=>[], |
10024
|
|
|
|
|
|
|
}] |
10025
|
|
|
|
|
|
|
}' |
10026
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10027
|
|
|
|
|
|
|
], |
10028
|
|
|
|
|
|
|
'number' => 4, |
10029
|
|
|
|
|
|
|
'uncommit' => undef, |
10030
|
|
|
|
|
|
|
'actcount' => 1, |
10031
|
|
|
|
|
|
|
'patcount' => 0 |
10032
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10033
|
|
|
|
|
|
|
], |
10034
|
|
|
|
|
|
|
'line' => 16, |
10035
|
|
|
|
|
|
|
'opcount' => 0 |
10036
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
10037
|
|
|
|
|
|
|
'COMMENT' => bless( { |
10038
|
|
|
|
|
|
|
'calls' => [], |
10039
|
|
|
|
|
|
|
'changed' => 0, |
10040
|
|
|
|
|
|
|
'impcount' => 0, |
10041
|
|
|
|
|
|
|
'name' => 'COMMENT', |
10042
|
|
|
|
|
|
|
'vars' => '', |
10043
|
|
|
|
|
|
|
'prods' => [ |
10044
|
|
|
|
|
|
|
bless( { |
10045
|
|
|
|
|
|
|
'error' => undef, |
10046
|
|
|
|
|
|
|
'dircount' => 0, |
10047
|
|
|
|
|
|
|
'items' => [ |
10048
|
|
|
|
|
|
|
bless( { |
10049
|
|
|
|
|
|
|
'mod' => '', |
10050
|
|
|
|
|
|
|
'rdelim' => '/', |
10051
|
|
|
|
|
|
|
'description' => '/#[^\\\\n]*/', |
10052
|
|
|
|
|
|
|
'line' => 93, |
10053
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
10054
|
|
|
|
|
|
|
'pattern' => '#[^\\n]*', |
10055
|
|
|
|
|
|
|
'lookahead' => 0, |
10056
|
|
|
|
|
|
|
'ldelim' => '/' |
10057
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10058
|
|
|
|
|
|
|
bless( { |
10059
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10060
|
|
|
|
|
|
|
'line' => 93, |
10061
|
|
|
|
|
|
|
'lookahead' => 0, |
10062
|
|
|
|
|
|
|
'code' => '{$return = \'\'}' |
10063
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10064
|
|
|
|
|
|
|
], |
10065
|
|
|
|
|
|
|
'line' => undef, |
10066
|
|
|
|
|
|
|
'strcount' => 0, |
10067
|
|
|
|
|
|
|
'actcount' => 1, |
10068
|
|
|
|
|
|
|
'patcount' => 1, |
10069
|
|
|
|
|
|
|
'number' => 0, |
10070
|
|
|
|
|
|
|
'uncommit' => undef |
10071
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10072
|
|
|
|
|
|
|
], |
10073
|
|
|
|
|
|
|
'opcount' => 0, |
10074
|
|
|
|
|
|
|
'line' => 93 |
10075
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
10076
|
|
|
|
|
|
|
'startrule' => bless( { |
10077
|
|
|
|
|
|
|
'name' => 'startrule', |
10078
|
|
|
|
|
|
|
'calls' => [ |
10079
|
|
|
|
|
|
|
'SCEN', |
10080
|
|
|
|
|
|
|
'EOF' |
10081
|
|
|
|
|
|
|
], |
10082
|
|
|
|
|
|
|
'changed' => 0, |
10083
|
|
|
|
|
|
|
'impcount' => 0, |
10084
|
|
|
|
|
|
|
'vars' => '', |
10085
|
|
|
|
|
|
|
'opcount' => 0, |
10086
|
|
|
|
|
|
|
'line' => 9, |
10087
|
|
|
|
|
|
|
'prods' => [ |
10088
|
|
|
|
|
|
|
bless( { |
10089
|
|
|
|
|
|
|
'uncommit' => undef, |
10090
|
|
|
|
|
|
|
'number' => 0, |
10091
|
|
|
|
|
|
|
'patcount' => 0, |
10092
|
|
|
|
|
|
|
'actcount' => 1, |
10093
|
|
|
|
|
|
|
'strcount' => 0, |
10094
|
|
|
|
|
|
|
'items' => [ |
10095
|
|
|
|
|
|
|
bless( { |
10096
|
|
|
|
|
|
|
'lookahead' => 0, |
10097
|
|
|
|
|
|
|
'subrule' => 'SCEN', |
10098
|
|
|
|
|
|
|
'line' => 9, |
10099
|
|
|
|
|
|
|
'matchrule' => 0, |
10100
|
|
|
|
|
|
|
'argcode' => undef, |
10101
|
|
|
|
|
|
|
'implicit' => undef |
10102
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10103
|
|
|
|
|
|
|
bless( { |
10104
|
|
|
|
|
|
|
'implicit' => undef, |
10105
|
|
|
|
|
|
|
'argcode' => undef, |
10106
|
|
|
|
|
|
|
'matchrule' => 0, |
10107
|
|
|
|
|
|
|
'subrule' => 'EOF', |
10108
|
|
|
|
|
|
|
'lookahead' => 0, |
10109
|
|
|
|
|
|
|
'line' => 9 |
10110
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10111
|
|
|
|
|
|
|
bless( { |
10112
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10113
|
|
|
|
|
|
|
'line' => 9, |
10114
|
|
|
|
|
|
|
'lookahead' => 0, |
10115
|
|
|
|
|
|
|
'code' => '{$return = $item{SCEN}}' |
10116
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10117
|
|
|
|
|
|
|
], |
10118
|
|
|
|
|
|
|
'line' => undef, |
10119
|
|
|
|
|
|
|
'error' => undef, |
10120
|
|
|
|
|
|
|
'dircount' => 0 |
10121
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10122
|
|
|
|
|
|
|
] |
10123
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
10124
|
|
|
|
|
|
|
'SCEN' => bless( { |
10125
|
|
|
|
|
|
|
'changed' => 0, |
10126
|
|
|
|
|
|
|
'calls' => [ |
10127
|
|
|
|
|
|
|
'LINE', |
10128
|
|
|
|
|
|
|
'SCEN' |
10129
|
|
|
|
|
|
|
], |
10130
|
|
|
|
|
|
|
'impcount' => 0, |
10131
|
|
|
|
|
|
|
'name' => 'SCEN', |
10132
|
|
|
|
|
|
|
'vars' => '', |
10133
|
|
|
|
|
|
|
'prods' => [ |
10134
|
|
|
|
|
|
|
bless( { |
10135
|
|
|
|
|
|
|
'patcount' => 0, |
10136
|
|
|
|
|
|
|
'actcount' => 1, |
10137
|
|
|
|
|
|
|
'number' => 0, |
10138
|
|
|
|
|
|
|
'uncommit' => undef, |
10139
|
|
|
|
|
|
|
'error' => undef, |
10140
|
|
|
|
|
|
|
'dircount' => 0, |
10141
|
|
|
|
|
|
|
'items' => [ |
10142
|
|
|
|
|
|
|
bless( { |
10143
|
|
|
|
|
|
|
'line' => 10, |
10144
|
|
|
|
|
|
|
'lookahead' => 0, |
10145
|
|
|
|
|
|
|
'subrule' => 'LINE', |
10146
|
|
|
|
|
|
|
'matchrule' => 0, |
10147
|
|
|
|
|
|
|
'argcode' => undef, |
10148
|
|
|
|
|
|
|
'implicit' => undef |
10149
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10150
|
|
|
|
|
|
|
bless( { |
10151
|
|
|
|
|
|
|
'matchrule' => 0, |
10152
|
|
|
|
|
|
|
'line' => 10, |
10153
|
|
|
|
|
|
|
'lookahead' => 0, |
10154
|
|
|
|
|
|
|
'subrule' => 'SCEN', |
10155
|
|
|
|
|
|
|
'implicit' => undef, |
10156
|
|
|
|
|
|
|
'argcode' => undef |
10157
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10158
|
|
|
|
|
|
|
bless( { |
10159
|
|
|
|
|
|
|
'code' => '{$return = [@{$item{LINE}},@{$item{SCEN}}]}', |
10160
|
|
|
|
|
|
|
'line' => 10, |
10161
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10162
|
|
|
|
|
|
|
'lookahead' => 0 |
10163
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10164
|
|
|
|
|
|
|
], |
10165
|
|
|
|
|
|
|
'line' => undef, |
10166
|
|
|
|
|
|
|
'strcount' => 0 |
10167
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
10168
|
|
|
|
|
|
|
bless( { |
10169
|
|
|
|
|
|
|
'line' => undef, |
10170
|
|
|
|
|
|
|
'items' => [ |
10171
|
|
|
|
|
|
|
bless( { |
10172
|
|
|
|
|
|
|
'implicit' => undef, |
10173
|
|
|
|
|
|
|
'argcode' => undef, |
10174
|
|
|
|
|
|
|
'matchrule' => 0, |
10175
|
|
|
|
|
|
|
'line' => 11, |
10176
|
|
|
|
|
|
|
'subrule' => 'LINE', |
10177
|
|
|
|
|
|
|
'lookahead' => 0 |
10178
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10179
|
|
|
|
|
|
|
bless( { |
10180
|
|
|
|
|
|
|
'lookahead' => 0, |
10181
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10182
|
|
|
|
|
|
|
'line' => 11, |
10183
|
|
|
|
|
|
|
'code' => '{$return = [@{$item{LINE}}]}' |
10184
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10185
|
|
|
|
|
|
|
], |
10186
|
|
|
|
|
|
|
'error' => undef, |
10187
|
|
|
|
|
|
|
'dircount' => 0, |
10188
|
|
|
|
|
|
|
'strcount' => 0, |
10189
|
|
|
|
|
|
|
'actcount' => 1, |
10190
|
|
|
|
|
|
|
'patcount' => 0, |
10191
|
|
|
|
|
|
|
'uncommit' => undef, |
10192
|
|
|
|
|
|
|
'number' => 1 |
10193
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10194
|
|
|
|
|
|
|
], |
10195
|
|
|
|
|
|
|
'opcount' => 0, |
10196
|
|
|
|
|
|
|
'line' => 10 |
10197
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
10198
|
|
|
|
|
|
|
'SCENMODULE' => bless( { |
10199
|
|
|
|
|
|
|
'opcount' => 0, |
10200
|
|
|
|
|
|
|
'line' => 60, |
10201
|
|
|
|
|
|
|
'prods' => [ |
10202
|
|
|
|
|
|
|
bless( { |
10203
|
|
|
|
|
|
|
'actcount' => 1, |
10204
|
|
|
|
|
|
|
'patcount' => 1, |
10205
|
|
|
|
|
|
|
'number' => 0, |
10206
|
|
|
|
|
|
|
'uncommit' => undef, |
10207
|
|
|
|
|
|
|
'dircount' => 0, |
10208
|
|
|
|
|
|
|
'error' => undef, |
10209
|
|
|
|
|
|
|
'items' => [ |
10210
|
|
|
|
|
|
|
bless( { |
10211
|
|
|
|
|
|
|
'lookahead' => 0, |
10212
|
|
|
|
|
|
|
'pattern' => 'Scen::', |
10213
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
10214
|
|
|
|
|
|
|
'line' => 60, |
10215
|
|
|
|
|
|
|
'ldelim' => '/', |
10216
|
|
|
|
|
|
|
'rdelim' => '/', |
10217
|
|
|
|
|
|
|
'mod' => '', |
10218
|
|
|
|
|
|
|
'description' => '/Scen::/' |
10219
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10220
|
|
|
|
|
|
|
bless( { |
10221
|
|
|
|
|
|
|
'argcode' => undef, |
10222
|
|
|
|
|
|
|
'implicit' => undef, |
10223
|
|
|
|
|
|
|
'lookahead' => 0, |
10224
|
|
|
|
|
|
|
'subrule' => 'BNAME', |
10225
|
|
|
|
|
|
|
'line' => 60, |
10226
|
|
|
|
|
|
|
'matchrule' => 0 |
10227
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10228
|
|
|
|
|
|
|
bless( { |
10229
|
|
|
|
|
|
|
'code' => '{ $return = "Treex::Scen::$item{BNAME}"}', |
10230
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10231
|
|
|
|
|
|
|
'line' => 60, |
10232
|
|
|
|
|
|
|
'lookahead' => 0 |
10233
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10234
|
|
|
|
|
|
|
], |
10235
|
|
|
|
|
|
|
'line' => undef, |
10236
|
|
|
|
|
|
|
'strcount' => 0 |
10237
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10238
|
|
|
|
|
|
|
], |
10239
|
|
|
|
|
|
|
'name' => 'SCENMODULE', |
10240
|
|
|
|
|
|
|
'calls' => [ |
10241
|
|
|
|
|
|
|
'BNAME' |
10242
|
|
|
|
|
|
|
], |
10243
|
|
|
|
|
|
|
'changed' => 0, |
10244
|
|
|
|
|
|
|
'impcount' => 0, |
10245
|
|
|
|
|
|
|
'vars' => '' |
10246
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
10247
|
|
|
|
|
|
|
'PVALUE' => bless( { |
10248
|
|
|
|
|
|
|
'vars' => '', |
10249
|
|
|
|
|
|
|
'impcount' => 0, |
10250
|
|
|
|
|
|
|
'calls' => [ |
10251
|
|
|
|
|
|
|
'PSQUOTE', |
10252
|
|
|
|
|
|
|
'PDQUOTE', |
10253
|
|
|
|
|
|
|
'PTICKED', |
10254
|
|
|
|
|
|
|
'PNOTQUOTED' |
10255
|
|
|
|
|
|
|
], |
10256
|
|
|
|
|
|
|
'changed' => 0, |
10257
|
|
|
|
|
|
|
'name' => 'PVALUE', |
10258
|
|
|
|
|
|
|
'prods' => [ |
10259
|
|
|
|
|
|
|
bless( { |
10260
|
|
|
|
|
|
|
'strcount' => 0, |
10261
|
|
|
|
|
|
|
'dircount' => 0, |
10262
|
|
|
|
|
|
|
'error' => undef, |
10263
|
|
|
|
|
|
|
'line' => undef, |
10264
|
|
|
|
|
|
|
'items' => [ |
10265
|
|
|
|
|
|
|
bless( { |
10266
|
|
|
|
|
|
|
'ldelim' => '/', |
10267
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
10268
|
|
|
|
|
|
|
'line' => 77, |
10269
|
|
|
|
|
|
|
'lookahead' => 0, |
10270
|
|
|
|
|
|
|
'pattern' => '\'', |
10271
|
|
|
|
|
|
|
'description' => '/\'/', |
10272
|
|
|
|
|
|
|
'mod' => '', |
10273
|
|
|
|
|
|
|
'rdelim' => '/' |
10274
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10275
|
|
|
|
|
|
|
bless( { |
10276
|
|
|
|
|
|
|
'lookahead' => 0, |
10277
|
|
|
|
|
|
|
'subrule' => 'PSQUOTE', |
10278
|
|
|
|
|
|
|
'line' => 77, |
10279
|
|
|
|
|
|
|
'matchrule' => 0, |
10280
|
|
|
|
|
|
|
'argcode' => undef, |
10281
|
|
|
|
|
|
|
'implicit' => undef |
10282
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10283
|
|
|
|
|
|
|
bless( { |
10284
|
|
|
|
|
|
|
'mod' => '', |
10285
|
|
|
|
|
|
|
'rdelim' => '/', |
10286
|
|
|
|
|
|
|
'description' => '/\'/', |
10287
|
|
|
|
|
|
|
'hashname' => '__PATTERN2__', |
10288
|
|
|
|
|
|
|
'line' => 77, |
10289
|
|
|
|
|
|
|
'pattern' => '\'', |
10290
|
|
|
|
|
|
|
'lookahead' => 0, |
10291
|
|
|
|
|
|
|
'ldelim' => '/' |
10292
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10293
|
|
|
|
|
|
|
bless( { |
10294
|
|
|
|
|
|
|
'lookahead' => 0, |
10295
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10296
|
|
|
|
|
|
|
'line' => 77, |
10297
|
|
|
|
|
|
|
'code' => '{$return = $item{PSQUOTE}}' |
10298
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10299
|
|
|
|
|
|
|
], |
10300
|
|
|
|
|
|
|
'number' => 0, |
10301
|
|
|
|
|
|
|
'uncommit' => undef, |
10302
|
|
|
|
|
|
|
'actcount' => 1, |
10303
|
|
|
|
|
|
|
'patcount' => 2 |
10304
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
10305
|
|
|
|
|
|
|
bless( { |
10306
|
|
|
|
|
|
|
'strcount' => 0, |
10307
|
|
|
|
|
|
|
'dircount' => 0, |
10308
|
|
|
|
|
|
|
'error' => undef, |
10309
|
|
|
|
|
|
|
'items' => [ |
10310
|
|
|
|
|
|
|
bless( { |
10311
|
|
|
|
|
|
|
'description' => '/"/', |
10312
|
|
|
|
|
|
|
'mod' => '', |
10313
|
|
|
|
|
|
|
'rdelim' => '/', |
10314
|
|
|
|
|
|
|
'ldelim' => '/', |
10315
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
10316
|
|
|
|
|
|
|
'line' => 78, |
10317
|
|
|
|
|
|
|
'pattern' => '"', |
10318
|
|
|
|
|
|
|
'lookahead' => 0 |
10319
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10320
|
|
|
|
|
|
|
bless( { |
10321
|
|
|
|
|
|
|
'argcode' => undef, |
10322
|
|
|
|
|
|
|
'implicit' => undef, |
10323
|
|
|
|
|
|
|
'line' => 78, |
10324
|
|
|
|
|
|
|
'subrule' => 'PDQUOTE', |
10325
|
|
|
|
|
|
|
'lookahead' => 0, |
10326
|
|
|
|
|
|
|
'matchrule' => 0 |
10327
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10328
|
|
|
|
|
|
|
bless( { |
10329
|
|
|
|
|
|
|
'hashname' => '__PATTERN2__', |
10330
|
|
|
|
|
|
|
'line' => 78, |
10331
|
|
|
|
|
|
|
'lookahead' => 0, |
10332
|
|
|
|
|
|
|
'pattern' => '"', |
10333
|
|
|
|
|
|
|
'ldelim' => '/', |
10334
|
|
|
|
|
|
|
'mod' => '', |
10335
|
|
|
|
|
|
|
'rdelim' => '/', |
10336
|
|
|
|
|
|
|
'description' => '/"/' |
10337
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10338
|
|
|
|
|
|
|
bless( { |
10339
|
|
|
|
|
|
|
'code' => '{$return = $item{PDQUOTE}}', |
10340
|
|
|
|
|
|
|
'line' => 78, |
10341
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10342
|
|
|
|
|
|
|
'lookahead' => 0 |
10343
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10344
|
|
|
|
|
|
|
], |
10345
|
|
|
|
|
|
|
'line' => undef, |
10346
|
|
|
|
|
|
|
'number' => 1, |
10347
|
|
|
|
|
|
|
'uncommit' => undef, |
10348
|
|
|
|
|
|
|
'patcount' => 2, |
10349
|
|
|
|
|
|
|
'actcount' => 1 |
10350
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
10351
|
|
|
|
|
|
|
bless( { |
10352
|
|
|
|
|
|
|
'uncommit' => undef, |
10353
|
|
|
|
|
|
|
'number' => 2, |
10354
|
|
|
|
|
|
|
'actcount' => 1, |
10355
|
|
|
|
|
|
|
'patcount' => 2, |
10356
|
|
|
|
|
|
|
'strcount' => 0, |
10357
|
|
|
|
|
|
|
'items' => [ |
10358
|
|
|
|
|
|
|
bless( { |
10359
|
|
|
|
|
|
|
'ldelim' => '/', |
10360
|
|
|
|
|
|
|
'lookahead' => 0, |
10361
|
|
|
|
|
|
|
'pattern' => '`', |
10362
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
10363
|
|
|
|
|
|
|
'line' => 79, |
10364
|
|
|
|
|
|
|
'description' => '/`/', |
10365
|
|
|
|
|
|
|
'rdelim' => '/', |
10366
|
|
|
|
|
|
|
'mod' => '' |
10367
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10368
|
|
|
|
|
|
|
bless( { |
10369
|
|
|
|
|
|
|
'implicit' => undef, |
10370
|
|
|
|
|
|
|
'argcode' => undef, |
10371
|
|
|
|
|
|
|
'matchrule' => 0, |
10372
|
|
|
|
|
|
|
'line' => 79, |
10373
|
|
|
|
|
|
|
'lookahead' => 0, |
10374
|
|
|
|
|
|
|
'subrule' => 'PTICKED' |
10375
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10376
|
|
|
|
|
|
|
bless( { |
10377
|
|
|
|
|
|
|
'description' => '/`/', |
10378
|
|
|
|
|
|
|
'mod' => '', |
10379
|
|
|
|
|
|
|
'rdelim' => '/', |
10380
|
|
|
|
|
|
|
'ldelim' => '/', |
10381
|
|
|
|
|
|
|
'line' => 79, |
10382
|
|
|
|
|
|
|
'hashname' => '__PATTERN2__', |
10383
|
|
|
|
|
|
|
'lookahead' => 0, |
10384
|
|
|
|
|
|
|
'pattern' => '`' |
10385
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10386
|
|
|
|
|
|
|
bless( { |
10387
|
|
|
|
|
|
|
'lookahead' => 0, |
10388
|
|
|
|
|
|
|
'line' => 79, |
10389
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10390
|
|
|
|
|
|
|
'code' => '{$return = $item[1].$item[2].$item[3]}' |
10391
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10392
|
|
|
|
|
|
|
], |
10393
|
|
|
|
|
|
|
'line' => undef, |
10394
|
|
|
|
|
|
|
'dircount' => 0, |
10395
|
|
|
|
|
|
|
'error' => undef |
10396
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
10397
|
|
|
|
|
|
|
bless( { |
10398
|
|
|
|
|
|
|
'actcount' => 1, |
10399
|
|
|
|
|
|
|
'patcount' => 0, |
10400
|
|
|
|
|
|
|
'uncommit' => undef, |
10401
|
|
|
|
|
|
|
'number' => 3, |
10402
|
|
|
|
|
|
|
'line' => undef, |
10403
|
|
|
|
|
|
|
'items' => [ |
10404
|
|
|
|
|
|
|
bless( { |
10405
|
|
|
|
|
|
|
'implicit' => undef, |
10406
|
|
|
|
|
|
|
'argcode' => undef, |
10407
|
|
|
|
|
|
|
'matchrule' => 0, |
10408
|
|
|
|
|
|
|
'lookahead' => 0, |
10409
|
|
|
|
|
|
|
'subrule' => 'PNOTQUOTED', |
10410
|
|
|
|
|
|
|
'line' => 80 |
10411
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10412
|
|
|
|
|
|
|
bless( { |
10413
|
|
|
|
|
|
|
'code' => '{$return = $item{PNOTQUOTED}}', |
10414
|
|
|
|
|
|
|
'lookahead' => 0, |
10415
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10416
|
|
|
|
|
|
|
'line' => 80 |
10417
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10418
|
|
|
|
|
|
|
], |
10419
|
|
|
|
|
|
|
'dircount' => 0, |
10420
|
|
|
|
|
|
|
'error' => undef, |
10421
|
|
|
|
|
|
|
'strcount' => 0 |
10422
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10423
|
|
|
|
|
|
|
], |
10424
|
|
|
|
|
|
|
'line' => 77, |
10425
|
|
|
|
|
|
|
'opcount' => 0 |
10426
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
10427
|
|
|
|
|
|
|
'PSQUOTE' => bless( { |
10428
|
|
|
|
|
|
|
'opcount' => 0, |
10429
|
|
|
|
|
|
|
'line' => 81, |
10430
|
|
|
|
|
|
|
'prods' => [ |
10431
|
|
|
|
|
|
|
bless( { |
10432
|
|
|
|
|
|
|
'actcount' => 1, |
10433
|
|
|
|
|
|
|
'patcount' => 0, |
10434
|
|
|
|
|
|
|
'number' => 0, |
10435
|
|
|
|
|
|
|
'uncommit' => undef, |
10436
|
|
|
|
|
|
|
'dircount' => 0, |
10437
|
|
|
|
|
|
|
'error' => undef, |
10438
|
|
|
|
|
|
|
'line' => undef, |
10439
|
|
|
|
|
|
|
'items' => [ |
10440
|
|
|
|
|
|
|
bless( { |
10441
|
|
|
|
|
|
|
'argcode' => undef, |
10442
|
|
|
|
|
|
|
'implicit' => undef, |
10443
|
|
|
|
|
|
|
'line' => 81, |
10444
|
|
|
|
|
|
|
'lookahead' => 0, |
10445
|
|
|
|
|
|
|
'subrule' => 'NOTSQUOTE', |
10446
|
|
|
|
|
|
|
'matchrule' => 0 |
10447
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10448
|
|
|
|
|
|
|
bless( { |
10449
|
|
|
|
|
|
|
'matchrule' => 0, |
10450
|
|
|
|
|
|
|
'lookahead' => 0, |
10451
|
|
|
|
|
|
|
'subrule' => 'SLASHEDSQUOTE', |
10452
|
|
|
|
|
|
|
'line' => 81, |
10453
|
|
|
|
|
|
|
'implicit' => undef, |
10454
|
|
|
|
|
|
|
'argcode' => undef |
10455
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10456
|
|
|
|
|
|
|
bless( { |
10457
|
|
|
|
|
|
|
'matchrule' => 0, |
10458
|
|
|
|
|
|
|
'line' => 81, |
10459
|
|
|
|
|
|
|
'subrule' => 'PSQUOTE', |
10460
|
|
|
|
|
|
|
'lookahead' => 0, |
10461
|
|
|
|
|
|
|
'implicit' => undef, |
10462
|
|
|
|
|
|
|
'argcode' => undef |
10463
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10464
|
|
|
|
|
|
|
bless( { |
10465
|
|
|
|
|
|
|
'code' => '{$return = $item{NOTSQUOTE}.$item{SLASHEDSQUOTE}.$item{PSQUOTE}}', |
10466
|
|
|
|
|
|
|
'lookahead' => 0, |
10467
|
|
|
|
|
|
|
'line' => 81, |
10468
|
|
|
|
|
|
|
'hashname' => '__ACTION1__' |
10469
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10470
|
|
|
|
|
|
|
], |
10471
|
|
|
|
|
|
|
'strcount' => 0 |
10472
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
10473
|
|
|
|
|
|
|
bless( { |
10474
|
|
|
|
|
|
|
'patcount' => 0, |
10475
|
|
|
|
|
|
|
'actcount' => 0, |
10476
|
|
|
|
|
|
|
'number' => 1, |
10477
|
|
|
|
|
|
|
'uncommit' => undef, |
10478
|
|
|
|
|
|
|
'dircount' => 0, |
10479
|
|
|
|
|
|
|
'error' => undef, |
10480
|
|
|
|
|
|
|
'line' => undef, |
10481
|
|
|
|
|
|
|
'items' => [ |
10482
|
|
|
|
|
|
|
bless( { |
10483
|
|
|
|
|
|
|
'argcode' => undef, |
10484
|
|
|
|
|
|
|
'implicit' => undef, |
10485
|
|
|
|
|
|
|
'line' => 82, |
10486
|
|
|
|
|
|
|
'lookahead' => 0, |
10487
|
|
|
|
|
|
|
'subrule' => 'NOTSQUOTE', |
10488
|
|
|
|
|
|
|
'matchrule' => 0 |
10489
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ) |
10490
|
|
|
|
|
|
|
], |
10491
|
|
|
|
|
|
|
'strcount' => 0 |
10492
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10493
|
|
|
|
|
|
|
], |
10494
|
|
|
|
|
|
|
'name' => 'PSQUOTE', |
10495
|
|
|
|
|
|
|
'changed' => 0, |
10496
|
|
|
|
|
|
|
'calls' => [ |
10497
|
|
|
|
|
|
|
'NOTSQUOTE', |
10498
|
|
|
|
|
|
|
'SLASHEDSQUOTE', |
10499
|
|
|
|
|
|
|
'PSQUOTE' |
10500
|
|
|
|
|
|
|
], |
10501
|
|
|
|
|
|
|
'impcount' => 0, |
10502
|
|
|
|
|
|
|
'vars' => '' |
10503
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
10504
|
|
|
|
|
|
|
'SLASHEDSQUOTE' => bless( { |
10505
|
|
|
|
|
|
|
'impcount' => 0, |
10506
|
|
|
|
|
|
|
'calls' => [], |
10507
|
|
|
|
|
|
|
'changed' => 0, |
10508
|
|
|
|
|
|
|
'name' => 'SLASHEDSQUOTE', |
10509
|
|
|
|
|
|
|
'vars' => '', |
10510
|
|
|
|
|
|
|
'prods' => [ |
10511
|
|
|
|
|
|
|
bless( { |
10512
|
|
|
|
|
|
|
'strcount' => 0, |
10513
|
|
|
|
|
|
|
'line' => undef, |
10514
|
|
|
|
|
|
|
'items' => [ |
10515
|
|
|
|
|
|
|
bless( { |
10516
|
|
|
|
|
|
|
'ldelim' => '/', |
10517
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
10518
|
|
|
|
|
|
|
'line' => 84, |
10519
|
|
|
|
|
|
|
'pattern' => '\\\\\'', |
10520
|
|
|
|
|
|
|
'lookahead' => 0, |
10521
|
|
|
|
|
|
|
'description' => '/\\\\\\\\\'/', |
10522
|
|
|
|
|
|
|
'mod' => '', |
10523
|
|
|
|
|
|
|
'rdelim' => '/' |
10524
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10525
|
|
|
|
|
|
|
bless( { |
10526
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10527
|
|
|
|
|
|
|
'line' => 84, |
10528
|
|
|
|
|
|
|
'lookahead' => 0, |
10529
|
|
|
|
|
|
|
'code' => '{$return = "\'"}' |
10530
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10531
|
|
|
|
|
|
|
], |
10532
|
|
|
|
|
|
|
'dircount' => 0, |
10533
|
|
|
|
|
|
|
'error' => undef, |
10534
|
|
|
|
|
|
|
'uncommit' => undef, |
10535
|
|
|
|
|
|
|
'number' => 0, |
10536
|
|
|
|
|
|
|
'patcount' => 1, |
10537
|
|
|
|
|
|
|
'actcount' => 1 |
10538
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10539
|
|
|
|
|
|
|
], |
10540
|
|
|
|
|
|
|
'line' => 84, |
10541
|
|
|
|
|
|
|
'opcount' => 0 |
10542
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
10543
|
|
|
|
|
|
|
'PNAME' => bless( { |
10544
|
|
|
|
|
|
|
'vars' => '', |
10545
|
|
|
|
|
|
|
'impcount' => 0, |
10546
|
|
|
|
|
|
|
'calls' => [], |
10547
|
|
|
|
|
|
|
'changed' => 0, |
10548
|
|
|
|
|
|
|
'name' => 'PNAME', |
10549
|
|
|
|
|
|
|
'prods' => [ |
10550
|
|
|
|
|
|
|
bless( { |
10551
|
|
|
|
|
|
|
'uncommit' => undef, |
10552
|
|
|
|
|
|
|
'number' => 0, |
10553
|
|
|
|
|
|
|
'actcount' => 1, |
10554
|
|
|
|
|
|
|
'patcount' => 1, |
10555
|
|
|
|
|
|
|
'strcount' => 0, |
10556
|
|
|
|
|
|
|
'line' => undef, |
10557
|
|
|
|
|
|
|
'items' => [ |
10558
|
|
|
|
|
|
|
bless( { |
10559
|
|
|
|
|
|
|
'line' => 76, |
10560
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
10561
|
|
|
|
|
|
|
'pattern' => '\\w+', |
10562
|
|
|
|
|
|
|
'lookahead' => 0, |
10563
|
|
|
|
|
|
|
'ldelim' => '/', |
10564
|
|
|
|
|
|
|
'mod' => '', |
10565
|
|
|
|
|
|
|
'rdelim' => '/', |
10566
|
|
|
|
|
|
|
'description' => '/\\\\w+/' |
10567
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10568
|
|
|
|
|
|
|
bless( { |
10569
|
|
|
|
|
|
|
'code' => '{$return = $item[1]}', |
10570
|
|
|
|
|
|
|
'lookahead' => 0, |
10571
|
|
|
|
|
|
|
'line' => 76, |
10572
|
|
|
|
|
|
|
'hashname' => '__ACTION1__' |
10573
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10574
|
|
|
|
|
|
|
], |
10575
|
|
|
|
|
|
|
'error' => undef, |
10576
|
|
|
|
|
|
|
'dircount' => 0 |
10577
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10578
|
|
|
|
|
|
|
], |
10579
|
|
|
|
|
|
|
'line' => 76, |
10580
|
|
|
|
|
|
|
'opcount' => 0 |
10581
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
10582
|
|
|
|
|
|
|
'PDQUOTE' => bless( { |
10583
|
|
|
|
|
|
|
'calls' => [ |
10584
|
|
|
|
|
|
|
'NOTDQUOTE', |
10585
|
|
|
|
|
|
|
'SLASHEDDQUOTE', |
10586
|
|
|
|
|
|
|
'PDQUOTE' |
10587
|
|
|
|
|
|
|
], |
10588
|
|
|
|
|
|
|
'changed' => 0, |
10589
|
|
|
|
|
|
|
'impcount' => 0, |
10590
|
|
|
|
|
|
|
'name' => 'PDQUOTE', |
10591
|
|
|
|
|
|
|
'vars' => '', |
10592
|
|
|
|
|
|
|
'prods' => [ |
10593
|
|
|
|
|
|
|
bless( { |
10594
|
|
|
|
|
|
|
'dircount' => 0, |
10595
|
|
|
|
|
|
|
'error' => undef, |
10596
|
|
|
|
|
|
|
'items' => [ |
10597
|
|
|
|
|
|
|
bless( { |
10598
|
|
|
|
|
|
|
'subrule' => 'NOTDQUOTE', |
10599
|
|
|
|
|
|
|
'lookahead' => 0, |
10600
|
|
|
|
|
|
|
'line' => 85, |
10601
|
|
|
|
|
|
|
'matchrule' => 0, |
10602
|
|
|
|
|
|
|
'argcode' => undef, |
10603
|
|
|
|
|
|
|
'implicit' => undef |
10604
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10605
|
|
|
|
|
|
|
bless( { |
10606
|
|
|
|
|
|
|
'implicit' => undef, |
10607
|
|
|
|
|
|
|
'argcode' => undef, |
10608
|
|
|
|
|
|
|
'matchrule' => 0, |
10609
|
|
|
|
|
|
|
'lookahead' => 0, |
10610
|
|
|
|
|
|
|
'subrule' => 'SLASHEDDQUOTE', |
10611
|
|
|
|
|
|
|
'line' => 85 |
10612
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10613
|
|
|
|
|
|
|
bless( { |
10614
|
|
|
|
|
|
|
'argcode' => undef, |
10615
|
|
|
|
|
|
|
'implicit' => undef, |
10616
|
|
|
|
|
|
|
'line' => 85, |
10617
|
|
|
|
|
|
|
'subrule' => 'PDQUOTE', |
10618
|
|
|
|
|
|
|
'lookahead' => 0, |
10619
|
|
|
|
|
|
|
'matchrule' => 0 |
10620
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10621
|
|
|
|
|
|
|
bless( { |
10622
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10623
|
|
|
|
|
|
|
'line' => 85, |
10624
|
|
|
|
|
|
|
'lookahead' => 0, |
10625
|
|
|
|
|
|
|
'code' => '{$return = $item{NOTDQUOTE}.$item{SLASHEDDQUOTE}.$item{PDQUOTE}}' |
10626
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10627
|
|
|
|
|
|
|
], |
10628
|
|
|
|
|
|
|
'line' => undef, |
10629
|
|
|
|
|
|
|
'strcount' => 0, |
10630
|
|
|
|
|
|
|
'patcount' => 0, |
10631
|
|
|
|
|
|
|
'actcount' => 1, |
10632
|
|
|
|
|
|
|
'number' => 0, |
10633
|
|
|
|
|
|
|
'uncommit' => undef |
10634
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
10635
|
|
|
|
|
|
|
bless( { |
10636
|
|
|
|
|
|
|
'strcount' => 0, |
10637
|
|
|
|
|
|
|
'items' => [ |
10638
|
|
|
|
|
|
|
bless( { |
10639
|
|
|
|
|
|
|
'line' => 86, |
10640
|
|
|
|
|
|
|
'subrule' => 'NOTDQUOTE', |
10641
|
|
|
|
|
|
|
'lookahead' => 0, |
10642
|
|
|
|
|
|
|
'matchrule' => 0, |
10643
|
|
|
|
|
|
|
'argcode' => undef, |
10644
|
|
|
|
|
|
|
'implicit' => undef |
10645
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ) |
10646
|
|
|
|
|
|
|
], |
10647
|
|
|
|
|
|
|
'line' => undef, |
10648
|
|
|
|
|
|
|
'dircount' => 0, |
10649
|
|
|
|
|
|
|
'error' => undef, |
10650
|
|
|
|
|
|
|
'uncommit' => undef, |
10651
|
|
|
|
|
|
|
'number' => 1, |
10652
|
|
|
|
|
|
|
'actcount' => 0, |
10653
|
|
|
|
|
|
|
'patcount' => 0 |
10654
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10655
|
|
|
|
|
|
|
], |
10656
|
|
|
|
|
|
|
'opcount' => 0, |
10657
|
|
|
|
|
|
|
'line' => 85 |
10658
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ) |
10659
|
|
|
|
|
|
|
}, |
10660
|
|
|
|
|
|
|
'_AUTOACTION' => undef, |
10661
|
|
|
|
|
|
|
'startcode' => '', |
10662
|
|
|
|
|
|
|
'_check' => { |
10663
|
|
|
|
|
|
|
'prevline' => '', |
10664
|
|
|
|
|
|
|
'prevoffset' => '', |
10665
|
|
|
|
|
|
|
'thiscolumn' => '', |
10666
|
|
|
|
|
|
|
'thisoffset' => '', |
10667
|
|
|
|
|
|
|
'prevcolumn' => '', |
10668
|
|
|
|
|
|
|
'itempos' => '' |
10669
|
|
|
|
|
|
|
}, |
10670
|
|
|
|
|
|
|
'_AUTOTREE' => undef, |
10671
|
|
|
|
|
|
|
'namespace' => 'Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser', |
10672
|
|
|
|
|
|
|
'localvars' => '' |
10673
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime' ); |
10674
|
|
|
|
|
|
|
} |
10675
|
|
|
|
|
|
|
|