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
|
4
|
|
|
4
|
|
96437
|
use 5.006; |
|
4
|
|
|
|
|
22
|
|
7
|
4
|
|
|
4
|
|
29
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
188
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime; |
10
|
|
|
|
|
|
|
|
11
|
4
|
|
|
4
|
|
2995
|
use Text::Balanced qw ( extract_codeblock extract_bracketed extract_quotelike extract_delimited ); |
|
4
|
|
|
|
|
41359
|
|
|
4
|
|
|
|
|
368
|
|
12
|
|
|
|
|
|
|
|
13
|
4
|
|
|
4
|
|
41
|
use vars qw ( $skip ); |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
38504
|
|
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
|
3983
|
50
|
|
3983
|
|
15123
|
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
|
3983
|
|
|
3983
|
|
15423
|
bless { |
1708
|
|
|
|
|
|
|
"failed" => 0, |
1709
|
|
|
|
|
|
|
"expected" => "", |
1710
|
|
|
|
|
|
|
"unexpected" => "", |
1711
|
|
|
|
|
|
|
"lastexpected" => "", |
1712
|
|
|
|
|
|
|
"lastunexpected" => "", |
1713
|
|
|
|
|
|
|
"defexpected" => $_[1], |
1714
|
|
|
|
|
|
|
}; |
1715
|
|
|
|
|
|
|
} |
1716
|
|
|
|
|
|
|
|
1717
|
|
|
|
|
|
|
sub is ($$) |
1718
|
|
|
|
|
|
|
{ |
1719
|
7875
|
|
|
7875
|
|
12921
|
$_[0]->{lastexpected} = $_[1]; return $_[0]; |
|
7875
|
|
|
|
|
18413
|
|
1720
|
|
|
|
|
|
|
} |
1721
|
|
|
|
|
|
|
|
1722
|
|
|
|
|
|
|
sub at ($$) |
1723
|
|
|
|
|
|
|
{ |
1724
|
11858
|
|
|
11858
|
|
19770
|
$_[0]->{lastunexpected} = $_[1]; return $_[0]; |
|
11858
|
|
|
|
|
15741
|
|
1725
|
|
|
|
|
|
|
} |
1726
|
|
|
|
|
|
|
|
1727
|
|
|
|
|
|
|
sub failed ($) |
1728
|
|
|
|
|
|
|
{ |
1729
|
4945
|
100
|
|
4945
|
|
10585
|
return unless $_[0]->{lastexpected}; |
1730
|
388
|
50
|
|
|
|
998
|
$_[0]->{expected} = $_[0]->{lastexpected} unless $_[0]->{failed}; |
1731
|
388
|
50
|
|
|
|
951
|
$_[0]->{unexpected} = $_[0]->{lastunexpected} unless $_[0]->{failed}; |
1732
|
388
|
|
|
|
|
660
|
$_[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
|
4
|
|
|
4
|
|
46
|
use Carp; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
337
|
|
1756
|
4
|
|
|
4
|
|
33
|
use vars qw ( $AUTOLOAD $VERSION $_FILENAME); |
|
4
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
1910
|
|
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
|
|
6238
|
my ($self) = @_; |
1819
|
13
|
|
|
|
|
48
|
my $namespace = $self->{namespace}; |
1820
|
13
|
|
|
|
|
76
|
$namespace =~ s/Parse::RecDescent::_Runtime:://; |
1821
|
13
|
50
|
|
|
|
3595
|
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
|
4
|
|
|
4
|
|
45
|
no strict 'refs'; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
39391
|
|
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
|
26
|
50
|
|
26
|
|
5091
|
croak "Could not find method: $AUTOLOAD\n" unless ref $_[0]; |
2964
|
26
|
|
33
|
|
|
94
|
my $class = ref($_[0]) || $_[0]; |
2965
|
26
|
50
|
|
|
|
145
|
my $text = ref($_[1]) eq 'SCALAR' ? ${$_[1]} : "$_[1]"; |
|
0
|
|
|
|
|
0
|
|
2966
|
26
|
|
|
|
|
113
|
$_[0]->{lastlinenum} = _linecount($text); |
2967
|
26
|
100
|
50
|
|
|
160
|
$_[0]->{lastlinenum} += ($_[2]||0) if @_ > 2; |
2968
|
26
|
|
|
|
|
74
|
$_[0]->{offsetlinenum} = $_[0]->{lastlinenum}; |
2969
|
26
|
|
|
|
|
70
|
$_[0]->{fulltext} = $text; |
2970
|
26
|
|
|
|
|
68
|
$_[0]->{fulltextlen} = length $text; |
2971
|
26
|
|
|
|
|
79
|
$_[0]->{linecounter_cache} = {}; |
2972
|
26
|
|
|
|
|
74
|
$_[0]->{deferred} = []; |
2973
|
26
|
|
|
|
|
71
|
$_[0]->{errors} = []; |
2974
|
26
|
|
|
|
|
142
|
my @args = @_[3..$#_]; |
2975
|
26
|
|
|
26
|
|
142
|
my $args = sub { [ @args ] }; |
|
26
|
|
|
|
|
112
|
|
2976
|
|
|
|
|
|
|
|
2977
|
26
|
|
|
|
|
286
|
$AUTOLOAD =~ s/$class/$_[0]->{namespace}/; |
2978
|
4
|
|
|
4
|
|
49
|
no strict "refs"; |
|
4
|
|
|
|
|
16
|
|
|
4
|
|
|
|
|
9665
|
|
2979
|
|
|
|
|
|
|
|
2980
|
26
|
|
33
|
|
|
116
|
local $::RD_WARN = $::RD_WARN || $_[0]->{__WARN__}; |
2981
|
26
|
|
33
|
|
|
195
|
local $::RD_HINT = $::RD_HINT || $_[0]->{__HINT__}; |
2982
|
26
|
|
33
|
|
|
129
|
local $::RD_TRACE = $::RD_TRACE || $_[0]->{__TRACE__}; |
2983
|
|
|
|
|
|
|
|
2984
|
26
|
50
|
|
|
|
215
|
croak "Unknown starting rule ($AUTOLOAD) called\n" |
2985
|
|
|
|
|
|
|
unless defined &$AUTOLOAD; |
2986
|
26
|
|
|
|
|
86
|
my $retval = &{$AUTOLOAD}( |
|
26
|
|
|
|
|
148
|
|
2987
|
|
|
|
|
|
|
$_[0], # $parser |
2988
|
|
|
|
|
|
|
$text, # $text |
2989
|
|
|
|
|
|
|
undef, # $repeating |
2990
|
|
|
|
|
|
|
undef, # $_noactions |
2991
|
|
|
|
|
|
|
$args, # \@args |
2992
|
|
|
|
|
|
|
undef, # $_itempos |
2993
|
|
|
|
|
|
|
); |
2994
|
|
|
|
|
|
|
|
2995
|
|
|
|
|
|
|
|
2996
|
26
|
100
|
|
|
|
87
|
if (defined $retval) |
2997
|
|
|
|
|
|
|
{ |
2998
|
24
|
|
|
|
|
74
|
foreach ( @{$_[0]->{deferred}} ) { &$_; } |
|
24
|
|
|
|
|
122
|
|
|
0
|
|
|
|
|
0
|
|
2999
|
|
|
|
|
|
|
} |
3000
|
|
|
|
|
|
|
else |
3001
|
|
|
|
|
|
|
{ |
3002
|
2
|
|
|
|
|
5
|
foreach ( @{$_[0]->{errors}} ) { _error(@$_); } |
|
2
|
|
|
|
|
9
|
|
|
0
|
|
|
|
|
0
|
|
3003
|
|
|
|
|
|
|
} |
3004
|
|
|
|
|
|
|
|
3005
|
26
|
50
|
|
|
|
93
|
if (ref $_[1] eq 'SCALAR') { ${$_[1]} = $text } |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
3006
|
|
|
|
|
|
|
|
3007
|
26
|
|
|
|
|
50
|
$ERRORS = 0; |
3008
|
26
|
|
|
|
|
214
|
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
|
26
|
|
50
|
26
|
|
262
|
scalar substr($_[0], pos $_[0]||0) =~ tr/\n// |
3271
|
|
|
|
|
|
|
} |
3272
|
|
|
|
|
|
|
|
3273
|
|
|
|
|
|
|
|
3274
|
|
|
|
|
|
|
package main; |
3275
|
|
|
|
|
|
|
|
3276
|
4
|
|
|
4
|
|
40
|
use vars qw ( $RD_ERRORS $RD_WARN $RD_HINT $RD_TRACE $RD_CHECK ); |
|
4
|
|
|
|
|
104
|
|
|
4
|
|
|
|
|
504
|
|
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
|
4
|
|
|
4
|
|
35
|
use strict; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
135
|
|
3292
|
4
|
|
|
4
|
|
126
|
use vars qw($skip $AUTOLOAD ); |
|
4
|
|
|
|
|
70
|
|
|
4
|
|
|
|
|
328
|
|
3293
|
|
|
|
|
|
|
@Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::ISA = (); |
3294
|
|
|
|
|
|
|
$skip = '\s*'; |
3295
|
|
|
|
|
|
|
|
3296
|
4
|
|
|
4
|
|
31
|
use File::Slurp; |
|
4
|
|
|
|
|
16
|
|
|
4
|
|
|
|
|
361
|
|
3297
|
4
|
|
|
4
|
|
41
|
use File::Basename; |
|
4
|
|
|
|
|
60
|
|
|
4
|
|
|
|
|
280
|
|
3298
|
4
|
|
|
4
|
|
29
|
use Treex::Core::Log; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
383
|
|
3299
|
|
|
|
|
|
|
## no critic (Miscellanea::ProhibitUnrestrictedNoCritic) |
3300
|
|
|
|
|
|
|
## no critic Generated code follows |
3301
|
4
|
|
|
4
|
|
34
|
no warnings; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
383
|
|
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
|
4
|
|
|
4
|
|
30
|
no strict 'refs'; |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
684
|
|
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
|
46
|
|
|
46
|
|
93
|
my $thisparser = $_[0]; |
3322
|
4
|
|
|
4
|
|
37
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
3069
|
|
3323
|
46
|
|
50
|
|
|
125
|
local $tracelevel = ($tracelevel||0)+1; |
3324
|
46
|
|
|
|
|
78
|
$ERRORS = 0; |
3325
|
46
|
|
|
|
|
101
|
my $thisrule = $thisparser->{"rules"}{"PNOTQUOTED"}; |
3326
|
|
|
|
|
|
|
|
3327
|
46
|
50
|
|
|
|
96
|
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
|
46
|
|
|
|
|
68
|
my $err_at = @{$thisparser->{errors}}; |
|
46
|
|
|
|
|
95
|
|
3335
|
|
|
|
|
|
|
|
3336
|
46
|
|
|
|
|
123
|
my $score; |
3337
|
|
|
|
|
|
|
my $score_return; |
3338
|
46
|
|
|
|
|
0
|
my $_tok; |
3339
|
46
|
|
|
|
|
83
|
my $return = undef; |
3340
|
46
|
|
|
|
|
78
|
my $_matched=0; |
3341
|
46
|
|
|
|
|
75
|
my $commit=0; |
3342
|
46
|
|
|
|
|
86
|
my @item = (); |
3343
|
46
|
|
|
|
|
67
|
my %item = (); |
3344
|
46
|
|
|
|
|
67
|
my $repeating = $_[2]; |
3345
|
46
|
|
|
|
|
74
|
my $_noactions = $_[3]; |
3346
|
46
|
50
|
|
|
|
108
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
46
|
|
|
|
|
62
|
|
|
46
|
|
|
|
|
89
|
|
3347
|
46
|
|
|
|
|
80
|
my $_itempos = $_[5]; |
3348
|
46
|
50
|
|
|
|
176
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
3349
|
46
|
|
|
|
|
119
|
my $text; |
3350
|
|
|
|
|
|
|
my $lastsep; |
3351
|
46
|
|
|
|
|
0
|
my $current_match; |
3352
|
46
|
|
|
|
|
125
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/\\S+/, or EMPTY}); |
3353
|
46
|
|
|
|
|
170
|
$expectation->at($_[1]); |
3354
|
|
|
|
|
|
|
|
3355
|
46
|
|
|
|
|
70
|
my $thisline; |
3356
|
46
|
|
|
|
|
334
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
3357
|
|
|
|
|
|
|
|
3358
|
|
|
|
|
|
|
|
3359
|
|
|
|
|
|
|
|
3360
|
46
|
|
33
|
|
|
189
|
while (!$_matched && !$commit) |
3361
|
|
|
|
|
|
|
{ |
3362
|
|
|
|
|
|
|
|
3363
|
46
|
50
|
|
|
|
101
|
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
|
46
|
|
|
|
|
102
|
my $thisprod = $thisrule->{"prods"}[0]; |
3369
|
46
|
|
|
|
|
81
|
$text = $_[1]; |
3370
|
46
|
|
|
|
|
75
|
my $_savetext; |
3371
|
46
|
|
|
|
|
91
|
@item = (q{PNOTQUOTED}); |
3372
|
46
|
|
|
|
|
93
|
%item = (__RULE__ => q{PNOTQUOTED}); |
3373
|
46
|
|
|
|
|
111
|
my $repcount = 0; |
3374
|
|
|
|
|
|
|
|
3375
|
|
|
|
|
|
|
|
3376
|
46
|
50
|
|
|
|
98
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/\\S+/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
3377
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3378
|
|
|
|
|
|
|
$tracelevel) |
3379
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3380
|
46
|
|
|
|
|
83
|
undef $lastsep; |
3381
|
46
|
|
|
|
|
113
|
$expectation->is(q{})->at($text); |
3382
|
|
|
|
|
|
|
|
3383
|
|
|
|
|
|
|
|
3384
|
46
|
50
|
33
|
|
|
289
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\S+)/) |
|
46
|
50
|
|
|
|
386
|
|
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
|
46
|
|
|
|
|
253
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
3395
|
46
|
|
|
|
|
190
|
substr($text,0,length($current_match),q{}); |
3396
|
46
|
50
|
|
|
|
158
|
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
|
46
|
|
|
|
|
126
|
push @item, $item{__PATTERN1__}=$current_match; |
3401
|
|
|
|
|
|
|
|
3402
|
|
|
|
|
|
|
|
3403
|
46
|
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
|
46
|
50
|
|
|
|
109
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1]}; |
|
46
|
|
|
|
|
111
|
|
3411
|
46
|
50
|
|
|
|
106
|
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
|
46
|
50
|
|
|
|
96
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
3418
|
|
|
|
|
|
|
. $_tok . q{])}, |
3419
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3420
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3421
|
46
|
|
|
|
|
81
|
push @item, $_tok; |
3422
|
46
|
|
|
|
|
98
|
$item{__ACTION1__}=$_tok; |
3423
|
|
|
|
|
|
|
|
3424
|
|
|
|
|
|
|
|
3425
|
46
|
50
|
|
|
|
93
|
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
|
46
|
|
|
|
|
83
|
$_matched = 1; |
3434
|
46
|
|
|
|
|
94
|
last; |
3435
|
|
|
|
|
|
|
} |
3436
|
|
|
|
|
|
|
|
3437
|
|
|
|
|
|
|
|
3438
|
46
|
|
33
|
|
|
112
|
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
|
4
|
|
|
4
|
|
35
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
2513
|
|
|
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
|
46
|
50
|
33
|
|
|
117
|
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
|
46
|
50
|
33
|
|
|
113
|
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
|
46
|
|
|
|
|
73
|
splice @{$thisparser->{errors}}, $err_at; |
|
46
|
|
|
|
|
112
|
|
3540
|
46
|
50
|
|
|
|
100
|
$return = $item[$#item] unless defined $return; |
3541
|
46
|
50
|
|
|
|
105
|
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
|
46
|
|
|
|
|
97
|
$_[1] = $text; |
3554
|
46
|
|
|
|
|
280
|
return $return; |
3555
|
|
|
|
|
|
|
} |
3556
|
|
|
|
|
|
|
|
3557
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
3558
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAMS |
3559
|
|
|
|
|
|
|
{ |
3560
|
191
|
|
|
191
|
|
385
|
my $thisparser = $_[0]; |
3561
|
4
|
|
|
4
|
|
37
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
1532
|
|
3562
|
191
|
|
50
|
|
|
512
|
local $tracelevel = ($tracelevel||0)+1; |
3563
|
191
|
|
|
|
|
282
|
$ERRORS = 0; |
3564
|
191
|
|
|
|
|
431
|
my $thisrule = $thisparser->{"rules"}{"PARAMS"}; |
3565
|
|
|
|
|
|
|
|
3566
|
191
|
50
|
|
|
|
480
|
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
|
191
|
|
|
|
|
273
|
my $err_at = @{$thisparser->{errors}}; |
|
191
|
|
|
|
|
329
|
|
3574
|
|
|
|
|
|
|
|
3575
|
191
|
|
|
|
|
479
|
my $score; |
3576
|
|
|
|
|
|
|
my $score_return; |
3577
|
191
|
|
|
|
|
0
|
my $_tok; |
3578
|
191
|
|
|
|
|
302
|
my $return = undef; |
3579
|
191
|
|
|
|
|
298
|
my $_matched=0; |
3580
|
191
|
|
|
|
|
302
|
my $commit=0; |
3581
|
191
|
|
|
|
|
345
|
my @item = (); |
3582
|
191
|
|
|
|
|
350
|
my %item = (); |
3583
|
191
|
|
|
|
|
265
|
my $repeating = $_[2]; |
3584
|
191
|
|
|
|
|
294
|
my $_noactions = $_[3]; |
3585
|
191
|
50
|
|
|
|
404
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
191
|
|
|
|
|
277
|
|
|
191
|
|
|
|
|
526
|
|
3586
|
191
|
|
|
|
|
309
|
my $_itempos = $_[5]; |
3587
|
191
|
100
|
|
|
|
572
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
3588
|
191
|
|
|
|
|
451
|
my $text; |
3589
|
|
|
|
|
|
|
my $lastsep; |
3590
|
191
|
|
|
|
|
0
|
my $current_match; |
3591
|
191
|
|
|
|
|
431
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{PARAM}); |
3592
|
191
|
|
|
|
|
492
|
$expectation->at($_[1]); |
3593
|
|
|
|
|
|
|
|
3594
|
191
|
|
|
|
|
319
|
my $thisline; |
3595
|
191
|
|
|
|
|
683
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
3596
|
|
|
|
|
|
|
|
3597
|
|
|
|
|
|
|
|
3598
|
|
|
|
|
|
|
|
3599
|
191
|
|
33
|
|
|
872
|
while (!$_matched && !$commit) |
3600
|
|
|
|
|
|
|
{ |
3601
|
|
|
|
|
|
|
|
3602
|
191
|
50
|
|
|
|
434
|
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
|
191
|
|
|
|
|
415
|
my $thisprod = $thisrule->{"prods"}[0]; |
3608
|
191
|
|
|
|
|
362
|
$text = $_[1]; |
3609
|
191
|
|
|
|
|
286
|
my $_savetext; |
3610
|
191
|
|
|
|
|
374
|
@item = (q{PARAMS}); |
3611
|
191
|
|
|
|
|
417
|
%item = (__RULE__ => q{PARAMS}); |
3612
|
191
|
|
|
|
|
308
|
my $repcount = 0; |
3613
|
|
|
|
|
|
|
|
3614
|
|
|
|
|
|
|
|
3615
|
191
|
50
|
|
|
|
405
|
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
|
4
|
|
|
4
|
|
36
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
741
|
|
|
191
|
|
|
|
|
281
|
|
3621
|
191
|
|
|
|
|
393
|
$expectation->is(q{})->at($text); |
3622
|
191
|
100
|
|
191
|
|
778
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAM($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
191
|
|
|
|
|
393
|
|
3623
|
|
|
|
|
|
|
{ |
3624
|
|
|
|
|
|
|
|
3625
|
127
|
50
|
|
|
|
296
|
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
|
127
|
|
|
|
|
666
|
$expectation->failed(); |
3631
|
127
|
|
|
|
|
229
|
last; |
3632
|
|
|
|
|
|
|
} |
3633
|
64
|
50
|
|
|
|
222
|
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
|
64
|
|
|
|
|
160
|
$item{q{PARAM}} = $_tok; |
3641
|
64
|
|
|
|
|
124
|
push @item, $_tok; |
3642
|
|
|
|
|
|
|
|
3643
|
|
|
|
|
|
|
} |
3644
|
|
|
|
|
|
|
|
3645
|
64
|
50
|
|
|
|
137
|
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
|
4
|
|
|
4
|
|
32
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
1782
|
|
|
64
|
|
|
|
|
93
|
|
3651
|
64
|
|
|
|
|
184
|
$expectation->is(q{PARAMS})->at($text); |
3652
|
64
|
100
|
|
64
|
|
403
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAMS($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
64
|
|
|
|
|
161
|
|
3653
|
|
|
|
|
|
|
{ |
3654
|
|
|
|
|
|
|
|
3655
|
62
|
50
|
|
|
|
145
|
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
|
62
|
|
|
|
|
160
|
$expectation->failed(); |
3661
|
62
|
|
|
|
|
121
|
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
|
|
|
|
|
6
|
$item{q{PARAMS}} = $_tok; |
3671
|
2
|
|
|
|
|
4
|
push @item, $_tok; |
3672
|
|
|
|
|
|
|
|
3673
|
|
|
|
|
|
|
} |
3674
|
|
|
|
|
|
|
|
3675
|
2
|
50
|
|
|
|
8
|
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
|
|
|
|
7
|
$_tok = ($_noactions) ? 0 : do {$return = [$item{PARAM}, @{$item{PARAMS}}]}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
8
|
|
3683
|
2
|
50
|
|
|
|
7
|
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
|
|
|
|
|
5
|
$_matched = 1; |
3706
|
2
|
|
|
|
|
3
|
last; |
3707
|
|
|
|
|
|
|
} |
3708
|
|
|
|
|
|
|
|
3709
|
|
|
|
|
|
|
|
3710
|
191
|
|
66
|
|
|
865
|
while (!$_matched && !$commit) |
3711
|
|
|
|
|
|
|
{ |
3712
|
|
|
|
|
|
|
|
3713
|
189
|
50
|
|
|
|
392
|
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
|
189
|
|
|
|
|
445
|
my $thisprod = $thisrule->{"prods"}[1]; |
3719
|
189
|
|
|
|
|
326
|
$text = $_[1]; |
3720
|
189
|
|
|
|
|
310
|
my $_savetext; |
3721
|
189
|
|
|
|
|
451
|
@item = (q{PARAMS}); |
3722
|
189
|
|
|
|
|
450
|
%item = (__RULE__ => q{PARAMS}); |
3723
|
189
|
|
|
|
|
305
|
my $repcount = 0; |
3724
|
|
|
|
|
|
|
|
3725
|
|
|
|
|
|
|
|
3726
|
189
|
50
|
|
|
|
376
|
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
|
4
|
|
|
4
|
|
34
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
2281
|
|
|
189
|
|
|
|
|
265
|
|
3732
|
189
|
|
|
|
|
412
|
$expectation->is(q{})->at($text); |
3733
|
189
|
100
|
|
189
|
|
853
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAM($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
189
|
|
|
|
|
444
|
|
3734
|
|
|
|
|
|
|
{ |
3735
|
|
|
|
|
|
|
|
3736
|
127
|
50
|
|
|
|
267
|
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
|
127
|
|
|
|
|
323
|
$expectation->failed(); |
3742
|
127
|
|
|
|
|
210
|
last; |
3743
|
|
|
|
|
|
|
} |
3744
|
62
|
50
|
|
|
|
217
|
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
|
62
|
|
|
|
|
128
|
$item{q{PARAM}} = $_tok; |
3752
|
62
|
|
|
|
|
116
|
push @item, $_tok; |
3753
|
|
|
|
|
|
|
|
3754
|
|
|
|
|
|
|
} |
3755
|
|
|
|
|
|
|
|
3756
|
62
|
50
|
|
|
|
148
|
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
|
62
|
50
|
|
|
|
144
|
$_tok = ($_noactions) ? 0 : do {$return = [$item{PARAM}]}; |
|
62
|
|
|
|
|
180
|
|
3764
|
62
|
50
|
|
|
|
151
|
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
|
62
|
50
|
|
|
|
137
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
3771
|
|
|
|
|
|
|
. $_tok . q{])}, |
3772
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3773
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3774
|
62
|
|
|
|
|
113
|
push @item, $_tok; |
3775
|
62
|
|
|
|
|
114
|
$item{__ACTION1__}=$_tok; |
3776
|
|
|
|
|
|
|
|
3777
|
|
|
|
|
|
|
|
3778
|
62
|
50
|
|
|
|
139
|
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
|
62
|
|
|
|
|
96
|
$_matched = 1; |
3787
|
62
|
|
|
|
|
104
|
last; |
3788
|
|
|
|
|
|
|
} |
3789
|
|
|
|
|
|
|
|
3790
|
|
|
|
|
|
|
|
3791
|
191
|
100
|
66
|
|
|
719
|
unless ( $_matched || defined($score) ) |
3792
|
|
|
|
|
|
|
{ |
3793
|
|
|
|
|
|
|
|
3794
|
|
|
|
|
|
|
|
3795
|
127
|
|
|
|
|
274
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
3796
|
127
|
50
|
|
|
|
271
|
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
|
127
|
|
|
|
|
636
|
return undef; |
3802
|
|
|
|
|
|
|
} |
3803
|
64
|
50
|
33
|
|
|
169
|
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
|
64
|
|
|
|
|
106
|
splice @{$thisparser->{errors}}, $err_at; |
|
64
|
|
|
|
|
129
|
|
3812
|
64
|
50
|
|
|
|
141
|
$return = $item[$#item] unless defined $return; |
3813
|
64
|
50
|
|
|
|
155
|
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
|
64
|
|
|
|
|
122
|
$_[1] = $text; |
3826
|
64
|
|
|
|
|
360
|
return $return; |
3827
|
|
|
|
|
|
|
} |
3828
|
|
|
|
|
|
|
|
3829
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
3830
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAM |
3831
|
|
|
|
|
|
|
{ |
3832
|
380
|
|
|
380
|
|
701
|
my $thisparser = $_[0]; |
3833
|
4
|
|
|
4
|
|
42
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
1593
|
|
3834
|
380
|
|
50
|
|
|
873
|
local $tracelevel = ($tracelevel||0)+1; |
3835
|
380
|
|
|
|
|
553
|
$ERRORS = 0; |
3836
|
380
|
|
|
|
|
738
|
my $thisrule = $thisparser->{"rules"}{"PARAM"}; |
3837
|
|
|
|
|
|
|
|
3838
|
380
|
50
|
|
|
|
784
|
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
|
380
|
|
|
|
|
587
|
my $err_at = @{$thisparser->{errors}}; |
|
380
|
|
|
|
|
682
|
|
3846
|
|
|
|
|
|
|
|
3847
|
380
|
|
|
|
|
899
|
my $score; |
3848
|
|
|
|
|
|
|
my $score_return; |
3849
|
380
|
|
|
|
|
0
|
my $_tok; |
3850
|
380
|
|
|
|
|
545
|
my $return = undef; |
3851
|
380
|
|
|
|
|
552
|
my $_matched=0; |
3852
|
380
|
|
|
|
|
576
|
my $commit=0; |
3853
|
380
|
|
|
|
|
582
|
my @item = (); |
3854
|
380
|
|
|
|
|
661
|
my %item = (); |
3855
|
380
|
|
|
|
|
589
|
my $repeating = $_[2]; |
3856
|
380
|
|
|
|
|
539
|
my $_noactions = $_[3]; |
3857
|
380
|
50
|
|
|
|
741
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
380
|
|
|
|
|
541
|
|
|
380
|
|
|
|
|
653
|
|
3858
|
380
|
|
|
|
|
582
|
my $_itempos = $_[5]; |
3859
|
380
|
100
|
|
|
|
967
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
3860
|
380
|
|
|
|
|
902
|
my $text; |
3861
|
|
|
|
|
|
|
my $lastsep; |
3862
|
380
|
|
|
|
|
0
|
my $current_match; |
3863
|
380
|
|
|
|
|
868
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{PNAME}); |
3864
|
380
|
|
|
|
|
925
|
$expectation->at($_[1]); |
3865
|
|
|
|
|
|
|
|
3866
|
380
|
|
|
|
|
552
|
my $thisline; |
3867
|
380
|
|
|
|
|
1087
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
3868
|
|
|
|
|
|
|
|
3869
|
|
|
|
|
|
|
|
3870
|
|
|
|
|
|
|
|
3871
|
380
|
|
33
|
|
|
1410
|
while (!$_matched && !$commit) |
3872
|
|
|
|
|
|
|
{ |
3873
|
380
|
50
|
|
|
|
852
|
local $skip = defined($skip) ? $skip : $Parse::RecDescent::_Runtime::skip; |
3874
|
380
|
50
|
|
|
|
757
|
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
|
380
|
|
|
|
|
728
|
my $thisprod = $thisrule->{"prods"}[0]; |
3880
|
380
|
|
|
|
|
625
|
$text = $_[1]; |
3881
|
380
|
|
|
|
|
515
|
my $_savetext; |
3882
|
380
|
|
|
|
|
708
|
@item = (q{PARAM}); |
3883
|
380
|
|
|
|
|
715
|
%item = (__RULE__ => q{PARAM}); |
3884
|
380
|
|
|
|
|
572
|
my $repcount = 0; |
3885
|
|
|
|
|
|
|
|
3886
|
|
|
|
|
|
|
|
3887
|
380
|
50
|
|
|
|
739
|
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
|
4
|
|
|
4
|
|
67
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
2101
|
|
|
380
|
|
|
|
|
507
|
|
3893
|
380
|
|
|
|
|
742
|
$expectation->is(q{})->at($text); |
3894
|
380
|
100
|
|
380
|
|
1471
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
380
|
|
|
|
|
762
|
|
3895
|
|
|
|
|
|
|
{ |
3896
|
|
|
|
|
|
|
|
3897
|
158
|
50
|
|
|
|
327
|
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
|
158
|
|
|
|
|
378
|
$expectation->failed(); |
3903
|
158
|
|
|
|
|
295
|
last; |
3904
|
|
|
|
|
|
|
} |
3905
|
222
|
50
|
|
|
|
752
|
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
|
222
|
|
|
|
|
415
|
$item{q{PNAME}} = $_tok; |
3913
|
222
|
|
|
|
|
381
|
push @item, $_tok; |
3914
|
|
|
|
|
|
|
|
3915
|
|
|
|
|
|
|
} |
3916
|
|
|
|
|
|
|
|
3917
|
222
|
50
|
|
|
|
418
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: ['=']}, |
3918
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3919
|
|
|
|
|
|
|
q{PARAM}, |
3920
|
|
|
|
|
|
|
$tracelevel) |
3921
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3922
|
222
|
|
|
|
|
347
|
undef $lastsep; |
3923
|
222
|
|
|
|
|
538
|
$expectation->is(q{'='})->at($text); |
3924
|
|
|
|
|
|
|
|
3925
|
|
|
|
|
|
|
|
3926
|
222
|
50
|
66
|
|
|
1117
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\=/) |
|
222
|
100
|
|
|
|
1625
|
|
3927
|
|
|
|
|
|
|
{ |
3928
|
96
|
50
|
|
|
|
318
|
$text = $lastsep . $text if defined $lastsep; |
3929
|
|
|
|
|
|
|
|
3930
|
96
|
|
|
|
|
261
|
$expectation->failed(); |
3931
|
96
|
50
|
|
|
|
199
|
Parse::RecDescent::_Runtime::_trace(qq{<<Didn't match terminal>>}, |
3932
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3933
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3934
|
96
|
|
|
|
|
212
|
last; |
3935
|
|
|
|
|
|
|
} |
3936
|
126
|
|
|
|
|
558
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
3937
|
126
|
|
|
|
|
381
|
substr($text,0,length($current_match),q{}); |
3938
|
126
|
50
|
|
|
|
273
|
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
|
126
|
|
|
|
|
321
|
push @item, $item{__STRING1__}=$current_match; |
3943
|
|
|
|
|
|
|
|
3944
|
|
|
|
|
|
|
|
3945
|
|
|
|
|
|
|
|
3946
|
|
|
|
|
|
|
|
3947
|
126
|
50
|
|
|
|
253
|
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
|
126
|
|
|
|
|
173
|
$_tok = do { my $oldskip = $skip; $skip= qr//; $oldskip }; |
|
126
|
|
|
|
|
208
|
|
|
126
|
|
|
|
|
509
|
|
|
126
|
|
|
|
|
276
|
|
3953
|
126
|
50
|
|
|
|
273
|
if (defined($_tok)) |
3954
|
|
|
|
|
|
|
{ |
3955
|
126
|
50
|
|
|
|
270
|
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
|
126
|
50
|
|
|
|
291
|
last unless defined $_tok; |
3968
|
126
|
|
|
|
|
253
|
push @item, $item{__DIRECTIVE1__}=$_tok; |
3969
|
|
|
|
|
|
|
|
3970
|
|
|
|
|
|
|
|
3971
|
126
|
50
|
|
|
|
268
|
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
|
4
|
|
|
4
|
|
36
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
2500
|
|
|
126
|
|
|
|
|
182
|
|
3977
|
126
|
|
|
|
|
305
|
$expectation->is(q{PVALUE})->at($text); |
3978
|
126
|
50
|
|
126
|
|
632
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PVALUE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
126
|
|
|
|
|
270
|
|
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
|
126
|
50
|
|
|
|
422
|
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
|
126
|
|
|
|
|
271
|
$item{q{PVALUE}} = $_tok; |
3997
|
126
|
|
|
|
|
233
|
push @item, $_tok; |
3998
|
|
|
|
|
|
|
|
3999
|
|
|
|
|
|
|
} |
4000
|
|
|
|
|
|
|
|
4001
|
126
|
50
|
|
|
|
274
|
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
|
126
|
50
|
|
|
|
247
|
$_tok = ($_noactions) ? 0 : do {$return = $item{PNAME}.'='.$item{PVALUE}}; |
|
126
|
|
|
|
|
353
|
|
4009
|
126
|
50
|
|
|
|
280
|
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
|
126
|
50
|
|
|
|
256
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
4016
|
|
|
|
|
|
|
. $_tok . q{])}, |
4017
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4018
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4019
|
126
|
|
|
|
|
216
|
push @item, $_tok; |
4020
|
126
|
|
|
|
|
254
|
$item{__ACTION1__}=$_tok; |
4021
|
|
|
|
|
|
|
|
4022
|
|
|
|
|
|
|
|
4023
|
126
|
50
|
|
|
|
297
|
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
|
126
|
|
|
|
|
190
|
$_matched = 1; |
4032
|
126
|
|
|
|
|
372
|
last; |
4033
|
|
|
|
|
|
|
} |
4034
|
|
|
|
|
|
|
|
4035
|
|
|
|
|
|
|
|
4036
|
380
|
100
|
66
|
|
|
1407
|
unless ( $_matched || defined($score) ) |
4037
|
|
|
|
|
|
|
{ |
4038
|
|
|
|
|
|
|
|
4039
|
|
|
|
|
|
|
|
4040
|
254
|
|
|
|
|
484
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
4041
|
254
|
50
|
|
|
|
483
|
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
|
254
|
|
|
|
|
1247
|
return undef; |
4047
|
|
|
|
|
|
|
} |
4048
|
126
|
50
|
33
|
|
|
306
|
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
|
126
|
|
|
|
|
206
|
splice @{$thisparser->{errors}}, $err_at; |
|
126
|
|
|
|
|
246
|
|
4057
|
126
|
50
|
|
|
|
273
|
$return = $item[$#item] unless defined $return; |
4058
|
126
|
50
|
|
|
|
242
|
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
|
126
|
|
|
|
|
260
|
$_[1] = $text; |
4071
|
126
|
|
|
|
|
742
|
return $return; |
4072
|
|
|
|
|
|
|
} |
4073
|
|
|
|
|
|
|
|
4074
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
4075
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::LINE |
4076
|
|
|
|
|
|
|
{ |
4077
|
134
|
|
|
134
|
|
257
|
my $thisparser = $_[0]; |
4078
|
4
|
|
|
4
|
|
40
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
1500
|
|
4079
|
134
|
|
50
|
|
|
351
|
local $tracelevel = ($tracelevel||0)+1; |
4080
|
134
|
|
|
|
|
250
|
$ERRORS = 0; |
4081
|
134
|
|
|
|
|
306
|
my $thisrule = $thisparser->{"rules"}{"LINE"}; |
4082
|
|
|
|
|
|
|
|
4083
|
134
|
50
|
|
|
|
313
|
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
|
134
|
|
|
|
|
200
|
my $err_at = @{$thisparser->{errors}}; |
|
134
|
|
|
|
|
252
|
|
4091
|
|
|
|
|
|
|
|
4092
|
134
|
|
|
|
|
427
|
my $score; |
4093
|
|
|
|
|
|
|
my $score_return; |
4094
|
134
|
|
|
|
|
0
|
my $_tok; |
4095
|
134
|
|
|
|
|
188
|
my $return = undef; |
4096
|
134
|
|
|
|
|
225
|
my $_matched=0; |
4097
|
134
|
|
|
|
|
188
|
my $commit=0; |
4098
|
134
|
|
|
|
|
217
|
my @item = (); |
4099
|
134
|
|
|
|
|
214
|
my %item = (); |
4100
|
134
|
|
|
|
|
559
|
my $repeating = $_[2]; |
4101
|
134
|
|
|
|
|
216
|
my $_noactions = $_[3]; |
4102
|
134
|
50
|
|
|
|
282
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
134
|
|
|
|
|
222
|
|
|
134
|
|
|
|
|
249
|
|
4103
|
134
|
|
|
|
|
215
|
my $_itempos = $_[5]; |
4104
|
134
|
100
|
|
|
|
365
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
4105
|
134
|
|
|
|
|
324
|
my $text; |
4106
|
|
|
|
|
|
|
my $lastsep; |
4107
|
134
|
|
|
|
|
0
|
my $current_match; |
4108
|
134
|
|
|
|
|
355
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{BLOCK, or COMMENT}); |
4109
|
134
|
|
|
|
|
365
|
$expectation->at($_[1]); |
4110
|
|
|
|
|
|
|
|
4111
|
134
|
|
|
|
|
190
|
my $thisline; |
4112
|
134
|
|
|
|
|
426
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
4113
|
|
|
|
|
|
|
|
4114
|
|
|
|
|
|
|
|
4115
|
|
|
|
|
|
|
|
4116
|
134
|
|
33
|
|
|
566
|
while (!$_matched && !$commit) |
4117
|
|
|
|
|
|
|
{ |
4118
|
|
|
|
|
|
|
|
4119
|
134
|
50
|
|
|
|
280
|
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
|
134
|
|
|
|
|
291
|
my $thisprod = $thisrule->{"prods"}[0]; |
4125
|
134
|
|
|
|
|
252
|
$text = $_[1]; |
4126
|
134
|
|
|
|
|
203
|
my $_savetext; |
4127
|
134
|
|
|
|
|
271
|
@item = (q{LINE}); |
4128
|
134
|
|
|
|
|
290
|
%item = (__RULE__ => q{LINE}); |
4129
|
134
|
|
|
|
|
202
|
my $repcount = 0; |
4130
|
|
|
|
|
|
|
|
4131
|
|
|
|
|
|
|
|
4132
|
134
|
50
|
|
|
|
291
|
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
|
4
|
|
|
4
|
|
35
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
815
|
|
|
134
|
|
|
|
|
209
|
|
4138
|
134
|
|
|
|
|
404
|
$expectation->is(q{})->at($text); |
4139
|
134
|
100
|
|
134
|
|
598
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BLOCK($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
134
|
|
|
|
|
284
|
|
4140
|
|
|
|
|
|
|
{ |
4141
|
|
|
|
|
|
|
|
4142
|
63
|
50
|
|
|
|
146
|
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
|
63
|
|
|
|
|
160
|
$expectation->failed(); |
4148
|
63
|
|
|
|
|
114
|
last; |
4149
|
|
|
|
|
|
|
} |
4150
|
71
|
50
|
|
|
|
586
|
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
|
71
|
|
|
|
|
163
|
$item{q{BLOCK}} = $_tok; |
4158
|
71
|
|
|
|
|
123
|
push @item, $_tok; |
4159
|
|
|
|
|
|
|
|
4160
|
|
|
|
|
|
|
} |
4161
|
|
|
|
|
|
|
|
4162
|
71
|
50
|
|
|
|
205
|
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
|
4
|
|
|
4
|
|
40
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
16
|
|
|
4
|
|
|
|
|
1682
|
|
|
71
|
|
|
|
|
105
|
|
4168
|
71
|
|
|
|
|
198
|
$expectation->is(q{COMMENT})->at($text); |
4169
|
71
|
100
|
|
71
|
|
357
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::COMMENT($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
71
|
|
|
|
|
167
|
|
4170
|
|
|
|
|
|
|
{ |
4171
|
|
|
|
|
|
|
|
4172
|
61
|
50
|
|
|
|
142
|
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
|
61
|
|
|
|
|
164
|
$expectation->failed(); |
4178
|
61
|
|
|
|
|
114
|
last; |
4179
|
|
|
|
|
|
|
} |
4180
|
10
|
50
|
|
|
|
42
|
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
|
|
|
|
|
25
|
$item{q{COMMENT}} = $_tok; |
4188
|
10
|
|
|
|
|
20
|
push @item, $_tok; |
4189
|
|
|
|
|
|
|
|
4190
|
|
|
|
|
|
|
} |
4191
|
|
|
|
|
|
|
|
4192
|
10
|
50
|
|
|
|
29
|
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
|
|
|
|
27
|
$_tok = ($_noactions) ? 0 : do {$return = [@{$item{BLOCK}}]}; |
|
10
|
|
|
|
|
18
|
|
|
10
|
|
|
|
|
30
|
|
4200
|
10
|
50
|
|
|
|
36
|
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
|
|
|
|
35
|
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
|
|
|
|
|
17
|
push @item, $_tok; |
4211
|
10
|
|
|
|
|
26
|
$item{__ACTION1__}=$_tok; |
4212
|
|
|
|
|
|
|
|
4213
|
|
|
|
|
|
|
|
4214
|
10
|
50
|
|
|
|
28
|
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
|
|
|
|
|
24
|
last; |
4224
|
|
|
|
|
|
|
} |
4225
|
|
|
|
|
|
|
|
4226
|
|
|
|
|
|
|
|
4227
|
134
|
|
66
|
|
|
604
|
while (!$_matched && !$commit) |
4228
|
|
|
|
|
|
|
{ |
4229
|
|
|
|
|
|
|
|
4230
|
124
|
50
|
|
|
|
300
|
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
|
124
|
|
|
|
|
269
|
my $thisprod = $thisrule->{"prods"}[1]; |
4236
|
124
|
|
|
|
|
225
|
$text = $_[1]; |
4237
|
124
|
|
|
|
|
210
|
my $_savetext; |
4238
|
124
|
|
|
|
|
285
|
@item = (q{LINE}); |
4239
|
124
|
|
|
|
|
354
|
%item = (__RULE__ => q{LINE}); |
4240
|
124
|
|
|
|
|
224
|
my $repcount = 0; |
4241
|
|
|
|
|
|
|
|
4242
|
|
|
|
|
|
|
|
4243
|
124
|
50
|
|
|
|
271
|
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
|
4
|
|
|
4
|
|
49
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
1520
|
|
|
124
|
|
|
|
|
192
|
|
4249
|
124
|
|
|
|
|
282
|
$expectation->is(q{})->at($text); |
4250
|
124
|
100
|
|
124
|
|
602
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BLOCK($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
124
|
|
|
|
|
266
|
|
4251
|
|
|
|
|
|
|
{ |
4252
|
|
|
|
|
|
|
|
4253
|
63
|
50
|
|
|
|
149
|
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
|
63
|
|
|
|
|
167
|
$expectation->failed(); |
4259
|
63
|
|
|
|
|
110
|
last; |
4260
|
|
|
|
|
|
|
} |
4261
|
61
|
50
|
|
|
|
197
|
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
|
61
|
|
|
|
|
132
|
$item{q{BLOCK}} = $_tok; |
4269
|
61
|
|
|
|
|
109
|
push @item, $_tok; |
4270
|
|
|
|
|
|
|
|
4271
|
|
|
|
|
|
|
} |
4272
|
|
|
|
|
|
|
|
4273
|
61
|
50
|
|
|
|
144
|
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
|
61
|
50
|
|
|
|
136
|
$_tok = ($_noactions) ? 0 : do {$return = [@{$item{BLOCK}}]}; |
|
61
|
|
|
|
|
98
|
|
|
61
|
|
|
|
|
168
|
|
4281
|
61
|
50
|
|
|
|
140
|
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
|
61
|
50
|
|
|
|
136
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
4288
|
|
|
|
|
|
|
. $_tok . q{])}, |
4289
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4290
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4291
|
61
|
|
|
|
|
111
|
push @item, $_tok; |
4292
|
61
|
|
|
|
|
115
|
$item{__ACTION1__}=$_tok; |
4293
|
|
|
|
|
|
|
|
4294
|
|
|
|
|
|
|
|
4295
|
61
|
50
|
|
|
|
127
|
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
|
61
|
|
|
|
|
104
|
$_matched = 1; |
4304
|
61
|
|
|
|
|
105
|
last; |
4305
|
|
|
|
|
|
|
} |
4306
|
|
|
|
|
|
|
|
4307
|
|
|
|
|
|
|
|
4308
|
134
|
|
66
|
|
|
468
|
while (!$_matched && !$commit) |
4309
|
|
|
|
|
|
|
{ |
4310
|
|
|
|
|
|
|
|
4311
|
63
|
50
|
|
|
|
145
|
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
|
63
|
|
|
|
|
149
|
my $thisprod = $thisrule->{"prods"}[2]; |
4317
|
63
|
|
|
|
|
118
|
$text = $_[1]; |
4318
|
63
|
|
|
|
|
97
|
my $_savetext; |
4319
|
63
|
|
|
|
|
179
|
@item = (q{LINE}); |
4320
|
63
|
|
|
|
|
148
|
%item = (__RULE__ => q{LINE}); |
4321
|
63
|
|
|
|
|
107
|
my $repcount = 0; |
4322
|
|
|
|
|
|
|
|
4323
|
|
|
|
|
|
|
|
4324
|
63
|
50
|
|
|
|
157
|
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
|
4
|
|
|
4
|
|
36
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
2680
|
|
|
63
|
|
|
|
|
99
|
|
4330
|
63
|
|
|
|
|
147
|
$expectation->is(q{})->at($text); |
4331
|
63
|
100
|
|
63
|
|
334
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::COMMENT($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
63
|
|
|
|
|
145
|
|
4332
|
|
|
|
|
|
|
{ |
4333
|
|
|
|
|
|
|
|
4334
|
52
|
50
|
|
|
|
297
|
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
|
52
|
|
|
|
|
154
|
$expectation->failed(); |
4340
|
52
|
|
|
|
|
88
|
last; |
4341
|
|
|
|
|
|
|
} |
4342
|
11
|
50
|
|
|
|
44
|
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
|
|
|
|
|
23
|
$item{q{COMMENT}} = $_tok; |
4350
|
11
|
|
|
|
|
23
|
push @item, $_tok; |
4351
|
|
|
|
|
|
|
|
4352
|
|
|
|
|
|
|
} |
4353
|
|
|
|
|
|
|
|
4354
|
11
|
50
|
|
|
|
25
|
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
|
|
|
|
24
|
$_tok = ($_noactions) ? 0 : do {$return = []}; |
|
11
|
|
|
|
|
28
|
|
4362
|
11
|
50
|
|
|
|
27
|
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
|
|
|
|
25
|
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
|
|
|
|
|
20
|
push @item, $_tok; |
4373
|
11
|
|
|
|
|
22
|
$item{__ACTION1__}=$_tok; |
4374
|
|
|
|
|
|
|
|
4375
|
|
|
|
|
|
|
|
4376
|
11
|
50
|
|
|
|
23
|
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
|
|
|
|
|
20
|
last; |
4386
|
|
|
|
|
|
|
} |
4387
|
|
|
|
|
|
|
|
4388
|
|
|
|
|
|
|
|
4389
|
134
|
100
|
66
|
|
|
466
|
unless ( $_matched || defined($score) ) |
4390
|
|
|
|
|
|
|
{ |
4391
|
|
|
|
|
|
|
|
4392
|
|
|
|
|
|
|
|
4393
|
52
|
|
|
|
|
113
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
4394
|
52
|
50
|
|
|
|
132
|
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
|
52
|
|
|
|
|
289
|
return undef; |
4400
|
|
|
|
|
|
|
} |
4401
|
82
|
50
|
33
|
|
|
217
|
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
|
82
|
|
|
|
|
126
|
splice @{$thisparser->{errors}}, $err_at; |
|
82
|
|
|
|
|
178
|
|
4410
|
82
|
50
|
|
|
|
185
|
$return = $item[$#item] unless defined $return; |
4411
|
82
|
50
|
|
|
|
192
|
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
|
82
|
|
|
|
|
162
|
$_[1] = $text; |
4424
|
82
|
|
|
|
|
500
|
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
|
4
|
|
|
4
|
|
37
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
20
|
|
|
4
|
|
|
|
|
3321
|
|
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
|
624
|
|
|
624
|
|
1042
|
my $thisparser = $_[0]; |
4567
|
4
|
|
|
4
|
|
35
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
2324
|
|
4568
|
624
|
|
50
|
|
|
1567
|
local $tracelevel = ($tracelevel||0)+1; |
4569
|
624
|
|
|
|
|
944
|
$ERRORS = 0; |
4570
|
624
|
|
|
|
|
1223
|
my $thisrule = $thisparser->{"rules"}{"BNAME"}; |
4571
|
|
|
|
|
|
|
|
4572
|
624
|
50
|
|
|
|
1312
|
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
|
624
|
|
|
|
|
834
|
my $err_at = @{$thisparser->{errors}}; |
|
624
|
|
|
|
|
1154
|
|
4580
|
|
|
|
|
|
|
|
4581
|
624
|
|
|
|
|
1452
|
my $score; |
4582
|
|
|
|
|
|
|
my $score_return; |
4583
|
624
|
|
|
|
|
0
|
my $_tok; |
4584
|
624
|
|
|
|
|
889
|
my $return = undef; |
4585
|
624
|
|
|
|
|
896
|
my $_matched=0; |
4586
|
624
|
|
|
|
|
875
|
my $commit=0; |
4587
|
624
|
|
|
|
|
1028
|
my @item = (); |
4588
|
624
|
|
|
|
|
1003
|
my %item = (); |
4589
|
624
|
|
|
|
|
909
|
my $repeating = $_[2]; |
4590
|
624
|
|
|
|
|
910
|
my $_noactions = $_[3]; |
4591
|
624
|
50
|
|
|
|
1228
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
624
|
|
|
|
|
850
|
|
|
624
|
|
|
|
|
1113
|
|
4592
|
624
|
|
|
|
|
1032
|
my $_itempos = $_[5]; |
4593
|
624
|
100
|
|
|
|
1514
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
4594
|
624
|
|
|
|
|
1430
|
my $text; |
4595
|
|
|
|
|
|
|
my $lastsep; |
4596
|
624
|
|
|
|
|
0
|
my $current_match; |
4597
|
624
|
|
|
|
|
1377
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/[A-Z]\\w*::/, or /[A-Z]\\w*/}); |
4598
|
624
|
|
|
|
|
1604
|
$expectation->at($_[1]); |
4599
|
|
|
|
|
|
|
|
4600
|
624
|
|
|
|
|
836
|
my $thisline; |
4601
|
624
|
|
|
|
|
1876
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
4602
|
|
|
|
|
|
|
|
4603
|
|
|
|
|
|
|
|
4604
|
|
|
|
|
|
|
|
4605
|
624
|
|
33
|
|
|
2374
|
while (!$_matched && !$commit) |
4606
|
|
|
|
|
|
|
{ |
4607
|
|
|
|
|
|
|
|
4608
|
624
|
50
|
|
|
|
1321
|
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
|
624
|
|
|
|
|
1226
|
my $thisprod = $thisrule->{"prods"}[0]; |
4614
|
624
|
|
|
|
|
1137
|
$text = $_[1]; |
4615
|
624
|
|
|
|
|
906
|
my $_savetext; |
4616
|
624
|
|
|
|
|
1116
|
@item = (q{BNAME}); |
4617
|
624
|
|
|
|
|
1159
|
%item = (__RULE__ => q{BNAME}); |
4618
|
624
|
|
|
|
|
909
|
my $repcount = 0; |
4619
|
|
|
|
|
|
|
|
4620
|
|
|
|
|
|
|
|
4621
|
624
|
50
|
|
|
|
1302
|
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
|
624
|
|
|
|
|
1089
|
undef $lastsep; |
4626
|
624
|
|
|
|
|
1349
|
$expectation->is(q{})->at($text); |
4627
|
|
|
|
|
|
|
|
4628
|
|
|
|
|
|
|
|
4629
|
624
|
100
|
66
|
|
|
3622
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[A-Z]\w*::)/) |
|
624
|
100
|
|
|
|
5058
|
|
4630
|
|
|
|
|
|
|
{ |
4631
|
444
|
50
|
|
|
|
1350
|
$text = $lastsep . $text if defined $lastsep; |
4632
|
444
|
|
|
|
|
1237
|
$expectation->failed(); |
4633
|
444
|
50
|
|
|
|
843
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
4634
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4635
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4636
|
|
|
|
|
|
|
|
4637
|
444
|
|
|
|
|
1036
|
last; |
4638
|
|
|
|
|
|
|
} |
4639
|
180
|
|
|
|
|
1019
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
4640
|
180
|
|
|
|
|
617
|
substr($text,0,length($current_match),q{}); |
4641
|
180
|
50
|
|
|
|
438
|
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
|
180
|
|
|
|
|
473
|
push @item, $item{__PATTERN1__}=$current_match; |
4646
|
|
|
|
|
|
|
|
4647
|
|
|
|
|
|
|
|
4648
|
180
|
50
|
|
|
|
396
|
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
|
4
|
|
|
4
|
|
35
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
3920
|
|
|
180
|
|
|
|
|
274
|
|
4654
|
180
|
|
|
|
|
397
|
$expectation->is(q{BNAME})->at($text); |
4655
|
180
|
50
|
|
180
|
|
854
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
180
|
|
|
|
|
413
|
|
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
|
180
|
50
|
|
|
|
640
|
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
|
180
|
|
|
|
|
370
|
$item{q{BNAME}} = $_tok; |
4674
|
180
|
|
|
|
|
316
|
push @item, $_tok; |
4675
|
|
|
|
|
|
|
|
4676
|
|
|
|
|
|
|
} |
4677
|
|
|
|
|
|
|
|
4678
|
180
|
50
|
|
|
|
384
|
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
|
180
|
50
|
|
|
|
338
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1].$item[2]}; |
|
180
|
|
|
|
|
427
|
|
4686
|
180
|
50
|
|
|
|
432
|
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
|
180
|
50
|
|
|
|
347
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
4693
|
|
|
|
|
|
|
. $_tok . q{])}, |
4694
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4695
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4696
|
180
|
|
|
|
|
302
|
push @item, $_tok; |
4697
|
180
|
|
|
|
|
313
|
$item{__ACTION1__}=$_tok; |
4698
|
|
|
|
|
|
|
|
4699
|
|
|
|
|
|
|
|
4700
|
180
|
50
|
|
|
|
355
|
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
|
180
|
|
|
|
|
251
|
$_matched = 1; |
4709
|
180
|
|
|
|
|
310
|
last; |
4710
|
|
|
|
|
|
|
} |
4711
|
|
|
|
|
|
|
|
4712
|
|
|
|
|
|
|
|
4713
|
624
|
|
66
|
|
|
1845
|
while (!$_matched && !$commit) |
4714
|
|
|
|
|
|
|
{ |
4715
|
|
|
|
|
|
|
|
4716
|
444
|
50
|
|
|
|
918
|
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
|
444
|
|
|
|
|
836
|
my $thisprod = $thisrule->{"prods"}[1]; |
4722
|
444
|
|
|
|
|
770
|
$text = $_[1]; |
4723
|
444
|
|
|
|
|
655
|
my $_savetext; |
4724
|
444
|
|
|
|
|
889
|
@item = (q{BNAME}); |
4725
|
444
|
|
|
|
|
922
|
%item = (__RULE__ => q{BNAME}); |
4726
|
444
|
|
|
|
|
729
|
my $repcount = 0; |
4727
|
|
|
|
|
|
|
|
4728
|
|
|
|
|
|
|
|
4729
|
444
|
50
|
|
|
|
847
|
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
|
444
|
|
|
|
|
735
|
undef $lastsep; |
4734
|
444
|
|
|
|
|
925
|
$expectation->is(q{})->at($text); |
4735
|
|
|
|
|
|
|
|
4736
|
|
|
|
|
|
|
|
4737
|
444
|
100
|
66
|
|
|
1910
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[A-Z]\w*)/) |
|
444
|
100
|
|
|
|
2952
|
|
4738
|
|
|
|
|
|
|
{ |
4739
|
252
|
50
|
|
|
|
743
|
$text = $lastsep . $text if defined $lastsep; |
4740
|
252
|
|
|
|
|
678
|
$expectation->failed(); |
4741
|
252
|
50
|
|
|
|
516
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
4742
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4743
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4744
|
|
|
|
|
|
|
|
4745
|
252
|
|
|
|
|
516
|
last; |
4746
|
|
|
|
|
|
|
} |
4747
|
192
|
|
|
|
|
977
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
4748
|
192
|
|
|
|
|
588
|
substr($text,0,length($current_match),q{}); |
4749
|
192
|
50
|
|
|
|
407
|
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
|
192
|
|
|
|
|
501
|
push @item, $item{__PATTERN1__}=$current_match; |
4754
|
|
|
|
|
|
|
|
4755
|
|
|
|
|
|
|
|
4756
|
192
|
50
|
|
|
|
391
|
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
|
192
|
50
|
|
|
|
388
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1]}; |
|
192
|
|
|
|
|
389
|
|
4764
|
192
|
50
|
|
|
|
423
|
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
|
192
|
50
|
|
|
|
382
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
4771
|
|
|
|
|
|
|
. $_tok . q{])}, |
4772
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4773
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4774
|
192
|
|
|
|
|
311
|
push @item, $_tok; |
4775
|
192
|
|
|
|
|
402
|
$item{__ACTION1__}=$_tok; |
4776
|
|
|
|
|
|
|
|
4777
|
|
|
|
|
|
|
|
4778
|
192
|
50
|
|
|
|
398
|
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
|
192
|
|
|
|
|
300
|
$_matched = 1; |
4787
|
192
|
|
|
|
|
378
|
last; |
4788
|
|
|
|
|
|
|
} |
4789
|
|
|
|
|
|
|
|
4790
|
|
|
|
|
|
|
|
4791
|
624
|
100
|
66
|
|
|
1678
|
unless ( $_matched || defined($score) ) |
4792
|
|
|
|
|
|
|
{ |
4793
|
|
|
|
|
|
|
|
4794
|
|
|
|
|
|
|
|
4795
|
252
|
|
|
|
|
514
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
4796
|
252
|
50
|
|
|
|
678
|
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
|
252
|
|
|
|
|
1281
|
return undef; |
4802
|
|
|
|
|
|
|
} |
4803
|
372
|
50
|
33
|
|
|
890
|
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
|
372
|
|
|
|
|
506
|
splice @{$thisparser->{errors}}, $err_at; |
|
372
|
|
|
|
|
765
|
|
4812
|
372
|
50
|
|
|
|
814
|
$return = $item[$#item] unless defined $return; |
4813
|
372
|
50
|
|
|
|
661
|
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
|
372
|
|
|
|
|
735
|
$_[1] = $text; |
4826
|
372
|
|
|
|
|
2072
|
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
|
|
23
|
my $thisparser = $_[0]; |
4833
|
4
|
|
|
4
|
|
37
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
3810
|
|
4834
|
16
|
|
50
|
|
|
40
|
local $tracelevel = ($tracelevel||0)+1; |
4835
|
16
|
|
|
|
|
26
|
$ERRORS = 0; |
4836
|
16
|
|
|
|
|
33
|
my $thisrule = $thisparser->{"rules"}{"SLASHEDDQUOTE"}; |
4837
|
|
|
|
|
|
|
|
4838
|
16
|
50
|
|
|
|
32
|
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
|
|
|
|
|
20
|
my $err_at = @{$thisparser->{errors}}; |
|
16
|
|
|
|
|
30
|
|
4846
|
|
|
|
|
|
|
|
4847
|
16
|
|
|
|
|
38
|
my $score; |
4848
|
|
|
|
|
|
|
my $score_return; |
4849
|
16
|
|
|
|
|
0
|
my $_tok; |
4850
|
16
|
|
|
|
|
20
|
my $return = undef; |
4851
|
16
|
|
|
|
|
24
|
my $_matched=0; |
4852
|
16
|
|
|
|
|
24
|
my $commit=0; |
4853
|
16
|
|
|
|
|
27
|
my @item = (); |
4854
|
16
|
|
|
|
|
24
|
my %item = (); |
4855
|
16
|
|
|
|
|
23
|
my $repeating = $_[2]; |
4856
|
16
|
|
|
|
|
25
|
my $_noactions = $_[3]; |
4857
|
16
|
50
|
|
|
|
32
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
16
|
|
|
|
|
24
|
|
|
16
|
|
|
|
|
29
|
|
4858
|
16
|
|
|
|
|
27
|
my $_itempos = $_[5]; |
4859
|
16
|
50
|
|
|
|
44
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
4860
|
16
|
|
|
|
|
48
|
my $text; |
4861
|
|
|
|
|
|
|
my $lastsep; |
4862
|
16
|
|
|
|
|
0
|
my $current_match; |
4863
|
16
|
|
|
|
|
39
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/\\\\"/}); |
4864
|
16
|
|
|
|
|
40
|
$expectation->at($_[1]); |
4865
|
|
|
|
|
|
|
|
4866
|
16
|
|
|
|
|
20
|
my $thisline; |
4867
|
16
|
|
|
|
|
56
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
4868
|
|
|
|
|
|
|
|
4869
|
|
|
|
|
|
|
|
4870
|
|
|
|
|
|
|
|
4871
|
16
|
|
33
|
|
|
64
|
while (!$_matched && !$commit) |
4872
|
|
|
|
|
|
|
{ |
4873
|
|
|
|
|
|
|
|
4874
|
16
|
50
|
|
|
|
31
|
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
|
|
|
|
|
35
|
my $thisprod = $thisrule->{"prods"}[0]; |
4880
|
16
|
|
|
|
|
27
|
$text = $_[1]; |
4881
|
16
|
|
|
|
|
26
|
my $_savetext; |
4882
|
16
|
|
|
|
|
29
|
@item = (q{SLASHEDDQUOTE}); |
4883
|
16
|
|
|
|
|
31
|
%item = (__RULE__ => q{SLASHEDDQUOTE}); |
4884
|
16
|
|
|
|
|
22
|
my $repcount = 0; |
4885
|
|
|
|
|
|
|
|
4886
|
|
|
|
|
|
|
|
4887
|
16
|
50
|
|
|
|
38
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/\\\\"/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
4888
|
|
|
|
|
|
|
q{SLASHEDDQUOTE}, |
4889
|
|
|
|
|
|
|
$tracelevel) |
4890
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4891
|
16
|
|
|
|
|
31
|
undef $lastsep; |
4892
|
16
|
|
|
|
|
38
|
$expectation->is(q{})->at($text); |
4893
|
|
|
|
|
|
|
|
4894
|
|
|
|
|
|
|
|
4895
|
16
|
50
|
66
|
|
|
95
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\\")/) |
|
16
|
100
|
|
|
|
118
|
|
4896
|
|
|
|
|
|
|
{ |
4897
|
8
|
50
|
|
|
|
23
|
$text = $lastsep . $text if defined $lastsep; |
4898
|
8
|
|
|
|
|
25
|
$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
|
|
|
|
|
17
|
last; |
4904
|
|
|
|
|
|
|
} |
4905
|
8
|
|
|
|
|
38
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
4906
|
8
|
|
|
|
|
27
|
substr($text,0,length($current_match),q{}); |
4907
|
8
|
50
|
|
|
|
19
|
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
|
|
|
|
|
20
|
push @item, $item{__PATTERN1__}=$current_match; |
4912
|
|
|
|
|
|
|
|
4913
|
|
|
|
|
|
|
|
4914
|
8
|
50
|
|
|
|
16
|
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
|
|
|
|
|
24
|
|
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
|
|
|
|
21
|
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
|
|
|
|
|
13
|
push @item, $_tok; |
4933
|
8
|
|
|
|
|
17
|
$item{__ACTION1__}=$_tok; |
4934
|
|
|
|
|
|
|
|
4935
|
|
|
|
|
|
|
|
4936
|
8
|
50
|
|
|
|
17
|
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
|
|
|
|
|
11
|
$_matched = 1; |
4945
|
8
|
|
|
|
|
29
|
last; |
4946
|
|
|
|
|
|
|
} |
4947
|
|
|
|
|
|
|
|
4948
|
|
|
|
|
|
|
|
4949
|
16
|
100
|
66
|
|
|
51
|
unless ( $_matched || defined($score) ) |
4950
|
|
|
|
|
|
|
{ |
4951
|
|
|
|
|
|
|
|
4952
|
|
|
|
|
|
|
|
4953
|
8
|
|
|
|
|
18
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
4954
|
8
|
50
|
|
|
|
18
|
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
|
|
|
|
|
41
|
return undef; |
4960
|
|
|
|
|
|
|
} |
4961
|
8
|
50
|
33
|
|
|
23
|
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
|
|
|
|
|
24
|
splice @{$thisparser->{errors}}, $err_at; |
|
8
|
|
|
|
|
19
|
|
4970
|
8
|
50
|
|
|
|
19
|
$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
|
|
|
|
|
16
|
$_[1] = $text; |
4984
|
8
|
|
|
|
|
45
|
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
|
|
39
|
my $thisparser = $_[0]; |
4991
|
4
|
|
|
4
|
|
55
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
3344
|
|
4992
|
24
|
|
50
|
|
|
68
|
local $tracelevel = ($tracelevel||0)+1; |
4993
|
24
|
|
|
|
|
37
|
$ERRORS = 0; |
4994
|
24
|
|
|
|
|
43
|
my $thisrule = $thisparser->{"rules"}{"NOTDQUOTE"}; |
4995
|
|
|
|
|
|
|
|
4996
|
24
|
50
|
|
|
|
49
|
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
|
|
|
|
|
32
|
my $err_at = @{$thisparser->{errors}}; |
|
24
|
|
|
|
|
39
|
|
5004
|
|
|
|
|
|
|
|
5005
|
24
|
|
|
|
|
56
|
my $score; |
5006
|
|
|
|
|
|
|
my $score_return; |
5007
|
24
|
|
|
|
|
0
|
my $_tok; |
5008
|
24
|
|
|
|
|
35
|
my $return = undef; |
5009
|
24
|
|
|
|
|
33
|
my $_matched=0; |
5010
|
24
|
|
|
|
|
33
|
my $commit=0; |
5011
|
24
|
|
|
|
|
83
|
my @item = (); |
5012
|
24
|
|
|
|
|
38
|
my %item = (); |
5013
|
24
|
|
|
|
|
34
|
my $repeating = $_[2]; |
5014
|
24
|
|
|
|
|
35
|
my $_noactions = $_[3]; |
5015
|
24
|
50
|
|
|
|
45
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
24
|
|
|
|
|
36
|
|
|
24
|
|
|
|
|
44
|
|
5016
|
24
|
|
|
|
|
36
|
my $_itempos = $_[5]; |
5017
|
24
|
50
|
|
|
|
69
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
5018
|
24
|
|
|
|
|
57
|
my $text; |
5019
|
|
|
|
|
|
|
my $lastsep; |
5020
|
24
|
|
|
|
|
0
|
my $current_match; |
5021
|
24
|
|
|
|
|
61
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/[^"]*[^"\\\\]/}); |
5022
|
24
|
|
|
|
|
66
|
$expectation->at($_[1]); |
5023
|
|
|
|
|
|
|
|
5024
|
24
|
|
|
|
|
33
|
my $thisline; |
5025
|
24
|
|
|
|
|
79
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
5026
|
|
|
|
|
|
|
|
5027
|
|
|
|
|
|
|
|
5028
|
|
|
|
|
|
|
|
5029
|
24
|
|
33
|
|
|
96
|
while (!$_matched && !$commit) |
5030
|
|
|
|
|
|
|
{ |
5031
|
|
|
|
|
|
|
|
5032
|
24
|
50
|
|
|
|
49
|
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
|
|
|
|
|
46
|
my $thisprod = $thisrule->{"prods"}[0]; |
5038
|
24
|
|
|
|
|
45
|
$text = $_[1]; |
5039
|
24
|
|
|
|
|
30
|
my $_savetext; |
5040
|
24
|
|
|
|
|
45
|
@item = (q{NOTDQUOTE}); |
5041
|
24
|
|
|
|
|
40
|
%item = (__RULE__ => q{NOTDQUOTE}); |
5042
|
24
|
|
|
|
|
38
|
my $repcount = 0; |
5043
|
|
|
|
|
|
|
|
5044
|
|
|
|
|
|
|
|
5045
|
24
|
50
|
|
|
|
45
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/[^"]*[^"\\\\]/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
5046
|
|
|
|
|
|
|
q{NOTDQUOTE}, |
5047
|
|
|
|
|
|
|
$tracelevel) |
5048
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5049
|
24
|
|
|
|
|
36
|
undef $lastsep; |
5050
|
24
|
|
|
|
|
55
|
$expectation->is(q{})->at($text); |
5051
|
|
|
|
|
|
|
|
5052
|
|
|
|
|
|
|
|
5053
|
24
|
50
|
33
|
|
|
151
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[^"]*[^"\\])/) |
|
24
|
50
|
|
|
|
208
|
|
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
|
|
|
|
|
143
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
5064
|
24
|
|
|
|
|
77
|
substr($text,0,length($current_match),q{}); |
5065
|
24
|
50
|
|
|
|
71
|
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
|
|
|
|
|
57
|
push @item, $item{__PATTERN1__}=$current_match; |
5070
|
|
|
|
|
|
|
|
5071
|
|
|
|
|
|
|
|
5072
|
24
|
50
|
|
|
|
44
|
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
|
|
|
|
|
44
|
$_matched = 1; |
5081
|
24
|
|
|
|
|
48
|
last; |
5082
|
|
|
|
|
|
|
} |
5083
|
|
|
|
|
|
|
|
5084
|
|
|
|
|
|
|
|
5085
|
24
|
50
|
33
|
|
|
52
|
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
|
|
|
79
|
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
|
|
|
|
|
32
|
splice @{$thisparser->{errors}}, $err_at; |
|
24
|
|
|
|
|
64
|
|
5106
|
24
|
50
|
|
|
|
62
|
$return = $item[$#item] unless defined $return; |
5107
|
24
|
50
|
|
|
|
47
|
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
|
|
|
|
|
42
|
$_[1] = $text; |
5120
|
24
|
|
|
|
|
163
|
return $return; |
5121
|
|
|
|
|
|
|
} |
5122
|
|
|
|
|
|
|
|
5123
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
5124
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::NOTSQUOTE |
5125
|
|
|
|
|
|
|
{ |
5126
|
152
|
|
|
152
|
|
265
|
my $thisparser = $_[0]; |
5127
|
4
|
|
|
4
|
|
37
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
3404
|
|
5128
|
152
|
|
50
|
|
|
390
|
local $tracelevel = ($tracelevel||0)+1; |
5129
|
152
|
|
|
|
|
224
|
$ERRORS = 0; |
5130
|
152
|
|
|
|
|
290
|
my $thisrule = $thisparser->{"rules"}{"NOTSQUOTE"}; |
5131
|
|
|
|
|
|
|
|
5132
|
152
|
50
|
|
|
|
317
|
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
|
152
|
|
|
|
|
193
|
my $err_at = @{$thisparser->{errors}}; |
|
152
|
|
|
|
|
272
|
|
5140
|
|
|
|
|
|
|
|
5141
|
152
|
|
|
|
|
339
|
my $score; |
5142
|
|
|
|
|
|
|
my $score_return; |
5143
|
152
|
|
|
|
|
0
|
my $_tok; |
5144
|
152
|
|
|
|
|
215
|
my $return = undef; |
5145
|
152
|
|
|
|
|
210
|
my $_matched=0; |
5146
|
152
|
|
|
|
|
214
|
my $commit=0; |
5147
|
152
|
|
|
|
|
283
|
my @item = (); |
5148
|
152
|
|
|
|
|
271
|
my %item = (); |
5149
|
152
|
|
|
|
|
216
|
my $repeating = $_[2]; |
5150
|
152
|
|
|
|
|
221
|
my $_noactions = $_[3]; |
5151
|
152
|
50
|
|
|
|
336
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
152
|
|
|
|
|
214
|
|
|
152
|
|
|
|
|
261
|
|
5152
|
152
|
|
|
|
|
252
|
my $_itempos = $_[5]; |
5153
|
152
|
100
|
|
|
|
382
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
5154
|
152
|
|
|
|
|
336
|
my $text; |
5155
|
|
|
|
|
|
|
my $lastsep; |
5156
|
152
|
|
|
|
|
0
|
my $current_match; |
5157
|
152
|
|
|
|
|
319
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/[^']*[^'\\\\]/}); |
5158
|
152
|
|
|
|
|
374
|
$expectation->at($_[1]); |
5159
|
|
|
|
|
|
|
|
5160
|
152
|
|
|
|
|
207
|
my $thisline; |
5161
|
152
|
|
|
|
|
396
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
5162
|
|
|
|
|
|
|
|
5163
|
|
|
|
|
|
|
|
5164
|
|
|
|
|
|
|
|
5165
|
152
|
|
33
|
|
|
569
|
while (!$_matched && !$commit) |
5166
|
|
|
|
|
|
|
{ |
5167
|
|
|
|
|
|
|
|
5168
|
152
|
50
|
|
|
|
336
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/[^']*[^'\\\\]/]}, |
5169
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5170
|
|
|
|
|
|
|
q{NOTSQUOTE}, |
5171
|
|
|
|
|
|
|
$tracelevel) |
5172
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5173
|
152
|
|
|
|
|
297
|
my $thisprod = $thisrule->{"prods"}[0]; |
5174
|
152
|
|
|
|
|
262
|
$text = $_[1]; |
5175
|
152
|
|
|
|
|
221
|
my $_savetext; |
5176
|
152
|
|
|
|
|
275
|
@item = (q{NOTSQUOTE}); |
5177
|
152
|
|
|
|
|
296
|
%item = (__RULE__ => q{NOTSQUOTE}); |
5178
|
152
|
|
|
|
|
210
|
my $repcount = 0; |
5179
|
|
|
|
|
|
|
|
5180
|
|
|
|
|
|
|
|
5181
|
152
|
50
|
|
|
|
281
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/[^']*[^'\\\\]/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
5182
|
|
|
|
|
|
|
q{NOTSQUOTE}, |
5183
|
|
|
|
|
|
|
$tracelevel) |
5184
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5185
|
152
|
|
|
|
|
273
|
undef $lastsep; |
5186
|
152
|
|
|
|
|
292
|
$expectation->is(q{})->at($text); |
5187
|
|
|
|
|
|
|
|
5188
|
|
|
|
|
|
|
|
5189
|
152
|
50
|
33
|
|
|
958
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[^']*[^'\\])/) |
|
152
|
50
|
|
|
|
1234
|
|
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
|
152
|
|
|
|
|
853
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
5200
|
152
|
|
|
|
|
465
|
substr($text,0,length($current_match),q{}); |
5201
|
152
|
50
|
|
|
|
327
|
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
|
152
|
|
|
|
|
390
|
push @item, $item{__PATTERN1__}=$current_match; |
5206
|
|
|
|
|
|
|
|
5207
|
|
|
|
|
|
|
|
5208
|
152
|
50
|
|
|
|
293
|
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
|
152
|
|
|
|
|
218
|
$_matched = 1; |
5217
|
152
|
|
|
|
|
312
|
last; |
5218
|
|
|
|
|
|
|
} |
5219
|
|
|
|
|
|
|
|
5220
|
|
|
|
|
|
|
|
5221
|
152
|
50
|
33
|
|
|
347
|
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
|
152
|
50
|
33
|
|
|
503
|
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
|
152
|
|
|
|
|
205
|
splice @{$thisparser->{errors}}, $err_at; |
|
152
|
|
|
|
|
343
|
|
5242
|
152
|
50
|
|
|
|
367
|
$return = $item[$#item] unless defined $return; |
5243
|
152
|
50
|
|
|
|
299
|
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
|
152
|
|
|
|
|
275
|
$_[1] = $text; |
5256
|
152
|
|
|
|
|
855
|
return $return; |
5257
|
|
|
|
|
|
|
} |
5258
|
|
|
|
|
|
|
|
5259
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
5260
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::INCLUDE |
5261
|
|
|
|
|
|
|
{ |
5262
|
258
|
|
|
258
|
|
444
|
my $thisparser = $_[0]; |
5263
|
4
|
|
|
4
|
|
36
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
5582
|
|
5264
|
258
|
|
50
|
|
|
610
|
local $tracelevel = ($tracelevel||0)+1; |
5265
|
258
|
|
|
|
|
485
|
$ERRORS = 0; |
5266
|
258
|
|
|
|
|
515
|
my $thisrule = $thisparser->{"rules"}{"INCLUDE"}; |
5267
|
|
|
|
|
|
|
|
5268
|
258
|
50
|
|
|
|
520
|
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
|
258
|
|
|
|
|
361
|
my $err_at = @{$thisparser->{errors}}; |
|
258
|
|
|
|
|
475
|
|
5276
|
|
|
|
|
|
|
|
5277
|
258
|
|
|
|
|
612
|
my $score; |
5278
|
|
|
|
|
|
|
my $score_return; |
5279
|
258
|
|
|
|
|
0
|
my $_tok; |
5280
|
258
|
|
|
|
|
468
|
my $return = undef; |
5281
|
258
|
|
|
|
|
382
|
my $_matched=0; |
5282
|
258
|
|
|
|
|
393
|
my $commit=0; |
5283
|
258
|
|
|
|
|
412
|
my @item = (); |
5284
|
258
|
|
|
|
|
419
|
my %item = (); |
5285
|
258
|
|
|
|
|
413
|
my $repeating = $_[2]; |
5286
|
258
|
|
|
|
|
388
|
my $_noactions = $_[3]; |
5287
|
258
|
50
|
|
|
|
567
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
258
|
|
|
|
|
363
|
|
|
258
|
|
|
|
|
527
|
|
5288
|
258
|
|
|
|
|
444
|
my $_itempos = $_[5]; |
5289
|
258
|
100
|
|
|
|
668
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
5290
|
258
|
|
|
|
|
613
|
my $text; |
5291
|
|
|
|
|
|
|
my $lastsep; |
5292
|
258
|
|
|
|
|
0
|
my $current_match; |
5293
|
258
|
|
|
|
|
595
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/\\/\\S+\\.scen/, or /[^\\/#]\\S+\\.scen/}); |
5294
|
258
|
|
|
|
|
645
|
$expectation->at($_[1]); |
5295
|
|
|
|
|
|
|
|
5296
|
258
|
|
|
|
|
363
|
my $thisline; |
5297
|
258
|
|
|
|
|
701
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
5298
|
|
|
|
|
|
|
|
5299
|
|
|
|
|
|
|
|
5300
|
|
|
|
|
|
|
|
5301
|
258
|
|
33
|
|
|
960
|
while (!$_matched && !$commit) |
5302
|
|
|
|
|
|
|
{ |
5303
|
|
|
|
|
|
|
|
5304
|
258
|
50
|
|
|
|
526
|
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
|
258
|
|
|
|
|
506
|
my $thisprod = $thisrule->{"prods"}[0]; |
5310
|
258
|
|
|
|
|
428
|
$text = $_[1]; |
5311
|
258
|
|
|
|
|
346
|
my $_savetext; |
5312
|
258
|
|
|
|
|
568
|
@item = (q{INCLUDE}); |
5313
|
258
|
|
|
|
|
503
|
%item = (__RULE__ => q{INCLUDE}); |
5314
|
258
|
|
|
|
|
409
|
my $repcount = 0; |
5315
|
|
|
|
|
|
|
|
5316
|
|
|
|
|
|
|
|
5317
|
258
|
50
|
|
|
|
524
|
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
|
258
|
|
|
|
|
455
|
undef $lastsep; |
5322
|
258
|
|
|
|
|
532
|
$expectation->is(q{})->at($text); |
5323
|
|
|
|
|
|
|
|
5324
|
|
|
|
|
|
|
|
5325
|
258
|
100
|
33
|
|
|
1791
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\/\S+\.scen)/) |
|
258
|
50
|
|
|
|
2144
|
|
5326
|
|
|
|
|
|
|
{ |
5327
|
258
|
50
|
|
|
|
781
|
$text = $lastsep . $text if defined $lastsep; |
5328
|
258
|
|
|
|
|
764
|
$expectation->failed(); |
5329
|
258
|
50
|
|
|
|
537
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
5330
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5331
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5332
|
|
|
|
|
|
|
|
5333
|
258
|
|
|
|
|
553
|
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
|
258
|
|
33
|
|
|
922
|
while (!$_matched && !$commit) |
5380
|
|
|
|
|
|
|
{ |
5381
|
|
|
|
|
|
|
|
5382
|
258
|
50
|
|
|
|
516
|
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
|
258
|
|
|
|
|
562
|
my $thisprod = $thisrule->{"prods"}[1]; |
5388
|
258
|
|
|
|
|
460
|
$text = $_[1]; |
5389
|
258
|
|
|
|
|
359
|
my $_savetext; |
5390
|
258
|
|
|
|
|
584
|
@item = (q{INCLUDE}); |
5391
|
258
|
|
|
|
|
570
|
%item = (__RULE__ => q{INCLUDE}); |
5392
|
258
|
|
|
|
|
425
|
my $repcount = 0; |
5393
|
|
|
|
|
|
|
|
5394
|
|
|
|
|
|
|
|
5395
|
258
|
50
|
|
|
|
520
|
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
|
258
|
|
|
|
|
440
|
undef $lastsep; |
5400
|
258
|
|
|
|
|
502
|
$expectation->is(q{})->at($text); |
5401
|
|
|
|
|
|
|
|
5402
|
|
|
|
|
|
|
|
5403
|
258
|
100
|
66
|
|
|
1138
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[^\/#]\S+\.scen)/) |
|
258
|
100
|
|
|
|
1741
|
|
5404
|
|
|
|
|
|
|
{ |
5405
|
253
|
50
|
|
|
|
743
|
$text = $lastsep . $text if defined $lastsep; |
5406
|
253
|
|
|
|
|
718
|
$expectation->failed(); |
5407
|
253
|
50
|
|
|
|
501
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
5408
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5409
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5410
|
|
|
|
|
|
|
|
5411
|
253
|
|
|
|
|
497
|
last; |
5412
|
|
|
|
|
|
|
} |
5413
|
5
|
|
|
|
|
38
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
5414
|
5
|
|
|
|
|
22
|
substr($text,0,length($current_match),q{}); |
5415
|
5
|
50
|
|
|
|
21
|
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
|
5
|
|
|
|
|
17
|
push @item, $item{__PATTERN1__}=$current_match; |
5420
|
|
|
|
|
|
|
|
5421
|
|
|
|
|
|
|
|
5422
|
5
|
50
|
|
|
|
14
|
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
|
5
|
50
|
|
|
|
16
|
$_tok = ($_noactions) ? 0 : do { my $from_file = $arg[0]; |
|
5
|
|
|
|
|
12
|
|
5430
|
5
|
100
|
|
|
|
15
|
if (length $from_file) { |
5431
|
1
|
|
|
|
|
69
|
$return = dirname($from_file) . "/$item[1]"; |
5432
|
|
|
|
|
|
|
} else { |
5433
|
4
|
|
|
|
|
10
|
$return = "./$item[1]"; |
5434
|
|
|
|
|
|
|
} |
5435
|
|
|
|
|
|
|
}; |
5436
|
5
|
50
|
|
|
|
29
|
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
|
5
|
50
|
|
|
|
18
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
5443
|
|
|
|
|
|
|
. $_tok . q{])}, |
5444
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5445
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5446
|
5
|
|
|
|
|
16
|
push @item, $_tok; |
5447
|
5
|
|
|
|
|
12
|
$item{__ACTION1__}=$_tok; |
5448
|
|
|
|
|
|
|
|
5449
|
|
|
|
|
|
|
|
5450
|
5
|
50
|
|
|
|
15
|
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
|
5
|
|
|
|
|
10
|
$_matched = 1; |
5459
|
5
|
|
|
|
|
12
|
last; |
5460
|
|
|
|
|
|
|
} |
5461
|
|
|
|
|
|
|
|
5462
|
|
|
|
|
|
|
|
5463
|
258
|
100
|
66
|
|
|
891
|
unless ( $_matched || defined($score) ) |
5464
|
|
|
|
|
|
|
{ |
5465
|
|
|
|
|
|
|
|
5466
|
|
|
|
|
|
|
|
5467
|
253
|
|
|
|
|
490
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
5468
|
253
|
50
|
|
|
|
561
|
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
|
253
|
|
|
|
|
1422
|
return undef; |
5474
|
|
|
|
|
|
|
} |
5475
|
5
|
50
|
33
|
|
|
22
|
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
|
5
|
|
|
|
|
12
|
splice @{$thisparser->{errors}}, $err_at; |
|
5
|
|
|
|
|
14
|
|
5484
|
5
|
50
|
|
|
|
14
|
$return = $item[$#item] unless defined $return; |
5485
|
5
|
50
|
|
|
|
15
|
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
|
5
|
|
|
|
|
12
|
$_[1] = $text; |
5498
|
5
|
|
|
|
|
33
|
return $return; |
5499
|
|
|
|
|
|
|
} |
5500
|
|
|
|
|
|
|
|
5501
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
5502
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::EOF |
5503
|
|
|
|
|
|
|
{ |
5504
|
24
|
|
|
24
|
|
61
|
my $thisparser = $_[0]; |
5505
|
4
|
|
|
4
|
|
40
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
3355
|
|
5506
|
24
|
|
50
|
|
|
105
|
local $tracelevel = ($tracelevel||0)+1; |
5507
|
24
|
|
|
|
|
49
|
$ERRORS = 0; |
5508
|
24
|
|
|
|
|
74
|
my $thisrule = $thisparser->{"rules"}{"EOF"}; |
5509
|
|
|
|
|
|
|
|
5510
|
24
|
50
|
|
|
|
57
|
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
|
24
|
|
|
|
|
47
|
my $err_at = @{$thisparser->{errors}}; |
|
24
|
|
|
|
|
57
|
|
5518
|
|
|
|
|
|
|
|
5519
|
24
|
|
|
|
|
73
|
my $score; |
5520
|
|
|
|
|
|
|
my $score_return; |
5521
|
24
|
|
|
|
|
0
|
my $_tok; |
5522
|
24
|
|
|
|
|
48
|
my $return = undef; |
5523
|
24
|
|
|
|
|
40
|
my $_matched=0; |
5524
|
24
|
|
|
|
|
48
|
my $commit=0; |
5525
|
24
|
|
|
|
|
51
|
my @item = (); |
5526
|
24
|
|
|
|
|
41
|
my %item = (); |
5527
|
24
|
|
|
|
|
57
|
my $repeating = $_[2]; |
5528
|
24
|
|
|
|
|
45
|
my $_noactions = $_[3]; |
5529
|
24
|
50
|
|
|
|
65
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
24
|
|
|
|
|
46
|
|
|
24
|
|
|
|
|
50
|
|
5530
|
24
|
|
|
|
|
47
|
my $_itempos = $_[5]; |
5531
|
24
|
100
|
|
|
|
99
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
5532
|
24
|
|
|
|
|
76
|
my $text; |
5533
|
|
|
|
|
|
|
my $lastsep; |
5534
|
24
|
|
|
|
|
0
|
my $current_match; |
5535
|
24
|
|
|
|
|
67
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/^\\Z/}); |
5536
|
24
|
|
|
|
|
81
|
$expectation->at($_[1]); |
5537
|
|
|
|
|
|
|
|
5538
|
24
|
|
|
|
|
38
|
my $thisline; |
5539
|
24
|
|
|
|
|
108
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
5540
|
|
|
|
|
|
|
|
5541
|
|
|
|
|
|
|
|
5542
|
|
|
|
|
|
|
|
5543
|
24
|
|
33
|
|
|
151
|
while (!$_matched && !$commit) |
5544
|
|
|
|
|
|
|
{ |
5545
|
|
|
|
|
|
|
|
5546
|
24
|
50
|
|
|
|
83
|
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
|
24
|
|
|
|
|
71
|
my $thisprod = $thisrule->{"prods"}[0]; |
5552
|
24
|
|
|
|
|
57
|
$text = $_[1]; |
5553
|
24
|
|
|
|
|
49
|
my $_savetext; |
5554
|
24
|
|
|
|
|
65
|
@item = (q{EOF}); |
5555
|
24
|
|
|
|
|
69
|
%item = (__RULE__ => q{EOF}); |
5556
|
24
|
|
|
|
|
40
|
my $repcount = 0; |
5557
|
|
|
|
|
|
|
|
5558
|
|
|
|
|
|
|
|
5559
|
24
|
50
|
|
|
|
72
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/^\\Z/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
5560
|
|
|
|
|
|
|
q{EOF}, |
5561
|
|
|
|
|
|
|
$tracelevel) |
5562
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5563
|
24
|
|
|
|
|
54
|
undef $lastsep; |
5564
|
24
|
|
|
|
|
68
|
$expectation->is(q{})->at($text); |
5565
|
|
|
|
|
|
|
|
5566
|
|
|
|
|
|
|
|
5567
|
24
|
100
|
33
|
|
|
245
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^\Z)/) |
|
24
|
50
|
|
|
|
377
|
|
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
|
24
|
|
|
|
|
147
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
5578
|
24
|
|
|
|
|
101
|
substr($text,0,length($current_match),q{}); |
5579
|
24
|
50
|
|
|
|
78
|
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
|
24
|
|
|
|
|
79
|
push @item, $item{__PATTERN1__}=$current_match; |
5584
|
|
|
|
|
|
|
|
5585
|
|
|
|
|
|
|
|
5586
|
24
|
50
|
|
|
|
69
|
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
|
24
|
|
|
|
|
45
|
$_matched = 1; |
5595
|
24
|
|
|
|
|
64
|
last; |
5596
|
|
|
|
|
|
|
} |
5597
|
|
|
|
|
|
|
|
5598
|
|
|
|
|
|
|
|
5599
|
24
|
50
|
33
|
|
|
81
|
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
|
24
|
50
|
33
|
|
|
116
|
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
|
24
|
|
|
|
|
56
|
splice @{$thisparser->{errors}}, $err_at; |
|
24
|
|
|
|
|
64
|
|
5620
|
24
|
50
|
|
|
|
96
|
$return = $item[$#item] unless defined $return; |
5621
|
24
|
50
|
|
|
|
71
|
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
|
24
|
|
|
|
|
50
|
$_[1] = $text; |
5634
|
24
|
|
|
|
|
161
|
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
|
4
|
|
|
4
|
|
36
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
30
|
|
|
4
|
|
|
|
|
3650
|
|
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
|
4
|
|
|
4
|
|
36
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
27
|
|
|
4
|
|
|
|
|
3817
|
|
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
|
444
|
|
|
444
|
|
815
|
my $thisparser = $_[0]; |
5957
|
4
|
|
|
4
|
|
36
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
2184
|
|
5958
|
444
|
|
50
|
|
|
1192
|
local $tracelevel = ($tracelevel||0)+1; |
5959
|
444
|
|
|
|
|
693
|
$ERRORS = 0; |
5960
|
444
|
|
|
|
|
1249
|
my $thisrule = $thisparser->{"rules"}{"TBNAME"}; |
5961
|
|
|
|
|
|
|
|
5962
|
444
|
50
|
|
|
|
930
|
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
|
444
|
|
|
|
|
654
|
my $err_at = @{$thisparser->{errors}}; |
|
444
|
|
|
|
|
870
|
|
5970
|
|
|
|
|
|
|
|
5971
|
444
|
|
|
|
|
1054
|
my $score; |
5972
|
|
|
|
|
|
|
my $score_return; |
5973
|
444
|
|
|
|
|
0
|
my $_tok; |
5974
|
444
|
|
|
|
|
649
|
my $return = undef; |
5975
|
444
|
|
|
|
|
601
|
my $_matched=0; |
5976
|
444
|
|
|
|
|
636
|
my $commit=0; |
5977
|
444
|
|
|
|
|
691
|
my @item = (); |
5978
|
444
|
|
|
|
|
748
|
my %item = (); |
5979
|
444
|
|
|
|
|
734
|
my $repeating = $_[2]; |
5980
|
444
|
|
|
|
|
683
|
my $_noactions = $_[3]; |
5981
|
444
|
50
|
|
|
|
880
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
444
|
|
|
|
|
615
|
|
|
444
|
|
|
|
|
828
|
|
5982
|
444
|
|
|
|
|
756
|
my $_itempos = $_[5]; |
5983
|
444
|
100
|
|
|
|
1193
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
5984
|
444
|
|
|
|
|
1030
|
my $text; |
5985
|
|
|
|
|
|
|
my $lastsep; |
5986
|
444
|
|
|
|
|
0
|
my $current_match; |
5987
|
444
|
|
|
|
|
1006
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/::/, or BNAME}); |
5988
|
444
|
|
|
|
|
1146
|
$expectation->at($_[1]); |
5989
|
|
|
|
|
|
|
|
5990
|
444
|
|
|
|
|
665
|
my $thisline; |
5991
|
444
|
|
|
|
|
1463
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
5992
|
|
|
|
|
|
|
|
5993
|
|
|
|
|
|
|
|
5994
|
|
|
|
|
|
|
|
5995
|
444
|
|
33
|
|
|
1704
|
while (!$_matched && !$commit) |
5996
|
|
|
|
|
|
|
{ |
5997
|
|
|
|
|
|
|
|
5998
|
444
|
50
|
|
|
|
925
|
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
|
444
|
|
|
|
|
864
|
my $thisprod = $thisrule->{"prods"}[0]; |
6004
|
444
|
|
|
|
|
744
|
$text = $_[1]; |
6005
|
444
|
|
|
|
|
663
|
my $_savetext; |
6006
|
444
|
|
|
|
|
861
|
@item = (q{TBNAME}); |
6007
|
444
|
|
|
|
|
890
|
%item = (__RULE__ => q{TBNAME}); |
6008
|
444
|
|
|
|
|
627
|
my $repcount = 0; |
6009
|
|
|
|
|
|
|
|
6010
|
|
|
|
|
|
|
|
6011
|
444
|
50
|
|
|
|
843
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/::/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
6012
|
|
|
|
|
|
|
q{TBNAME}, |
6013
|
|
|
|
|
|
|
$tracelevel) |
6014
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6015
|
444
|
|
|
|
|
746
|
undef $lastsep; |
6016
|
444
|
|
|
|
|
909
|
$expectation->is(q{})->at($text); |
6017
|
|
|
|
|
|
|
|
6018
|
|
|
|
|
|
|
|
6019
|
444
|
100
|
66
|
|
|
2595
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:::)/) |
|
444
|
100
|
|
|
|
2979
|
|
6020
|
|
|
|
|
|
|
{ |
6021
|
440
|
50
|
|
|
|
1309
|
$text = $lastsep . $text if defined $lastsep; |
6022
|
440
|
|
|
|
|
1212
|
$expectation->failed(); |
6023
|
440
|
50
|
|
|
|
896
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
6024
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6025
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6026
|
|
|
|
|
|
|
|
6027
|
440
|
|
|
|
|
941
|
last; |
6028
|
|
|
|
|
|
|
} |
6029
|
4
|
|
|
|
|
19
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
6030
|
4
|
|
|
|
|
14
|
substr($text,0,length($current_match),q{}); |
6031
|
4
|
50
|
|
|
|
11
|
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
|
|
|
|
10
|
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
|
4
|
|
|
4
|
|
37
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
1676
|
|
|
4
|
|
|
|
|
7
|
|
6044
|
4
|
|
|
|
|
10
|
$expectation->is(q{BNAME})->at($text); |
6045
|
4
|
50
|
|
4
|
|
19
|
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
|
|
|
|
|
9
|
$item{q{BNAME}} = $_tok; |
6064
|
4
|
|
|
|
|
7
|
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
|
|
|
|
|
9
|
|
6076
|
4
|
50
|
|
|
|
11
|
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
|
|
|
|
11
|
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
|
|
|
|
|
8
|
$item{__ACTION1__}=$_tok; |
6088
|
|
|
|
|
|
|
|
6089
|
|
|
|
|
|
|
|
6090
|
4
|
50
|
|
|
|
8
|
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
|
|
|
|
|
7
|
$_matched = 1; |
6099
|
4
|
|
|
|
|
8
|
last; |
6100
|
|
|
|
|
|
|
} |
6101
|
|
|
|
|
|
|
|
6102
|
|
|
|
|
|
|
|
6103
|
444
|
|
66
|
|
|
1568
|
while (!$_matched && !$commit) |
6104
|
|
|
|
|
|
|
{ |
6105
|
|
|
|
|
|
|
|
6106
|
440
|
50
|
|
|
|
868
|
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
|
440
|
|
|
|
|
787
|
my $thisprod = $thisrule->{"prods"}[1]; |
6112
|
440
|
|
|
|
|
834
|
$text = $_[1]; |
6113
|
440
|
|
|
|
|
599
|
my $_savetext; |
6114
|
440
|
|
|
|
|
934
|
@item = (q{TBNAME}); |
6115
|
440
|
|
|
|
|
950
|
%item = (__RULE__ => q{TBNAME}); |
6116
|
440
|
|
|
|
|
628
|
my $repcount = 0; |
6117
|
|
|
|
|
|
|
|
6118
|
|
|
|
|
|
|
|
6119
|
440
|
50
|
|
|
|
929
|
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
|
4
|
|
|
4
|
|
35
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
2384
|
|
|
440
|
|
|
|
|
694
|
|
6125
|
440
|
|
|
|
|
895
|
$expectation->is(q{})->at($text); |
6126
|
440
|
100
|
|
440
|
|
2093
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
440
|
|
|
|
|
884
|
|
6127
|
|
|
|
|
|
|
{ |
6128
|
|
|
|
|
|
|
|
6129
|
252
|
50
|
|
|
|
514
|
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
|
252
|
|
|
|
|
652
|
$expectation->failed(); |
6135
|
252
|
|
|
|
|
423
|
last; |
6136
|
|
|
|
|
|
|
} |
6137
|
188
|
50
|
|
|
|
613
|
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
|
188
|
|
|
|
|
389
|
$item{q{BNAME}} = $_tok; |
6145
|
188
|
|
|
|
|
316
|
push @item, $_tok; |
6146
|
|
|
|
|
|
|
|
6147
|
|
|
|
|
|
|
} |
6148
|
|
|
|
|
|
|
|
6149
|
188
|
50
|
|
|
|
375
|
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
|
188
|
50
|
|
|
|
398
|
$_tok = ($_noactions) ? 0 : do {$return = "Treex::Block::$item{BNAME}"}; |
|
188
|
|
|
|
|
518
|
|
6157
|
188
|
50
|
|
|
|
484
|
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
|
188
|
50
|
|
|
|
422
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
6164
|
|
|
|
|
|
|
. $_tok . q{])}, |
6165
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6166
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6167
|
188
|
|
|
|
|
404
|
push @item, $_tok; |
6168
|
188
|
|
|
|
|
300
|
$item{__ACTION1__}=$_tok; |
6169
|
|
|
|
|
|
|
|
6170
|
|
|
|
|
|
|
|
6171
|
188
|
50
|
|
|
|
361
|
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
|
188
|
|
|
|
|
271
|
$_matched = 1; |
6180
|
188
|
|
|
|
|
351
|
last; |
6181
|
|
|
|
|
|
|
} |
6182
|
|
|
|
|
|
|
|
6183
|
|
|
|
|
|
|
|
6184
|
444
|
100
|
66
|
|
|
1689
|
unless ( $_matched || defined($score) ) |
6185
|
|
|
|
|
|
|
{ |
6186
|
|
|
|
|
|
|
|
6187
|
|
|
|
|
|
|
|
6188
|
252
|
|
|
|
|
455
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
6189
|
252
|
50
|
|
|
|
539
|
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
|
252
|
|
|
|
|
1191
|
return undef; |
6195
|
|
|
|
|
|
|
} |
6196
|
192
|
50
|
33
|
|
|
448
|
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
|
192
|
|
|
|
|
284
|
splice @{$thisparser->{errors}}, $err_at; |
|
192
|
|
|
|
|
355
|
|
6205
|
192
|
50
|
|
|
|
401
|
$return = $item[$#item] unless defined $return; |
6206
|
192
|
50
|
|
|
|
354
|
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
|
192
|
|
|
|
|
338
|
$_[1] = $text; |
6219
|
192
|
|
|
|
|
1349
|
return $return; |
6220
|
|
|
|
|
|
|
} |
6221
|
|
|
|
|
|
|
|
6222
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
6223
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BLOCK |
6224
|
|
|
|
|
|
|
{ |
6225
|
258
|
|
|
258
|
|
485
|
my $thisparser = $_[0]; |
6226
|
4
|
|
|
4
|
|
39
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
1569
|
|
6227
|
258
|
|
50
|
|
|
651
|
local $tracelevel = ($tracelevel||0)+1; |
6228
|
258
|
|
|
|
|
389
|
$ERRORS = 0; |
6229
|
258
|
|
|
|
|
558
|
my $thisrule = $thisparser->{"rules"}{"BLOCK"}; |
6230
|
|
|
|
|
|
|
|
6231
|
258
|
50
|
|
|
|
563
|
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
|
258
|
|
|
|
|
365
|
my $err_at = @{$thisparser->{errors}}; |
|
258
|
|
|
|
|
505
|
|
6239
|
|
|
|
|
|
|
|
6240
|
258
|
|
|
|
|
655
|
my $score; |
6241
|
|
|
|
|
|
|
my $score_return; |
6242
|
258
|
|
|
|
|
0
|
my $_tok; |
6243
|
258
|
|
|
|
|
437
|
my $return = undef; |
6244
|
258
|
|
|
|
|
351
|
my $_matched=0; |
6245
|
258
|
|
|
|
|
371
|
my $commit=0; |
6246
|
258
|
|
|
|
|
501
|
my @item = (); |
6247
|
258
|
|
|
|
|
415
|
my %item = (); |
6248
|
258
|
|
|
|
|
433
|
my $repeating = $_[2]; |
6249
|
258
|
|
|
|
|
363
|
my $_noactions = $_[3]; |
6250
|
258
|
50
|
|
|
|
522
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
258
|
|
|
|
|
362
|
|
|
258
|
|
|
|
|
479
|
|
6251
|
258
|
|
|
|
|
444
|
my $_itempos = $_[5]; |
6252
|
258
|
100
|
|
|
|
637
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
6253
|
258
|
|
|
|
|
771
|
my $text; |
6254
|
|
|
|
|
|
|
my $lastsep; |
6255
|
258
|
|
|
|
|
0
|
my $current_match; |
6256
|
258
|
|
|
|
|
531
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{INCLUDE, or SCENMODULE, or TBNAME}); |
6257
|
258
|
|
|
|
|
717
|
$expectation->at($_[1]); |
6258
|
|
|
|
|
|
|
|
6259
|
258
|
|
|
|
|
367
|
my $thisline; |
6260
|
258
|
|
|
|
|
773
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
6261
|
|
|
|
|
|
|
|
6262
|
|
|
|
|
|
|
|
6263
|
|
|
|
|
|
|
|
6264
|
258
|
|
33
|
|
|
1107
|
while (!$_matched && !$commit) |
6265
|
|
|
|
|
|
|
{ |
6266
|
|
|
|
|
|
|
|
6267
|
258
|
50
|
|
|
|
556
|
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
|
258
|
|
|
|
|
506
|
my $thisprod = $thisrule->{"prods"}[0]; |
6273
|
258
|
|
|
|
|
442
|
$text = $_[1]; |
6274
|
258
|
|
|
|
|
358
|
my $_savetext; |
6275
|
258
|
|
|
|
|
468
|
@item = (q{BLOCK}); |
6276
|
258
|
|
|
|
|
511
|
%item = (__RULE__ => q{BLOCK}); |
6277
|
258
|
|
|
|
|
467
|
my $repcount = 0; |
6278
|
|
|
|
|
|
|
|
6279
|
|
|
|
|
|
|
|
6280
|
258
|
50
|
|
|
|
590
|
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
|
4
|
|
|
4
|
|
35
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
1687
|
|
|
258
|
|
|
|
|
378
|
|
6286
|
258
|
|
|
|
|
545
|
$expectation->is(q{})->at($text); |
6287
|
258
|
100
|
|
258
|
|
1079
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::INCLUDE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
258
|
|
|
|
|
520
|
|
6288
|
|
|
|
|
|
|
{ |
6289
|
|
|
|
|
|
|
|
6290
|
253
|
50
|
|
|
|
512
|
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
|
253
|
|
|
|
|
668
|
$expectation->failed(); |
6296
|
253
|
|
|
|
|
475
|
last; |
6297
|
|
|
|
|
|
|
} |
6298
|
5
|
50
|
|
|
|
28
|
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
|
5
|
|
|
|
|
11
|
$item{q{INCLUDE}} = $_tok; |
6306
|
5
|
|
|
|
|
12
|
push @item, $_tok; |
6307
|
|
|
|
|
|
|
|
6308
|
|
|
|
|
|
|
} |
6309
|
|
|
|
|
|
|
|
6310
|
5
|
50
|
|
|
|
25
|
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
|
5
|
50
|
|
|
|
16
|
$_tok = ($_noactions) ? 0 : do { |
6318
|
5
|
|
|
|
|
40
|
my $included = read_file( $item{INCLUDE}, binmode => ':utf8' ); |
6319
|
5
|
|
|
|
|
987
|
my $result = $thisparser->startrule( $included, 1, $item{INCLUDE} ); |
6320
|
5
|
50
|
33
|
|
|
36
|
if (defined $result and ref $result eq 'ARRAY') { |
6321
|
5
|
|
|
|
|
25
|
$return = [@$result]; |
6322
|
|
|
|
|
|
|
} else { |
6323
|
0
|
|
|
|
|
0
|
$return = undef; |
6324
|
|
|
|
|
|
|
} |
6325
|
|
|
|
|
|
|
}; |
6326
|
5
|
50
|
|
|
|
20
|
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
|
5
|
50
|
|
|
|
13
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
6333
|
|
|
|
|
|
|
. $_tok . q{])}, |
6334
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6335
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6336
|
5
|
|
|
|
|
11
|
push @item, $_tok; |
6337
|
5
|
|
|
|
|
12
|
$item{__ACTION1__}=$_tok; |
6338
|
|
|
|
|
|
|
|
6339
|
|
|
|
|
|
|
|
6340
|
5
|
50
|
|
|
|
15
|
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
|
5
|
|
|
|
|
12
|
$_matched = 1; |
6349
|
5
|
|
|
|
|
11
|
last; |
6350
|
|
|
|
|
|
|
} |
6351
|
|
|
|
|
|
|
|
6352
|
|
|
|
|
|
|
|
6353
|
258
|
|
66
|
|
|
1219
|
while (!$_matched && !$commit) |
6354
|
|
|
|
|
|
|
{ |
6355
|
|
|
|
|
|
|
|
6356
|
253
|
50
|
|
|
|
573
|
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
|
253
|
|
|
|
|
546
|
my $thisprod = $thisrule->{"prods"}[1]; |
6362
|
253
|
|
|
|
|
457
|
$text = $_[1]; |
6363
|
253
|
|
|
|
|
371
|
my $_savetext; |
6364
|
253
|
|
|
|
|
592
|
@item = (q{BLOCK}); |
6365
|
253
|
|
|
|
|
565
|
%item = (__RULE__ => q{BLOCK}); |
6366
|
253
|
|
|
|
|
423
|
my $repcount = 0; |
6367
|
|
|
|
|
|
|
|
6368
|
|
|
|
|
|
|
|
6369
|
253
|
50
|
|
|
|
500
|
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
|
4
|
|
|
4
|
|
33
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
920
|
|
|
253
|
|
|
|
|
420
|
|
6375
|
253
|
|
|
|
|
542
|
$expectation->is(q{})->at($text); |
6376
|
253
|
50
|
|
253
|
|
1102
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SCENMODULE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
253
|
|
|
|
|
564
|
|
6377
|
|
|
|
|
|
|
{ |
6378
|
|
|
|
|
|
|
|
6379
|
253
|
50
|
|
|
|
534
|
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
|
253
|
|
|
|
|
676
|
$expectation->failed(); |
6385
|
253
|
|
|
|
|
444
|
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
|
4
|
|
|
4
|
|
33
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
2470
|
|
|
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
|
258
|
|
66
|
|
|
1525
|
while (!$_matched && !$commit) |
6477
|
|
|
|
|
|
|
{ |
6478
|
|
|
|
|
|
|
|
6479
|
253
|
50
|
|
|
|
524
|
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
|
253
|
|
|
|
|
506
|
my $thisprod = $thisrule->{"prods"}[2]; |
6485
|
253
|
|
|
|
|
457
|
$text = $_[1]; |
6486
|
253
|
|
|
|
|
376
|
my $_savetext; |
6487
|
253
|
|
|
|
|
581
|
@item = (q{BLOCK}); |
6488
|
253
|
|
|
|
|
575
|
%item = (__RULE__ => q{BLOCK}); |
6489
|
253
|
|
|
|
|
397
|
my $repcount = 0; |
6490
|
|
|
|
|
|
|
|
6491
|
|
|
|
|
|
|
|
6492
|
253
|
50
|
|
|
|
485
|
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
|
4
|
|
|
4
|
|
36
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
2139
|
|
|
253
|
|
|
|
|
393
|
|
6498
|
253
|
|
|
|
|
542
|
$expectation->is(q{})->at($text); |
6499
|
253
|
50
|
|
253
|
|
1049
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SCENMODULE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
253
|
|
|
|
|
560
|
|
6500
|
|
|
|
|
|
|
{ |
6501
|
|
|
|
|
|
|
|
6502
|
253
|
50
|
|
|
|
509
|
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
|
253
|
|
|
|
|
583
|
$expectation->failed(); |
6508
|
253
|
|
|
|
|
426
|
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
|
258
|
|
66
|
|
|
1168
|
while (!$_matched && !$commit) |
6569
|
|
|
|
|
|
|
{ |
6570
|
|
|
|
|
|
|
|
6571
|
253
|
50
|
|
|
|
519
|
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
|
253
|
|
|
|
|
478
|
my $thisprod = $thisrule->{"prods"}[3]; |
6577
|
253
|
|
|
|
|
442
|
$text = $_[1]; |
6578
|
253
|
|
|
|
|
366
|
my $_savetext; |
6579
|
253
|
|
|
|
|
562
|
@item = (q{BLOCK}); |
6580
|
253
|
|
|
|
|
536
|
%item = (__RULE__ => q{BLOCK}); |
6581
|
253
|
|
|
|
|
425
|
my $repcount = 0; |
6582
|
|
|
|
|
|
|
|
6583
|
|
|
|
|
|
|
|
6584
|
253
|
50
|
|
|
|
505
|
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
|
4
|
|
|
4
|
|
36
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
874
|
|
|
253
|
|
|
|
|
358
|
|
6590
|
253
|
|
|
|
|
556
|
$expectation->is(q{})->at($text); |
6591
|
253
|
100
|
|
253
|
|
1024
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::TBNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
253
|
|
|
|
|
522
|
|
6592
|
|
|
|
|
|
|
{ |
6593
|
|
|
|
|
|
|
|
6594
|
126
|
50
|
|
|
|
289
|
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
|
126
|
|
|
|
|
354
|
$expectation->failed(); |
6600
|
126
|
|
|
|
|
224
|
last; |
6601
|
|
|
|
|
|
|
} |
6602
|
127
|
50
|
|
|
|
409
|
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
|
127
|
|
|
|
|
267
|
$item{q{TBNAME}} = $_tok; |
6610
|
127
|
|
|
|
|
210
|
push @item, $_tok; |
6611
|
|
|
|
|
|
|
|
6612
|
|
|
|
|
|
|
} |
6613
|
|
|
|
|
|
|
|
6614
|
127
|
50
|
|
|
|
258
|
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
|
4
|
|
|
4
|
|
31
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
1803
|
|
|
127
|
|
|
|
|
193
|
|
6620
|
127
|
|
|
|
|
325
|
$expectation->is(q{PARAMS})->at($text); |
6621
|
127
|
100
|
|
127
|
|
656
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAMS($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
127
|
|
|
|
|
293
|
|
6622
|
|
|
|
|
|
|
{ |
6623
|
|
|
|
|
|
|
|
6624
|
65
|
50
|
|
|
|
149
|
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
|
65
|
|
|
|
|
172
|
$expectation->failed(); |
6630
|
65
|
|
|
|
|
116
|
last; |
6631
|
|
|
|
|
|
|
} |
6632
|
62
|
50
|
|
|
|
215
|
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
|
62
|
|
|
|
|
139
|
$item{q{PARAMS}} = $_tok; |
6640
|
62
|
|
|
|
|
108
|
push @item, $_tok; |
6641
|
|
|
|
|
|
|
|
6642
|
|
|
|
|
|
|
} |
6643
|
|
|
|
|
|
|
|
6644
|
62
|
50
|
|
|
|
136
|
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
|
62
|
50
|
|
|
|
139
|
$_tok = ($_noactions) ? 0 : do {$return = [{ |
6652
|
|
|
|
|
|
|
block_name=>$item{TBNAME}, |
6653
|
|
|
|
|
|
|
block_parameters=>$item{PARAMS}, |
6654
|
62
|
|
|
|
|
238
|
}] |
6655
|
|
|
|
|
|
|
}; |
6656
|
62
|
50
|
|
|
|
146
|
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
|
62
|
50
|
|
|
|
136
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
6663
|
|
|
|
|
|
|
. $_tok . q{])}, |
6664
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6665
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6666
|
62
|
|
|
|
|
106
|
push @item, $_tok; |
6667
|
62
|
|
|
|
|
112
|
$item{__ACTION1__}=$_tok; |
6668
|
|
|
|
|
|
|
|
6669
|
|
|
|
|
|
|
|
6670
|
62
|
50
|
|
|
|
128
|
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
|
62
|
|
|
|
|
105
|
$_matched = 1; |
6679
|
62
|
|
|
|
|
110
|
last; |
6680
|
|
|
|
|
|
|
} |
6681
|
|
|
|
|
|
|
|
6682
|
|
|
|
|
|
|
|
6683
|
258
|
|
66
|
|
|
990
|
while (!$_matched && !$commit) |
6684
|
|
|
|
|
|
|
{ |
6685
|
|
|
|
|
|
|
|
6686
|
191
|
50
|
|
|
|
400
|
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
|
191
|
|
|
|
|
398
|
my $thisprod = $thisrule->{"prods"}[4]; |
6692
|
191
|
|
|
|
|
322
|
$text = $_[1]; |
6693
|
191
|
|
|
|
|
275
|
my $_savetext; |
6694
|
191
|
|
|
|
|
456
|
@item = (q{BLOCK}); |
6695
|
191
|
|
|
|
|
459
|
%item = (__RULE__ => q{BLOCK}); |
6696
|
191
|
|
|
|
|
298
|
my $repcount = 0; |
6697
|
|
|
|
|
|
|
|
6698
|
|
|
|
|
|
|
|
6699
|
191
|
50
|
|
|
|
421
|
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
|
4
|
|
|
4
|
|
33
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
2986
|
|
|
191
|
|
|
|
|
296
|
|
6705
|
191
|
|
|
|
|
389
|
$expectation->is(q{})->at($text); |
6706
|
191
|
100
|
|
191
|
|
831
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::TBNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
191
|
|
|
|
|
433
|
|
6707
|
|
|
|
|
|
|
{ |
6708
|
|
|
|
|
|
|
|
6709
|
126
|
50
|
|
|
|
283
|
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
|
126
|
|
|
|
|
311
|
$expectation->failed(); |
6715
|
126
|
|
|
|
|
229
|
last; |
6716
|
|
|
|
|
|
|
} |
6717
|
65
|
50
|
|
|
|
210
|
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
|
65
|
|
|
|
|
137
|
$item{q{TBNAME}} = $_tok; |
6725
|
65
|
|
|
|
|
116
|
push @item, $_tok; |
6726
|
|
|
|
|
|
|
|
6727
|
|
|
|
|
|
|
} |
6728
|
|
|
|
|
|
|
|
6729
|
65
|
50
|
|
|
|
135
|
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
|
65
|
50
|
|
|
|
136
|
$_tok = ($_noactions) ? 0 : do {$return = [{ |
6737
|
|
|
|
|
|
|
block_name=>$item{TBNAME}, |
6738
|
65
|
|
|
|
|
262
|
block_parameters=>[], |
6739
|
|
|
|
|
|
|
}] |
6740
|
|
|
|
|
|
|
}; |
6741
|
65
|
50
|
|
|
|
154
|
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
|
65
|
50
|
|
|
|
143
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
6748
|
|
|
|
|
|
|
. $_tok . q{])}, |
6749
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6750
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6751
|
65
|
|
|
|
|
119
|
push @item, $_tok; |
6752
|
65
|
|
|
|
|
107
|
$item{__ACTION1__}=$_tok; |
6753
|
|
|
|
|
|
|
|
6754
|
|
|
|
|
|
|
|
6755
|
65
|
50
|
|
|
|
145
|
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
|
65
|
|
|
|
|
95
|
$_matched = 1; |
6764
|
65
|
|
|
|
|
112
|
last; |
6765
|
|
|
|
|
|
|
} |
6766
|
|
|
|
|
|
|
|
6767
|
|
|
|
|
|
|
|
6768
|
258
|
100
|
66
|
|
|
840
|
unless ( $_matched || defined($score) ) |
6769
|
|
|
|
|
|
|
{ |
6770
|
|
|
|
|
|
|
|
6771
|
|
|
|
|
|
|
|
6772
|
126
|
|
|
|
|
267
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
6773
|
126
|
50
|
|
|
|
278
|
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
|
126
|
|
|
|
|
634
|
return undef; |
6779
|
|
|
|
|
|
|
} |
6780
|
132
|
50
|
33
|
|
|
448
|
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
|
132
|
|
|
|
|
205
|
splice @{$thisparser->{errors}}, $err_at; |
|
132
|
|
|
|
|
272
|
|
6789
|
132
|
50
|
|
|
|
307
|
$return = $item[$#item] unless defined $return; |
6790
|
132
|
50
|
|
|
|
288
|
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
|
132
|
|
|
|
|
256
|
$_[1] = $text; |
6803
|
132
|
|
|
|
|
767
|
return $return; |
6804
|
|
|
|
|
|
|
} |
6805
|
|
|
|
|
|
|
|
6806
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
6807
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::COMMENT |
6808
|
|
|
|
|
|
|
{ |
6809
|
134
|
|
|
134
|
|
241
|
my $thisparser = $_[0]; |
6810
|
4
|
|
|
4
|
|
42
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
3908
|
|
6811
|
134
|
|
50
|
|
|
341
|
local $tracelevel = ($tracelevel||0)+1; |
6812
|
134
|
|
|
|
|
189
|
$ERRORS = 0; |
6813
|
134
|
|
|
|
|
298
|
my $thisrule = $thisparser->{"rules"}{"COMMENT"}; |
6814
|
|
|
|
|
|
|
|
6815
|
134
|
50
|
|
|
|
276
|
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
|
134
|
|
|
|
|
198
|
my $err_at = @{$thisparser->{errors}}; |
|
134
|
|
|
|
|
264
|
|
6823
|
|
|
|
|
|
|
|
6824
|
134
|
|
|
|
|
344
|
my $score; |
6825
|
|
|
|
|
|
|
my $score_return; |
6826
|
134
|
|
|
|
|
0
|
my $_tok; |
6827
|
134
|
|
|
|
|
198
|
my $return = undef; |
6828
|
134
|
|
|
|
|
193
|
my $_matched=0; |
6829
|
134
|
|
|
|
|
193
|
my $commit=0; |
6830
|
134
|
|
|
|
|
220
|
my @item = (); |
6831
|
134
|
|
|
|
|
228
|
my %item = (); |
6832
|
134
|
|
|
|
|
193
|
my $repeating = $_[2]; |
6833
|
134
|
|
|
|
|
211
|
my $_noactions = $_[3]; |
6834
|
134
|
50
|
|
|
|
288
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
134
|
|
|
|
|
198
|
|
|
134
|
|
|
|
|
260
|
|
6835
|
134
|
|
|
|
|
215
|
my $_itempos = $_[5]; |
6836
|
134
|
100
|
|
|
|
376
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
6837
|
134
|
|
|
|
|
325
|
my $text; |
6838
|
|
|
|
|
|
|
my $lastsep; |
6839
|
134
|
|
|
|
|
0
|
my $current_match; |
6840
|
134
|
|
|
|
|
325
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/#[^\\n]*/}); |
6841
|
134
|
|
|
|
|
367
|
$expectation->at($_[1]); |
6842
|
|
|
|
|
|
|
|
6843
|
134
|
|
|
|
|
202
|
my $thisline; |
6844
|
134
|
|
|
|
|
550
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
6845
|
|
|
|
|
|
|
|
6846
|
|
|
|
|
|
|
|
6847
|
|
|
|
|
|
|
|
6848
|
134
|
|
33
|
|
|
598
|
while (!$_matched && !$commit) |
6849
|
|
|
|
|
|
|
{ |
6850
|
|
|
|
|
|
|
|
6851
|
134
|
50
|
|
|
|
379
|
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
|
134
|
|
|
|
|
318
|
my $thisprod = $thisrule->{"prods"}[0]; |
6857
|
134
|
|
|
|
|
245
|
$text = $_[1]; |
6858
|
134
|
|
|
|
|
191
|
my $_savetext; |
6859
|
134
|
|
|
|
|
250
|
@item = (q{COMMENT}); |
6860
|
134
|
|
|
|
|
285
|
%item = (__RULE__ => q{COMMENT}); |
6861
|
134
|
|
|
|
|
207
|
my $repcount = 0; |
6862
|
|
|
|
|
|
|
|
6863
|
|
|
|
|
|
|
|
6864
|
134
|
50
|
|
|
|
305
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/#[^\\n]*/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
6865
|
|
|
|
|
|
|
q{COMMENT}, |
6866
|
|
|
|
|
|
|
$tracelevel) |
6867
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6868
|
134
|
|
|
|
|
256
|
undef $lastsep; |
6869
|
134
|
|
|
|
|
294
|
$expectation->is(q{})->at($text); |
6870
|
|
|
|
|
|
|
|
6871
|
|
|
|
|
|
|
|
6872
|
134
|
100
|
66
|
|
|
920
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:#[^\n]*)/) |
|
134
|
100
|
|
|
|
1061
|
|
6873
|
|
|
|
|
|
|
{ |
6874
|
113
|
50
|
|
|
|
338
|
$text = $lastsep . $text if defined $lastsep; |
6875
|
113
|
|
|
|
|
332
|
$expectation->failed(); |
6876
|
113
|
50
|
|
|
|
242
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
6877
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6878
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6879
|
|
|
|
|
|
|
|
6880
|
113
|
|
|
|
|
256
|
last; |
6881
|
|
|
|
|
|
|
} |
6882
|
21
|
|
|
|
|
154
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
6883
|
21
|
|
|
|
|
81
|
substr($text,0,length($current_match),q{}); |
6884
|
21
|
50
|
|
|
|
75
|
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
|
|
|
|
50
|
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
|
|
|
|
47
|
$_tok = ($_noactions) ? 0 : do {$return = ''}; |
|
21
|
|
|
|
|
39
|
|
6899
|
21
|
50
|
|
|
|
88
|
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
|
|
|
|
|
46
|
push @item, $_tok; |
6910
|
21
|
|
|
|
|
43
|
$item{__ACTION1__}=$_tok; |
6911
|
|
|
|
|
|
|
|
6912
|
|
|
|
|
|
|
|
6913
|
21
|
50
|
|
|
|
46
|
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
|
|
|
|
|
50
|
last; |
6923
|
|
|
|
|
|
|
} |
6924
|
|
|
|
|
|
|
|
6925
|
|
|
|
|
|
|
|
6926
|
134
|
100
|
66
|
|
|
450
|
unless ( $_matched || defined($score) ) |
6927
|
|
|
|
|
|
|
{ |
6928
|
|
|
|
|
|
|
|
6929
|
|
|
|
|
|
|
|
6930
|
113
|
|
|
|
|
210
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
6931
|
113
|
50
|
|
|
|
227
|
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
|
113
|
|
|
|
|
573
|
return undef; |
6937
|
|
|
|
|
|
|
} |
6938
|
21
|
50
|
33
|
|
|
71
|
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
|
|
|
|
|
37
|
splice @{$thisparser->{errors}}, $err_at; |
|
21
|
|
|
|
|
65
|
|
6947
|
21
|
50
|
|
|
|
59
|
$return = $item[$#item] unless defined $return; |
6948
|
21
|
50
|
|
|
|
51
|
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
|
|
|
|
|
43
|
$_[1] = $text; |
6961
|
21
|
|
|
|
|
139
|
return $return; |
6962
|
|
|
|
|
|
|
} |
6963
|
|
|
|
|
|
|
|
6964
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
6965
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::startrule |
6966
|
|
|
|
|
|
|
{ |
6967
|
26
|
|
|
26
|
|
62
|
my $thisparser = $_[0]; |
6968
|
4
|
|
|
4
|
|
36
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
1566
|
|
6969
|
26
|
|
100
|
|
|
126
|
local $tracelevel = ($tracelevel||0)+1; |
6970
|
26
|
|
|
|
|
65
|
$ERRORS = 0; |
6971
|
26
|
|
|
|
|
78
|
my $thisrule = $thisparser->{"rules"}{"startrule"}; |
6972
|
|
|
|
|
|
|
|
6973
|
26
|
50
|
|
|
|
74
|
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
|
26
|
|
|
|
|
54
|
my $err_at = @{$thisparser->{errors}}; |
|
26
|
|
|
|
|
69
|
|
6981
|
|
|
|
|
|
|
|
6982
|
26
|
|
|
|
|
102
|
my $score; |
6983
|
|
|
|
|
|
|
my $score_return; |
6984
|
26
|
|
|
|
|
0
|
my $_tok; |
6985
|
26
|
|
|
|
|
62
|
my $return = undef; |
6986
|
26
|
|
|
|
|
49
|
my $_matched=0; |
6987
|
26
|
|
|
|
|
43
|
my $commit=0; |
6988
|
26
|
|
|
|
|
55
|
my @item = (); |
6989
|
26
|
|
|
|
|
52
|
my %item = (); |
6990
|
26
|
|
|
|
|
50
|
my $repeating = $_[2]; |
6991
|
26
|
|
|
|
|
51
|
my $_noactions = $_[3]; |
6992
|
26
|
50
|
|
|
|
77
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
26
|
|
|
|
|
44
|
|
|
26
|
|
|
|
|
63
|
|
6993
|
26
|
|
|
|
|
66
|
my $_itempos = $_[5]; |
6994
|
26
|
100
|
|
|
|
133
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
6995
|
26
|
|
|
|
|
89
|
my $text; |
6996
|
|
|
|
|
|
|
my $lastsep; |
6997
|
26
|
|
|
|
|
0
|
my $current_match; |
6998
|
26
|
|
|
|
|
158
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{SCEN}); |
6999
|
26
|
|
|
|
|
110
|
$expectation->at($_[1]); |
7000
|
|
|
|
|
|
|
|
7001
|
26
|
|
|
|
|
41
|
my $thisline; |
7002
|
26
|
|
|
|
|
163
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
7003
|
|
|
|
|
|
|
|
7004
|
|
|
|
|
|
|
|
7005
|
|
|
|
|
|
|
|
7006
|
26
|
|
33
|
|
|
158
|
while (!$_matched && !$commit) |
7007
|
|
|
|
|
|
|
{ |
7008
|
|
|
|
|
|
|
|
7009
|
26
|
50
|
|
|
|
82
|
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
|
26
|
|
|
|
|
95
|
my $thisprod = $thisrule->{"prods"}[0]; |
7015
|
26
|
|
|
|
|
72
|
$text = $_[1]; |
7016
|
26
|
|
|
|
|
266
|
my $_savetext; |
7017
|
26
|
|
|
|
|
65
|
@item = (q{startrule}); |
7018
|
26
|
|
|
|
|
85
|
%item = (__RULE__ => q{startrule}); |
7019
|
26
|
|
|
|
|
54
|
my $repcount = 0; |
7020
|
|
|
|
|
|
|
|
7021
|
|
|
|
|
|
|
|
7022
|
26
|
50
|
|
|
|
67
|
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
|
4
|
|
|
4
|
|
40
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
797
|
|
|
26
|
|
|
|
|
46
|
|
7028
|
26
|
|
|
|
|
87
|
$expectation->is(q{})->at($text); |
7029
|
26
|
100
|
|
26
|
|
163
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SCEN($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
26
|
|
|
|
|
66
|
|
7030
|
|
|
|
|
|
|
{ |
7031
|
|
|
|
|
|
|
|
7032
|
2
|
50
|
|
|
|
8
|
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
|
|
|
|
|
8
|
$expectation->failed(); |
7038
|
2
|
|
|
|
|
4
|
last; |
7039
|
|
|
|
|
|
|
} |
7040
|
24
|
50
|
|
|
|
115
|
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
|
24
|
|
|
|
|
62
|
$item{q{SCEN}} = $_tok; |
7048
|
24
|
|
|
|
|
54
|
push @item, $_tok; |
7049
|
|
|
|
|
|
|
|
7050
|
|
|
|
|
|
|
} |
7051
|
|
|
|
|
|
|
|
7052
|
24
|
50
|
|
|
|
68
|
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
|
4
|
|
|
4
|
|
32
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
21
|
|
|
4
|
|
|
|
|
2354
|
|
|
24
|
|
|
|
|
44
|
|
7058
|
24
|
|
|
|
|
87
|
$expectation->is(q{EOF})->at($text); |
7059
|
24
|
50
|
|
24
|
|
178
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::EOF($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
24
|
|
|
|
|
71
|
|
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
|
24
|
50
|
|
|
|
98
|
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
|
24
|
|
|
|
|
70
|
$item{q{EOF}} = $_tok; |
7078
|
24
|
|
|
|
|
54
|
push @item, $_tok; |
7079
|
|
|
|
|
|
|
|
7080
|
|
|
|
|
|
|
} |
7081
|
|
|
|
|
|
|
|
7082
|
24
|
50
|
|
|
|
65
|
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
|
24
|
50
|
|
|
|
69
|
$_tok = ($_noactions) ? 0 : do {$return = $item{SCEN}}; |
|
24
|
|
|
|
|
78
|
|
7090
|
24
|
50
|
|
|
|
74
|
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
|
24
|
50
|
|
|
|
67
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
7097
|
|
|
|
|
|
|
. $_tok . q{])}, |
7098
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7099
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7100
|
24
|
|
|
|
|
45
|
push @item, $_tok; |
7101
|
24
|
|
|
|
|
58
|
$item{__ACTION1__}=$_tok; |
7102
|
|
|
|
|
|
|
|
7103
|
|
|
|
|
|
|
|
7104
|
24
|
50
|
|
|
|
64
|
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
|
24
|
|
|
|
|
41
|
$_matched = 1; |
7113
|
24
|
|
|
|
|
49
|
last; |
7114
|
|
|
|
|
|
|
} |
7115
|
|
|
|
|
|
|
|
7116
|
|
|
|
|
|
|
|
7117
|
26
|
100
|
66
|
|
|
112
|
unless ( $_matched || defined($score) ) |
7118
|
|
|
|
|
|
|
{ |
7119
|
|
|
|
|
|
|
|
7120
|
|
|
|
|
|
|
|
7121
|
2
|
|
|
|
|
5
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
7122
|
2
|
50
|
|
|
|
6
|
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
|
24
|
50
|
33
|
|
|
87
|
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
|
24
|
|
|
|
|
45
|
splice @{$thisparser->{errors}}, $err_at; |
|
24
|
|
|
|
|
59
|
|
7138
|
24
|
50
|
|
|
|
127
|
$return = $item[$#item] unless defined $return; |
7139
|
24
|
50
|
|
|
|
70
|
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
|
24
|
|
|
|
|
63
|
$_[1] = $text; |
7152
|
24
|
|
|
|
|
184
|
return $return; |
7153
|
|
|
|
|
|
|
} |
7154
|
|
|
|
|
|
|
|
7155
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
7156
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SCEN |
7157
|
|
|
|
|
|
|
{ |
7158
|
84
|
|
|
84
|
|
174
|
my $thisparser = $_[0]; |
7159
|
4
|
|
|
4
|
|
37
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
15
|
|
|
4
|
|
|
|
|
1564
|
|
7160
|
84
|
|
50
|
|
|
253
|
local $tracelevel = ($tracelevel||0)+1; |
7161
|
84
|
|
|
|
|
143
|
$ERRORS = 0; |
7162
|
84
|
|
|
|
|
184
|
my $thisrule = $thisparser->{"rules"}{"SCEN"}; |
7163
|
|
|
|
|
|
|
|
7164
|
84
|
50
|
|
|
|
191
|
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
|
84
|
|
|
|
|
146
|
my $err_at = @{$thisparser->{errors}}; |
|
84
|
|
|
|
|
171
|
|
7172
|
|
|
|
|
|
|
|
7173
|
84
|
|
|
|
|
227
|
my $score; |
7174
|
|
|
|
|
|
|
my $score_return; |
7175
|
84
|
|
|
|
|
0
|
my $_tok; |
7176
|
84
|
|
|
|
|
154
|
my $return = undef; |
7177
|
84
|
|
|
|
|
125
|
my $_matched=0; |
7178
|
84
|
|
|
|
|
136
|
my $commit=0; |
7179
|
84
|
|
|
|
|
150
|
my @item = (); |
7180
|
84
|
|
|
|
|
162
|
my %item = (); |
7181
|
84
|
|
|
|
|
129
|
my $repeating = $_[2]; |
7182
|
84
|
|
|
|
|
137
|
my $_noactions = $_[3]; |
7183
|
84
|
50
|
|
|
|
227
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
84
|
|
|
|
|
130
|
|
|
84
|
|
|
|
|
161
|
|
7184
|
84
|
|
|
|
|
152
|
my $_itempos = $_[5]; |
7185
|
84
|
100
|
|
|
|
294
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
7186
|
84
|
|
|
|
|
246
|
my $text; |
7187
|
|
|
|
|
|
|
my $lastsep; |
7188
|
84
|
|
|
|
|
0
|
my $current_match; |
7189
|
84
|
|
|
|
|
224
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{LINE}); |
7190
|
84
|
|
|
|
|
282
|
$expectation->at($_[1]); |
7191
|
|
|
|
|
|
|
|
7192
|
84
|
|
|
|
|
142
|
my $thisline; |
7193
|
84
|
|
|
|
|
321
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
7194
|
|
|
|
|
|
|
|
7195
|
|
|
|
|
|
|
|
7196
|
|
|
|
|
|
|
|
7197
|
84
|
|
33
|
|
|
398
|
while (!$_matched && !$commit) |
7198
|
|
|
|
|
|
|
{ |
7199
|
|
|
|
|
|
|
|
7200
|
84
|
50
|
|
|
|
191
|
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
|
84
|
|
|
|
|
209
|
my $thisprod = $thisrule->{"prods"}[0]; |
7206
|
84
|
|
|
|
|
173
|
$text = $_[1]; |
7207
|
84
|
|
|
|
|
168
|
my $_savetext; |
7208
|
84
|
|
|
|
|
191
|
@item = (q{SCEN}); |
7209
|
84
|
|
|
|
|
189
|
%item = (__RULE__ => q{SCEN}); |
7210
|
84
|
|
|
|
|
135
|
my $repcount = 0; |
7211
|
|
|
|
|
|
|
|
7212
|
|
|
|
|
|
|
|
7213
|
84
|
50
|
|
|
|
196
|
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
|
4
|
|
|
4
|
|
35
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
763
|
|
|
84
|
|
|
|
|
118
|
|
7219
|
84
|
|
|
|
|
215
|
$expectation->is(q{})->at($text); |
7220
|
84
|
100
|
|
45
|
|
433
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::LINE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
84
|
|
|
|
|
183
|
|
7221
|
|
|
|
|
|
|
{ |
7222
|
|
|
|
|
|
|
|
7223
|
26
|
50
|
|
|
|
71
|
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
|
26
|
|
|
|
|
87
|
$expectation->failed(); |
7229
|
26
|
|
|
|
|
59
|
last; |
7230
|
|
|
|
|
|
|
} |
7231
|
58
|
50
|
|
|
|
223
|
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
|
58
|
|
|
|
|
133
|
$item{q{LINE}} = $_tok; |
7239
|
58
|
|
|
|
|
106
|
push @item, $_tok; |
7240
|
|
|
|
|
|
|
|
7241
|
|
|
|
|
|
|
} |
7242
|
|
|
|
|
|
|
|
7243
|
58
|
50
|
|
|
|
165
|
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
|
4
|
|
|
4
|
|
33
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
1660
|
|
|
58
|
|
|
|
|
114
|
|
7249
|
58
|
|
|
|
|
181
|
$expectation->is(q{SCEN})->at($text); |
7250
|
58
|
100
|
|
30
|
|
473
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SCEN($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
58
|
|
|
|
|
138
|
|
7251
|
|
|
|
|
|
|
{ |
7252
|
|
|
|
|
|
|
|
7253
|
24
|
50
|
|
|
|
71
|
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
|
24
|
|
|
|
|
72
|
$expectation->failed(); |
7259
|
24
|
|
|
|
|
44
|
last; |
7260
|
|
|
|
|
|
|
} |
7261
|
34
|
50
|
|
|
|
146
|
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
|
34
|
|
|
|
|
80
|
$item{q{SCEN}} = $_tok; |
7269
|
34
|
|
|
|
|
66
|
push @item, $_tok; |
7270
|
|
|
|
|
|
|
|
7271
|
|
|
|
|
|
|
} |
7272
|
|
|
|
|
|
|
|
7273
|
34
|
50
|
|
|
|
81
|
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
|
34
|
50
|
|
|
|
83
|
$_tok = ($_noactions) ? 0 : do {$return = [@{$item{LINE}},@{$item{SCEN}}]}; |
|
34
|
|
|
|
|
62
|
|
|
34
|
|
|
|
|
77
|
|
|
34
|
|
|
|
|
87
|
|
7281
|
34
|
50
|
|
|
|
92
|
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
|
34
|
50
|
|
|
|
96
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
7288
|
|
|
|
|
|
|
. $_tok . q{])}, |
7289
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7290
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7291
|
34
|
|
|
|
|
60
|
push @item, $_tok; |
7292
|
34
|
|
|
|
|
71
|
$item{__ACTION1__}=$_tok; |
7293
|
|
|
|
|
|
|
|
7294
|
|
|
|
|
|
|
|
7295
|
34
|
50
|
|
|
|
92
|
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
|
34
|
|
|
|
|
58
|
$_matched = 1; |
7304
|
34
|
|
|
|
|
62
|
last; |
7305
|
|
|
|
|
|
|
} |
7306
|
|
|
|
|
|
|
|
7307
|
|
|
|
|
|
|
|
7308
|
84
|
|
66
|
|
|
358
|
while (!$_matched && !$commit) |
7309
|
|
|
|
|
|
|
{ |
7310
|
|
|
|
|
|
|
|
7311
|
50
|
50
|
|
|
|
128
|
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
|
50
|
|
|
|
|
120
|
my $thisprod = $thisrule->{"prods"}[1]; |
7317
|
50
|
|
|
|
|
93
|
$text = $_[1]; |
7318
|
50
|
|
|
|
|
92
|
my $_savetext; |
7319
|
50
|
|
|
|
|
119
|
@item = (q{SCEN}); |
7320
|
50
|
|
|
|
|
166
|
%item = (__RULE__ => q{SCEN}); |
7321
|
50
|
|
|
|
|
94
|
my $repcount = 0; |
7322
|
|
|
|
|
|
|
|
7323
|
|
|
|
|
|
|
|
7324
|
50
|
50
|
|
|
|
122
|
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
|
4
|
|
|
4
|
|
35
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
2362
|
|
|
50
|
|
|
|
|
77
|
|
7330
|
50
|
|
|
|
|
123
|
$expectation->is(q{})->at($text); |
7331
|
50
|
100
|
|
30
|
|
234
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::LINE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
50
|
|
|
|
|
112
|
|
7332
|
|
|
|
|
|
|
{ |
7333
|
|
|
|
|
|
|
|
7334
|
26
|
50
|
|
|
|
92
|
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
|
26
|
|
|
|
|
86
|
$expectation->failed(); |
7340
|
26
|
|
|
|
|
51
|
last; |
7341
|
|
|
|
|
|
|
} |
7342
|
24
|
50
|
|
|
|
101
|
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
|
24
|
|
|
|
|
63
|
$item{q{LINE}} = $_tok; |
7350
|
24
|
|
|
|
|
51
|
push @item, $_tok; |
7351
|
|
|
|
|
|
|
|
7352
|
|
|
|
|
|
|
} |
7353
|
|
|
|
|
|
|
|
7354
|
24
|
50
|
|
|
|
67
|
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
|
24
|
50
|
|
|
|
68
|
$_tok = ($_noactions) ? 0 : do {$return = [@{$item{LINE}}]}; |
|
24
|
|
|
|
|
43
|
|
|
24
|
|
|
|
|
68
|
|
7362
|
24
|
50
|
|
|
|
64
|
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
|
24
|
50
|
|
|
|
70
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
7369
|
|
|
|
|
|
|
. $_tok . q{])}, |
7370
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7371
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7372
|
24
|
|
|
|
|
51
|
push @item, $_tok; |
7373
|
24
|
|
|
|
|
52
|
$item{__ACTION1__}=$_tok; |
7374
|
|
|
|
|
|
|
|
7375
|
|
|
|
|
|
|
|
7376
|
24
|
50
|
|
|
|
62
|
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
|
24
|
|
|
|
|
52
|
$_matched = 1; |
7385
|
24
|
|
|
|
|
39
|
last; |
7386
|
|
|
|
|
|
|
} |
7387
|
|
|
|
|
|
|
|
7388
|
|
|
|
|
|
|
|
7389
|
84
|
100
|
66
|
|
|
292
|
unless ( $_matched || defined($score) ) |
7390
|
|
|
|
|
|
|
{ |
7391
|
|
|
|
|
|
|
|
7392
|
|
|
|
|
|
|
|
7393
|
26
|
|
|
|
|
66
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
7394
|
26
|
50
|
|
|
|
77
|
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
|
26
|
|
|
|
|
159
|
return undef; |
7400
|
|
|
|
|
|
|
} |
7401
|
58
|
50
|
33
|
|
|
166
|
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
|
58
|
|
|
|
|
91
|
splice @{$thisparser->{errors}}, $err_at; |
|
58
|
|
|
|
|
127
|
|
7410
|
58
|
50
|
|
|
|
144
|
$return = $item[$#item] unless defined $return; |
7411
|
58
|
50
|
|
|
|
112
|
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
|
58
|
|
|
|
|
127
|
$_[1] = $text; |
7424
|
58
|
|
|
|
|
403
|
return $return; |
7425
|
|
|
|
|
|
|
} |
7426
|
|
|
|
|
|
|
|
7427
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
7428
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SCENMODULE |
7429
|
|
|
|
|
|
|
{ |
7430
|
506
|
|
|
506
|
|
896
|
my $thisparser = $_[0]; |
7431
|
4
|
|
|
4
|
|
39
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
2196
|
|
7432
|
506
|
|
50
|
|
|
1191
|
local $tracelevel = ($tracelevel||0)+1; |
7433
|
506
|
|
|
|
|
732
|
$ERRORS = 0; |
7434
|
506
|
|
|
|
|
1003
|
my $thisrule = $thisparser->{"rules"}{"SCENMODULE"}; |
7435
|
|
|
|
|
|
|
|
7436
|
506
|
50
|
|
|
|
983
|
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
|
506
|
|
|
|
|
689
|
my $err_at = @{$thisparser->{errors}}; |
|
506
|
|
|
|
|
957
|
|
7444
|
|
|
|
|
|
|
|
7445
|
506
|
|
|
|
|
1182
|
my $score; |
7446
|
|
|
|
|
|
|
my $score_return; |
7447
|
506
|
|
|
|
|
0
|
my $_tok; |
7448
|
506
|
|
|
|
|
737
|
my $return = undef; |
7449
|
506
|
|
|
|
|
715
|
my $_matched=0; |
7450
|
506
|
|
|
|
|
703
|
my $commit=0; |
7451
|
506
|
|
|
|
|
811
|
my @item = (); |
7452
|
506
|
|
|
|
|
776
|
my %item = (); |
7453
|
506
|
|
|
|
|
704
|
my $repeating = $_[2]; |
7454
|
506
|
|
|
|
|
739
|
my $_noactions = $_[3]; |
7455
|
506
|
50
|
|
|
|
1012
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
506
|
|
|
|
|
695
|
|
|
506
|
|
|
|
|
805
|
|
7456
|
506
|
|
|
|
|
820
|
my $_itempos = $_[5]; |
7457
|
506
|
100
|
|
|
|
1249
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
7458
|
506
|
|
|
|
|
1124
|
my $text; |
7459
|
|
|
|
|
|
|
my $lastsep; |
7460
|
506
|
|
|
|
|
0
|
my $current_match; |
7461
|
506
|
|
|
|
|
1005
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/Scen::/}); |
7462
|
506
|
|
|
|
|
1307
|
$expectation->at($_[1]); |
7463
|
|
|
|
|
|
|
|
7464
|
506
|
|
|
|
|
730
|
my $thisline; |
7465
|
506
|
|
|
|
|
1572
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
7466
|
|
|
|
|
|
|
|
7467
|
|
|
|
|
|
|
|
7468
|
|
|
|
|
|
|
|
7469
|
506
|
|
33
|
|
|
1876
|
while (!$_matched && !$commit) |
7470
|
|
|
|
|
|
|
{ |
7471
|
|
|
|
|
|
|
|
7472
|
506
|
50
|
|
|
|
1071
|
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
|
506
|
|
|
|
|
959
|
my $thisprod = $thisrule->{"prods"}[0]; |
7478
|
506
|
|
|
|
|
904
|
$text = $_[1]; |
7479
|
506
|
|
|
|
|
695
|
my $_savetext; |
7480
|
506
|
|
|
|
|
902
|
@item = (q{SCENMODULE}); |
7481
|
506
|
|
|
|
|
923
|
%item = (__RULE__ => q{SCENMODULE}); |
7482
|
506
|
|
|
|
|
781
|
my $repcount = 0; |
7483
|
|
|
|
|
|
|
|
7484
|
|
|
|
|
|
|
|
7485
|
506
|
50
|
|
|
|
953
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/Scen::/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
7486
|
|
|
|
|
|
|
q{SCENMODULE}, |
7487
|
|
|
|
|
|
|
$tracelevel) |
7488
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7489
|
506
|
|
|
|
|
884
|
undef $lastsep; |
7490
|
506
|
|
|
|
|
1160
|
$expectation->is(q{})->at($text); |
7491
|
|
|
|
|
|
|
|
7492
|
|
|
|
|
|
|
|
7493
|
506
|
100
|
33
|
|
|
2985
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:Scen::)/) |
|
506
|
50
|
|
|
|
3463
|
|
7494
|
|
|
|
|
|
|
{ |
7495
|
506
|
50
|
|
|
|
1390
|
$text = $lastsep . $text if defined $lastsep; |
7496
|
506
|
|
|
|
|
1367
|
$expectation->failed(); |
7497
|
506
|
50
|
|
|
|
1033
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
7498
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7499
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7500
|
|
|
|
|
|
|
|
7501
|
506
|
|
|
|
|
991
|
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
|
4
|
|
|
4
|
|
36
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
2385
|
|
|
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
|
506
|
50
|
33
|
|
|
1733
|
unless ( $_matched || defined($score) ) |
7578
|
|
|
|
|
|
|
{ |
7579
|
|
|
|
|
|
|
|
7580
|
|
|
|
|
|
|
|
7581
|
506
|
|
|
|
|
971
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
7582
|
506
|
50
|
|
|
|
941
|
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
|
506
|
|
|
|
|
2494
|
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
|
126
|
|
|
126
|
|
224
|
my $thisparser = $_[0]; |
7619
|
4
|
|
|
4
|
|
42
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
2195
|
|
7620
|
126
|
|
50
|
|
|
319
|
local $tracelevel = ($tracelevel||0)+1; |
7621
|
126
|
|
|
|
|
184
|
$ERRORS = 0; |
7622
|
126
|
|
|
|
|
264
|
my $thisrule = $thisparser->{"rules"}{"PVALUE"}; |
7623
|
|
|
|
|
|
|
|
7624
|
126
|
50
|
|
|
|
290
|
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
|
126
|
|
|
|
|
200
|
my $err_at = @{$thisparser->{errors}}; |
|
126
|
|
|
|
|
235
|
|
7632
|
|
|
|
|
|
|
|
7633
|
126
|
|
|
|
|
316
|
my $score; |
7634
|
|
|
|
|
|
|
my $score_return; |
7635
|
126
|
|
|
|
|
0
|
my $_tok; |
7636
|
126
|
|
|
|
|
212
|
my $return = undef; |
7637
|
126
|
|
|
|
|
175
|
my $_matched=0; |
7638
|
126
|
|
|
|
|
175
|
my $commit=0; |
7639
|
126
|
|
|
|
|
203
|
my @item = (); |
7640
|
126
|
|
|
|
|
192
|
my %item = (); |
7641
|
126
|
|
|
|
|
246
|
my $repeating = $_[2]; |
7642
|
126
|
|
|
|
|
192
|
my $_noactions = $_[3]; |
7643
|
126
|
50
|
|
|
|
249
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
126
|
|
|
|
|
226
|
|
|
126
|
|
|
|
|
249
|
|
7644
|
126
|
|
|
|
|
227
|
my $_itempos = $_[5]; |
7645
|
126
|
100
|
|
|
|
341
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
7646
|
126
|
|
|
|
|
325
|
my $text; |
7647
|
|
|
|
|
|
|
my $lastsep; |
7648
|
126
|
|
|
|
|
0
|
my $current_match; |
7649
|
126
|
|
|
|
|
293
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/'/, or /"/, or /`/, or PNOTQUOTED}); |
7650
|
126
|
|
|
|
|
348
|
$expectation->at($_[1]); |
7651
|
|
|
|
|
|
|
|
7652
|
126
|
|
|
|
|
189
|
my $thisline; |
7653
|
126
|
|
|
|
|
445
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
7654
|
|
|
|
|
|
|
|
7655
|
|
|
|
|
|
|
|
7656
|
|
|
|
|
|
|
|
7657
|
126
|
|
33
|
|
|
534
|
while (!$_matched && !$commit) |
7658
|
|
|
|
|
|
|
{ |
7659
|
|
|
|
|
|
|
|
7660
|
126
|
50
|
|
|
|
297
|
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
|
126
|
|
|
|
|
275
|
my $thisprod = $thisrule->{"prods"}[0]; |
7666
|
126
|
|
|
|
|
281
|
$text = $_[1]; |
7667
|
126
|
|
|
|
|
181
|
my $_savetext; |
7668
|
126
|
|
|
|
|
269
|
@item = (q{PVALUE}); |
7669
|
126
|
|
|
|
|
244
|
%item = (__RULE__ => q{PVALUE}); |
7670
|
126
|
|
|
|
|
335
|
my $repcount = 0; |
7671
|
|
|
|
|
|
|
|
7672
|
|
|
|
|
|
|
|
7673
|
126
|
50
|
|
|
|
263
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/'/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
7674
|
|
|
|
|
|
|
q{PVALUE}, |
7675
|
|
|
|
|
|
|
$tracelevel) |
7676
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7677
|
126
|
|
|
|
|
237
|
undef $lastsep; |
7678
|
126
|
|
|
|
|
291
|
$expectation->is(q{})->at($text); |
7679
|
|
|
|
|
|
|
|
7680
|
|
|
|
|
|
|
|
7681
|
126
|
50
|
66
|
|
|
794
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:')/) |
|
126
|
100
|
|
|
|
945
|
|
7682
|
|
|
|
|
|
|
{ |
7683
|
54
|
50
|
|
|
|
202
|
$text = $lastsep . $text if defined $lastsep; |
7684
|
54
|
|
|
|
|
168
|
$expectation->failed(); |
7685
|
54
|
50
|
|
|
|
125
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
7686
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7687
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7688
|
|
|
|
|
|
|
|
7689
|
54
|
|
|
|
|
122
|
last; |
7690
|
|
|
|
|
|
|
} |
7691
|
72
|
|
|
|
|
348
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
7692
|
72
|
|
|
|
|
207
|
substr($text,0,length($current_match),q{}); |
7693
|
72
|
50
|
|
|
|
166
|
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
|
72
|
|
|
|
|
179
|
push @item, $item{__PATTERN1__}=$current_match; |
7698
|
|
|
|
|
|
|
|
7699
|
|
|
|
|
|
|
|
7700
|
72
|
50
|
|
|
|
149
|
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
|
4
|
|
|
4
|
|
48
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
3240
|
|
|
72
|
|
|
|
|
103
|
|
7706
|
72
|
|
|
|
|
143
|
$expectation->is(q{PSQUOTE})->at($text); |
7707
|
72
|
50
|
|
72
|
|
291
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PSQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
72
|
|
|
|
|
149
|
|
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
|
72
|
50
|
|
|
|
215
|
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
|
72
|
|
|
|
|
144
|
$item{q{PSQUOTE}} = $_tok; |
7726
|
72
|
|
|
|
|
119
|
push @item, $_tok; |
7727
|
|
|
|
|
|
|
|
7728
|
|
|
|
|
|
|
} |
7729
|
|
|
|
|
|
|
|
7730
|
72
|
50
|
|
|
|
151
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/'/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
7731
|
|
|
|
|
|
|
q{PVALUE}, |
7732
|
|
|
|
|
|
|
$tracelevel) |
7733
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7734
|
72
|
|
|
|
|
143
|
undef $lastsep; |
7735
|
72
|
|
|
|
|
178
|
$expectation->is(q{/'/})->at($text); |
7736
|
|
|
|
|
|
|
|
7737
|
|
|
|
|
|
|
|
7738
|
72
|
50
|
33
|
|
|
360
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:')/) |
|
72
|
50
|
|
|
|
520
|
|
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
|
72
|
|
|
|
|
315
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
7749
|
72
|
|
|
|
|
240
|
substr($text,0,length($current_match),q{}); |
7750
|
72
|
50
|
|
|
|
156
|
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
|
72
|
|
|
|
|
177
|
push @item, $item{__PATTERN2__}=$current_match; |
7755
|
|
|
|
|
|
|
|
7756
|
|
|
|
|
|
|
|
7757
|
72
|
50
|
|
|
|
156
|
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
|
72
|
50
|
|
|
|
134
|
$_tok = ($_noactions) ? 0 : do {$return = $item{PSQUOTE}}; |
|
72
|
|
|
|
|
161
|
|
7765
|
72
|
50
|
|
|
|
174
|
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
|
72
|
50
|
|
|
|
151
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
7772
|
|
|
|
|
|
|
. $_tok . q{])}, |
7773
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7774
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7775
|
72
|
|
|
|
|
131
|
push @item, $_tok; |
7776
|
72
|
|
|
|
|
124
|
$item{__ACTION1__}=$_tok; |
7777
|
|
|
|
|
|
|
|
7778
|
|
|
|
|
|
|
|
7779
|
72
|
50
|
|
|
|
143
|
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
|
72
|
|
|
|
|
118
|
$_matched = 1; |
7788
|
72
|
|
|
|
|
156
|
last; |
7789
|
|
|
|
|
|
|
} |
7790
|
|
|
|
|
|
|
|
7791
|
|
|
|
|
|
|
|
7792
|
126
|
|
66
|
|
|
365
|
while (!$_matched && !$commit) |
7793
|
|
|
|
|
|
|
{ |
7794
|
|
|
|
|
|
|
|
7795
|
54
|
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
|
54
|
|
|
|
|
117
|
my $thisprod = $thisrule->{"prods"}[1]; |
7801
|
54
|
|
|
|
|
108
|
$text = $_[1]; |
7802
|
54
|
|
|
|
|
76
|
my $_savetext; |
7803
|
54
|
|
|
|
|
115
|
@item = (q{PVALUE}); |
7804
|
54
|
|
|
|
|
130
|
%item = (__RULE__ => q{PVALUE}); |
7805
|
54
|
|
|
|
|
92
|
my $repcount = 0; |
7806
|
|
|
|
|
|
|
|
7807
|
|
|
|
|
|
|
|
7808
|
54
|
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
|
54
|
|
|
|
|
90
|
undef $lastsep; |
7813
|
54
|
|
|
|
|
136
|
$expectation->is(q{})->at($text); |
7814
|
|
|
|
|
|
|
|
7815
|
|
|
|
|
|
|
|
7816
|
54
|
50
|
66
|
|
|
283
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:")/) |
|
54
|
100
|
|
|
|
377
|
|
7817
|
|
|
|
|
|
|
{ |
7818
|
46
|
50
|
|
|
|
138
|
$text = $lastsep . $text if defined $lastsep; |
7819
|
46
|
|
|
|
|
131
|
$expectation->failed(); |
7820
|
46
|
50
|
|
|
|
113
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
7821
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7822
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7823
|
|
|
|
|
|
|
|
7824
|
46
|
|
|
|
|
101
|
last; |
7825
|
|
|
|
|
|
|
} |
7826
|
8
|
|
|
|
|
43
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
7827
|
8
|
|
|
|
|
30
|
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
|
|
|
|
|
20
|
push @item, $item{__PATTERN1__}=$current_match; |
7833
|
|
|
|
|
|
|
|
7834
|
|
|
|
|
|
|
|
7835
|
8
|
50
|
|
|
|
19
|
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
|
4
|
|
|
4
|
|
45
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
3213
|
|
|
8
|
|
|
|
|
9
|
|
7841
|
8
|
|
|
|
|
18
|
$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
|
|
|
|
26
|
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
|
|
|
|
|
20
|
$item{q{PDQUOTE}} = $_tok; |
7861
|
8
|
|
|
|
|
15
|
push @item, $_tok; |
7862
|
|
|
|
|
|
|
|
7863
|
|
|
|
|
|
|
} |
7864
|
|
|
|
|
|
|
|
7865
|
8
|
50
|
|
|
|
16
|
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
|
|
|
|
|
18
|
$expectation->is(q{/"/})->at($text); |
7871
|
|
|
|
|
|
|
|
7872
|
|
|
|
|
|
|
|
7873
|
8
|
50
|
33
|
|
|
60
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:")/) |
|
8
|
50
|
|
|
|
67
|
|
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
|
|
|
|
|
37
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
7884
|
8
|
|
|
|
|
29
|
substr($text,0,length($current_match),q{}); |
7885
|
8
|
50
|
|
|
|
27
|
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
|
|
|
|
|
21
|
push @item, $item{__PATTERN2__}=$current_match; |
7890
|
|
|
|
|
|
|
|
7891
|
|
|
|
|
|
|
|
7892
|
8
|
50
|
|
|
|
19
|
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
|
|
|
|
15
|
$_tok = ($_noactions) ? 0 : do {$return = $item{PDQUOTE}}; |
|
8
|
|
|
|
|
17
|
|
7900
|
8
|
50
|
|
|
|
18
|
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
|
|
|
|
18
|
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
|
|
|
|
|
12
|
push @item, $_tok; |
7911
|
8
|
|
|
|
|
16
|
$item{__ACTION1__}=$_tok; |
7912
|
|
|
|
|
|
|
|
7913
|
|
|
|
|
|
|
|
7914
|
8
|
50
|
|
|
|
15
|
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
|
|
|
|
|
12
|
$_matched = 1; |
7923
|
8
|
|
|
|
|
17
|
last; |
7924
|
|
|
|
|
|
|
} |
7925
|
|
|
|
|
|
|
|
7926
|
|
|
|
|
|
|
|
7927
|
126
|
|
66
|
|
|
350
|
while (!$_matched && !$commit) |
7928
|
|
|
|
|
|
|
{ |
7929
|
|
|
|
|
|
|
|
7930
|
46
|
50
|
|
|
|
116
|
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
|
46
|
|
|
|
|
96
|
my $thisprod = $thisrule->{"prods"}[2]; |
7936
|
46
|
|
|
|
|
83
|
$text = $_[1]; |
7937
|
46
|
|
|
|
|
84
|
my $_savetext; |
7938
|
46
|
|
|
|
|
101
|
@item = (q{PVALUE}); |
7939
|
46
|
|
|
|
|
101
|
%item = (__RULE__ => q{PVALUE}); |
7940
|
46
|
|
|
|
|
78
|
my $repcount = 0; |
7941
|
|
|
|
|
|
|
|
7942
|
|
|
|
|
|
|
|
7943
|
46
|
50
|
|
|
|
93
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/`/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
7944
|
|
|
|
|
|
|
q{PVALUE}, |
7945
|
|
|
|
|
|
|
$tracelevel) |
7946
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7947
|
46
|
|
|
|
|
82
|
undef $lastsep; |
7948
|
46
|
|
|
|
|
105
|
$expectation->is(q{})->at($text); |
7949
|
|
|
|
|
|
|
|
7950
|
|
|
|
|
|
|
|
7951
|
46
|
50
|
33
|
|
|
233
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:`)/) |
|
46
|
50
|
|
|
|
305
|
|
7952
|
|
|
|
|
|
|
{ |
7953
|
46
|
50
|
|
|
|
131
|
$text = $lastsep . $text if defined $lastsep; |
7954
|
46
|
|
|
|
|
144
|
$expectation->failed(); |
7955
|
46
|
50
|
|
|
|
103
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
7956
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7957
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7958
|
|
|
|
|
|
|
|
7959
|
46
|
|
|
|
|
98
|
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
|
4
|
|
|
4
|
|
44
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
2494
|
|
|
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
|
126
|
|
66
|
|
|
358
|
while (!$_matched && !$commit) |
8063
|
|
|
|
|
|
|
{ |
8064
|
|
|
|
|
|
|
|
8065
|
46
|
50
|
|
|
|
95
|
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
|
46
|
|
|
|
|
97
|
my $thisprod = $thisrule->{"prods"}[3]; |
8071
|
46
|
|
|
|
|
291
|
$text = $_[1]; |
8072
|
46
|
|
|
|
|
67
|
my $_savetext; |
8073
|
46
|
|
|
|
|
100
|
@item = (q{PVALUE}); |
8074
|
46
|
|
|
|
|
105
|
%item = (__RULE__ => q{PVALUE}); |
8075
|
46
|
|
|
|
|
84
|
my $repcount = 0; |
8076
|
|
|
|
|
|
|
|
8077
|
|
|
|
|
|
|
|
8078
|
46
|
50
|
|
|
|
97
|
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
|
4
|
|
|
4
|
|
42
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
2787
|
|
|
46
|
|
|
|
|
70
|
|
8084
|
46
|
|
|
|
|
111
|
$expectation->is(q{})->at($text); |
8085
|
46
|
50
|
|
46
|
|
242
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PNOTQUOTED($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
46
|
|
|
|
|
106
|
|
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
|
46
|
50
|
|
|
|
168
|
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
|
46
|
|
|
|
|
98
|
$item{q{PNOTQUOTED}} = $_tok; |
8104
|
46
|
|
|
|
|
91
|
push @item, $_tok; |
8105
|
|
|
|
|
|
|
|
8106
|
|
|
|
|
|
|
} |
8107
|
|
|
|
|
|
|
|
8108
|
46
|
50
|
|
|
|
92
|
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
|
46
|
50
|
|
|
|
104
|
$_tok = ($_noactions) ? 0 : do {$return = $item{PNOTQUOTED}}; |
|
46
|
|
|
|
|
98
|
|
8116
|
46
|
50
|
|
|
|
110
|
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
|
46
|
50
|
|
|
|
97
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
8123
|
|
|
|
|
|
|
. $_tok . q{])}, |
8124
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8125
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8126
|
46
|
|
|
|
|
76
|
push @item, $_tok; |
8127
|
46
|
|
|
|
|
92
|
$item{__ACTION1__}=$_tok; |
8128
|
|
|
|
|
|
|
|
8129
|
|
|
|
|
|
|
|
8130
|
46
|
50
|
|
|
|
98
|
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
|
46
|
|
|
|
|
90
|
$_matched = 1; |
8139
|
46
|
|
|
|
|
77
|
last; |
8140
|
|
|
|
|
|
|
} |
8141
|
|
|
|
|
|
|
|
8142
|
|
|
|
|
|
|
|
8143
|
126
|
50
|
33
|
|
|
301
|
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
|
126
|
50
|
33
|
|
|
320
|
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
|
126
|
|
|
|
|
179
|
splice @{$thisparser->{errors}}, $err_at; |
|
126
|
|
|
|
|
265
|
|
8164
|
126
|
50
|
|
|
|
276
|
$return = $item[$#item] unless defined $return; |
8165
|
126
|
50
|
|
|
|
259
|
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
|
126
|
|
|
|
|
253
|
$_[1] = $text; |
8178
|
126
|
|
|
|
|
799
|
return $return; |
8179
|
|
|
|
|
|
|
} |
8180
|
|
|
|
|
|
|
|
8181
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
8182
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PSQUOTE |
8183
|
|
|
|
|
|
|
{ |
8184
|
80
|
|
|
80
|
|
148
|
my $thisparser = $_[0]; |
8185
|
4
|
|
|
4
|
|
36
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
1554
|
|
8186
|
80
|
|
50
|
|
|
232
|
local $tracelevel = ($tracelevel||0)+1; |
8187
|
80
|
|
|
|
|
140
|
$ERRORS = 0; |
8188
|
80
|
|
|
|
|
165
|
my $thisrule = $thisparser->{"rules"}{"PSQUOTE"}; |
8189
|
|
|
|
|
|
|
|
8190
|
80
|
50
|
|
|
|
165
|
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
|
80
|
|
|
|
|
119
|
my $err_at = @{$thisparser->{errors}}; |
|
80
|
|
|
|
|
140
|
|
8198
|
|
|
|
|
|
|
|
8199
|
80
|
|
|
|
|
189
|
my $score; |
8200
|
|
|
|
|
|
|
my $score_return; |
8201
|
80
|
|
|
|
|
0
|
my $_tok; |
8202
|
80
|
|
|
|
|
121
|
my $return = undef; |
8203
|
80
|
|
|
|
|
118
|
my $_matched=0; |
8204
|
80
|
|
|
|
|
111
|
my $commit=0; |
8205
|
80
|
|
|
|
|
131
|
my @item = (); |
8206
|
80
|
|
|
|
|
117
|
my %item = (); |
8207
|
80
|
|
|
|
|
157
|
my $repeating = $_[2]; |
8208
|
80
|
|
|
|
|
116
|
my $_noactions = $_[3]; |
8209
|
80
|
50
|
|
|
|
165
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
80
|
|
|
|
|
108
|
|
|
80
|
|
|
|
|
149
|
|
8210
|
80
|
|
|
|
|
125
|
my $_itempos = $_[5]; |
8211
|
80
|
100
|
|
|
|
222
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
8212
|
80
|
|
|
|
|
177
|
my $text; |
8213
|
|
|
|
|
|
|
my $lastsep; |
8214
|
80
|
|
|
|
|
0
|
my $current_match; |
8215
|
80
|
|
|
|
|
152
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{NOTSQUOTE}); |
8216
|
80
|
|
|
|
|
214
|
$expectation->at($_[1]); |
8217
|
|
|
|
|
|
|
|
8218
|
80
|
|
|
|
|
111
|
my $thisline; |
8219
|
80
|
|
|
|
|
270
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
8220
|
|
|
|
|
|
|
|
8221
|
|
|
|
|
|
|
|
8222
|
|
|
|
|
|
|
|
8223
|
80
|
|
33
|
|
|
321
|
while (!$_matched && !$commit) |
8224
|
|
|
|
|
|
|
{ |
8225
|
|
|
|
|
|
|
|
8226
|
80
|
50
|
|
|
|
197
|
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
|
80
|
|
|
|
|
166
|
my $thisprod = $thisrule->{"prods"}[0]; |
8232
|
80
|
|
|
|
|
137
|
$text = $_[1]; |
8233
|
80
|
|
|
|
|
103
|
my $_savetext; |
8234
|
80
|
|
|
|
|
184
|
@item = (q{PSQUOTE}); |
8235
|
80
|
|
|
|
|
170
|
%item = (__RULE__ => q{PSQUOTE}); |
8236
|
80
|
|
|
|
|
107
|
my $repcount = 0; |
8237
|
|
|
|
|
|
|
|
8238
|
|
|
|
|
|
|
|
8239
|
80
|
50
|
|
|
|
178
|
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
|
4
|
|
|
4
|
|
38
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
822
|
|
|
80
|
|
|
|
|
111
|
|
8245
|
80
|
|
|
|
|
180
|
$expectation->is(q{})->at($text); |
8246
|
80
|
50
|
|
80
|
|
441
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::NOTSQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
80
|
|
|
|
|
195
|
|
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
|
80
|
50
|
|
|
|
270
|
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
|
80
|
|
|
|
|
148
|
$item{q{NOTSQUOTE}} = $_tok; |
8265
|
80
|
|
|
|
|
139
|
push @item, $_tok; |
8266
|
|
|
|
|
|
|
|
8267
|
|
|
|
|
|
|
} |
8268
|
|
|
|
|
|
|
|
8269
|
80
|
50
|
|
|
|
162
|
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
|
4
|
|
|
4
|
|
33
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
866
|
|
|
80
|
|
|
|
|
106
|
|
8275
|
80
|
|
|
|
|
177
|
$expectation->is(q{SLASHEDSQUOTE})->at($text); |
8276
|
80
|
100
|
|
80
|
|
348
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SLASHEDSQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
80
|
|
|
|
|
175
|
|
8277
|
|
|
|
|
|
|
{ |
8278
|
|
|
|
|
|
|
|
8279
|
72
|
50
|
|
|
|
155
|
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
|
72
|
|
|
|
|
183
|
$expectation->failed(); |
8285
|
72
|
|
|
|
|
126
|
last; |
8286
|
|
|
|
|
|
|
} |
8287
|
8
|
50
|
|
|
|
28
|
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
|
|
|
|
18
|
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
|
4
|
|
|
4
|
|
39
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
1633
|
|
|
8
|
|
|
|
|
12
|
|
8305
|
8
|
|
|
|
|
21
|
$expectation->is(q{PSQUOTE})->at($text); |
8306
|
8
|
50
|
|
8
|
|
55
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PSQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
8
|
|
|
|
|
18
|
|
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
|
|
|
|
31
|
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
|
|
|
|
|
13
|
$item{q{PSQUOTE}} = $_tok; |
8325
|
8
|
|
|
|
|
17
|
push @item, $_tok; |
8326
|
|
|
|
|
|
|
|
8327
|
|
|
|
|
|
|
} |
8328
|
|
|
|
|
|
|
|
8329
|
8
|
50
|
|
|
|
19
|
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
|
|
|
|
18
|
$_tok = ($_noactions) ? 0 : do {$return = $item{NOTSQUOTE}.$item{SLASHEDSQUOTE}.$item{PSQUOTE}}; |
|
8
|
|
|
|
|
23
|
|
8337
|
8
|
50
|
|
|
|
22
|
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
|
|
|
|
|
13
|
$item{__ACTION1__}=$_tok; |
8349
|
|
|
|
|
|
|
|
8350
|
|
|
|
|
|
|
|
8351
|
8
|
50
|
|
|
|
19
|
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
|
|
|
|
|
13
|
last; |
8361
|
|
|
|
|
|
|
} |
8362
|
|
|
|
|
|
|
|
8363
|
|
|
|
|
|
|
|
8364
|
80
|
|
66
|
|
|
378
|
while (!$_matched && !$commit) |
8365
|
|
|
|
|
|
|
{ |
8366
|
|
|
|
|
|
|
|
8367
|
72
|
50
|
|
|
|
163
|
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
|
72
|
|
|
|
|
137
|
my $thisprod = $thisrule->{"prods"}[1]; |
8373
|
72
|
|
|
|
|
129
|
$text = $_[1]; |
8374
|
72
|
|
|
|
|
134
|
my $_savetext; |
8375
|
72
|
|
|
|
|
153
|
@item = (q{PSQUOTE}); |
8376
|
72
|
|
|
|
|
177
|
%item = (__RULE__ => q{PSQUOTE}); |
8377
|
72
|
|
|
|
|
115
|
my $repcount = 0; |
8378
|
|
|
|
|
|
|
|
8379
|
|
|
|
|
|
|
|
8380
|
72
|
50
|
|
|
|
139
|
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
|
4
|
|
|
4
|
|
33
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
16
|
|
|
4
|
|
|
|
|
2175
|
|
|
72
|
|
|
|
|
99
|
|
8386
|
72
|
|
|
|
|
145
|
$expectation->is(q{})->at($text); |
8387
|
72
|
50
|
|
72
|
|
303
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::NOTSQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
72
|
|
|
|
|
150
|
|
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
|
72
|
50
|
|
|
|
222
|
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
|
72
|
|
|
|
|
141
|
$item{q{NOTSQUOTE}} = $_tok; |
8406
|
72
|
|
|
|
|
118
|
push @item, $_tok; |
8407
|
|
|
|
|
|
|
|
8408
|
|
|
|
|
|
|
} |
8409
|
|
|
|
|
|
|
|
8410
|
72
|
50
|
|
|
|
141
|
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
|
72
|
|
|
|
|
130
|
$_matched = 1; |
8419
|
72
|
|
|
|
|
116
|
last; |
8420
|
|
|
|
|
|
|
} |
8421
|
|
|
|
|
|
|
|
8422
|
|
|
|
|
|
|
|
8423
|
80
|
50
|
33
|
|
|
204
|
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
|
80
|
50
|
66
|
|
|
261
|
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
|
80
|
|
|
|
|
109
|
splice @{$thisparser->{errors}}, $err_at; |
|
80
|
|
|
|
|
153
|
|
8444
|
80
|
100
|
|
|
|
209
|
$return = $item[$#item] unless defined $return; |
8445
|
80
|
50
|
|
|
|
179
|
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
|
80
|
|
|
|
|
138
|
$_[1] = $text; |
8458
|
80
|
|
|
|
|
443
|
return $return; |
8459
|
|
|
|
|
|
|
} |
8460
|
|
|
|
|
|
|
|
8461
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
8462
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SLASHEDSQUOTE |
8463
|
|
|
|
|
|
|
{ |
8464
|
80
|
|
|
80
|
|
148
|
my $thisparser = $_[0]; |
8465
|
4
|
|
|
4
|
|
38
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
3757
|
|
8466
|
80
|
|
50
|
|
|
204
|
local $tracelevel = ($tracelevel||0)+1; |
8467
|
80
|
|
|
|
|
112
|
$ERRORS = 0; |
8468
|
80
|
|
|
|
|
154
|
my $thisrule = $thisparser->{"rules"}{"SLASHEDSQUOTE"}; |
8469
|
|
|
|
|
|
|
|
8470
|
80
|
50
|
|
|
|
153
|
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
|
80
|
|
|
|
|
116
|
my $err_at = @{$thisparser->{errors}}; |
|
80
|
|
|
|
|
150
|
|
8478
|
|
|
|
|
|
|
|
8479
|
80
|
|
|
|
|
183
|
my $score; |
8480
|
|
|
|
|
|
|
my $score_return; |
8481
|
80
|
|
|
|
|
0
|
my $_tok; |
8482
|
80
|
|
|
|
|
109
|
my $return = undef; |
8483
|
80
|
|
|
|
|
123
|
my $_matched=0; |
8484
|
80
|
|
|
|
|
111
|
my $commit=0; |
8485
|
80
|
|
|
|
|
132
|
my @item = (); |
8486
|
80
|
|
|
|
|
113
|
my %item = (); |
8487
|
80
|
|
|
|
|
120
|
my $repeating = $_[2]; |
8488
|
80
|
|
|
|
|
110
|
my $_noactions = $_[3]; |
8489
|
80
|
50
|
|
|
|
163
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
80
|
|
|
|
|
110
|
|
|
80
|
|
|
|
|
146
|
|
8490
|
80
|
|
|
|
|
129
|
my $_itempos = $_[5]; |
8491
|
80
|
100
|
|
|
|
198
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
8492
|
80
|
|
|
|
|
182
|
my $text; |
8493
|
|
|
|
|
|
|
my $lastsep; |
8494
|
80
|
|
|
|
|
0
|
my $current_match; |
8495
|
80
|
|
|
|
|
161
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/\\\\'/}); |
8496
|
80
|
|
|
|
|
212
|
$expectation->at($_[1]); |
8497
|
|
|
|
|
|
|
|
8498
|
80
|
|
|
|
|
116
|
my $thisline; |
8499
|
80
|
|
|
|
|
234
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
8500
|
|
|
|
|
|
|
|
8501
|
|
|
|
|
|
|
|
8502
|
|
|
|
|
|
|
|
8503
|
80
|
|
33
|
|
|
326
|
while (!$_matched && !$commit) |
8504
|
|
|
|
|
|
|
{ |
8505
|
|
|
|
|
|
|
|
8506
|
80
|
50
|
|
|
|
167
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/\\\\'/]}, |
8507
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8508
|
|
|
|
|
|
|
q{SLASHEDSQUOTE}, |
8509
|
|
|
|
|
|
|
$tracelevel) |
8510
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8511
|
80
|
|
|
|
|
174
|
my $thisprod = $thisrule->{"prods"}[0]; |
8512
|
80
|
|
|
|
|
136
|
$text = $_[1]; |
8513
|
80
|
|
|
|
|
104
|
my $_savetext; |
8514
|
80
|
|
|
|
|
151
|
@item = (q{SLASHEDSQUOTE}); |
8515
|
80
|
|
|
|
|
157
|
%item = (__RULE__ => q{SLASHEDSQUOTE}); |
8516
|
80
|
|
|
|
|
117
|
my $repcount = 0; |
8517
|
|
|
|
|
|
|
|
8518
|
|
|
|
|
|
|
|
8519
|
80
|
50
|
|
|
|
144
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/\\\\'/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
8520
|
|
|
|
|
|
|
q{SLASHEDSQUOTE}, |
8521
|
|
|
|
|
|
|
$tracelevel) |
8522
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8523
|
80
|
|
|
|
|
148
|
undef $lastsep; |
8524
|
80
|
|
|
|
|
160
|
$expectation->is(q{})->at($text); |
8525
|
|
|
|
|
|
|
|
8526
|
|
|
|
|
|
|
|
8527
|
80
|
50
|
66
|
|
|
470
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\\')/) |
|
80
|
100
|
|
|
|
548
|
|
8528
|
|
|
|
|
|
|
{ |
8529
|
72
|
50
|
|
|
|
232
|
$text = $lastsep . $text if defined $lastsep; |
8530
|
72
|
|
|
|
|
214
|
$expectation->failed(); |
8531
|
72
|
50
|
|
|
|
158
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
8532
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8533
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8534
|
|
|
|
|
|
|
|
8535
|
72
|
|
|
|
|
176
|
last; |
8536
|
|
|
|
|
|
|
} |
8537
|
8
|
|
|
|
|
45
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
8538
|
8
|
|
|
|
|
26
|
substr($text,0,length($current_match),q{}); |
8539
|
8
|
50
|
|
|
|
20
|
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
|
|
|
|
|
23
|
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
|
|
|
|
18
|
$_tok = ($_noactions) ? 0 : do {$return = "'"}; |
|
8
|
|
|
|
|
16
|
|
8554
|
8
|
50
|
|
|
|
26
|
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
|
|
|
|
20
|
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
|
|
|
|
|
14
|
push @item, $_tok; |
8565
|
8
|
|
|
|
|
18
|
$item{__ACTION1__}=$_tok; |
8566
|
|
|
|
|
|
|
|
8567
|
|
|
|
|
|
|
|
8568
|
8
|
50
|
|
|
|
18
|
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
|
|
|
|
|
11
|
$_matched = 1; |
8577
|
8
|
|
|
|
|
18
|
last; |
8578
|
|
|
|
|
|
|
} |
8579
|
|
|
|
|
|
|
|
8580
|
|
|
|
|
|
|
|
8581
|
80
|
100
|
66
|
|
|
299
|
unless ( $_matched || defined($score) ) |
8582
|
|
|
|
|
|
|
{ |
8583
|
|
|
|
|
|
|
|
8584
|
|
|
|
|
|
|
|
8585
|
72
|
|
|
|
|
129
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
8586
|
72
|
50
|
|
|
|
143
|
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
|
72
|
|
|
|
|
339
|
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
|
|
|
|
|
11
|
splice @{$thisparser->{errors}}, $err_at; |
|
8
|
|
|
|
|
22
|
|
8602
|
8
|
50
|
|
|
|
21
|
$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
|
|
|
|
|
53
|
return $return; |
8617
|
|
|
|
|
|
|
} |
8618
|
|
|
|
|
|
|
|
8619
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
8620
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PNAME |
8621
|
|
|
|
|
|
|
{ |
8622
|
380
|
|
|
380
|
|
646
|
my $thisparser = $_[0]; |
8623
|
4
|
|
|
4
|
|
42
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
3942
|
|
8624
|
380
|
|
50
|
|
|
825
|
local $tracelevel = ($tracelevel||0)+1; |
8625
|
380
|
|
|
|
|
536
|
$ERRORS = 0; |
8626
|
380
|
|
|
|
|
735
|
my $thisrule = $thisparser->{"rules"}{"PNAME"}; |
8627
|
|
|
|
|
|
|
|
8628
|
380
|
50
|
|
|
|
746
|
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
|
380
|
|
|
|
|
510
|
my $err_at = @{$thisparser->{errors}}; |
|
380
|
|
|
|
|
718
|
|
8636
|
|
|
|
|
|
|
|
8637
|
380
|
|
|
|
|
917
|
my $score; |
8638
|
|
|
|
|
|
|
my $score_return; |
8639
|
380
|
|
|
|
|
0
|
my $_tok; |
8640
|
380
|
|
|
|
|
550
|
my $return = undef; |
8641
|
380
|
|
|
|
|
544
|
my $_matched=0; |
8642
|
380
|
|
|
|
|
519
|
my $commit=0; |
8643
|
380
|
|
|
|
|
599
|
my @item = (); |
8644
|
380
|
|
|
|
|
939
|
my %item = (); |
8645
|
380
|
|
|
|
|
548
|
my $repeating = $_[2]; |
8646
|
380
|
|
|
|
|
547
|
my $_noactions = $_[3]; |
8647
|
380
|
50
|
|
|
|
719
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
380
|
|
|
|
|
522
|
|
|
380
|
|
|
|
|
653
|
|
8648
|
380
|
|
|
|
|
605
|
my $_itempos = $_[5]; |
8649
|
380
|
100
|
|
|
|
885
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
8650
|
380
|
|
|
|
|
965
|
my $text; |
8651
|
|
|
|
|
|
|
my $lastsep; |
8652
|
380
|
|
|
|
|
0
|
my $current_match; |
8653
|
380
|
|
|
|
|
767
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/\\w+/}); |
8654
|
380
|
|
|
|
|
967
|
$expectation->at($_[1]); |
8655
|
|
|
|
|
|
|
|
8656
|
380
|
|
|
|
|
523
|
my $thisline; |
8657
|
380
|
|
|
|
|
995
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
8658
|
|
|
|
|
|
|
|
8659
|
|
|
|
|
|
|
|
8660
|
|
|
|
|
|
|
|
8661
|
380
|
|
33
|
|
|
1379
|
while (!$_matched && !$commit) |
8662
|
|
|
|
|
|
|
{ |
8663
|
|
|
|
|
|
|
|
8664
|
380
|
50
|
|
|
|
799
|
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
|
380
|
|
|
|
|
683
|
my $thisprod = $thisrule->{"prods"}[0]; |
8670
|
380
|
|
|
|
|
658
|
$text = $_[1]; |
8671
|
380
|
|
|
|
|
563
|
my $_savetext; |
8672
|
380
|
|
|
|
|
736
|
@item = (q{PNAME}); |
8673
|
380
|
|
|
|
|
687
|
%item = (__RULE__ => q{PNAME}); |
8674
|
380
|
|
|
|
|
551
|
my $repcount = 0; |
8675
|
|
|
|
|
|
|
|
8676
|
|
|
|
|
|
|
|
8677
|
380
|
50
|
|
|
|
759
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/\\w+/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
8678
|
|
|
|
|
|
|
q{PNAME}, |
8679
|
|
|
|
|
|
|
$tracelevel) |
8680
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8681
|
380
|
|
|
|
|
640
|
undef $lastsep; |
8682
|
380
|
|
|
|
|
803
|
$expectation->is(q{})->at($text); |
8683
|
|
|
|
|
|
|
|
8684
|
|
|
|
|
|
|
|
8685
|
380
|
100
|
66
|
|
|
2431
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\w+)/) |
|
380
|
100
|
|
|
|
2918
|
|
8686
|
|
|
|
|
|
|
{ |
8687
|
158
|
50
|
|
|
|
517
|
$text = $lastsep . $text if defined $lastsep; |
8688
|
158
|
|
|
|
|
438
|
$expectation->failed(); |
8689
|
158
|
50
|
|
|
|
333
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
8690
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8691
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8692
|
|
|
|
|
|
|
|
8693
|
158
|
|
|
|
|
324
|
last; |
8694
|
|
|
|
|
|
|
} |
8695
|
222
|
|
|
|
|
1160
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
8696
|
222
|
|
|
|
|
721
|
substr($text,0,length($current_match),q{}); |
8697
|
222
|
50
|
|
|
|
519
|
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
|
222
|
|
|
|
|
554
|
push @item, $item{__PATTERN1__}=$current_match; |
8702
|
|
|
|
|
|
|
|
8703
|
|
|
|
|
|
|
|
8704
|
222
|
50
|
|
|
|
451
|
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
|
222
|
50
|
|
|
|
391
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1]}; |
|
222
|
|
|
|
|
477
|
|
8712
|
222
|
50
|
|
|
|
501
|
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
|
222
|
50
|
|
|
|
436
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
8719
|
|
|
|
|
|
|
. $_tok . q{])}, |
8720
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8721
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8722
|
222
|
|
|
|
|
355
|
push @item, $_tok; |
8723
|
222
|
|
|
|
|
427
|
$item{__ACTION1__}=$_tok; |
8724
|
|
|
|
|
|
|
|
8725
|
|
|
|
|
|
|
|
8726
|
222
|
50
|
|
|
|
493
|
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
|
222
|
|
|
|
|
347
|
$_matched = 1; |
8735
|
222
|
|
|
|
|
447
|
last; |
8736
|
|
|
|
|
|
|
} |
8737
|
|
|
|
|
|
|
|
8738
|
|
|
|
|
|
|
|
8739
|
380
|
100
|
66
|
|
|
1082
|
unless ( $_matched || defined($score) ) |
8740
|
|
|
|
|
|
|
{ |
8741
|
|
|
|
|
|
|
|
8742
|
|
|
|
|
|
|
|
8743
|
158
|
|
|
|
|
287
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
8744
|
158
|
50
|
|
|
|
304
|
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
|
158
|
|
|
|
|
783
|
return undef; |
8750
|
|
|
|
|
|
|
} |
8751
|
222
|
50
|
33
|
|
|
564
|
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
|
222
|
|
|
|
|
644
|
splice @{$thisparser->{errors}}, $err_at; |
|
222
|
|
|
|
|
494
|
|
8760
|
222
|
50
|
|
|
|
463
|
$return = $item[$#item] unless defined $return; |
8761
|
222
|
50
|
|
|
|
423
|
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
|
222
|
|
|
|
|
409
|
$_[1] = $text; |
8774
|
222
|
|
|
|
|
1282
|
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
|
|
28
|
my $thisparser = $_[0]; |
8781
|
4
|
|
|
4
|
|
35
|
use vars q{$tracelevel}; |
|
4
|
|
|
|
|
25
|
|
|
4
|
|
|
|
|
1511
|
|
8782
|
16
|
|
50
|
|
|
38
|
local $tracelevel = ($tracelevel||0)+1; |
8783
|
16
|
|
|
|
|
27
|
$ERRORS = 0; |
8784
|
16
|
|
|
|
|
33
|
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
|
|
|
|
|
19
|
my $err_at = @{$thisparser->{errors}}; |
|
16
|
|
|
|
|
32
|
|
8794
|
|
|
|
|
|
|
|
8795
|
16
|
|
|
|
|
40
|
my $score; |
8796
|
|
|
|
|
|
|
my $score_return; |
8797
|
16
|
|
|
|
|
0
|
my $_tok; |
8798
|
16
|
|
|
|
|
26
|
my $return = undef; |
8799
|
16
|
|
|
|
|
22
|
my $_matched=0; |
8800
|
16
|
|
|
|
|
25
|
my $commit=0; |
8801
|
16
|
|
|
|
|
24
|
my @item = (); |
8802
|
16
|
|
|
|
|
23
|
my %item = (); |
8803
|
16
|
|
|
|
|
40
|
my $repeating = $_[2]; |
8804
|
16
|
|
|
|
|
24
|
my $_noactions = $_[3]; |
8805
|
16
|
50
|
|
|
|
47
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
16
|
|
|
|
|
23
|
|
|
16
|
|
|
|
|
30
|
|
8806
|
16
|
|
|
|
|
27
|
my $_itempos = $_[5]; |
8807
|
16
|
50
|
|
|
|
51
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
8808
|
16
|
|
|
|
|
39
|
my $text; |
8809
|
|
|
|
|
|
|
my $lastsep; |
8810
|
16
|
|
|
|
|
0
|
my $current_match; |
8811
|
16
|
|
|
|
|
40
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{NOTDQUOTE}); |
8812
|
16
|
|
|
|
|
46
|
$expectation->at($_[1]); |
8813
|
|
|
|
|
|
|
|
8814
|
16
|
|
|
|
|
24
|
my $thisline; |
8815
|
16
|
|
|
|
|
59
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
8816
|
|
|
|
|
|
|
|
8817
|
|
|
|
|
|
|
|
8818
|
|
|
|
|
|
|
|
8819
|
16
|
|
33
|
|
|
65
|
while (!$_matched && !$commit) |
8820
|
|
|
|
|
|
|
{ |
8821
|
|
|
|
|
|
|
|
8822
|
16
|
50
|
|
|
|
31
|
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
|
|
|
|
|
32
|
my $thisprod = $thisrule->{"prods"}[0]; |
8828
|
16
|
|
|
|
|
29
|
$text = $_[1]; |
8829
|
16
|
|
|
|
|
24
|
my $_savetext; |
8830
|
16
|
|
|
|
|
31
|
@item = (q{PDQUOTE}); |
8831
|
16
|
|
|
|
|
32
|
%item = (__RULE__ => q{PDQUOTE}); |
8832
|
16
|
|
|
|
|
23
|
my $repcount = 0; |
8833
|
|
|
|
|
|
|
|
8834
|
|
|
|
|
|
|
|
8835
|
16
|
50
|
|
|
|
30
|
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
|
4
|
|
|
4
|
|
33
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
736
|
|
|
16
|
|
|
|
|
22
|
|
8841
|
16
|
|
|
|
|
33
|
$expectation->is(q{})->at($text); |
8842
|
16
|
50
|
|
16
|
|
69
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::NOTDQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
16
|
|
|
|
|
31
|
|
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
|
|
|
|
53
|
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
|
|
|
|
|
29
|
$item{q{NOTDQUOTE}} = $_tok; |
8861
|
16
|
|
|
|
|
30
|
push @item, $_tok; |
8862
|
|
|
|
|
|
|
|
8863
|
|
|
|
|
|
|
} |
8864
|
|
|
|
|
|
|
|
8865
|
16
|
50
|
|
|
|
38
|
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
|
4
|
|
|
4
|
|
38
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
16
|
|
|
4
|
|
|
|
|
825
|
|
|
16
|
|
|
|
|
21
|
|
8871
|
16
|
|
|
|
|
41
|
$expectation->is(q{SLASHEDDQUOTE})->at($text); |
8872
|
16
|
100
|
|
16
|
|
73
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SLASHEDDQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
16
|
|
|
|
|
36
|
|
8873
|
|
|
|
|
|
|
{ |
8874
|
|
|
|
|
|
|
|
8875
|
8
|
50
|
|
|
|
17
|
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
|
|
|
|
|
15
|
last; |
8882
|
|
|
|
|
|
|
} |
8883
|
8
|
50
|
|
|
|
26
|
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
|
|
|
|
|
15
|
$item{q{SLASHEDDQUOTE}} = $_tok; |
8891
|
8
|
|
|
|
|
15
|
push @item, $_tok; |
8892
|
|
|
|
|
|
|
|
8893
|
|
|
|
|
|
|
} |
8894
|
|
|
|
|
|
|
|
8895
|
8
|
50
|
|
|
|
17
|
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
|
4
|
|
|
4
|
|
34
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
1599
|
|
|
8
|
|
|
|
|
15
|
|
8901
|
8
|
|
|
|
|
20
|
$expectation->is(q{PDQUOTE})->at($text); |
8902
|
8
|
50
|
|
8
|
|
50
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PDQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
8
|
|
|
|
|
18
|
|
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
|
|
|
|
22
|
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
|
|
|
|
|
15
|
$item{q{PDQUOTE}} = $_tok; |
8921
|
8
|
|
|
|
|
15
|
push @item, $_tok; |
8922
|
|
|
|
|
|
|
|
8923
|
|
|
|
|
|
|
} |
8924
|
|
|
|
|
|
|
|
8925
|
8
|
50
|
|
|
|
23
|
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
|
|
|
|
21
|
$_tok = ($_noactions) ? 0 : do {$return = $item{NOTDQUOTE}.$item{SLASHEDDQUOTE}.$item{PDQUOTE}}; |
|
8
|
|
|
|
|
22
|
|
8933
|
8
|
50
|
|
|
|
19
|
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
|
|
|
|
27
|
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
|
|
|
|
|
14
|
push @item, $_tok; |
8944
|
8
|
|
|
|
|
16
|
$item{__ACTION1__}=$_tok; |
8945
|
|
|
|
|
|
|
|
8946
|
|
|
|
|
|
|
|
8947
|
8
|
50
|
|
|
|
16
|
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
|
|
|
|
|
12
|
$_matched = 1; |
8956
|
8
|
|
|
|
|
13
|
last; |
8957
|
|
|
|
|
|
|
} |
8958
|
|
|
|
|
|
|
|
8959
|
|
|
|
|
|
|
|
8960
|
16
|
|
66
|
|
|
66
|
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
|
|
|
|
|
12
|
$text = $_[1]; |
8970
|
8
|
|
|
|
|
11
|
my $_savetext; |
8971
|
8
|
|
|
|
|
18
|
@item = (q{PDQUOTE}); |
8972
|
8
|
|
|
|
|
22
|
%item = (__RULE__ => q{PDQUOTE}); |
8973
|
8
|
|
|
|
|
16
|
my $repcount = 0; |
8974
|
|
|
|
|
|
|
|
8975
|
|
|
|
|
|
|
|
8976
|
8
|
50
|
|
|
|
13
|
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
|
4
|
|
|
4
|
|
34
|
if (1) { no strict qw{refs}; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
16447
|
|
|
8
|
|
|
|
|
14
|
|
8982
|
8
|
|
|
|
|
21
|
$expectation->is(q{})->at($text); |
8983
|
8
|
50
|
|
8
|
|
35
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::NOTDQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
8
|
|
|
|
|
18
|
|
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
|
|
|
|
33
|
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
|
|
|
|
|
17
|
$item{q{NOTDQUOTE}} = $_tok; |
9002
|
8
|
|
|
|
|
14
|
push @item, $_tok; |
9003
|
|
|
|
|
|
|
|
9004
|
|
|
|
|
|
|
} |
9005
|
|
|
|
|
|
|
|
9006
|
8
|
50
|
|
|
|
18
|
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
|
|
|
|
|
9
|
$_matched = 1; |
9015
|
8
|
|
|
|
|
17
|
last; |
9016
|
|
|
|
|
|
|
} |
9017
|
|
|
|
|
|
|
|
9018
|
|
|
|
|
|
|
|
9019
|
16
|
50
|
33
|
|
|
34
|
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
|
|
|
43
|
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
|
|
|
|
|
29
|
splice @{$thisparser->{errors}}, $err_at; |
|
16
|
|
|
|
|
27
|
|
9040
|
16
|
100
|
|
|
|
34
|
$return = $item[$#item] unless defined $return; |
9041
|
16
|
50
|
|
|
|
32
|
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
|
|
|
|
|
26
|
$_[1] = $text; |
9054
|
16
|
|
|
|
|
87
|
return $return; |
9055
|
|
|
|
|
|
|
} |
9056
|
|
|
|
|
|
|
} |
9057
|
15
|
|
|
15
|
0
|
9202
|
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
|
|
|
|
|
|
|
|