line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
## no critic (Miscellanea::ProhibitUnrestrictedNoCritic) |
2
|
|
|
|
|
|
|
## no critic Generated code follows |
3
|
|
|
|
|
|
|
{ |
4
|
|
|
|
|
|
|
# GENERATE RECURSIVE DESCENT PARSER OBJECTS FROM A GRAMMAR |
5
|
|
|
|
|
|
|
|
6
|
2
|
|
|
2
|
|
65
|
use 5.006; |
|
2
|
|
|
|
|
8
|
|
7
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
127
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime; |
10
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::VERSION = '2.20150928'; |
11
|
2
|
|
|
2
|
|
2097
|
use Text::Balanced qw ( extract_codeblock extract_bracketed extract_quotelike extract_delimited ); |
|
2
|
|
|
|
|
20939
|
|
|
2
|
|
|
|
|
206
|
|
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
2
|
|
22
|
use vars qw ( $skip ); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
18087
|
|
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
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::LineCounter::VERSION = '2.20150928'; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub TIESCALAR # ($classname, \$text, $thisparser, $prevflag) |
25
|
|
|
|
|
|
|
{ |
26
|
2016
|
50
|
|
2016
|
|
8298
|
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
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::ColCounter::VERSION = '2.20150928'; |
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
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::OffsetCounter::VERSION = '2.20150928'; |
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
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::Rule::VERSION = '2.20150928'; |
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
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::Production::VERSION = '2.20150928'; |
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
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::Action::VERSION = '2.20150928'; |
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
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::Directive::VERSION = '2.20150928'; |
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
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::UncondReject::VERSION = '2.20150928'; |
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
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::Error::VERSION = '2.20150928'; |
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
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::Token::VERSION = '2.20150928'; |
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
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::Literal::VERSION = '2.20150928'; |
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
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::InterpLit::VERSION = '2.20150928'; |
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
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::Subrule::VERSION = '2.20150928'; |
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
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::Repetition::VERSION = '2.20150928'; |
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
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::Result::VERSION = '2.20150928'; |
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
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::Operator::VERSION = '2.20150928'; |
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
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::Expectation::VERSION = '2.20150928'; |
1705
|
|
|
|
|
|
|
sub new ($) |
1706
|
|
|
|
|
|
|
{ |
1707
|
2016
|
|
|
2016
|
|
7765
|
bless { |
1708
|
|
|
|
|
|
|
"failed" => 0, |
1709
|
|
|
|
|
|
|
"expected" => "", |
1710
|
|
|
|
|
|
|
"unexpected" => "", |
1711
|
|
|
|
|
|
|
"lastexpected" => "", |
1712
|
|
|
|
|
|
|
"lastunexpected" => "", |
1713
|
|
|
|
|
|
|
"defexpected" => $_[1], |
1714
|
|
|
|
|
|
|
}; |
1715
|
|
|
|
|
|
|
} |
1716
|
|
|
|
|
|
|
|
1717
|
|
|
|
|
|
|
sub is ($$) |
1718
|
|
|
|
|
|
|
{ |
1719
|
4041
|
|
|
4041
|
|
6404
|
$_[0]->{lastexpected} = $_[1]; return $_[0]; |
|
4041
|
|
|
|
|
8601
|
|
1720
|
|
|
|
|
|
|
} |
1721
|
|
|
|
|
|
|
|
1722
|
|
|
|
|
|
|
sub at ($$) |
1723
|
|
|
|
|
|
|
{ |
1724
|
6057
|
|
|
6057
|
|
8830
|
$_[0]->{lastunexpected} = $_[1]; return $_[0]; |
|
6057
|
|
|
|
|
6532
|
|
1725
|
|
|
|
|
|
|
} |
1726
|
|
|
|
|
|
|
|
1727
|
|
|
|
|
|
|
sub failed ($) |
1728
|
|
|
|
|
|
|
{ |
1729
|
2699
|
100
|
|
2699
|
|
6358
|
return unless $_[0]->{lastexpected}; |
1730
|
167
|
50
|
|
|
|
489
|
$_[0]->{expected} = $_[0]->{lastexpected} unless $_[0]->{failed}; |
1731
|
167
|
50
|
|
|
|
460
|
$_[0]->{unexpected} = $_[0]->{lastunexpected} unless $_[0]->{failed}; |
1732
|
167
|
|
|
|
|
287
|
$_[0]->{failed} = 1; |
1733
|
|
|
|
|
|
|
} |
1734
|
|
|
|
|
|
|
|
1735
|
|
|
|
|
|
|
sub message ($) |
1736
|
|
|
|
|
|
|
{ |
1737
|
0
|
|
|
0
|
|
0
|
my ($self) = @_; |
1738
|
0
|
0
|
|
|
|
0
|
$self->{expected} = $self->{defexpected} unless $self->{expected}; |
1739
|
0
|
|
|
|
|
0
|
$self->{expected} =~ s/_/ /g; |
1740
|
0
|
0
|
0
|
|
|
0
|
if (!$self->{unexpected} || $self->{unexpected} =~ /\A\s*\Z/s) |
1741
|
|
|
|
|
|
|
{ |
1742
|
0
|
|
|
|
|
0
|
return "Was expecting $self->{expected}"; |
1743
|
|
|
|
|
|
|
} |
1744
|
|
|
|
|
|
|
else |
1745
|
|
|
|
|
|
|
{ |
1746
|
0
|
|
|
|
|
0
|
$self->{unexpected} =~ /\s*(.*)/; |
1747
|
0
|
|
|
|
|
0
|
return "Was expecting $self->{expected} but found \"$1\" instead"; |
1748
|
|
|
|
|
|
|
} |
1749
|
|
|
|
|
|
|
} |
1750
|
|
|
|
|
|
|
|
1751
|
|
|
|
|
|
|
1; |
1752
|
|
|
|
|
|
|
|
1753
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime; |
1754
|
|
|
|
|
|
|
|
1755
|
2
|
|
|
2
|
|
25
|
use Carp; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
181
|
|
1756
|
2
|
|
|
2
|
|
12
|
use vars qw ( $AUTOLOAD $VERSION $_FILENAME); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
855
|
|
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
|
|
3255
|
my ($self) = @_; |
1819
|
13
|
|
|
|
|
50
|
my $namespace = $self->{namespace}; |
1820
|
13
|
|
|
|
|
65
|
$namespace =~ s/Parse::RecDescent::_Runtime:://; |
1821
|
13
|
50
|
|
|
|
4480
|
if ($self->{_not_precompiled}) { |
1822
|
|
|
|
|
|
|
# BEGIN WORKAROUND |
1823
|
|
|
|
|
|
|
# Perl has a bug that creates a circular reference between |
1824
|
|
|
|
|
|
|
# @ISA and that variable's stash: |
1825
|
|
|
|
|
|
|
# https://rt.perl.org/rt3/Ticket/Display.html?id=92708 |
1826
|
|
|
|
|
|
|
# Emptying the array before deleting the stash seems to |
1827
|
|
|
|
|
|
|
# prevent the leak. Once the ticket above has been resolved, |
1828
|
|
|
|
|
|
|
# these two lines can be removed. |
1829
|
2
|
|
|
2
|
|
14
|
no strict 'refs'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
21985
|
|
1830
|
0
|
|
|
|
|
0
|
@{$self->{namespace} . '::ISA'} = (); |
|
0
|
|
|
|
|
0
|
|
1831
|
|
|
|
|
|
|
# END WORKAROUND |
1832
|
|
|
|
|
|
|
|
1833
|
|
|
|
|
|
|
# Some grammars may contain circular references between rules, |
1834
|
|
|
|
|
|
|
# such as: |
1835
|
|
|
|
|
|
|
# a: 'ID' | b |
1836
|
|
|
|
|
|
|
# b: '(' a ')' |
1837
|
|
|
|
|
|
|
# Unless these references are broken, the subs stay around on |
1838
|
|
|
|
|
|
|
# stash deletion below. Iterate through the stash entries and |
1839
|
|
|
|
|
|
|
# for each defined code reference, set it to reference sub {} |
1840
|
|
|
|
|
|
|
# instead. |
1841
|
|
|
|
|
|
|
{ |
1842
|
0
|
|
|
|
|
0
|
local $^W; # avoid 'sub redefined' warnings. |
|
0
|
|
|
|
|
0
|
|
1843
|
0
|
|
|
0
|
|
0
|
my $blank_sub = sub {}; |
1844
|
0
|
|
|
|
|
0
|
while (my ($name, $glob) = each %{"Parse::RecDescent::_Runtime::$namespace\::"}) { |
|
0
|
|
|
|
|
0
|
|
1845
|
0
|
0
|
|
|
|
0
|
*$glob = $blank_sub if defined &$glob; |
1846
|
|
|
|
|
|
|
} |
1847
|
|
|
|
|
|
|
} |
1848
|
|
|
|
|
|
|
|
1849
|
|
|
|
|
|
|
# Delete the namespace's stash |
1850
|
0
|
|
|
|
|
0
|
delete $Parse::RecDescent::_Runtime::{$namespace.'::'}; |
1851
|
|
|
|
|
|
|
} |
1852
|
|
|
|
|
|
|
} |
1853
|
|
|
|
|
|
|
|
1854
|
|
|
|
|
|
|
# BUILDING A GRAMMAR.... |
1855
|
|
|
|
|
|
|
|
1856
|
|
|
|
|
|
|
# ARGS ARE: $self, $grammar, $isimplicit, $isleftop |
1857
|
|
|
|
|
|
|
sub Replace ($$) |
1858
|
|
|
|
|
|
|
{ |
1859
|
|
|
|
|
|
|
# set $replace = 1 for _generate |
1860
|
0
|
|
|
0
|
|
0
|
splice(@_, 2, 0, 1); |
1861
|
|
|
|
|
|
|
|
1862
|
0
|
|
|
|
|
0
|
return _generate(@_); |
1863
|
|
|
|
|
|
|
} |
1864
|
|
|
|
|
|
|
|
1865
|
|
|
|
|
|
|
# ARGS ARE: $self, $grammar, $isimplicit, $isleftop |
1866
|
|
|
|
|
|
|
sub Extend ($$) |
1867
|
|
|
|
|
|
|
{ |
1868
|
|
|
|
|
|
|
# set $replace = 0 for _generate |
1869
|
0
|
|
|
0
|
|
0
|
splice(@_, 2, 0, 0); |
1870
|
|
|
|
|
|
|
|
1871
|
0
|
|
|
|
|
0
|
return _generate(@_); |
1872
|
|
|
|
|
|
|
} |
1873
|
|
|
|
|
|
|
|
1874
|
|
|
|
|
|
|
sub _no_rule ($$;$) |
1875
|
|
|
|
|
|
|
{ |
1876
|
0
|
|
|
0
|
|
0
|
_error("Ruleless $_[0] at start of grammar.",$_[1]); |
1877
|
0
|
0
|
|
|
|
0
|
my $desc = $_[2] ? "\"$_[2]\"" : ""; |
1878
|
0
|
|
|
|
|
0
|
_hint("You need to define a rule for the $_[0] $desc |
1879
|
|
|
|
|
|
|
to be part of."); |
1880
|
|
|
|
|
|
|
} |
1881
|
|
|
|
|
|
|
|
1882
|
|
|
|
|
|
|
my $NEGLOOKAHEAD = '\G(\s*\.\.\.\!)'; |
1883
|
|
|
|
|
|
|
my $POSLOOKAHEAD = '\G(\s*\.\.\.)'; |
1884
|
|
|
|
|
|
|
my $RULE = '\G\s*(\w+)[ \t]*:'; |
1885
|
|
|
|
|
|
|
my $PROD = '\G\s*([|])'; |
1886
|
|
|
|
|
|
|
my $TOKEN = q{\G\s*/((\\\\/|\\\\\\\\|[^/])*)/([cgimsox]*)}; |
1887
|
|
|
|
|
|
|
my $MTOKEN = q{\G\s*(m\s*[^\w\s])}; |
1888
|
|
|
|
|
|
|
my $LITERAL = q{\G\s*'((\\\\['\\\\]|[^'])*)'}; |
1889
|
|
|
|
|
|
|
my $INTERPLIT = q{\G\s*"((\\\\["\\\\]|[^"])*)"}; |
1890
|
|
|
|
|
|
|
my $SUBRULE = '\G\s*(\w+)'; |
1891
|
|
|
|
|
|
|
my $MATCHRULE = '\G(\s*<matchrule:)'; |
1892
|
|
|
|
|
|
|
my $SIMPLEPAT = '((\\s+/[^/\\\\]*(?:\\\\.[^/\\\\]*)*/)?)'; |
1893
|
|
|
|
|
|
|
my $OPTIONAL = '\G\((\?)'.$SIMPLEPAT.'\)'; |
1894
|
|
|
|
|
|
|
my $ANY = '\G\((s\?)'.$SIMPLEPAT.'\)'; |
1895
|
|
|
|
|
|
|
my $MANY = '\G\((s|\.\.)'.$SIMPLEPAT.'\)'; |
1896
|
|
|
|
|
|
|
my $EXACTLY = '\G\(([1-9]\d*)'.$SIMPLEPAT.'\)'; |
1897
|
|
|
|
|
|
|
my $BETWEEN = '\G\((\d+)\.\.([1-9]\d*)'.$SIMPLEPAT.'\)'; |
1898
|
|
|
|
|
|
|
my $ATLEAST = '\G\((\d+)\.\.'.$SIMPLEPAT.'\)'; |
1899
|
|
|
|
|
|
|
my $ATMOST = '\G\(\.\.([1-9]\d*)'.$SIMPLEPAT.'\)'; |
1900
|
|
|
|
|
|
|
my $BADREP = '\G\((-?\d+)?\.\.(-?\d+)?'.$SIMPLEPAT.'\)'; |
1901
|
|
|
|
|
|
|
my $ACTION = '\G\s*\{'; |
1902
|
|
|
|
|
|
|
my $IMPLICITSUBRULE = '\G\s*\('; |
1903
|
|
|
|
|
|
|
my $COMMENT = '\G\s*(#.*)'; |
1904
|
|
|
|
|
|
|
my $COMMITMK = '\G\s*<commit>'; |
1905
|
|
|
|
|
|
|
my $UNCOMMITMK = '\G\s*<uncommit>'; |
1906
|
|
|
|
|
|
|
my $QUOTELIKEMK = '\G\s*<perl_quotelike>'; |
1907
|
|
|
|
|
|
|
my $CODEBLOCKMK = '\G\s*<perl_codeblock(?:\s+([][()<>{}]+))?>'; |
1908
|
|
|
|
|
|
|
my $VARIABLEMK = '\G\s*<perl_variable>'; |
1909
|
|
|
|
|
|
|
my $NOCHECKMK = '\G\s*<nocheck>'; |
1910
|
|
|
|
|
|
|
my $AUTOACTIONPATMK = '\G\s*<autoaction:'; |
1911
|
|
|
|
|
|
|
my $AUTOTREEMK = '\G\s*<autotree(?::\s*([\w:]+)\s*)?>'; |
1912
|
|
|
|
|
|
|
my $AUTOSTUBMK = '\G\s*<autostub>'; |
1913
|
|
|
|
|
|
|
my $AUTORULEMK = '\G\s*<autorule:(.*?)>'; |
1914
|
|
|
|
|
|
|
my $REJECTMK = '\G\s*<reject>'; |
1915
|
|
|
|
|
|
|
my $CONDREJECTMK = '\G\s*<reject:'; |
1916
|
|
|
|
|
|
|
my $SCOREMK = '\G\s*<score:'; |
1917
|
|
|
|
|
|
|
my $AUTOSCOREMK = '\G\s*<autoscore:'; |
1918
|
|
|
|
|
|
|
my $SKIPMK = '\G\s*<skip:'; |
1919
|
|
|
|
|
|
|
my $OPMK = '\G\s*<(left|right)op(?:=(\'.*?\'))?:'; |
1920
|
|
|
|
|
|
|
my $ENDDIRECTIVEMK = '\G\s*>'; |
1921
|
|
|
|
|
|
|
my $RESYNCMK = '\G\s*<resync>'; |
1922
|
|
|
|
|
|
|
my $RESYNCPATMK = '\G\s*<resync:'; |
1923
|
|
|
|
|
|
|
my $RULEVARPATMK = '\G\s*<rulevar:'; |
1924
|
|
|
|
|
|
|
my $DEFERPATMK = '\G\s*<defer:'; |
1925
|
|
|
|
|
|
|
my $TOKENPATMK = '\G\s*<token:'; |
1926
|
|
|
|
|
|
|
my $AUTOERRORMK = '\G\s*<error(\??)>'; |
1927
|
|
|
|
|
|
|
my $MSGERRORMK = '\G\s*<error(\??):'; |
1928
|
|
|
|
|
|
|
my $NOCHECK = '\G\s*<nocheck>'; |
1929
|
|
|
|
|
|
|
my $WARNMK = '\G\s*<warn((?::\s*(\d+)\s*)?)>'; |
1930
|
|
|
|
|
|
|
my $HINTMK = '\G\s*<hint>'; |
1931
|
|
|
|
|
|
|
my $TRACEBUILDMK = '\G\s*<trace_build((?::\s*(\d+)\s*)?)>'; |
1932
|
|
|
|
|
|
|
my $TRACEPARSEMK = '\G\s*<trace_parse((?::\s*(\d+)\s*)?)>'; |
1933
|
|
|
|
|
|
|
my $UNCOMMITPROD = $PROD.'\s*<uncommit'; |
1934
|
|
|
|
|
|
|
my $ERRORPROD = $PROD.'\s*<error'; |
1935
|
|
|
|
|
|
|
my $LONECOLON = '\G\s*:'; |
1936
|
|
|
|
|
|
|
my $OTHER = '\G\s*([^\s]+)'; |
1937
|
|
|
|
|
|
|
|
1938
|
|
|
|
|
|
|
my @lines = 0; |
1939
|
|
|
|
|
|
|
|
1940
|
|
|
|
|
|
|
sub _generate |
1941
|
|
|
|
|
|
|
{ |
1942
|
0
|
|
|
0
|
|
0
|
my ($self, $grammar, $replace, $isimplicit, $isleftop) = (@_, 0); |
1943
|
|
|
|
|
|
|
|
1944
|
0
|
|
|
|
|
0
|
my $aftererror = 0; |
1945
|
0
|
|
|
|
|
0
|
my $lookahead = 0; |
1946
|
0
|
|
|
|
|
0
|
my $lookaheadspec = ""; |
1947
|
0
|
|
|
|
|
0
|
my $must_pop_lines; |
1948
|
0
|
0
|
|
|
|
0
|
if (! $lines[-1]) { |
1949
|
0
|
|
|
|
|
0
|
push @lines, _linecount($grammar) ; |
1950
|
0
|
|
|
|
|
0
|
$must_pop_lines = 1; |
1951
|
|
|
|
|
|
|
} |
1952
|
|
|
|
|
|
|
$self->{_check}{itempos} = ($grammar =~ /\@itempos\b|\$itempos\s*\[/) |
1953
|
0
|
0
|
|
|
|
0
|
unless $self->{_check}{itempos}; |
1954
|
0
|
|
|
|
|
0
|
for (qw(thisoffset thiscolumn prevline prevoffset prevcolumn)) |
1955
|
|
|
|
|
|
|
{ |
1956
|
|
|
|
|
|
|
$self->{_check}{$_} = |
1957
|
|
|
|
|
|
|
($grammar =~ /\$$_/) || $self->{_check}{itempos} |
1958
|
0
|
0
|
0
|
|
|
0
|
unless $self->{_check}{$_}; |
1959
|
|
|
|
|
|
|
} |
1960
|
0
|
|
|
|
|
0
|
my $line; |
1961
|
|
|
|
|
|
|
|
1962
|
0
|
|
|
|
|
0
|
my $rule = undef; |
1963
|
0
|
|
|
|
|
0
|
my $prod = undef; |
1964
|
0
|
|
|
|
|
0
|
my $item = undef; |
1965
|
0
|
|
|
|
|
0
|
my $lastgreedy = ''; |
1966
|
0
|
|
|
|
|
0
|
pos $grammar = 0; |
1967
|
0
|
|
|
|
|
0
|
study $grammar; |
1968
|
|
|
|
|
|
|
|
1969
|
0
|
|
|
|
|
0
|
local $::RD_HINT = $::RD_HINT; |
1970
|
0
|
|
|
|
|
0
|
local $::RD_WARN = $::RD_WARN; |
1971
|
0
|
|
|
|
|
0
|
local $::RD_TRACE = $::RD_TRACE; |
1972
|
0
|
|
|
|
|
0
|
local $::RD_CHECK = $::RD_CHECK; |
1973
|
|
|
|
|
|
|
|
1974
|
0
|
|
|
|
|
0
|
while (pos $grammar < length $grammar) |
1975
|
|
|
|
|
|
|
{ |
1976
|
0
|
|
|
|
|
0
|
$line = $lines[-1] - _linecount($grammar) + 1; |
1977
|
0
|
|
|
|
|
0
|
my $commitonly; |
1978
|
0
|
|
|
|
|
0
|
my $code = ""; |
1979
|
0
|
|
|
|
|
0
|
my @components = (); |
1980
|
0
|
0
|
0
|
|
|
0
|
if ($grammar =~ m/$COMMENT/gco) |
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
1981
|
|
|
|
|
|
|
{ |
1982
|
0
|
|
|
|
|
0
|
_parse("a comment",0,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
1983
|
0
|
|
|
|
|
0
|
next; |
1984
|
|
|
|
|
|
|
} |
1985
|
|
|
|
|
|
|
elsif ($grammar =~ m/$NEGLOOKAHEAD/gco) |
1986
|
|
|
|
|
|
|
{ |
1987
|
0
|
|
|
|
|
0
|
_parse("a negative lookahead",$aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
1988
|
0
|
0
|
|
|
|
0
|
$lookahead = $lookahead ? -$lookahead : -1; |
1989
|
0
|
|
|
|
|
0
|
$lookaheadspec .= $1; |
1990
|
0
|
|
|
|
|
0
|
next; # SKIP LOOKAHEAD RESET AT END OF while LOOP |
1991
|
|
|
|
|
|
|
} |
1992
|
|
|
|
|
|
|
elsif ($grammar =~ m/$POSLOOKAHEAD/gco) |
1993
|
|
|
|
|
|
|
{ |
1994
|
0
|
|
|
|
|
0
|
_parse("a positive lookahead",$aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
1995
|
0
|
0
|
|
|
|
0
|
$lookahead = $lookahead ? $lookahead : 1; |
1996
|
0
|
|
|
|
|
0
|
$lookaheadspec .= $1; |
1997
|
0
|
|
|
|
|
0
|
next; # SKIP LOOKAHEAD RESET AT END OF while LOOP |
1998
|
|
|
|
|
|
|
} |
1999
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$ACTION)/gco |
2000
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar); $code }) |
|
0
|
|
|
|
|
0
|
|
2001
|
|
|
|
|
|
|
{ |
2002
|
0
|
|
|
|
|
0
|
_parse("an action", $aftererror, $line, $code); |
2003
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Action($code,$lookahead,$line); |
2004
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2005
|
|
|
|
|
|
|
or $self->_addstartcode($code); |
2006
|
|
|
|
|
|
|
} |
2007
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$IMPLICITSUBRULE)/gco |
2008
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar,'{([',undef,'(',1); |
2009
|
0
|
|
|
|
|
0
|
$code }) |
2010
|
|
|
|
|
|
|
{ |
2011
|
0
|
|
|
|
|
0
|
$code =~ s/\A\s*\(|\)\Z//g; |
2012
|
0
|
|
|
|
|
0
|
_parse("an implicit subrule", $aftererror, $line, |
2013
|
|
|
|
|
|
|
"( $code )"); |
2014
|
0
|
|
|
|
|
0
|
my $implicit = $rule->nextimplicit; |
2015
|
|
|
|
|
|
|
return undef |
2016
|
0
|
0
|
|
|
|
0
|
if !$self->_generate("$implicit : $code",$replace,1); |
2017
|
0
|
|
|
|
|
0
|
my $pos = pos $grammar; |
2018
|
0
|
|
|
|
|
0
|
substr($grammar,$pos,0,$implicit); |
2019
|
0
|
|
|
|
|
0
|
pos $grammar = $pos;; |
2020
|
|
|
|
|
|
|
} |
2021
|
|
|
|
|
|
|
elsif ($grammar =~ m/$ENDDIRECTIVEMK/gco) |
2022
|
|
|
|
|
|
|
{ |
2023
|
|
|
|
|
|
|
|
2024
|
|
|
|
|
|
|
# EXTRACT TRAILING REPETITION SPECIFIER (IF ANY) |
2025
|
|
|
|
|
|
|
|
2026
|
0
|
|
|
|
|
0
|
my ($minrep,$maxrep) = (1,$MAXREP); |
2027
|
0
|
0
|
|
|
|
0
|
if ($grammar =~ m/\G[(]/gc) |
2028
|
|
|
|
|
|
|
{ |
2029
|
0
|
|
|
|
|
0
|
pos($grammar)--; |
2030
|
|
|
|
|
|
|
|
2031
|
0
|
0
|
|
|
|
0
|
if ($grammar =~ m/$OPTIONAL/gco) |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
2032
|
0
|
|
|
|
|
0
|
{ ($minrep, $maxrep) = (0,1) } |
2033
|
|
|
|
|
|
|
elsif ($grammar =~ m/$ANY/gco) |
2034
|
0
|
|
|
|
|
0
|
{ $minrep = 0 } |
2035
|
|
|
|
|
|
|
elsif ($grammar =~ m/$EXACTLY/gco) |
2036
|
0
|
|
|
|
|
0
|
{ ($minrep, $maxrep) = ($1,$1) } |
2037
|
|
|
|
|
|
|
elsif ($grammar =~ m/$BETWEEN/gco) |
2038
|
0
|
|
|
|
|
0
|
{ ($minrep, $maxrep) = ($1,$2) } |
2039
|
|
|
|
|
|
|
elsif ($grammar =~ m/$ATLEAST/gco) |
2040
|
0
|
|
|
|
|
0
|
{ $minrep = $1 } |
2041
|
|
|
|
|
|
|
elsif ($grammar =~ m/$ATMOST/gco) |
2042
|
0
|
|
|
|
|
0
|
{ $maxrep = $1 } |
2043
|
|
|
|
|
|
|
elsif ($grammar =~ m/$MANY/gco) |
2044
|
|
|
|
|
|
|
{ } |
2045
|
|
|
|
|
|
|
elsif ($grammar =~ m/$BADREP/gco) |
2046
|
|
|
|
|
|
|
{ |
2047
|
0
|
|
|
|
|
0
|
_parse("an invalid repetition specifier", 0,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2048
|
0
|
|
|
|
|
0
|
_error("Incorrect specification of a repeated directive", |
2049
|
|
|
|
|
|
|
$line); |
2050
|
0
|
|
|
|
|
0
|
_hint("Repeated directives cannot have |
2051
|
|
|
|
|
|
|
a maximum repetition of zero, nor can they have |
2052
|
|
|
|
|
|
|
negative components in their ranges."); |
2053
|
|
|
|
|
|
|
} |
2054
|
|
|
|
|
|
|
} |
2055
|
|
|
|
|
|
|
|
2056
|
0
|
0
|
|
|
|
0
|
$prod && $prod->enddirective($line,$minrep,$maxrep); |
2057
|
|
|
|
|
|
|
} |
2058
|
|
|
|
|
|
|
elsif ($grammar =~ m/\G\s*<[^m]/gc) |
2059
|
|
|
|
|
|
|
{ |
2060
|
0
|
|
|
|
|
0
|
pos($grammar)-=2; |
2061
|
|
|
|
|
|
|
|
2062
|
0
|
0
|
0
|
|
|
0
|
if ($grammar =~ m/$OPMK/gco) |
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
2063
|
|
|
|
|
|
|
{ |
2064
|
|
|
|
|
|
|
# $DB::single=1; |
2065
|
0
|
|
|
|
|
0
|
_parse("a $1-associative operator directive", $aftererror, $line, "<$1op:...>"); |
2066
|
0
|
|
0
|
|
|
0
|
$prod->adddirective($1, $line,$2||''); |
2067
|
|
|
|
|
|
|
} |
2068
|
|
|
|
|
|
|
elsif ($grammar =~ m/$UNCOMMITMK/gco) |
2069
|
|
|
|
|
|
|
{ |
2070
|
0
|
|
|
|
|
0
|
_parse("an uncommit marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2071
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive('$commit=0;1', |
2072
|
|
|
|
|
|
|
$lookahead,$line,"<uncommit>"); |
2073
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2074
|
|
|
|
|
|
|
or _no_rule("<uncommit>",$line); |
2075
|
|
|
|
|
|
|
} |
2076
|
|
|
|
|
|
|
elsif ($grammar =~ m/$QUOTELIKEMK/gco) |
2077
|
|
|
|
|
|
|
{ |
2078
|
0
|
|
|
|
|
0
|
_parse("an perl quotelike marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2079
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive( |
2080
|
|
|
|
|
|
|
'my ($match,@res); |
2081
|
|
|
|
|
|
|
($match,$text,undef,@res) = |
2082
|
|
|
|
|
|
|
Text::Balanced::extract_quotelike($text,$skip); |
2083
|
|
|
|
|
|
|
$match ? \@res : undef; |
2084
|
|
|
|
|
|
|
', $lookahead,$line,"<perl_quotelike>"); |
2085
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2086
|
|
|
|
|
|
|
or _no_rule("<perl_quotelike>",$line); |
2087
|
|
|
|
|
|
|
} |
2088
|
|
|
|
|
|
|
elsif ($grammar =~ m/$CODEBLOCKMK/gco) |
2089
|
|
|
|
|
|
|
{ |
2090
|
0
|
|
0
|
|
|
0
|
my $outer = $1||"{}"; |
2091
|
0
|
|
|
|
|
0
|
_parse("an perl codeblock marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2092
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive( |
2093
|
|
|
|
|
|
|
'Text::Balanced::extract_codeblock($text,undef,$skip,\''.$outer.'\'); |
2094
|
|
|
|
|
|
|
', $lookahead,$line,"<perl_codeblock>"); |
2095
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2096
|
|
|
|
|
|
|
or _no_rule("<perl_codeblock>",$line); |
2097
|
|
|
|
|
|
|
} |
2098
|
|
|
|
|
|
|
elsif ($grammar =~ m/$VARIABLEMK/gco) |
2099
|
|
|
|
|
|
|
{ |
2100
|
0
|
|
|
|
|
0
|
_parse("an perl variable marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2101
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive( |
2102
|
|
|
|
|
|
|
'Text::Balanced::extract_variable($text,$skip); |
2103
|
|
|
|
|
|
|
', $lookahead,$line,"<perl_variable>"); |
2104
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2105
|
|
|
|
|
|
|
or _no_rule("<perl_variable>",$line); |
2106
|
|
|
|
|
|
|
} |
2107
|
|
|
|
|
|
|
elsif ($grammar =~ m/$NOCHECKMK/gco) |
2108
|
|
|
|
|
|
|
{ |
2109
|
0
|
|
|
|
|
0
|
_parse("a disable checking marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2110
|
0
|
0
|
|
|
|
0
|
if ($rule) |
2111
|
|
|
|
|
|
|
{ |
2112
|
0
|
|
|
|
|
0
|
_error("<nocheck> directive not at start of grammar", $line); |
2113
|
0
|
|
|
|
|
0
|
_hint("The <nocheck> directive can only |
2114
|
|
|
|
|
|
|
be specified at the start of a |
2115
|
|
|
|
|
|
|
grammar (before the first rule |
2116
|
|
|
|
|
|
|
is defined."); |
2117
|
|
|
|
|
|
|
} |
2118
|
|
|
|
|
|
|
else |
2119
|
|
|
|
|
|
|
{ |
2120
|
0
|
|
|
|
|
0
|
local $::RD_CHECK = 1; |
2121
|
|
|
|
|
|
|
} |
2122
|
|
|
|
|
|
|
} |
2123
|
|
|
|
|
|
|
elsif ($grammar =~ m/$AUTOSTUBMK/gco) |
2124
|
|
|
|
|
|
|
{ |
2125
|
0
|
|
|
|
|
0
|
_parse("an autostub marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2126
|
0
|
|
|
|
|
0
|
$::RD_AUTOSTUB = ""; |
2127
|
|
|
|
|
|
|
} |
2128
|
|
|
|
|
|
|
elsif ($grammar =~ m/$AUTORULEMK/gco) |
2129
|
|
|
|
|
|
|
{ |
2130
|
0
|
|
|
|
|
0
|
_parse("an autorule marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2131
|
0
|
|
|
|
|
0
|
$::RD_AUTOSTUB = $1; |
2132
|
|
|
|
|
|
|
} |
2133
|
|
|
|
|
|
|
elsif ($grammar =~ m/$AUTOTREEMK/gco) |
2134
|
|
|
|
|
|
|
{ |
2135
|
0
|
0
|
|
|
|
0
|
my $base = defined($1) ? $1 : ""; |
2136
|
0
|
|
|
|
|
0
|
my $current_match = substr($grammar, $-[0], $+[0] - $-[0]); |
2137
|
0
|
0
|
0
|
|
|
0
|
$base .= "::" if $base && $base !~ /::$/; |
2138
|
0
|
|
|
|
|
0
|
_parse("an autotree marker", $aftererror,$line, $current_match); |
2139
|
0
|
0
|
|
|
|
0
|
if ($rule) |
2140
|
|
|
|
|
|
|
{ |
2141
|
0
|
|
|
|
|
0
|
_error("<autotree> directive not at start of grammar", $line); |
2142
|
0
|
|
|
|
|
0
|
_hint("The <autotree> directive can only |
2143
|
|
|
|
|
|
|
be specified at the start of a |
2144
|
|
|
|
|
|
|
grammar (before the first rule |
2145
|
|
|
|
|
|
|
is defined."); |
2146
|
|
|
|
|
|
|
} |
2147
|
|
|
|
|
|
|
else |
2148
|
|
|
|
|
|
|
{ |
2149
|
0
|
|
|
|
|
0
|
undef $self->{_AUTOACTION}; |
2150
|
|
|
|
|
|
|
$self->{_AUTOTREE}{NODE} |
2151
|
0
|
|
|
|
|
0
|
= new Parse::RecDescent::_Runtime::Action(q({bless \%item, ').$base.q('.$item[0]}),0,-1); |
2152
|
|
|
|
|
|
|
$self->{_AUTOTREE}{TERMINAL} |
2153
|
0
|
|
|
|
|
0
|
= new Parse::RecDescent::_Runtime::Action(q({bless {__VALUE__=>$item[1]}, ').$base.q('.$item[0]}),0,-1); |
2154
|
|
|
|
|
|
|
} |
2155
|
|
|
|
|
|
|
} |
2156
|
|
|
|
|
|
|
|
2157
|
|
|
|
|
|
|
elsif ($grammar =~ m/$REJECTMK/gco) |
2158
|
|
|
|
|
|
|
{ |
2159
|
0
|
|
|
|
|
0
|
_parse("an reject marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2160
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::UncondReject($lookahead,$line,"<reject>"); |
2161
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2162
|
|
|
|
|
|
|
or _no_rule("<reject>",$line); |
2163
|
|
|
|
|
|
|
} |
2164
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$CONDREJECTMK)/gco |
2165
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar,'{',undef,'<'); |
2166
|
0
|
|
|
|
|
0
|
$code }) |
2167
|
|
|
|
|
|
|
{ |
2168
|
0
|
|
|
|
|
0
|
_parse("a (conditional) reject marker", $aftererror,$line, $code ); |
2169
|
0
|
|
|
|
|
0
|
$code =~ /\A\s*<reject:(.*)>\Z/s; |
2170
|
0
|
|
|
|
|
0
|
my $cond = $1; |
2171
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive( |
2172
|
|
|
|
|
|
|
"($1) ? undef : 1", $lookahead,$line,"<reject:$cond>"); |
2173
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2174
|
|
|
|
|
|
|
or _no_rule("<reject:$cond>",$line); |
2175
|
|
|
|
|
|
|
} |
2176
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$SCOREMK)/gco |
2177
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar,'{',undef,'<'); |
2178
|
0
|
|
|
|
|
0
|
$code }) |
2179
|
|
|
|
|
|
|
{ |
2180
|
0
|
|
|
|
|
0
|
_parse("a score marker", $aftererror,$line, $code ); |
2181
|
0
|
|
|
|
|
0
|
$code =~ /\A\s*<score:(.*)>\Z/s; |
2182
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->addscore($1, $lookahead, $line) |
2183
|
|
|
|
|
|
|
or _no_rule($code,$line); |
2184
|
|
|
|
|
|
|
} |
2185
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$AUTOSCOREMK)/gco |
2186
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar,'{',undef,'<'); |
2187
|
0
|
|
|
|
|
0
|
$code; |
2188
|
|
|
|
|
|
|
} ) |
2189
|
|
|
|
|
|
|
{ |
2190
|
0
|
|
|
|
|
0
|
_parse("an autoscore specifier", $aftererror,$line,$code); |
2191
|
0
|
|
|
|
|
0
|
$code =~ /\A\s*<autoscore:(.*)>\Z/s; |
2192
|
|
|
|
|
|
|
|
2193
|
0
|
0
|
0
|
|
|
0
|
$rule and $rule->addautoscore($1,$self) |
2194
|
|
|
|
|
|
|
or _no_rule($code,$line); |
2195
|
|
|
|
|
|
|
|
2196
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::UncondReject($lookahead,$line,$code); |
2197
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2198
|
|
|
|
|
|
|
or _no_rule($code,$line); |
2199
|
|
|
|
|
|
|
} |
2200
|
|
|
|
|
|
|
elsif ($grammar =~ m/$RESYNCMK/gco) |
2201
|
|
|
|
|
|
|
{ |
2202
|
0
|
|
|
|
|
0
|
_parse("a resync to newline marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2203
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive( |
2204
|
|
|
|
|
|
|
'if ($text =~ s/(\A[^\n]*\n)//) { $return = 0; $1; } else { undef }', |
2205
|
|
|
|
|
|
|
$lookahead,$line,"<resync>"); |
2206
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2207
|
|
|
|
|
|
|
or _no_rule("<resync>",$line); |
2208
|
|
|
|
|
|
|
} |
2209
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$RESYNCPATMK)/gco |
2210
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_bracketed($grammar,'<'); |
2211
|
0
|
|
|
|
|
0
|
$code }) |
2212
|
|
|
|
|
|
|
{ |
2213
|
0
|
|
|
|
|
0
|
_parse("a resync with pattern marker", $aftererror,$line, $code ); |
2214
|
0
|
|
|
|
|
0
|
$code =~ /\A\s*<resync:(.*)>\Z/s; |
2215
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive( |
2216
|
|
|
|
|
|
|
'if ($text =~ s/(\A'.$1.')//) { $return = 0; $1; } else { undef }', |
2217
|
|
|
|
|
|
|
$lookahead,$line,$code); |
2218
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2219
|
|
|
|
|
|
|
or _no_rule($code,$line); |
2220
|
|
|
|
|
|
|
} |
2221
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$SKIPMK)/gco |
2222
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar,'<'); |
2223
|
0
|
|
|
|
|
0
|
$code }) |
2224
|
|
|
|
|
|
|
{ |
2225
|
0
|
|
|
|
|
0
|
_parse("a skip marker", $aftererror,$line, $code ); |
2226
|
0
|
|
|
|
|
0
|
$code =~ /\A\s*<skip:(.*)>\Z/s; |
2227
|
0
|
0
|
|
|
|
0
|
if ($rule) { |
2228
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive( |
2229
|
|
|
|
|
|
|
'my $oldskip = $skip; $skip='.$1.'; $oldskip', |
2230
|
|
|
|
|
|
|
$lookahead,$line,$code); |
2231
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2232
|
|
|
|
|
|
|
or _no_rule($code,$line); |
2233
|
|
|
|
|
|
|
} else { |
2234
|
|
|
|
|
|
|
#global <skip> directive |
2235
|
0
|
|
|
|
|
0
|
$self->{skip} = $1; |
2236
|
|
|
|
|
|
|
} |
2237
|
|
|
|
|
|
|
} |
2238
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$RULEVARPATMK)/gco |
2239
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar,'{',undef,'<'); |
2240
|
0
|
|
|
|
|
0
|
$code; |
2241
|
|
|
|
|
|
|
} ) |
2242
|
|
|
|
|
|
|
{ |
2243
|
0
|
|
|
|
|
0
|
_parse("a rule variable specifier", $aftererror,$line,$code); |
2244
|
0
|
|
|
|
|
0
|
$code =~ /\A\s*<rulevar:(.*)>\Z/s; |
2245
|
|
|
|
|
|
|
|
2246
|
0
|
0
|
0
|
|
|
0
|
$rule and $rule->addvar($1,$self) |
2247
|
|
|
|
|
|
|
or _no_rule($code,$line); |
2248
|
|
|
|
|
|
|
|
2249
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::UncondReject($lookahead,$line,$code); |
2250
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2251
|
|
|
|
|
|
|
or _no_rule($code,$line); |
2252
|
|
|
|
|
|
|
} |
2253
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$AUTOACTIONPATMK)/gco |
2254
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar,'{',undef,'<'); |
2255
|
0
|
|
|
|
|
0
|
$code; |
2256
|
|
|
|
|
|
|
} ) |
2257
|
|
|
|
|
|
|
{ |
2258
|
0
|
|
|
|
|
0
|
_parse("an autoaction specifier", $aftererror,$line,$code); |
2259
|
0
|
|
|
|
|
0
|
$code =~ s/\A\s*<autoaction:(.*)>\Z/$1/s; |
2260
|
0
|
0
|
|
|
|
0
|
if ($code =~ /\A\s*[^{]|[^}]\s*\Z/) { |
2261
|
0
|
|
|
|
|
0
|
$code = "{ $code }" |
2262
|
|
|
|
|
|
|
} |
2263
|
|
|
|
|
|
|
$self->{_check}{itempos} = |
2264
|
0
|
|
|
|
|
0
|
$code =~ /\@itempos\b|\$itempos\s*\[/; |
2265
|
|
|
|
|
|
|
$self->{_AUTOACTION} |
2266
|
0
|
|
|
|
|
0
|
= new Parse::RecDescent::_Runtime::Action($code,0,-$line) |
2267
|
|
|
|
|
|
|
} |
2268
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$DEFERPATMK)/gco |
2269
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar,'{',undef,'<'); |
2270
|
0
|
|
|
|
|
0
|
$code; |
2271
|
|
|
|
|
|
|
} ) |
2272
|
|
|
|
|
|
|
{ |
2273
|
0
|
|
|
|
|
0
|
_parse("a deferred action specifier", $aftererror,$line,$code); |
2274
|
0
|
|
|
|
|
0
|
$code =~ s/\A\s*<defer:(.*)>\Z/$1/s; |
2275
|
0
|
0
|
|
|
|
0
|
if ($code =~ /\A\s*[^{]|[^}]\s*\Z/) |
2276
|
|
|
|
|
|
|
{ |
2277
|
0
|
|
|
|
|
0
|
$code = "{ $code }" |
2278
|
|
|
|
|
|
|
} |
2279
|
|
|
|
|
|
|
|
2280
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive( |
2281
|
|
|
|
|
|
|
"push \@{\$thisparser->{deferred}}, sub $code;", |
2282
|
|
|
|
|
|
|
$lookahead,$line,"<defer:$code>"); |
2283
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2284
|
|
|
|
|
|
|
or _no_rule("<defer:$code>",$line); |
2285
|
|
|
|
|
|
|
|
2286
|
0
|
|
|
|
|
0
|
$self->{deferrable} = 1; |
2287
|
|
|
|
|
|
|
} |
2288
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$TOKENPATMK)/gco |
2289
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_codeblock($grammar,'{',undef,'<'); |
2290
|
0
|
|
|
|
|
0
|
$code; |
2291
|
|
|
|
|
|
|
} ) |
2292
|
|
|
|
|
|
|
{ |
2293
|
0
|
|
|
|
|
0
|
_parse("a token constructor", $aftererror,$line,$code); |
2294
|
0
|
|
|
|
|
0
|
$code =~ s/\A\s*<token:(.*)>\Z/$1/s; |
2295
|
|
|
|
|
|
|
|
2296
|
0
|
|
0
|
|
|
0
|
my $types = eval 'no strict; local $SIG{__WARN__} = sub {0}; my @arr=('.$code.'); @arr' || (); |
2297
|
0
|
0
|
|
|
|
0
|
if (!$types) |
2298
|
|
|
|
|
|
|
{ |
2299
|
0
|
|
|
|
|
0
|
_error("Incorrect token specification: \"$@\"", $line); |
2300
|
0
|
|
|
|
|
0
|
_hint("The <token:...> directive requires a list |
2301
|
|
|
|
|
|
|
of one or more strings representing possible |
2302
|
|
|
|
|
|
|
types of the specified token. For example: |
2303
|
|
|
|
|
|
|
<token:NOUN,VERB>"); |
2304
|
|
|
|
|
|
|
} |
2305
|
|
|
|
|
|
|
else |
2306
|
|
|
|
|
|
|
{ |
2307
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive( |
2308
|
|
|
|
|
|
|
'no strict; |
2309
|
|
|
|
|
|
|
$return = { text => $item[-1] }; |
2310
|
|
|
|
|
|
|
@{$return->{type}}{'.$code.'} = (1..'.$types.');', |
2311
|
|
|
|
|
|
|
$lookahead,$line,"<token:$code>"); |
2312
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2313
|
|
|
|
|
|
|
or _no_rule("<token:$code>",$line); |
2314
|
|
|
|
|
|
|
} |
2315
|
|
|
|
|
|
|
} |
2316
|
|
|
|
|
|
|
elsif ($grammar =~ m/$COMMITMK/gco) |
2317
|
|
|
|
|
|
|
{ |
2318
|
0
|
|
|
|
|
0
|
_parse("an commit marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2319
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Directive('$commit = 1', |
2320
|
|
|
|
|
|
|
$lookahead,$line,"<commit>"); |
2321
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2322
|
|
|
|
|
|
|
or _no_rule("<commit>",$line); |
2323
|
|
|
|
|
|
|
} |
2324
|
|
|
|
|
|
|
elsif ($grammar =~ m/$NOCHECKMK/gco) { |
2325
|
0
|
|
|
|
|
0
|
_parse("an hint request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2326
|
0
|
|
|
|
|
0
|
$::RD_CHECK = 0; |
2327
|
|
|
|
|
|
|
} |
2328
|
|
|
|
|
|
|
elsif ($grammar =~ m/$HINTMK/gco) { |
2329
|
0
|
|
|
|
|
0
|
_parse("an hint request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2330
|
0
|
|
|
|
|
0
|
$::RD_HINT = $self->{__HINT__} = 1; |
2331
|
|
|
|
|
|
|
} |
2332
|
|
|
|
|
|
|
elsif ($grammar =~ m/$WARNMK/gco) { |
2333
|
0
|
|
|
|
|
0
|
_parse("an warning request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2334
|
0
|
0
|
|
|
|
0
|
$::RD_WARN = $self->{__WARN__} = $1 ? $2+0 : 1; |
2335
|
|
|
|
|
|
|
} |
2336
|
|
|
|
|
|
|
elsif ($grammar =~ m/$TRACEBUILDMK/gco) { |
2337
|
0
|
|
|
|
|
0
|
_parse("an grammar build trace request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2338
|
0
|
0
|
|
|
|
0
|
$::RD_TRACE = $1 ? $2+0 : 1; |
2339
|
|
|
|
|
|
|
} |
2340
|
|
|
|
|
|
|
elsif ($grammar =~ m/$TRACEPARSEMK/gco) { |
2341
|
0
|
|
|
|
|
0
|
_parse("an parse trace request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2342
|
0
|
0
|
|
|
|
0
|
$self->{__TRACE__} = $1 ? $2+0 : 1; |
2343
|
|
|
|
|
|
|
} |
2344
|
|
|
|
|
|
|
elsif ($grammar =~ m/$AUTOERRORMK/gco) |
2345
|
|
|
|
|
|
|
{ |
2346
|
0
|
|
|
|
|
0
|
$commitonly = $1; |
2347
|
0
|
|
|
|
|
0
|
_parse("an error marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2348
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Error('',$lookahead,$1,$line); |
2349
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2350
|
|
|
|
|
|
|
or _no_rule("<error>",$line); |
2351
|
0
|
|
|
|
|
0
|
$aftererror = !$commitonly; |
2352
|
|
|
|
|
|
|
} |
2353
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$MSGERRORMK)/gco |
2354
|
0
|
|
|
|
|
0
|
and do { $commitonly = $1; |
2355
|
0
|
|
|
|
|
0
|
($code) = extract_bracketed($grammar,'<'); |
2356
|
0
|
|
|
|
|
0
|
$code }) |
2357
|
|
|
|
|
|
|
{ |
2358
|
0
|
|
|
|
|
0
|
_parse("an error marker", $aftererror,$line,$code); |
2359
|
0
|
|
|
|
|
0
|
$code =~ /\A\s*<error\??:(.*)>\Z/s; |
2360
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Error($1,$lookahead,$commitonly,$line); |
2361
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2362
|
|
|
|
|
|
|
or _no_rule("$code",$line); |
2363
|
0
|
|
|
|
|
0
|
$aftererror = !$commitonly; |
2364
|
|
|
|
|
|
|
} |
2365
|
0
|
|
|
|
|
0
|
elsif (do { $commitonly = $1; |
2366
|
0
|
|
|
|
|
0
|
($code) = extract_bracketed($grammar,'<'); |
2367
|
0
|
|
|
|
|
0
|
$code }) |
2368
|
|
|
|
|
|
|
{ |
2369
|
0
|
0
|
|
|
|
0
|
if ($code =~ /^<[A-Z_]+>$/) |
2370
|
|
|
|
|
|
|
{ |
2371
|
0
|
|
|
|
|
0
|
_error("Token items are not yet |
2372
|
|
|
|
|
|
|
supported: \"$code\"", |
2373
|
|
|
|
|
|
|
$line); |
2374
|
0
|
|
|
|
|
0
|
_hint("Items like $code that consist of angle |
2375
|
|
|
|
|
|
|
brackets enclosing a sequence of |
2376
|
|
|
|
|
|
|
uppercase characters will eventually |
2377
|
|
|
|
|
|
|
be used to specify pre-lexed tokens |
2378
|
|
|
|
|
|
|
in a grammar. That functionality is not |
2379
|
|
|
|
|
|
|
yet implemented. Or did you misspell |
2380
|
|
|
|
|
|
|
\"$code\"?"); |
2381
|
|
|
|
|
|
|
} |
2382
|
|
|
|
|
|
|
else |
2383
|
|
|
|
|
|
|
{ |
2384
|
0
|
|
|
|
|
0
|
_error("Untranslatable item encountered: \"$code\"", |
2385
|
|
|
|
|
|
|
$line); |
2386
|
0
|
|
|
|
|
0
|
_hint("Did you misspell \"$code\" |
2387
|
|
|
|
|
|
|
or forget to comment it out?"); |
2388
|
|
|
|
|
|
|
} |
2389
|
|
|
|
|
|
|
} |
2390
|
|
|
|
|
|
|
} |
2391
|
|
|
|
|
|
|
elsif ($grammar =~ m/$RULE/gco) |
2392
|
|
|
|
|
|
|
{ |
2393
|
0
|
0
|
|
|
|
0
|
_parseunneg("a rule declaration", 0, |
2394
|
|
|
|
|
|
|
$lookahead,$line, substr($grammar, $-[0], $+[0] - $-[0]) ) or next; |
2395
|
0
|
|
|
|
|
0
|
my $rulename = $1; |
2396
|
0
|
0
|
|
|
|
0
|
if ($rulename =~ /Replace|Extend|Precompile|Save/ ) |
2397
|
|
|
|
|
|
|
{ |
2398
|
0
|
0
|
|
|
|
0
|
_warn(2,"Rule \"$rulename\" hidden by method |
2399
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::$rulename",$line) |
2400
|
|
|
|
|
|
|
and |
2401
|
|
|
|
|
|
|
_hint("The rule named \"$rulename\" cannot be directly |
2402
|
|
|
|
|
|
|
called through the Parse::RecDescent::_Runtime object |
2403
|
|
|
|
|
|
|
for this grammar (although it may still |
2404
|
|
|
|
|
|
|
be used as a subrule of other rules). |
2405
|
|
|
|
|
|
|
It can't be directly called because |
2406
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::$rulename is already defined (it |
2407
|
|
|
|
|
|
|
is the standard method of all |
2408
|
|
|
|
|
|
|
parsers)."); |
2409
|
|
|
|
|
|
|
} |
2410
|
0
|
|
|
|
|
0
|
$rule = new Parse::RecDescent::_Runtime::Rule($rulename,$self,$line,$replace); |
2411
|
0
|
0
|
|
|
|
0
|
$prod->check_pending($line) if $prod; |
2412
|
0
|
|
|
|
|
0
|
$prod = $rule->addprod( new Parse::RecDescent::_Runtime::Production ); |
2413
|
0
|
|
|
|
|
0
|
$aftererror = 0; |
2414
|
|
|
|
|
|
|
} |
2415
|
|
|
|
|
|
|
elsif ($grammar =~ m/$UNCOMMITPROD/gco) |
2416
|
|
|
|
|
|
|
{ |
2417
|
0
|
|
|
|
|
0
|
pos($grammar)-=9; |
2418
|
0
|
0
|
|
|
|
0
|
_parseunneg("a new (uncommitted) production", |
2419
|
|
|
|
|
|
|
0, $lookahead, $line, substr($grammar, $-[0], $+[0] - $-[0]) ) or next; |
2420
|
|
|
|
|
|
|
|
2421
|
0
|
0
|
|
|
|
0
|
$prod->check_pending($line) if $prod; |
2422
|
0
|
|
|
|
|
0
|
$prod = new Parse::RecDescent::_Runtime::Production($line,1); |
2423
|
0
|
0
|
0
|
|
|
0
|
$rule and $rule->addprod($prod) |
2424
|
|
|
|
|
|
|
or _no_rule("<uncommit>",$line); |
2425
|
0
|
|
|
|
|
0
|
$aftererror = 0; |
2426
|
|
|
|
|
|
|
} |
2427
|
|
|
|
|
|
|
elsif ($grammar =~ m/$ERRORPROD/gco) |
2428
|
|
|
|
|
|
|
{ |
2429
|
0
|
|
|
|
|
0
|
pos($grammar)-=6; |
2430
|
0
|
0
|
|
|
|
0
|
_parseunneg("a new (error) production", $aftererror, |
2431
|
|
|
|
|
|
|
$lookahead,$line, substr($grammar, $-[0], $+[0] - $-[0]) ) or next; |
2432
|
0
|
0
|
|
|
|
0
|
$prod->check_pending($line) if $prod; |
2433
|
0
|
|
|
|
|
0
|
$prod = new Parse::RecDescent::_Runtime::Production($line,0,1); |
2434
|
0
|
0
|
0
|
|
|
0
|
$rule and $rule->addprod($prod) |
2435
|
|
|
|
|
|
|
or _no_rule("<error>",$line); |
2436
|
0
|
|
|
|
|
0
|
$aftererror = 0; |
2437
|
|
|
|
|
|
|
} |
2438
|
|
|
|
|
|
|
elsif ($grammar =~ m/$PROD/gco) |
2439
|
|
|
|
|
|
|
{ |
2440
|
0
|
0
|
|
|
|
0
|
_parseunneg("a new production", 0, |
2441
|
|
|
|
|
|
|
$lookahead,$line, substr($grammar, $-[0], $+[0] - $-[0]) ) or next; |
2442
|
0
|
0
|
0
|
|
|
0
|
$rule |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
2443
|
|
|
|
|
|
|
and (!$prod || $prod->check_pending($line)) |
2444
|
|
|
|
|
|
|
and $prod = $rule->addprod(new Parse::RecDescent::_Runtime::Production($line)) |
2445
|
|
|
|
|
|
|
or _no_rule("production",$line); |
2446
|
0
|
|
|
|
|
0
|
$aftererror = 0; |
2447
|
|
|
|
|
|
|
} |
2448
|
|
|
|
|
|
|
elsif ($grammar =~ m/$LITERAL/gco) |
2449
|
|
|
|
|
|
|
{ |
2450
|
0
|
|
|
|
|
0
|
my $literal = $1; |
2451
|
0
|
|
|
|
|
0
|
($code = $literal) =~ s/\\\\/\\/g; |
2452
|
0
|
|
|
|
|
0
|
_parse("a literal terminal", $aftererror,$line,$literal); |
2453
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Literal($code,$lookahead,$line); |
2454
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2455
|
|
|
|
|
|
|
or _no_rule("literal terminal",$line,"'$literal'"); |
2456
|
|
|
|
|
|
|
} |
2457
|
|
|
|
|
|
|
elsif ($grammar =~ m/$INTERPLIT/gco) |
2458
|
|
|
|
|
|
|
{ |
2459
|
0
|
|
|
|
|
0
|
_parse("an interpolated literal terminal", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2460
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::InterpLit($1,$lookahead,$line); |
2461
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2462
|
|
|
|
|
|
|
or _no_rule("interpolated literal terminal",$line,"'$1'"); |
2463
|
|
|
|
|
|
|
} |
2464
|
|
|
|
|
|
|
elsif ($grammar =~ m/$TOKEN/gco) |
2465
|
|
|
|
|
|
|
{ |
2466
|
0
|
|
|
|
|
0
|
_parse("a /../ pattern terminal", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) ); |
2467
|
0
|
0
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Token($1,'/',$3?$3:'',$lookahead,$line); |
2468
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2469
|
|
|
|
|
|
|
or _no_rule("pattern terminal",$line,"/$1/"); |
2470
|
|
|
|
|
|
|
} |
2471
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$MTOKEN)/gco |
2472
|
0
|
|
|
|
|
0
|
and do { ($code, undef, @components) |
2473
|
|
|
|
|
|
|
= extract_quotelike($grammar); |
2474
|
0
|
|
|
|
|
0
|
$code } |
2475
|
|
|
|
|
|
|
) |
2476
|
|
|
|
|
|
|
|
2477
|
|
|
|
|
|
|
{ |
2478
|
0
|
|
|
|
|
0
|
_parse("an m/../ pattern terminal", $aftererror,$line,$code); |
2479
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Token(@components[3,2,8], |
2480
|
|
|
|
|
|
|
$lookahead,$line); |
2481
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2482
|
|
|
|
|
|
|
or _no_rule("pattern terminal",$line,$code); |
2483
|
|
|
|
|
|
|
} |
2484
|
|
|
|
|
|
|
elsif ($grammar =~ m/(?=$MATCHRULE)/gco |
2485
|
0
|
|
|
|
|
0
|
and do { ($code) = extract_bracketed($grammar,'<'); |
2486
|
0
|
|
|
|
|
0
|
$code |
2487
|
|
|
|
|
|
|
} |
2488
|
|
|
|
|
|
|
or $grammar =~ m/$SUBRULE/gco |
2489
|
|
|
|
|
|
|
and $code = $1) |
2490
|
|
|
|
|
|
|
{ |
2491
|
0
|
|
|
|
|
0
|
my $name = $code; |
2492
|
0
|
|
|
|
|
0
|
my $matchrule = 0; |
2493
|
0
|
0
|
|
|
|
0
|
if (substr($name,0,1) eq '<') |
2494
|
|
|
|
|
|
|
{ |
2495
|
0
|
|
|
|
|
0
|
$name =~ s/$MATCHRULE\s*//; |
2496
|
0
|
|
|
|
|
0
|
$name =~ s/\s*>\Z//; |
2497
|
0
|
|
|
|
|
0
|
$matchrule = 1; |
2498
|
|
|
|
|
|
|
} |
2499
|
|
|
|
|
|
|
|
2500
|
|
|
|
|
|
|
# EXTRACT TRAILING ARG LIST (IF ANY) |
2501
|
|
|
|
|
|
|
|
2502
|
0
|
|
0
|
|
|
0
|
my ($argcode) = extract_codeblock($grammar, "[]",'') || ''; |
2503
|
|
|
|
|
|
|
|
2504
|
|
|
|
|
|
|
# EXTRACT TRAILING REPETITION SPECIFIER (IF ANY) |
2505
|
|
|
|
|
|
|
|
2506
|
0
|
0
|
|
|
|
0
|
if ($grammar =~ m/\G[(]/gc) |
2507
|
|
|
|
|
|
|
{ |
2508
|
0
|
|
|
|
|
0
|
pos($grammar)--; |
2509
|
|
|
|
|
|
|
|
2510
|
0
|
0
|
|
|
|
0
|
if ($grammar =~ m/$OPTIONAL/gco) |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
2511
|
|
|
|
|
|
|
{ |
2512
|
0
|
|
|
|
|
0
|
_parse("an zero-or-one subrule match", $aftererror,$line,"$code$argcode($1)"); |
2513
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Repetition($name,$1,0,1, |
2514
|
|
|
|
|
|
|
$lookahead,$line, |
2515
|
|
|
|
|
|
|
$self, |
2516
|
|
|
|
|
|
|
$matchrule, |
2517
|
|
|
|
|
|
|
$argcode); |
2518
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2519
|
|
|
|
|
|
|
or _no_rule("repetition",$line,"$code$argcode($1)"); |
2520
|
|
|
|
|
|
|
|
2521
|
0
|
0
|
0
|
|
|
0
|
!$matchrule and $rule and $rule->addcall($name); |
2522
|
|
|
|
|
|
|
} |
2523
|
|
|
|
|
|
|
elsif ($grammar =~ m/$ANY/gco) |
2524
|
|
|
|
|
|
|
{ |
2525
|
0
|
|
|
|
|
0
|
_parse("a zero-or-more subrule match", $aftererror,$line,"$code$argcode($1)"); |
2526
|
0
|
0
|
|
|
|
0
|
if ($2) |
2527
|
|
|
|
|
|
|
{ |
2528
|
0
|
|
|
|
|
0
|
my $pos = pos $grammar; |
2529
|
0
|
|
|
|
|
0
|
substr($grammar,$pos,0, |
2530
|
|
|
|
|
|
|
"<leftop='$name(s?)': $name $2 $name>(s?) "); |
2531
|
|
|
|
|
|
|
|
2532
|
0
|
|
|
|
|
0
|
pos $grammar = $pos; |
2533
|
|
|
|
|
|
|
} |
2534
|
|
|
|
|
|
|
else |
2535
|
|
|
|
|
|
|
{ |
2536
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Repetition($name,$1,0,$MAXREP, |
2537
|
|
|
|
|
|
|
$lookahead,$line, |
2538
|
|
|
|
|
|
|
$self, |
2539
|
|
|
|
|
|
|
$matchrule, |
2540
|
|
|
|
|
|
|
$argcode); |
2541
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2542
|
|
|
|
|
|
|
or _no_rule("repetition",$line,"$code$argcode($1)"); |
2543
|
|
|
|
|
|
|
|
2544
|
0
|
0
|
0
|
|
|
0
|
!$matchrule and $rule and $rule->addcall($name); |
2545
|
|
|
|
|
|
|
|
2546
|
0
|
0
|
|
|
|
0
|
_check_insatiable($name,$1,$grammar,$line) if $::RD_CHECK; |
2547
|
|
|
|
|
|
|
} |
2548
|
|
|
|
|
|
|
} |
2549
|
|
|
|
|
|
|
elsif ($grammar =~ m/$MANY/gco) |
2550
|
|
|
|
|
|
|
{ |
2551
|
0
|
|
|
|
|
0
|
_parse("a one-or-more subrule match", $aftererror,$line,"$code$argcode($1)"); |
2552
|
0
|
0
|
|
|
|
0
|
if ($2) |
2553
|
|
|
|
|
|
|
{ |
2554
|
|
|
|
|
|
|
# $DB::single=1; |
2555
|
0
|
|
|
|
|
0
|
my $pos = pos $grammar; |
2556
|
0
|
|
|
|
|
0
|
substr($grammar,$pos,0, |
2557
|
|
|
|
|
|
|
"<leftop='$name(s)': $name $2 $name> "); |
2558
|
|
|
|
|
|
|
|
2559
|
0
|
|
|
|
|
0
|
pos $grammar = $pos; |
2560
|
|
|
|
|
|
|
} |
2561
|
|
|
|
|
|
|
else |
2562
|
|
|
|
|
|
|
{ |
2563
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Repetition($name,$1,1,$MAXREP, |
2564
|
|
|
|
|
|
|
$lookahead,$line, |
2565
|
|
|
|
|
|
|
$self, |
2566
|
|
|
|
|
|
|
$matchrule, |
2567
|
|
|
|
|
|
|
$argcode); |
2568
|
|
|
|
|
|
|
|
2569
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2570
|
|
|
|
|
|
|
or _no_rule("repetition",$line,"$code$argcode($1)"); |
2571
|
|
|
|
|
|
|
|
2572
|
0
|
0
|
0
|
|
|
0
|
!$matchrule and $rule and $rule->addcall($name); |
2573
|
|
|
|
|
|
|
|
2574
|
0
|
0
|
|
|
|
0
|
_check_insatiable($name,$1,$grammar,$line) if $::RD_CHECK; |
2575
|
|
|
|
|
|
|
} |
2576
|
|
|
|
|
|
|
} |
2577
|
|
|
|
|
|
|
elsif ($grammar =~ m/$EXACTLY/gco) |
2578
|
|
|
|
|
|
|
{ |
2579
|
0
|
|
|
|
|
0
|
_parse("an exactly-$1-times subrule match", $aftererror,$line,"$code$argcode($1)"); |
2580
|
0
|
0
|
|
|
|
0
|
if ($2) |
2581
|
|
|
|
|
|
|
{ |
2582
|
0
|
|
|
|
|
0
|
my $pos = pos $grammar; |
2583
|
0
|
|
|
|
|
0
|
substr($grammar,$pos,0, |
2584
|
|
|
|
|
|
|
"<leftop='$name($1)': $name $2 $name>($1) "); |
2585
|
|
|
|
|
|
|
|
2586
|
0
|
|
|
|
|
0
|
pos $grammar = $pos; |
2587
|
|
|
|
|
|
|
} |
2588
|
|
|
|
|
|
|
else |
2589
|
|
|
|
|
|
|
{ |
2590
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Repetition($name,$1,$1,$1, |
2591
|
|
|
|
|
|
|
$lookahead,$line, |
2592
|
|
|
|
|
|
|
$self, |
2593
|
|
|
|
|
|
|
$matchrule, |
2594
|
|
|
|
|
|
|
$argcode); |
2595
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2596
|
|
|
|
|
|
|
or _no_rule("repetition",$line,"$code$argcode($1)"); |
2597
|
|
|
|
|
|
|
|
2598
|
0
|
0
|
0
|
|
|
0
|
!$matchrule and $rule and $rule->addcall($name); |
2599
|
|
|
|
|
|
|
} |
2600
|
|
|
|
|
|
|
} |
2601
|
|
|
|
|
|
|
elsif ($grammar =~ m/$BETWEEN/gco) |
2602
|
|
|
|
|
|
|
{ |
2603
|
0
|
|
|
|
|
0
|
_parse("a $1-to-$2 subrule match", $aftererror,$line,"$code$argcode($1..$2)"); |
2604
|
0
|
0
|
|
|
|
0
|
if ($3) |
2605
|
|
|
|
|
|
|
{ |
2606
|
0
|
|
|
|
|
0
|
my $pos = pos $grammar; |
2607
|
0
|
|
|
|
|
0
|
substr($grammar,$pos,0, |
2608
|
|
|
|
|
|
|
"<leftop='$name($1..$2)': $name $3 $name>($1..$2) "); |
2609
|
|
|
|
|
|
|
|
2610
|
0
|
|
|
|
|
0
|
pos $grammar = $pos; |
2611
|
|
|
|
|
|
|
} |
2612
|
|
|
|
|
|
|
else |
2613
|
|
|
|
|
|
|
{ |
2614
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Repetition($name,"$1..$2",$1,$2, |
2615
|
|
|
|
|
|
|
$lookahead,$line, |
2616
|
|
|
|
|
|
|
$self, |
2617
|
|
|
|
|
|
|
$matchrule, |
2618
|
|
|
|
|
|
|
$argcode); |
2619
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2620
|
|
|
|
|
|
|
or _no_rule("repetition",$line,"$code$argcode($1..$2)"); |
2621
|
|
|
|
|
|
|
|
2622
|
0
|
0
|
0
|
|
|
0
|
!$matchrule and $rule and $rule->addcall($name); |
2623
|
|
|
|
|
|
|
} |
2624
|
|
|
|
|
|
|
} |
2625
|
|
|
|
|
|
|
elsif ($grammar =~ m/$ATLEAST/gco) |
2626
|
|
|
|
|
|
|
{ |
2627
|
0
|
|
|
|
|
0
|
_parse("a $1-or-more subrule match", $aftererror,$line,"$code$argcode($1..)"); |
2628
|
0
|
0
|
|
|
|
0
|
if ($2) |
2629
|
|
|
|
|
|
|
{ |
2630
|
0
|
|
|
|
|
0
|
my $pos = pos $grammar; |
2631
|
0
|
|
|
|
|
0
|
substr($grammar,$pos,0, |
2632
|
|
|
|
|
|
|
"<leftop='$name($1..)': $name $2 $name>($1..) "); |
2633
|
|
|
|
|
|
|
|
2634
|
0
|
|
|
|
|
0
|
pos $grammar = $pos; |
2635
|
|
|
|
|
|
|
} |
2636
|
|
|
|
|
|
|
else |
2637
|
|
|
|
|
|
|
{ |
2638
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Repetition($name,"$1..",$1,$MAXREP, |
2639
|
|
|
|
|
|
|
$lookahead,$line, |
2640
|
|
|
|
|
|
|
$self, |
2641
|
|
|
|
|
|
|
$matchrule, |
2642
|
|
|
|
|
|
|
$argcode); |
2643
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2644
|
|
|
|
|
|
|
or _no_rule("repetition",$line,"$code$argcode($1..)"); |
2645
|
|
|
|
|
|
|
|
2646
|
0
|
0
|
0
|
|
|
0
|
!$matchrule and $rule and $rule->addcall($name); |
2647
|
0
|
0
|
|
|
|
0
|
_check_insatiable($name,"$1..",$grammar,$line) if $::RD_CHECK; |
2648
|
|
|
|
|
|
|
} |
2649
|
|
|
|
|
|
|
} |
2650
|
|
|
|
|
|
|
elsif ($grammar =~ m/$ATMOST/gco) |
2651
|
|
|
|
|
|
|
{ |
2652
|
0
|
|
|
|
|
0
|
_parse("a one-to-$1 subrule match", $aftererror,$line,"$code$argcode(..$1)"); |
2653
|
0
|
0
|
|
|
|
0
|
if ($2) |
2654
|
|
|
|
|
|
|
{ |
2655
|
0
|
|
|
|
|
0
|
my $pos = pos $grammar; |
2656
|
0
|
|
|
|
|
0
|
substr($grammar,$pos,0, |
2657
|
|
|
|
|
|
|
"<leftop='$name(..$1)': $name $2 $name>(..$1) "); |
2658
|
|
|
|
|
|
|
|
2659
|
0
|
|
|
|
|
0
|
pos $grammar = $pos; |
2660
|
|
|
|
|
|
|
} |
2661
|
|
|
|
|
|
|
else |
2662
|
|
|
|
|
|
|
{ |
2663
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Repetition($name,"..$1",1,$1, |
2664
|
|
|
|
|
|
|
$lookahead,$line, |
2665
|
|
|
|
|
|
|
$self, |
2666
|
|
|
|
|
|
|
$matchrule, |
2667
|
|
|
|
|
|
|
$argcode); |
2668
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2669
|
|
|
|
|
|
|
or _no_rule("repetition",$line,"$code$argcode(..$1)"); |
2670
|
|
|
|
|
|
|
|
2671
|
0
|
0
|
0
|
|
|
0
|
!$matchrule and $rule and $rule->addcall($name); |
2672
|
|
|
|
|
|
|
} |
2673
|
|
|
|
|
|
|
} |
2674
|
|
|
|
|
|
|
elsif ($grammar =~ m/$BADREP/gco) |
2675
|
|
|
|
|
|
|
{ |
2676
|
0
|
|
|
|
|
0
|
my $current_match = substr($grammar, $-[0], $+[0] - $-[0]); |
2677
|
0
|
|
|
|
|
0
|
_parse("an subrule match with invalid repetition specifier", 0,$line, $current_match); |
2678
|
0
|
|
|
|
|
0
|
_error("Incorrect specification of a repeated subrule", |
2679
|
|
|
|
|
|
|
$line); |
2680
|
0
|
|
|
|
|
0
|
_hint("Repeated subrules like \"$code$argcode$current_match\" cannot have |
2681
|
|
|
|
|
|
|
a maximum repetition of zero, nor can they have |
2682
|
|
|
|
|
|
|
negative components in their ranges."); |
2683
|
|
|
|
|
|
|
} |
2684
|
|
|
|
|
|
|
} |
2685
|
|
|
|
|
|
|
else |
2686
|
|
|
|
|
|
|
{ |
2687
|
0
|
|
|
|
|
0
|
_parse("a subrule match", $aftererror,$line,$code); |
2688
|
0
|
|
|
|
|
0
|
my $desc; |
2689
|
0
|
0
|
|
|
|
0
|
if ($name=~/\A_alternation_\d+_of_production_\d+_of_rule/) |
2690
|
0
|
|
|
|
|
0
|
{ $desc = $self->{"rules"}{$name}->expected } |
2691
|
0
|
|
|
|
|
0
|
$item = new Parse::RecDescent::_Runtime::Subrule($name, |
2692
|
|
|
|
|
|
|
$lookahead, |
2693
|
|
|
|
|
|
|
$line, |
2694
|
|
|
|
|
|
|
$desc, |
2695
|
|
|
|
|
|
|
$matchrule, |
2696
|
|
|
|
|
|
|
$argcode); |
2697
|
|
|
|
|
|
|
|
2698
|
0
|
0
|
0
|
|
|
0
|
$prod and $prod->additem($item) |
2699
|
|
|
|
|
|
|
or _no_rule("(sub)rule",$line,$name); |
2700
|
|
|
|
|
|
|
|
2701
|
0
|
0
|
0
|
|
|
0
|
!$matchrule and $rule and $rule->addcall($name); |
2702
|
|
|
|
|
|
|
} |
2703
|
|
|
|
|
|
|
} |
2704
|
|
|
|
|
|
|
elsif ($grammar =~ m/$LONECOLON/gco ) |
2705
|
|
|
|
|
|
|
{ |
2706
|
0
|
|
|
|
|
0
|
_error("Unexpected colon encountered", $line); |
2707
|
0
|
|
|
|
|
0
|
_hint("Did you mean \"|\" (to start a new production)? |
2708
|
|
|
|
|
|
|
Or perhaps you forgot that the colon |
2709
|
|
|
|
|
|
|
in a rule definition must be |
2710
|
|
|
|
|
|
|
on the same line as the rule name?"); |
2711
|
|
|
|
|
|
|
} |
2712
|
|
|
|
|
|
|
elsif ($grammar =~ m/$ACTION/gco ) # BAD ACTION, ALREADY FAILED |
2713
|
|
|
|
|
|
|
{ |
2714
|
0
|
|
|
|
|
0
|
_error("Malformed action encountered", |
2715
|
|
|
|
|
|
|
$line); |
2716
|
0
|
|
|
|
|
0
|
_hint("Did you forget the closing curly bracket |
2717
|
|
|
|
|
|
|
or is there a syntax error in the action?"); |
2718
|
|
|
|
|
|
|
} |
2719
|
|
|
|
|
|
|
elsif ($grammar =~ m/$OTHER/gco ) |
2720
|
|
|
|
|
|
|
{ |
2721
|
0
|
|
|
|
|
0
|
_error("Untranslatable item encountered: \"$1\"", |
2722
|
|
|
|
|
|
|
$line); |
2723
|
0
|
|
|
|
|
0
|
_hint("Did you misspell \"$1\" |
2724
|
|
|
|
|
|
|
or forget to comment it out?"); |
2725
|
|
|
|
|
|
|
} |
2726
|
|
|
|
|
|
|
|
2727
|
0
|
0
|
|
|
|
0
|
if ($lookaheadspec =~ tr /././ > 3) |
2728
|
|
|
|
|
|
|
{ |
2729
|
0
|
|
|
|
|
0
|
$lookaheadspec =~ s/\A\s+//; |
2730
|
0
|
0
|
|
|
|
0
|
$lookahead = $lookahead<0 |
2731
|
|
|
|
|
|
|
? 'a negative lookahead ("...!")' |
2732
|
|
|
|
|
|
|
: 'a positive lookahead ("...")' ; |
2733
|
0
|
0
|
|
|
|
0
|
_warn(1,"Found two or more lookahead specifiers in a |
2734
|
|
|
|
|
|
|
row.",$line) |
2735
|
|
|
|
|
|
|
and |
2736
|
|
|
|
|
|
|
_hint("Multiple positive and/or negative lookaheads |
2737
|
|
|
|
|
|
|
are simply multiplied together to produce a |
2738
|
|
|
|
|
|
|
single positive or negative lookahead |
2739
|
|
|
|
|
|
|
specification. In this case the sequence |
2740
|
|
|
|
|
|
|
\"$lookaheadspec\" was reduced to $lookahead. |
2741
|
|
|
|
|
|
|
Was this your intention?"); |
2742
|
|
|
|
|
|
|
} |
2743
|
0
|
|
|
|
|
0
|
$lookahead = 0; |
2744
|
0
|
|
|
|
|
0
|
$lookaheadspec = ""; |
2745
|
|
|
|
|
|
|
|
2746
|
0
|
|
|
|
|
0
|
$grammar =~ m/\G\s+/gc; |
2747
|
|
|
|
|
|
|
} |
2748
|
|
|
|
|
|
|
|
2749
|
0
|
0
|
|
|
|
0
|
if ($must_pop_lines) { |
2750
|
0
|
|
|
|
|
0
|
pop @lines; |
2751
|
|
|
|
|
|
|
} |
2752
|
|
|
|
|
|
|
|
2753
|
0
|
0
|
0
|
|
|
0
|
unless ($ERRORS or $isimplicit or !$::RD_CHECK) |
|
|
|
0
|
|
|
|
|
2754
|
|
|
|
|
|
|
{ |
2755
|
0
|
|
|
|
|
0
|
$self->_check_grammar(); |
2756
|
|
|
|
|
|
|
} |
2757
|
|
|
|
|
|
|
|
2758
|
0
|
0
|
0
|
|
|
0
|
unless ($ERRORS or $isimplicit or $Parse::RecDescent::_Runtime::compiling) |
|
|
|
0
|
|
|
|
|
2759
|
|
|
|
|
|
|
{ |
2760
|
0
|
|
|
|
|
0
|
my $code = $self->_code(); |
2761
|
0
|
0
|
|
|
|
0
|
if (defined $::RD_TRACE) |
2762
|
|
|
|
|
|
|
{ |
2763
|
0
|
0
|
|
|
|
0
|
my $mode = ($nextnamespace eq "namespace000002") ? '>' : '>>'; |
2764
|
0
|
|
|
|
|
0
|
print STDERR "printing code (", length($code),") to RD_TRACE\n"; |
2765
|
0
|
|
|
|
|
0
|
local *TRACE_FILE; |
2766
|
0
|
0
|
0
|
|
|
0
|
open TRACE_FILE, $mode, "RD_TRACE" |
2767
|
|
|
|
|
|
|
and print TRACE_FILE "my \$ERRORS;\n$code" |
2768
|
|
|
|
|
|
|
and close TRACE_FILE; |
2769
|
|
|
|
|
|
|
} |
2770
|
|
|
|
|
|
|
|
2771
|
0
|
0
|
|
|
|
0
|
unless ( eval "$code 1" ) |
2772
|
|
|
|
|
|
|
{ |
2773
|
0
|
|
|
|
|
0
|
_error("Internal error in generated parser code!"); |
2774
|
0
|
|
|
|
|
0
|
$@ =~ s/at grammar/in grammar at/; |
2775
|
0
|
|
|
|
|
0
|
_hint($@); |
2776
|
|
|
|
|
|
|
} |
2777
|
|
|
|
|
|
|
} |
2778
|
|
|
|
|
|
|
|
2779
|
0
|
0
|
0
|
|
|
0
|
if ($ERRORS and !_verbosity("HINT")) |
2780
|
|
|
|
|
|
|
{ |
2781
|
0
|
0
|
|
|
|
0
|
local $::RD_HINT = defined $::RD_HINT ? $::RD_HINT : 1; |
2782
|
0
|
|
|
|
|
0
|
_hint('Set $::RD_HINT (or -RD_HINT if you\'re using "perl -s") |
2783
|
|
|
|
|
|
|
for hints on fixing these problems. Use $::RD_HINT = 0 |
2784
|
|
|
|
|
|
|
to disable this message.'); |
2785
|
|
|
|
|
|
|
} |
2786
|
0
|
0
|
|
|
|
0
|
if ($ERRORS) { $ERRORS=0; return } |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
2787
|
0
|
|
|
|
|
0
|
return $self; |
2788
|
|
|
|
|
|
|
} |
2789
|
|
|
|
|
|
|
|
2790
|
|
|
|
|
|
|
|
2791
|
|
|
|
|
|
|
sub _addstartcode($$) |
2792
|
|
|
|
|
|
|
{ |
2793
|
0
|
|
|
0
|
|
0
|
my ($self, $code) = @_; |
2794
|
0
|
|
|
|
|
0
|
$code =~ s/\A\s*\{(.*)\}\Z/$1/s; |
2795
|
|
|
|
|
|
|
|
2796
|
0
|
|
|
|
|
0
|
$self->{"startcode"} .= "$code;\n"; |
2797
|
|
|
|
|
|
|
} |
2798
|
|
|
|
|
|
|
|
2799
|
|
|
|
|
|
|
# CHECK FOR GRAMMAR PROBLEMS.... |
2800
|
|
|
|
|
|
|
|
2801
|
|
|
|
|
|
|
sub _check_insatiable($$$$) |
2802
|
|
|
|
|
|
|
{ |
2803
|
0
|
|
|
0
|
|
0
|
my ($subrule,$repspec,$grammar,$line) = @_; |
2804
|
0
|
|
|
|
|
0
|
pos($grammar)=pos($_[2]); |
2805
|
0
|
0
|
0
|
|
|
0
|
return if $grammar =~ m/$OPTIONAL/gco || $grammar =~ m/$ANY/gco; |
2806
|
0
|
|
|
|
|
0
|
my $min = 1; |
2807
|
0
|
0
|
0
|
|
|
0
|
if ( $grammar =~ m/$MANY/gco |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
2808
|
|
|
|
|
|
|
|| $grammar =~ m/$EXACTLY/gco |
2809
|
|
|
|
|
|
|
|| $grammar =~ m/$ATMOST/gco |
2810
|
0
|
|
|
|
|
0
|
|| $grammar =~ m/$BETWEEN/gco && do { $min=$2; 1 } |
|
0
|
|
|
|
|
0
|
|
2811
|
0
|
|
|
|
|
0
|
|| $grammar =~ m/$ATLEAST/gco && do { $min=$2; 1 } |
|
0
|
|
|
|
|
0
|
|
2812
|
|
|
|
|
|
|
|| $grammar =~ m/$SUBRULE(?!\s*:)/gco |
2813
|
|
|
|
|
|
|
) |
2814
|
|
|
|
|
|
|
{ |
2815
|
0
|
0
|
0
|
|
|
0
|
return unless $1 eq $subrule && $min > 0; |
2816
|
0
|
|
|
|
|
0
|
my $current_match = substr($grammar, $-[0], $+[0] - $-[0]); |
2817
|
0
|
0
|
|
|
|
0
|
_warn(3,"Subrule sequence \"$subrule($repspec) $current_match\" will |
2818
|
|
|
|
|
|
|
(almost certainly) fail.",$line) |
2819
|
|
|
|
|
|
|
and |
2820
|
|
|
|
|
|
|
_hint("Unless subrule \"$subrule\" performs some cunning |
2821
|
|
|
|
|
|
|
lookahead, the repetition \"$subrule($repspec)\" will |
2822
|
|
|
|
|
|
|
insatiably consume as many matches of \"$subrule\" as it |
2823
|
|
|
|
|
|
|
can, leaving none to match the \"$current_match\" that follows."); |
2824
|
|
|
|
|
|
|
} |
2825
|
|
|
|
|
|
|
} |
2826
|
|
|
|
|
|
|
|
2827
|
|
|
|
|
|
|
sub _check_grammar ($) |
2828
|
|
|
|
|
|
|
{ |
2829
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
2830
|
0
|
|
|
|
|
0
|
my $rules = $self->{"rules"}; |
2831
|
0
|
|
|
|
|
0
|
my $rule; |
2832
|
0
|
|
|
|
|
0
|
foreach $rule ( values %$rules ) |
2833
|
|
|
|
|
|
|
{ |
2834
|
0
|
0
|
|
|
|
0
|
next if ! $rule->{"changed"}; |
2835
|
|
|
|
|
|
|
|
2836
|
|
|
|
|
|
|
# CHECK FOR UNDEFINED RULES |
2837
|
|
|
|
|
|
|
|
2838
|
0
|
|
|
|
|
0
|
my $call; |
2839
|
0
|
|
|
|
|
0
|
foreach $call ( @{$rule->{"calls"}} ) |
|
0
|
|
|
|
|
0
|
|
2840
|
|
|
|
|
|
|
{ |
2841
|
0
|
0
|
0
|
|
|
0
|
if (!defined ${$rules}{$call} |
|
0
|
|
|
|
|
0
|
|
2842
|
0
|
|
|
|
|
0
|
&&!defined &{"Parse::RecDescent::_Runtime::$call"}) |
2843
|
|
|
|
|
|
|
{ |
2844
|
0
|
0
|
|
|
|
0
|
if (!defined $::RD_AUTOSTUB) |
2845
|
|
|
|
|
|
|
{ |
2846
|
0
|
0
|
|
|
|
0
|
_warn(3,"Undefined (sub)rule \"$call\" |
2847
|
|
|
|
|
|
|
used in a production.") |
2848
|
|
|
|
|
|
|
and |
2849
|
|
|
|
|
|
|
_hint("Will you be providing this rule |
2850
|
|
|
|
|
|
|
later, or did you perhaps |
2851
|
|
|
|
|
|
|
misspell \"$call\"? Otherwise |
2852
|
|
|
|
|
|
|
it will be treated as an |
2853
|
|
|
|
|
|
|
immediate <reject>."); |
2854
|
0
|
|
|
|
|
0
|
eval "sub $self->{namespace}::$call {undef}"; |
2855
|
|
|
|
|
|
|
} |
2856
|
|
|
|
|
|
|
else # EXPERIMENTAL |
2857
|
|
|
|
|
|
|
{ |
2858
|
0
|
|
|
|
|
0
|
my $rule = qq{'$call'}; |
2859
|
0
|
0
|
0
|
|
|
0
|
if ($::RD_AUTOSTUB and $::RD_AUTOSTUB ne "1") { |
2860
|
0
|
|
|
|
|
0
|
$rule = $::RD_AUTOSTUB; |
2861
|
|
|
|
|
|
|
} |
2862
|
0
|
0
|
|
|
|
0
|
_warn(1,"Autogenerating rule: $call") |
2863
|
|
|
|
|
|
|
and |
2864
|
|
|
|
|
|
|
_hint("A call was made to a subrule |
2865
|
|
|
|
|
|
|
named \"$call\", but no such |
2866
|
|
|
|
|
|
|
rule was specified. However, |
2867
|
|
|
|
|
|
|
since \$::RD_AUTOSTUB |
2868
|
|
|
|
|
|
|
was defined, a rule stub |
2869
|
|
|
|
|
|
|
($call : $rule) was |
2870
|
|
|
|
|
|
|
automatically created."); |
2871
|
|
|
|
|
|
|
|
2872
|
0
|
|
|
|
|
0
|
$self->_generate("$call: $rule",0,1); |
2873
|
|
|
|
|
|
|
} |
2874
|
|
|
|
|
|
|
} |
2875
|
|
|
|
|
|
|
} |
2876
|
|
|
|
|
|
|
|
2877
|
|
|
|
|
|
|
# CHECK FOR LEFT RECURSION |
2878
|
|
|
|
|
|
|
|
2879
|
0
|
0
|
|
|
|
0
|
if ($rule->isleftrec($rules)) |
2880
|
|
|
|
|
|
|
{ |
2881
|
0
|
|
|
|
|
0
|
_error("Rule \"$rule->{name}\" is left-recursive."); |
2882
|
0
|
|
|
|
|
0
|
_hint("Redesign the grammar so it's not left-recursive. |
2883
|
|
|
|
|
|
|
That will probably mean you need to re-implement |
2884
|
|
|
|
|
|
|
repetitions using the '(s)' notation. |
2885
|
|
|
|
|
|
|
For example: \"$rule->{name}(s)\"."); |
2886
|
0
|
|
|
|
|
0
|
next; |
2887
|
|
|
|
|
|
|
} |
2888
|
|
|
|
|
|
|
|
2889
|
|
|
|
|
|
|
# CHECK FOR PRODUCTIONS FOLLOWING EMPTY PRODUCTIONS |
2890
|
|
|
|
|
|
|
{ |
2891
|
0
|
|
|
|
|
0
|
my $hasempty; |
|
0
|
|
|
|
|
0
|
|
2892
|
|
|
|
|
|
|
my $prod; |
2893
|
0
|
|
|
|
|
0
|
foreach $prod ( @{$rule->{"prods"}} ) { |
|
0
|
|
|
|
|
0
|
|
2894
|
0
|
0
|
|
|
|
0
|
if ($hasempty) { |
2895
|
0
|
|
|
|
|
0
|
_error("Production " . $prod->describe . " for \"$rule->{name}\" |
2896
|
|
|
|
|
|
|
will never be reached (preceding empty production will |
2897
|
|
|
|
|
|
|
always match first)."); |
2898
|
0
|
|
|
|
|
0
|
_hint("Reorder the grammar so that the empty production |
2899
|
|
|
|
|
|
|
is last in the list or productions."); |
2900
|
0
|
|
|
|
|
0
|
last; |
2901
|
|
|
|
|
|
|
} |
2902
|
0
|
|
0
|
|
|
0
|
$hasempty ||= $prod->isempty(); |
2903
|
|
|
|
|
|
|
} |
2904
|
|
|
|
|
|
|
} |
2905
|
|
|
|
|
|
|
} |
2906
|
|
|
|
|
|
|
} |
2907
|
|
|
|
|
|
|
|
2908
|
|
|
|
|
|
|
# GENERATE ACTUAL PARSER CODE |
2909
|
|
|
|
|
|
|
|
2910
|
|
|
|
|
|
|
sub _code($) |
2911
|
|
|
|
|
|
|
{ |
2912
|
0
|
|
|
0
|
|
0
|
my $self = shift; |
2913
|
0
|
0
|
|
|
|
0
|
my $initial_skip = defined($self->{skip}) ? $self->{skip} : $skip; |
2914
|
|
|
|
|
|
|
|
2915
|
0
|
|
|
|
|
0
|
my $code = qq! |
2916
|
|
|
|
|
|
|
package $self->{namespace}; |
2917
|
|
|
|
|
|
|
use strict; |
2918
|
|
|
|
|
|
|
use vars qw(\$skip \$AUTOLOAD $self->{localvars} ); |
2919
|
|
|
|
|
|
|
\@$self->{namespace}\::ISA = (); |
2920
|
|
|
|
|
|
|
\$skip = '$initial_skip'; |
2921
|
|
|
|
|
|
|
$self->{startcode} |
2922
|
|
|
|
|
|
|
|
2923
|
|
|
|
|
|
|
{ |
2924
|
|
|
|
|
|
|
local \$SIG{__WARN__} = sub {0}; |
2925
|
|
|
|
|
|
|
# PRETEND TO BE IN Parse::RecDescent::_Runtime NAMESPACE |
2926
|
|
|
|
|
|
|
*$self->{namespace}::AUTOLOAD = sub |
2927
|
|
|
|
|
|
|
{ |
2928
|
|
|
|
|
|
|
no strict 'refs'; |
2929
|
|
|
|
|
|
|
! |
2930
|
|
|
|
|
|
|
# This generated code uses ${"AUTOLOAD"} rather than $AUTOLOAD in |
2931
|
|
|
|
|
|
|
# order to avoid the circular reference documented here: |
2932
|
|
|
|
|
|
|
# https://rt.perl.org/rt3/Public/Bug/Display.html?id=110248 |
2933
|
|
|
|
|
|
|
# As a result of the investigation of |
2934
|
|
|
|
|
|
|
# https://rt.cpan.org/Ticket/Display.html?id=53710 |
2935
|
|
|
|
|
|
|
. qq! |
2936
|
|
|
|
|
|
|
\${"AUTOLOAD"} =~ s/^$self->{namespace}/Parse::RecDescent::_Runtime/; |
2937
|
|
|
|
|
|
|
goto &{\${"AUTOLOAD"}}; |
2938
|
|
|
|
|
|
|
} |
2939
|
|
|
|
|
|
|
} |
2940
|
|
|
|
|
|
|
|
2941
|
|
|
|
|
|
|
!; |
2942
|
0
|
|
|
|
|
0
|
$code .= "push \@$self->{namespace}\::ISA, 'Parse::RecDescent::_Runtime';"; |
2943
|
0
|
|
|
|
|
0
|
$self->{"startcode"} = ''; |
2944
|
|
|
|
|
|
|
|
2945
|
0
|
|
|
|
|
0
|
my $rule; |
2946
|
0
|
|
|
|
|
0
|
foreach $rule ( values %{$self->{"rules"}} ) |
|
0
|
|
|
|
|
0
|
|
2947
|
|
|
|
|
|
|
{ |
2948
|
0
|
0
|
|
|
|
0
|
if ($rule->{"changed"}) |
2949
|
|
|
|
|
|
|
{ |
2950
|
0
|
|
|
|
|
0
|
$code .= $rule->code($self->{"namespace"},$self); |
2951
|
0
|
|
|
|
|
0
|
$rule->{"changed"} = 0; |
2952
|
|
|
|
|
|
|
} |
2953
|
|
|
|
|
|
|
} |
2954
|
|
|
|
|
|
|
|
2955
|
0
|
|
|
|
|
0
|
return $code; |
2956
|
|
|
|
|
|
|
} |
2957
|
|
|
|
|
|
|
|
2958
|
|
|
|
|
|
|
|
2959
|
|
|
|
|
|
|
# EXECUTING A PARSE.... |
2960
|
|
|
|
|
|
|
|
2961
|
|
|
|
|
|
|
sub AUTOLOAD # ($parser, $text; $linenum, @args) |
2962
|
|
|
|
|
|
|
{ |
2963
|
14
|
50
|
|
14
|
|
65
|
croak "Could not find method: $AUTOLOAD\n" unless ref $_[0]; |
2964
|
14
|
|
33
|
|
|
75
|
my $class = ref($_[0]) || $_[0]; |
2965
|
14
|
50
|
|
|
|
71
|
my $text = ref($_[1]) eq 'SCALAR' ? ${$_[1]} : "$_[1]"; |
|
0
|
|
|
|
|
0
|
|
2966
|
14
|
|
|
|
|
73
|
$_[0]->{lastlinenum} = _linecount($text); |
2967
|
14
|
50
|
50
|
|
|
105
|
$_[0]->{lastlinenum} += ($_[2]||0) if @_ > 2; |
2968
|
14
|
|
|
|
|
55
|
$_[0]->{offsetlinenum} = $_[0]->{lastlinenum}; |
2969
|
14
|
|
|
|
|
36
|
$_[0]->{fulltext} = $text; |
2970
|
14
|
|
|
|
|
48
|
$_[0]->{fulltextlen} = length $text; |
2971
|
14
|
|
|
|
|
44
|
$_[0]->{linecounter_cache} = {}; |
2972
|
14
|
|
|
|
|
38
|
$_[0]->{deferred} = []; |
2973
|
14
|
|
|
|
|
34
|
$_[0]->{errors} = []; |
2974
|
14
|
|
|
|
|
76
|
my @args = @_[3..$#_]; |
2975
|
14
|
|
|
14
|
|
80
|
my $args = sub { [ @args ] }; |
|
14
|
|
|
|
|
55
|
|
2976
|
|
|
|
|
|
|
|
2977
|
14
|
|
|
|
|
160
|
$AUTOLOAD =~ s/$class/$_[0]->{namespace}/; |
2978
|
2
|
|
|
2
|
|
25
|
no strict "refs"; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
4784
|
|
2979
|
|
|
|
|
|
|
|
2980
|
14
|
|
33
|
|
|
65
|
local $::RD_WARN = $::RD_WARN || $_[0]->{__WARN__}; |
2981
|
14
|
|
33
|
|
|
84
|
local $::RD_HINT = $::RD_HINT || $_[0]->{__HINT__}; |
2982
|
14
|
|
33
|
|
|
63
|
local $::RD_TRACE = $::RD_TRACE || $_[0]->{__TRACE__}; |
2983
|
|
|
|
|
|
|
|
2984
|
14
|
50
|
|
|
|
146
|
croak "Unknown starting rule ($AUTOLOAD) called\n" |
2985
|
|
|
|
|
|
|
unless defined &$AUTOLOAD; |
2986
|
14
|
|
|
|
|
34
|
my $retval = &{$AUTOLOAD}( |
|
14
|
|
|
|
|
95
|
|
2987
|
|
|
|
|
|
|
$_[0], # $parser |
2988
|
|
|
|
|
|
|
$text, # $text |
2989
|
|
|
|
|
|
|
undef, # $repeating |
2990
|
|
|
|
|
|
|
undef, # $_noactions |
2991
|
|
|
|
|
|
|
$args, # \@args |
2992
|
|
|
|
|
|
|
undef, # $_itempos |
2993
|
|
|
|
|
|
|
); |
2994
|
|
|
|
|
|
|
|
2995
|
|
|
|
|
|
|
|
2996
|
14
|
100
|
|
|
|
57
|
if (defined $retval) |
2997
|
|
|
|
|
|
|
{ |
2998
|
12
|
|
|
|
|
24
|
foreach ( @{$_[0]->{deferred}} ) { &$_; } |
|
12
|
|
|
|
|
74
|
|
|
0
|
|
|
|
|
0
|
|
2999
|
|
|
|
|
|
|
} |
3000
|
|
|
|
|
|
|
else |
3001
|
|
|
|
|
|
|
{ |
3002
|
2
|
|
|
|
|
5
|
foreach ( @{$_[0]->{errors}} ) { _error(@$_); } |
|
2
|
|
|
|
|
13
|
|
|
0
|
|
|
|
|
0
|
|
3003
|
|
|
|
|
|
|
} |
3004
|
|
|
|
|
|
|
|
3005
|
14
|
50
|
|
|
|
58
|
if (ref $_[1] eq 'SCALAR') { ${$_[1]} = $text } |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
3006
|
|
|
|
|
|
|
|
3007
|
14
|
|
|
|
|
19
|
$ERRORS = 0; |
3008
|
14
|
|
|
|
|
166
|
return $retval; |
3009
|
|
|
|
|
|
|
} |
3010
|
|
|
|
|
|
|
|
3011
|
|
|
|
|
|
|
sub _parserepeat($$$$$$$$$) # RETURNS A REF TO AN ARRAY OF MATCHES |
3012
|
|
|
|
|
|
|
{ |
3013
|
0
|
|
|
0
|
|
0
|
my ($parser, $text, $prod, $min, $max, $_noactions, $expectation, $argcode, $_itempos) = @_; |
3014
|
0
|
|
|
|
|
0
|
my @tokens = (); |
3015
|
|
|
|
|
|
|
|
3016
|
0
|
|
|
|
|
0
|
my $itemposfirst; |
3017
|
|
|
|
|
|
|
my $reps; |
3018
|
0
|
|
|
|
|
0
|
for ($reps=0; $reps<$max;) |
3019
|
|
|
|
|
|
|
{ |
3020
|
0
|
|
|
|
|
0
|
$expectation->at($text); |
3021
|
0
|
|
|
|
|
0
|
my $_savetext = $text; |
3022
|
0
|
|
|
|
|
0
|
my $prevtextlen = length $text; |
3023
|
0
|
|
|
|
|
0
|
my $_tok; |
3024
|
0
|
0
|
|
|
|
0
|
if (! defined ($_tok = &$prod($parser,$text,1,$_noactions,$argcode,$_itempos))) |
3025
|
|
|
|
|
|
|
{ |
3026
|
0
|
|
|
|
|
0
|
$text = $_savetext; |
3027
|
0
|
|
|
|
|
0
|
last; |
3028
|
|
|
|
|
|
|
} |
3029
|
|
|
|
|
|
|
|
3030
|
0
|
0
|
0
|
|
|
0
|
if (defined($_itempos) and !defined($itemposfirst)) |
3031
|
|
|
|
|
|
|
{ |
3032
|
0
|
|
|
|
|
0
|
$itemposfirst = Parse::RecDescent::_Runtime::Production::_duplicate_itempos($_itempos); |
3033
|
|
|
|
|
|
|
} |
3034
|
|
|
|
|
|
|
|
3035
|
0
|
0
|
|
|
|
0
|
push @tokens, $_tok if defined $_tok; |
3036
|
0
|
0
|
0
|
|
|
0
|
last if ++$reps >= $min and $prevtextlen == length $text; |
3037
|
|
|
|
|
|
|
} |
3038
|
|
|
|
|
|
|
|
3039
|
0
|
0
|
|
|
|
0
|
do { $expectation->failed(); return undef} if $reps<$min; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
3040
|
|
|
|
|
|
|
|
3041
|
0
|
0
|
|
|
|
0
|
if (defined $itemposfirst) |
3042
|
|
|
|
|
|
|
{ |
3043
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::Production::_update_itempos($_itempos, $itemposfirst, undef, [qw(from)]); |
3044
|
|
|
|
|
|
|
} |
3045
|
|
|
|
|
|
|
|
3046
|
0
|
|
|
|
|
0
|
$_[1] = $text; |
3047
|
0
|
|
|
|
|
0
|
return [@tokens]; |
3048
|
|
|
|
|
|
|
} |
3049
|
|
|
|
|
|
|
|
3050
|
|
|
|
|
|
|
sub set_autoflush { |
3051
|
0
|
|
|
0
|
|
0
|
my $orig_selected = select $_[0]; |
3052
|
0
|
|
|
|
|
0
|
$| = 1; |
3053
|
0
|
|
|
|
|
0
|
select $orig_selected; |
3054
|
0
|
|
|
|
|
0
|
return; |
3055
|
|
|
|
|
|
|
} |
3056
|
|
|
|
|
|
|
|
3057
|
|
|
|
|
|
|
# ERROR REPORTING.... |
3058
|
|
|
|
|
|
|
|
3059
|
|
|
|
|
|
|
sub _write_ERROR { |
3060
|
0
|
|
|
0
|
|
0
|
my ($errorprefix, $errortext) = @_; |
3061
|
0
|
0
|
|
|
|
0
|
return if $errortext !~ /\S/; |
3062
|
0
|
|
|
|
|
0
|
$errorprefix =~ s/\s+\Z//; |
3063
|
0
|
|
|
|
|
0
|
local $^A = q{}; |
3064
|
|
|
|
|
|
|
|
3065
|
0
|
|
|
|
|
0
|
formline(<<'END_FORMAT', $errorprefix, $errortext); |
3066
|
|
|
|
|
|
|
@>>>>>>>>>>>>>>>>>>>>: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
3067
|
|
|
|
|
|
|
END_FORMAT |
3068
|
0
|
|
|
|
|
0
|
formline(<<'END_FORMAT', $errortext); |
3069
|
|
|
|
|
|
|
~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< |
3070
|
|
|
|
|
|
|
END_FORMAT |
3071
|
0
|
|
|
|
|
0
|
print {*STDERR} $^A; |
|
0
|
|
|
|
|
0
|
|
3072
|
|
|
|
|
|
|
} |
3073
|
|
|
|
|
|
|
|
3074
|
|
|
|
|
|
|
# TRACING |
3075
|
|
|
|
|
|
|
|
3076
|
|
|
|
|
|
|
my $TRACE_FORMAT = <<'END_FORMAT'; |
3077
|
|
|
|
|
|
|
@>|@|||||||||@^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<| |
3078
|
|
|
|
|
|
|
| ~~ |^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<| |
3079
|
|
|
|
|
|
|
END_FORMAT |
3080
|
|
|
|
|
|
|
|
3081
|
|
|
|
|
|
|
my $TRACECONTEXT_FORMAT = <<'END_FORMAT'; |
3082
|
|
|
|
|
|
|
@>|@|||||||||@ |^<<<<<<<<<<<<<<<<<<<<<<<<<<< |
3083
|
|
|
|
|
|
|
| ~~ | |^<<<<<<<<<<<<<<<<<<<<<<<<<<< |
3084
|
|
|
|
|
|
|
END_FORMAT |
3085
|
|
|
|
|
|
|
|
3086
|
|
|
|
|
|
|
sub _write_TRACE { |
3087
|
0
|
|
|
0
|
|
0
|
my ($tracelevel, $tracerulename, $tracemsg) = @_; |
3088
|
0
|
0
|
|
|
|
0
|
return if $tracemsg !~ /\S/; |
3089
|
0
|
|
|
|
|
0
|
$tracemsg =~ s/\s*\Z//; |
3090
|
0
|
|
|
|
|
0
|
local $^A = q{}; |
3091
|
0
|
|
|
|
|
0
|
my $bar = '|'; |
3092
|
0
|
|
|
|
|
0
|
formline($TRACE_FORMAT, $tracelevel, $tracerulename, $bar, $tracemsg, $tracemsg); |
3093
|
0
|
|
|
|
|
0
|
print {*STDERR} $^A; |
|
0
|
|
|
|
|
0
|
|
3094
|
|
|
|
|
|
|
} |
3095
|
|
|
|
|
|
|
|
3096
|
|
|
|
|
|
|
sub _write_TRACECONTEXT { |
3097
|
0
|
|
|
0
|
|
0
|
my ($tracelevel, $tracerulename, $tracecontext) = @_; |
3098
|
0
|
0
|
|
|
|
0
|
return if $tracecontext !~ /\S/; |
3099
|
0
|
|
|
|
|
0
|
$tracecontext =~ s/\s*\Z//; |
3100
|
0
|
|
|
|
|
0
|
local $^A = q{}; |
3101
|
0
|
|
|
|
|
0
|
my $bar = '|'; |
3102
|
0
|
|
|
|
|
0
|
formline($TRACECONTEXT_FORMAT, $tracelevel, $tracerulename, $bar, $tracecontext, $tracecontext); |
3103
|
0
|
|
|
|
|
0
|
print {*STDERR} $^A; |
|
0
|
|
|
|
|
0
|
|
3104
|
|
|
|
|
|
|
} |
3105
|
|
|
|
|
|
|
|
3106
|
|
|
|
|
|
|
sub _verbosity($) |
3107
|
|
|
|
|
|
|
{ |
3108
|
0
|
0
|
0
|
0
|
|
0
|
defined $::RD_TRACE |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
3109
|
|
|
|
|
|
|
or defined $::RD_HINT and $::RD_HINT and $_[0] =~ /ERRORS|WARN|HINT/ |
3110
|
|
|
|
|
|
|
or defined $::RD_WARN and $::RD_WARN and $_[0] =~ /ERRORS|WARN/ |
3111
|
|
|
|
|
|
|
or defined $::RD_ERRORS and $::RD_ERRORS and $_[0] =~ /ERRORS/ |
3112
|
|
|
|
|
|
|
} |
3113
|
|
|
|
|
|
|
|
3114
|
|
|
|
|
|
|
sub _error($;$) |
3115
|
|
|
|
|
|
|
{ |
3116
|
0
|
|
|
0
|
|
0
|
$ERRORS++; |
3117
|
0
|
0
|
|
|
|
0
|
return 0 if ! _verbosity("ERRORS"); |
3118
|
0
|
|
|
|
|
0
|
my $errortext = $_[0]; |
3119
|
0
|
0
|
|
|
|
0
|
my $errorprefix = "ERROR" . ($_[1] ? " (line $_[1])" : ""); |
3120
|
0
|
|
|
|
|
0
|
$errortext =~ s/\s+/ /g; |
3121
|
0
|
0
|
|
|
|
0
|
print {*STDERR} "\n" if _verbosity("WARN"); |
|
0
|
|
|
|
|
0
|
|
3122
|
0
|
|
|
|
|
0
|
_write_ERROR($errorprefix, $errortext); |
3123
|
0
|
|
|
|
|
0
|
return 1; |
3124
|
|
|
|
|
|
|
} |
3125
|
|
|
|
|
|
|
|
3126
|
|
|
|
|
|
|
sub _warn($$;$) |
3127
|
|
|
|
|
|
|
{ |
3128
|
0
|
0
|
0
|
0
|
|
0
|
return 0 unless _verbosity("WARN") && ($::RD_HINT || $_[0] >= ($::RD_WARN||1)); |
|
|
|
0
|
|
|
|
|
3129
|
0
|
|
|
|
|
0
|
my $errortext = $_[1]; |
3130
|
0
|
0
|
|
|
|
0
|
my $errorprefix = "Warning" . ($_[2] ? " (line $_[2])" : ""); |
3131
|
0
|
0
|
|
|
|
0
|
print {*STDERR} "\n" if _verbosity("HINT"); |
|
0
|
|
|
|
|
0
|
|
3132
|
0
|
|
|
|
|
0
|
$errortext =~ s/\s+/ /g; |
3133
|
0
|
|
|
|
|
0
|
_write_ERROR($errorprefix, $errortext); |
3134
|
0
|
|
|
|
|
0
|
return 1; |
3135
|
|
|
|
|
|
|
} |
3136
|
|
|
|
|
|
|
|
3137
|
|
|
|
|
|
|
sub _hint($) |
3138
|
|
|
|
|
|
|
{ |
3139
|
0
|
0
|
|
0
|
|
0
|
return 0 unless $::RD_HINT; |
3140
|
0
|
|
|
|
|
0
|
my $errortext = $_[0]; |
3141
|
0
|
0
|
|
|
|
0
|
my $errorprefix = "Hint" . ($_[1] ? " (line $_[1])" : ""); |
3142
|
0
|
|
|
|
|
0
|
$errortext =~ s/\s+/ /g; |
3143
|
0
|
|
|
|
|
0
|
_write_ERROR($errorprefix, $errortext); |
3144
|
0
|
|
|
|
|
0
|
return 1; |
3145
|
|
|
|
|
|
|
} |
3146
|
|
|
|
|
|
|
|
3147
|
|
|
|
|
|
|
sub _tracemax($) |
3148
|
|
|
|
|
|
|
{ |
3149
|
0
|
0
|
0
|
0
|
|
0
|
if (defined $::RD_TRACE |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
3150
|
|
|
|
|
|
|
&& $::RD_TRACE =~ /\d+/ |
3151
|
|
|
|
|
|
|
&& $::RD_TRACE>1 |
3152
|
|
|
|
|
|
|
&& $::RD_TRACE+10<length($_[0])) |
3153
|
|
|
|
|
|
|
{ |
3154
|
0
|
|
|
|
|
0
|
my $count = length($_[0]) - $::RD_TRACE; |
3155
|
0
|
|
|
|
|
0
|
return substr($_[0],0,$::RD_TRACE/2) |
3156
|
|
|
|
|
|
|
. "...<$count>..." |
3157
|
|
|
|
|
|
|
. substr($_[0],-$::RD_TRACE/2); |
3158
|
|
|
|
|
|
|
} |
3159
|
|
|
|
|
|
|
else |
3160
|
|
|
|
|
|
|
{ |
3161
|
0
|
|
|
|
|
0
|
return substr($_[0],0,500); |
3162
|
|
|
|
|
|
|
} |
3163
|
|
|
|
|
|
|
} |
3164
|
|
|
|
|
|
|
|
3165
|
|
|
|
|
|
|
sub _tracefirst($) |
3166
|
|
|
|
|
|
|
{ |
3167
|
0
|
0
|
0
|
0
|
|
0
|
if (defined $::RD_TRACE |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
3168
|
|
|
|
|
|
|
&& $::RD_TRACE =~ /\d+/ |
3169
|
|
|
|
|
|
|
&& $::RD_TRACE>1 |
3170
|
|
|
|
|
|
|
&& $::RD_TRACE+10<length($_[0])) |
3171
|
|
|
|
|
|
|
{ |
3172
|
0
|
|
|
|
|
0
|
my $count = length($_[0]) - $::RD_TRACE; |
3173
|
0
|
|
|
|
|
0
|
return substr($_[0],0,$::RD_TRACE) . "...<+$count>"; |
3174
|
|
|
|
|
|
|
} |
3175
|
|
|
|
|
|
|
else |
3176
|
|
|
|
|
|
|
{ |
3177
|
0
|
|
|
|
|
0
|
return substr($_[0],0,500); |
3178
|
|
|
|
|
|
|
} |
3179
|
|
|
|
|
|
|
} |
3180
|
|
|
|
|
|
|
|
3181
|
|
|
|
|
|
|
my $lastcontext = ''; |
3182
|
|
|
|
|
|
|
my $lastrulename = ''; |
3183
|
|
|
|
|
|
|
my $lastlevel = ''; |
3184
|
|
|
|
|
|
|
|
3185
|
|
|
|
|
|
|
sub _trace($;$$$) |
3186
|
|
|
|
|
|
|
{ |
3187
|
0
|
|
|
0
|
|
0
|
my $tracemsg = $_[0]; |
3188
|
0
|
|
0
|
|
|
0
|
my $tracecontext = $_[1]||$lastcontext; |
3189
|
0
|
|
0
|
|
|
0
|
my $tracerulename = $_[2]||$lastrulename; |
3190
|
0
|
|
0
|
|
|
0
|
my $tracelevel = $_[3]||$lastlevel; |
3191
|
0
|
0
|
|
|
|
0
|
if ($tracerulename) { $lastrulename = $tracerulename } |
|
0
|
|
|
|
|
0
|
|
3192
|
0
|
0
|
|
|
|
0
|
if ($tracelevel) { $lastlevel = $tracelevel } |
|
0
|
|
|
|
|
0
|
|
3193
|
|
|
|
|
|
|
|
3194
|
0
|
|
|
|
|
0
|
$tracecontext =~ s/\n/\\n/g; |
3195
|
0
|
|
|
|
|
0
|
$tracecontext =~ s/\s+/ /g; |
3196
|
0
|
|
|
|
|
0
|
$tracerulename = qq{$tracerulename}; |
3197
|
0
|
|
|
|
|
0
|
_write_TRACE($tracelevel, $tracerulename, $tracemsg); |
3198
|
0
|
0
|
|
|
|
0
|
if ($tracecontext ne $lastcontext) |
3199
|
|
|
|
|
|
|
{ |
3200
|
0
|
0
|
|
|
|
0
|
if ($tracecontext) |
3201
|
|
|
|
|
|
|
{ |
3202
|
0
|
|
|
|
|
0
|
$lastcontext = _tracefirst($tracecontext); |
3203
|
0
|
|
|
|
|
0
|
$tracecontext = qq{"$tracecontext"}; |
3204
|
|
|
|
|
|
|
} |
3205
|
|
|
|
|
|
|
else |
3206
|
|
|
|
|
|
|
{ |
3207
|
0
|
|
|
|
|
0
|
$tracecontext = qq{<NO TEXT LEFT>}; |
3208
|
|
|
|
|
|
|
} |
3209
|
0
|
|
|
|
|
0
|
_write_TRACECONTEXT($tracelevel, $tracerulename, $tracecontext); |
3210
|
|
|
|
|
|
|
} |
3211
|
|
|
|
|
|
|
} |
3212
|
|
|
|
|
|
|
|
3213
|
|
|
|
|
|
|
sub _matchtracemessage |
3214
|
|
|
|
|
|
|
{ |
3215
|
0
|
|
|
0
|
|
0
|
my ($self, $reject) = @_; |
3216
|
|
|
|
|
|
|
|
3217
|
0
|
|
|
|
|
0
|
my $prefix = ''; |
3218
|
0
|
|
|
|
|
0
|
my $postfix = ''; |
3219
|
0
|
|
|
|
|
0
|
my $matched = not $reject; |
3220
|
0
|
|
|
|
|
0
|
my @t = ("Matched", "Didn't match"); |
3221
|
0
|
0
|
0
|
|
|
0
|
if (exists $self->{lookahead} and $self->{lookahead}) |
3222
|
|
|
|
|
|
|
{ |
3223
|
0
|
0
|
|
|
|
0
|
$postfix = $reject ? "(reject)" : "(keep)"; |
3224
|
0
|
|
|
|
|
0
|
$prefix = "..."; |
3225
|
0
|
0
|
|
|
|
0
|
if ($self->{lookahead} < 0) |
3226
|
|
|
|
|
|
|
{ |
3227
|
0
|
|
|
|
|
0
|
$prefix .= '!'; |
3228
|
0
|
|
|
|
|
0
|
$matched = not $matched; |
3229
|
|
|
|
|
|
|
} |
3230
|
|
|
|
|
|
|
} |
3231
|
0
|
0
|
|
|
|
0
|
$prefix . ($matched ? $t[0] : $t[1]) . $postfix; |
3232
|
|
|
|
|
|
|
} |
3233
|
|
|
|
|
|
|
|
3234
|
|
|
|
|
|
|
sub _parseunneg($$$$$) |
3235
|
|
|
|
|
|
|
{ |
3236
|
0
|
|
|
0
|
|
0
|
_parse($_[0],$_[1],$_[3],$_[4]); |
3237
|
0
|
0
|
|
|
|
0
|
if ($_[2]<0) |
3238
|
|
|
|
|
|
|
{ |
3239
|
0
|
|
|
|
|
0
|
_error("Can't negate \"$_[4]\".",$_[3]); |
3240
|
0
|
|
|
|
|
0
|
_hint("You can't negate $_[0]. Remove the \"...!\" before |
3241
|
|
|
|
|
|
|
\"$_[4]\"."); |
3242
|
0
|
|
|
|
|
0
|
return 0; |
3243
|
|
|
|
|
|
|
} |
3244
|
0
|
|
|
|
|
0
|
return 1; |
3245
|
|
|
|
|
|
|
} |
3246
|
|
|
|
|
|
|
|
3247
|
|
|
|
|
|
|
sub _parse($$$$) |
3248
|
|
|
|
|
|
|
{ |
3249
|
0
|
|
|
0
|
|
0
|
my $what = $_[3]; |
3250
|
0
|
|
|
|
|
0
|
$what =~ s/^\s+//; |
3251
|
0
|
0
|
|
|
|
0
|
if ($_[1]) |
3252
|
|
|
|
|
|
|
{ |
3253
|
0
|
0
|
|
|
|
0
|
_warn(3,"Found $_[0] ($what) after an unconditional <error>",$_[2]) |
3254
|
|
|
|
|
|
|
and |
3255
|
|
|
|
|
|
|
_hint("An unconditional <error> always causes the |
3256
|
|
|
|
|
|
|
production containing it to immediately fail. |
3257
|
|
|
|
|
|
|
\u$_[0] that follows an <error> |
3258
|
|
|
|
|
|
|
will never be reached. Did you mean to use |
3259
|
|
|
|
|
|
|
<error?> instead?"); |
3260
|
|
|
|
|
|
|
} |
3261
|
|
|
|
|
|
|
|
3262
|
0
|
0
|
|
|
|
0
|
return if ! _verbosity("TRACE"); |
3263
|
0
|
|
|
|
|
0
|
my $errortext = "Treating \"$what\" as $_[0]"; |
3264
|
0
|
|
|
|
|
0
|
my $errorprefix = "Parse::RecDescent::_Runtime"; |
3265
|
0
|
|
|
|
|
0
|
$errortext =~ s/\s+/ /g; |
3266
|
0
|
|
|
|
|
0
|
_write_ERROR($errorprefix, $errortext); |
3267
|
|
|
|
|
|
|
} |
3268
|
|
|
|
|
|
|
|
3269
|
|
|
|
|
|
|
sub _linecount($) { |
3270
|
14
|
|
50
|
14
|
|
180
|
scalar substr($_[0], pos $_[0]||0) =~ tr/\n// |
3271
|
|
|
|
|
|
|
} |
3272
|
|
|
|
|
|
|
|
3273
|
|
|
|
|
|
|
|
3274
|
|
|
|
|
|
|
package main; |
3275
|
|
|
|
|
|
|
$main::VERSION = '2.20150928'; |
3276
|
2
|
|
|
2
|
|
17
|
use vars qw ( $RD_ERRORS $RD_WARN $RD_HINT $RD_TRACE $RD_CHECK ); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
385
|
|
3277
|
|
|
|
|
|
|
$::RD_CHECK = 1; |
3278
|
|
|
|
|
|
|
$::RD_ERRORS = 1; |
3279
|
|
|
|
|
|
|
$::RD_WARN = 3; |
3280
|
|
|
|
|
|
|
|
3281
|
|
|
|
|
|
|
1; |
3282
|
|
|
|
|
|
|
|
3283
|
|
|
|
|
|
|
} |
3284
|
|
|
|
|
|
|
package Treex::Core::ScenarioParser; |
3285
|
|
|
|
|
|
|
$Treex::Core::ScenarioParser::VERSION = '2.20150928'; |
3286
|
|
|
|
|
|
|
{ my $ERRORS; |
3287
|
|
|
|
|
|
|
|
3288
|
|
|
|
|
|
|
|
3289
|
|
|
|
|
|
|
package Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser; |
3290
|
|
|
|
|
|
|
$Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::VERSION = '2.20150928'; |
3291
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
51
|
|
3292
|
2
|
|
|
2
|
|
9
|
use vars qw($skip $AUTOLOAD ); |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
127
|
|
3293
|
|
|
|
|
|
|
@Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::ISA = (); |
3294
|
|
|
|
|
|
|
$skip = '\s*'; |
3295
|
|
|
|
|
|
|
|
3296
|
2
|
|
|
2
|
|
11
|
use File::Slurp; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
252
|
|
3297
|
2
|
|
|
2
|
|
15
|
use File::Basename; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
163
|
|
3298
|
2
|
|
|
2
|
|
12
|
use Treex::Core::Log; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
197
|
|
3299
|
|
|
|
|
|
|
## no critic (Miscellanea::ProhibitUnrestrictedNoCritic) |
3300
|
|
|
|
|
|
|
## no critic Generated code follows |
3301
|
2
|
|
|
2
|
|
12
|
no warnings; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
173
|
|
3302
|
|
|
|
|
|
|
; |
3303
|
|
|
|
|
|
|
|
3304
|
|
|
|
|
|
|
|
3305
|
|
|
|
|
|
|
{ |
3306
|
|
|
|
|
|
|
local $SIG{__WARN__} = sub {0}; |
3307
|
|
|
|
|
|
|
# PRETEND TO BE IN Parse::RecDescent::_Runtime NAMESPACE |
3308
|
|
|
|
|
|
|
*Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::AUTOLOAD = sub |
3309
|
|
|
|
|
|
|
{ |
3310
|
2
|
|
|
2
|
|
10
|
no strict 'refs'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
243
|
|
3311
|
|
|
|
|
|
|
|
3312
|
0
|
|
|
0
|
|
0
|
${"AUTOLOAD"} =~ s/^Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser/Parse::RecDescent::_Runtime/; |
|
0
|
|
|
|
|
0
|
|
3313
|
0
|
|
|
|
|
0
|
goto &{${"AUTOLOAD"}}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
3314
|
|
|
|
|
|
|
} |
3315
|
|
|
|
|
|
|
} |
3316
|
|
|
|
|
|
|
|
3317
|
|
|
|
|
|
|
push @Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::ISA, 'Parse::RecDescent::_Runtime'; |
3318
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
3319
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PNOTQUOTED |
3320
|
|
|
|
|
|
|
{ |
3321
|
38
|
|
|
38
|
|
74
|
my $thisparser = $_[0]; |
3322
|
2
|
|
|
2
|
|
14
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
1759
|
|
3323
|
38
|
|
50
|
|
|
100
|
local $tracelevel = ($tracelevel||0)+1; |
3324
|
38
|
|
|
|
|
53
|
$ERRORS = 0; |
3325
|
38
|
|
|
|
|
68
|
my $thisrule = $thisparser->{"rules"}{"PNOTQUOTED"}; |
3326
|
|
|
|
|
|
|
|
3327
|
38
|
50
|
|
|
|
87
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [PNOTQUOTED]}, |
3328
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3329
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3330
|
|
|
|
|
|
|
$tracelevel) |
3331
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3332
|
|
|
|
|
|
|
|
3333
|
|
|
|
|
|
|
|
3334
|
38
|
|
|
|
|
40
|
my $err_at = @{$thisparser->{errors}}; |
|
38
|
|
|
|
|
65
|
|
3335
|
|
|
|
|
|
|
|
3336
|
38
|
|
|
|
|
49
|
my $score; |
3337
|
|
|
|
|
|
|
my $score_return; |
3338
|
0
|
|
|
|
|
0
|
my $_tok; |
3339
|
38
|
|
|
|
|
45
|
my $return = undef; |
3340
|
38
|
|
|
|
|
51
|
my $_matched=0; |
3341
|
38
|
|
|
|
|
43
|
my $commit=0; |
3342
|
38
|
|
|
|
|
104
|
my @item = (); |
3343
|
38
|
|
|
|
|
59
|
my %item = (); |
3344
|
38
|
|
|
|
|
49
|
my $repeating = $_[2]; |
3345
|
38
|
|
|
|
|
45
|
my $_noactions = $_[3]; |
3346
|
38
|
50
|
|
|
|
90
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
38
|
|
|
|
|
50
|
|
|
38
|
|
|
|
|
73
|
|
3347
|
38
|
|
|
|
|
57
|
my $_itempos = $_[5]; |
3348
|
38
|
50
|
|
|
|
103
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
3349
|
38
|
|
|
|
|
47
|
my $text; |
3350
|
|
|
|
|
|
|
my $lastsep; |
3351
|
0
|
|
|
|
|
0
|
my $current_match; |
3352
|
38
|
|
|
|
|
85
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/\\S+/, or EMPTY}); |
3353
|
38
|
|
|
|
|
85
|
$expectation->at($_[1]); |
3354
|
|
|
|
|
|
|
|
3355
|
38
|
|
|
|
|
42
|
my $thisline; |
3356
|
38
|
|
|
|
|
137
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
3357
|
|
|
|
|
|
|
|
3358
|
|
|
|
|
|
|
|
3359
|
|
|
|
|
|
|
|
3360
|
38
|
|
33
|
|
|
150
|
while (!$_matched && !$commit) |
3361
|
|
|
|
|
|
|
{ |
3362
|
|
|
|
|
|
|
|
3363
|
38
|
50
|
|
|
|
82
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/\\S+/]}, |
3364
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3365
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3366
|
|
|
|
|
|
|
$tracelevel) |
3367
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3368
|
38
|
|
|
|
|
76
|
my $thisprod = $thisrule->{"prods"}[0]; |
3369
|
38
|
|
|
|
|
54
|
$text = $_[1]; |
3370
|
38
|
|
|
|
|
40
|
my $_savetext; |
3371
|
38
|
|
|
|
|
65
|
@item = (q{PNOTQUOTED}); |
3372
|
38
|
|
|
|
|
89
|
%item = (__RULE__ => q{PNOTQUOTED}); |
3373
|
38
|
|
|
|
|
445
|
my $repcount = 0; |
3374
|
|
|
|
|
|
|
|
3375
|
|
|
|
|
|
|
|
3376
|
38
|
50
|
|
|
|
80
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/\\S+/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
3377
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3378
|
|
|
|
|
|
|
$tracelevel) |
3379
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3380
|
38
|
|
|
|
|
51
|
undef $lastsep; |
3381
|
38
|
|
|
|
|
80
|
$expectation->is(q{})->at($text); |
3382
|
|
|
|
|
|
|
|
3383
|
|
|
|
|
|
|
|
3384
|
38
|
50
|
33
|
|
|
193
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\S+)/) |
|
38
|
50
|
|
|
|
351
|
|
3385
|
|
|
|
|
|
|
{ |
3386
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
3387
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
3388
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
3389
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3390
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3391
|
|
|
|
|
|
|
|
3392
|
0
|
|
|
|
|
0
|
last; |
3393
|
|
|
|
|
|
|
} |
3394
|
38
|
|
|
|
|
187
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
3395
|
38
|
|
|
|
|
109
|
substr($text,0,length($current_match),q{}); |
3396
|
38
|
50
|
|
|
|
86
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
3397
|
|
|
|
|
|
|
. $current_match . q{])}, |
3398
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3399
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3400
|
38
|
|
|
|
|
94
|
push @item, $item{__PATTERN1__}=$current_match; |
3401
|
|
|
|
|
|
|
|
3402
|
|
|
|
|
|
|
|
3403
|
38
|
50
|
|
|
|
73
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
3404
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3405
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3406
|
|
|
|
|
|
|
$tracelevel) |
3407
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3408
|
|
|
|
|
|
|
|
3409
|
|
|
|
|
|
|
|
3410
|
38
|
50
|
|
|
|
73
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1]}; |
|
38
|
|
|
|
|
81
|
|
3411
|
38
|
50
|
|
|
|
109
|
unless (defined $_tok) |
3412
|
|
|
|
|
|
|
{ |
3413
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
3414
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3415
|
0
|
|
|
|
|
0
|
last; |
3416
|
|
|
|
|
|
|
} |
3417
|
38
|
50
|
|
|
|
80
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
3418
|
|
|
|
|
|
|
. $_tok . q{])}, |
3419
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3420
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3421
|
38
|
|
|
|
|
52
|
push @item, $_tok; |
3422
|
38
|
|
|
|
|
82
|
$item{__ACTION1__}=$_tok; |
3423
|
|
|
|
|
|
|
|
3424
|
|
|
|
|
|
|
|
3425
|
38
|
50
|
|
|
|
73
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/\\S+/]<<}, |
3426
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3427
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3428
|
|
|
|
|
|
|
$tracelevel) |
3429
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3430
|
|
|
|
|
|
|
|
3431
|
|
|
|
|
|
|
|
3432
|
|
|
|
|
|
|
|
3433
|
38
|
|
|
|
|
46
|
$_matched = 1; |
3434
|
38
|
|
|
|
|
67
|
last; |
3435
|
|
|
|
|
|
|
} |
3436
|
|
|
|
|
|
|
|
3437
|
|
|
|
|
|
|
|
3438
|
38
|
|
33
|
|
|
98
|
while (!$_matched && !$commit) |
3439
|
|
|
|
|
|
|
{ |
3440
|
|
|
|
|
|
|
|
3441
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [EMPTY]}, |
3442
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3443
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3444
|
|
|
|
|
|
|
$tracelevel) |
3445
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3446
|
0
|
|
|
|
|
0
|
my $thisprod = $thisrule->{"prods"}[1]; |
3447
|
0
|
|
|
|
|
0
|
$text = $_[1]; |
3448
|
0
|
|
|
|
|
0
|
my $_savetext; |
3449
|
0
|
|
|
|
|
0
|
@item = (q{PNOTQUOTED}); |
3450
|
0
|
|
|
|
|
0
|
%item = (__RULE__ => q{PNOTQUOTED}); |
3451
|
0
|
|
|
|
|
0
|
my $repcount = 0; |
3452
|
|
|
|
|
|
|
|
3453
|
|
|
|
|
|
|
|
3454
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [EMPTY]}, |
3455
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3456
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3457
|
|
|
|
|
|
|
$tracelevel) |
3458
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3459
|
2
|
|
|
2
|
|
13
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
1457
|
|
|
0
|
|
|
|
|
0
|
|
3460
|
0
|
|
|
|
|
0
|
$expectation->is(q{})->at($text); |
3461
|
0
|
0
|
|
0
|
|
0
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::EMPTY($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
0
|
|
|
|
|
0
|
|
3462
|
|
|
|
|
|
|
{ |
3463
|
|
|
|
|
|
|
|
3464
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [EMPTY]>>}, |
3465
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3466
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3467
|
|
|
|
|
|
|
$tracelevel) |
3468
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3469
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
3470
|
0
|
|
|
|
|
0
|
last; |
3471
|
|
|
|
|
|
|
} |
3472
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [EMPTY]<< (return value: [} |
3473
|
|
|
|
|
|
|
. $_tok . q{]}, |
3474
|
|
|
|
|
|
|
|
3475
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3476
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3477
|
|
|
|
|
|
|
$tracelevel) |
3478
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3479
|
0
|
|
|
|
|
0
|
$item{q{EMPTY}} = $_tok; |
3480
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
3481
|
|
|
|
|
|
|
|
3482
|
|
|
|
|
|
|
} |
3483
|
|
|
|
|
|
|
|
3484
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
3485
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3486
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3487
|
|
|
|
|
|
|
$tracelevel) |
3488
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3489
|
|
|
|
|
|
|
|
3490
|
|
|
|
|
|
|
|
3491
|
0
|
0
|
|
|
|
0
|
$_tok = ($_noactions) ? 0 : do {$return = ''}; |
|
0
|
|
|
|
|
0
|
|
3492
|
0
|
0
|
|
|
|
0
|
unless (defined $_tok) |
3493
|
|
|
|
|
|
|
{ |
3494
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
3495
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3496
|
0
|
|
|
|
|
0
|
last; |
3497
|
|
|
|
|
|
|
} |
3498
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
3499
|
|
|
|
|
|
|
. $_tok . q{])}, |
3500
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3501
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3502
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
3503
|
0
|
|
|
|
|
0
|
$item{__ACTION1__}=$_tok; |
3504
|
|
|
|
|
|
|
|
3505
|
|
|
|
|
|
|
|
3506
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [EMPTY]<<}, |
3507
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3508
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3509
|
|
|
|
|
|
|
$tracelevel) |
3510
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3511
|
|
|
|
|
|
|
|
3512
|
|
|
|
|
|
|
|
3513
|
|
|
|
|
|
|
|
3514
|
0
|
|
|
|
|
0
|
$_matched = 1; |
3515
|
0
|
|
|
|
|
0
|
last; |
3516
|
|
|
|
|
|
|
} |
3517
|
|
|
|
|
|
|
|
3518
|
|
|
|
|
|
|
|
3519
|
38
|
50
|
33
|
|
|
99
|
unless ( $_matched || defined($score) ) |
3520
|
|
|
|
|
|
|
{ |
3521
|
|
|
|
|
|
|
|
3522
|
|
|
|
|
|
|
|
3523
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
3524
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
3525
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3526
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3527
|
|
|
|
|
|
|
$tracelevel) |
3528
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3529
|
0
|
|
|
|
|
0
|
return undef; |
3530
|
|
|
|
|
|
|
} |
3531
|
38
|
50
|
33
|
|
|
110
|
if (!defined($return) && defined($score)) |
3532
|
|
|
|
|
|
|
{ |
3533
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
3534
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3535
|
|
|
|
|
|
|
$tracelevel) |
3536
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3537
|
0
|
|
|
|
|
0
|
$return = $score_return; |
3538
|
|
|
|
|
|
|
} |
3539
|
38
|
|
|
|
|
41
|
splice @{$thisparser->{errors}}, $err_at; |
|
38
|
|
|
|
|
78
|
|
3540
|
38
|
50
|
|
|
|
84
|
$return = $item[$#item] unless defined $return; |
3541
|
38
|
50
|
|
|
|
81
|
if (defined $::RD_TRACE) |
3542
|
|
|
|
|
|
|
{ |
3543
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
3544
|
|
|
|
|
|
|
$return . q{])}, "", |
3545
|
|
|
|
|
|
|
q{PNOTQUOTED}, |
3546
|
|
|
|
|
|
|
$tracelevel); |
3547
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
3548
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
3549
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3550
|
|
|
|
|
|
|
, q{PNOTQUOTED}, |
3551
|
|
|
|
|
|
|
$tracelevel) |
3552
|
|
|
|
|
|
|
} |
3553
|
38
|
|
|
|
|
67
|
$_[1] = $text; |
3554
|
38
|
|
|
|
|
284
|
return $return; |
3555
|
|
|
|
|
|
|
} |
3556
|
|
|
|
|
|
|
|
3557
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
3558
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SPACE |
3559
|
|
|
|
|
|
|
{ |
3560
|
0
|
|
|
0
|
|
0
|
my $thisparser = $_[0]; |
3561
|
2
|
|
|
2
|
|
13
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
2417
|
|
3562
|
0
|
|
0
|
|
|
0
|
local $tracelevel = ($tracelevel||0)+1; |
3563
|
0
|
|
|
|
|
0
|
$ERRORS = 0; |
3564
|
0
|
|
|
|
|
0
|
my $thisrule = $thisparser->{"rules"}{"SPACE"}; |
3565
|
|
|
|
|
|
|
|
3566
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [SPACE]}, |
3567
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3568
|
|
|
|
|
|
|
q{SPACE}, |
3569
|
|
|
|
|
|
|
$tracelevel) |
3570
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3571
|
|
|
|
|
|
|
|
3572
|
|
|
|
|
|
|
|
3573
|
0
|
|
|
|
|
0
|
my $err_at = @{$thisparser->{errors}}; |
|
0
|
|
|
|
|
0
|
|
3574
|
|
|
|
|
|
|
|
3575
|
0
|
|
|
|
|
0
|
my $score; |
3576
|
|
|
|
|
|
|
my $score_return; |
3577
|
0
|
|
|
|
|
0
|
my $_tok; |
3578
|
0
|
|
|
|
|
0
|
my $return = undef; |
3579
|
0
|
|
|
|
|
0
|
my $_matched=0; |
3580
|
0
|
|
|
|
|
0
|
my $commit=0; |
3581
|
0
|
|
|
|
|
0
|
my @item = (); |
3582
|
0
|
|
|
|
|
0
|
my %item = (); |
3583
|
0
|
|
|
|
|
0
|
my $repeating = $_[2]; |
3584
|
0
|
|
|
|
|
0
|
my $_noactions = $_[3]; |
3585
|
0
|
0
|
|
|
|
0
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
3586
|
0
|
|
|
|
|
0
|
my $_itempos = $_[5]; |
3587
|
0
|
0
|
|
|
|
0
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
3588
|
0
|
|
|
|
|
0
|
my $text; |
3589
|
|
|
|
|
|
|
my $lastsep; |
3590
|
0
|
|
|
|
|
0
|
my $current_match; |
3591
|
0
|
|
|
|
|
0
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/\\s+/}); |
3592
|
0
|
|
|
|
|
0
|
$expectation->at($_[1]); |
3593
|
|
|
|
|
|
|
|
3594
|
0
|
|
|
|
|
0
|
my $thisline; |
3595
|
0
|
|
|
|
|
0
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
3596
|
|
|
|
|
|
|
|
3597
|
|
|
|
|
|
|
|
3598
|
|
|
|
|
|
|
|
3599
|
0
|
|
0
|
|
|
0
|
while (!$_matched && !$commit) |
3600
|
|
|
|
|
|
|
{ |
3601
|
|
|
|
|
|
|
|
3602
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/\\s+/]}, |
3603
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3604
|
|
|
|
|
|
|
q{SPACE}, |
3605
|
|
|
|
|
|
|
$tracelevel) |
3606
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3607
|
0
|
|
|
|
|
0
|
my $thisprod = $thisrule->{"prods"}[0]; |
3608
|
0
|
|
|
|
|
0
|
$text = $_[1]; |
3609
|
0
|
|
|
|
|
0
|
my $_savetext; |
3610
|
0
|
|
|
|
|
0
|
@item = (q{SPACE}); |
3611
|
0
|
|
|
|
|
0
|
%item = (__RULE__ => q{SPACE}); |
3612
|
0
|
|
|
|
|
0
|
my $repcount = 0; |
3613
|
|
|
|
|
|
|
|
3614
|
|
|
|
|
|
|
|
3615
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/\\s+/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
3616
|
|
|
|
|
|
|
q{SPACE}, |
3617
|
|
|
|
|
|
|
$tracelevel) |
3618
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3619
|
0
|
|
|
|
|
0
|
undef $lastsep; |
3620
|
0
|
|
|
|
|
0
|
$expectation->is(q{})->at($text); |
3621
|
|
|
|
|
|
|
|
3622
|
|
|
|
|
|
|
|
3623
|
0
|
0
|
0
|
|
|
0
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\s+)/) |
|
0
|
0
|
|
|
|
0
|
|
3624
|
|
|
|
|
|
|
{ |
3625
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
3626
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
3627
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
3628
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3629
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3630
|
|
|
|
|
|
|
|
3631
|
0
|
|
|
|
|
0
|
last; |
3632
|
|
|
|
|
|
|
} |
3633
|
0
|
|
|
|
|
0
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
3634
|
0
|
|
|
|
|
0
|
substr($text,0,length($current_match),q{}); |
3635
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
3636
|
|
|
|
|
|
|
. $current_match . q{])}, |
3637
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3638
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3639
|
0
|
|
|
|
|
0
|
push @item, $item{__PATTERN1__}=$current_match; |
3640
|
|
|
|
|
|
|
|
3641
|
|
|
|
|
|
|
|
3642
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
3643
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3644
|
|
|
|
|
|
|
q{SPACE}, |
3645
|
|
|
|
|
|
|
$tracelevel) |
3646
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3647
|
|
|
|
|
|
|
|
3648
|
|
|
|
|
|
|
|
3649
|
0
|
0
|
|
|
|
0
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1]}; |
|
0
|
|
|
|
|
0
|
|
3650
|
0
|
0
|
|
|
|
0
|
unless (defined $_tok) |
3651
|
|
|
|
|
|
|
{ |
3652
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
3653
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3654
|
0
|
|
|
|
|
0
|
last; |
3655
|
|
|
|
|
|
|
} |
3656
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
3657
|
|
|
|
|
|
|
. $_tok . q{])}, |
3658
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3659
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3660
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
3661
|
0
|
|
|
|
|
0
|
$item{__ACTION1__}=$_tok; |
3662
|
|
|
|
|
|
|
|
3663
|
|
|
|
|
|
|
|
3664
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/\\s+/]<<}, |
3665
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3666
|
|
|
|
|
|
|
q{SPACE}, |
3667
|
|
|
|
|
|
|
$tracelevel) |
3668
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3669
|
|
|
|
|
|
|
|
3670
|
|
|
|
|
|
|
|
3671
|
|
|
|
|
|
|
|
3672
|
0
|
|
|
|
|
0
|
$_matched = 1; |
3673
|
0
|
|
|
|
|
0
|
last; |
3674
|
|
|
|
|
|
|
} |
3675
|
|
|
|
|
|
|
|
3676
|
|
|
|
|
|
|
|
3677
|
0
|
0
|
0
|
|
|
0
|
unless ( $_matched || defined($score) ) |
3678
|
|
|
|
|
|
|
{ |
3679
|
|
|
|
|
|
|
|
3680
|
|
|
|
|
|
|
|
3681
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
3682
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
3683
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3684
|
|
|
|
|
|
|
q{SPACE}, |
3685
|
|
|
|
|
|
|
$tracelevel) |
3686
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3687
|
0
|
|
|
|
|
0
|
return undef; |
3688
|
|
|
|
|
|
|
} |
3689
|
0
|
0
|
0
|
|
|
0
|
if (!defined($return) && defined($score)) |
3690
|
|
|
|
|
|
|
{ |
3691
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
3692
|
|
|
|
|
|
|
q{SPACE}, |
3693
|
|
|
|
|
|
|
$tracelevel) |
3694
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3695
|
0
|
|
|
|
|
0
|
$return = $score_return; |
3696
|
|
|
|
|
|
|
} |
3697
|
0
|
|
|
|
|
0
|
splice @{$thisparser->{errors}}, $err_at; |
|
0
|
|
|
|
|
0
|
|
3698
|
0
|
0
|
|
|
|
0
|
$return = $item[$#item] unless defined $return; |
3699
|
0
|
0
|
|
|
|
0
|
if (defined $::RD_TRACE) |
3700
|
|
|
|
|
|
|
{ |
3701
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
3702
|
|
|
|
|
|
|
$return . q{])}, "", |
3703
|
|
|
|
|
|
|
q{SPACE}, |
3704
|
|
|
|
|
|
|
$tracelevel); |
3705
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
3706
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
3707
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3708
|
|
|
|
|
|
|
, q{SPACE}, |
3709
|
|
|
|
|
|
|
$tracelevel) |
3710
|
|
|
|
|
|
|
} |
3711
|
0
|
|
|
|
|
0
|
$_[1] = $text; |
3712
|
0
|
|
|
|
|
0
|
return $return; |
3713
|
|
|
|
|
|
|
} |
3714
|
|
|
|
|
|
|
|
3715
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
3716
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PDQUOTE |
3717
|
|
|
|
|
|
|
{ |
3718
|
16
|
|
|
16
|
|
19
|
my $thisparser = $_[0]; |
3719
|
2
|
|
|
2
|
|
15
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
922
|
|
3720
|
16
|
|
50
|
|
|
38
|
local $tracelevel = ($tracelevel||0)+1; |
3721
|
16
|
|
|
|
|
21
|
$ERRORS = 0; |
3722
|
16
|
|
|
|
|
27
|
my $thisrule = $thisparser->{"rules"}{"PDQUOTE"}; |
3723
|
|
|
|
|
|
|
|
3724
|
16
|
50
|
|
|
|
34
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [PDQUOTE]}, |
3725
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3726
|
|
|
|
|
|
|
q{PDQUOTE}, |
3727
|
|
|
|
|
|
|
$tracelevel) |
3728
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3729
|
|
|
|
|
|
|
|
3730
|
|
|
|
|
|
|
|
3731
|
16
|
|
|
|
|
18
|
my $err_at = @{$thisparser->{errors}}; |
|
16
|
|
|
|
|
24
|
|
3732
|
|
|
|
|
|
|
|
3733
|
16
|
|
|
|
|
21
|
my $score; |
3734
|
|
|
|
|
|
|
my $score_return; |
3735
|
0
|
|
|
|
|
0
|
my $_tok; |
3736
|
16
|
|
|
|
|
20
|
my $return = undef; |
3737
|
16
|
|
|
|
|
17
|
my $_matched=0; |
3738
|
16
|
|
|
|
|
17
|
my $commit=0; |
3739
|
16
|
|
|
|
|
25
|
my @item = (); |
3740
|
16
|
|
|
|
|
20
|
my %item = (); |
3741
|
16
|
|
|
|
|
20
|
my $repeating = $_[2]; |
3742
|
16
|
|
|
|
|
20
|
my $_noactions = $_[3]; |
3743
|
16
|
50
|
|
|
|
30
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
16
|
|
|
|
|
15
|
|
|
16
|
|
|
|
|
49
|
|
3744
|
16
|
|
|
|
|
20
|
my $_itempos = $_[5]; |
3745
|
16
|
50
|
|
|
|
42
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
3746
|
16
|
|
|
|
|
18
|
my $text; |
3747
|
|
|
|
|
|
|
my $lastsep; |
3748
|
0
|
|
|
|
|
0
|
my $current_match; |
3749
|
16
|
|
|
|
|
42
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{NOTDQUOTE}); |
3750
|
16
|
|
|
|
|
38
|
$expectation->at($_[1]); |
3751
|
|
|
|
|
|
|
|
3752
|
16
|
|
|
|
|
15
|
my $thisline; |
3753
|
16
|
|
|
|
|
42
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
3754
|
|
|
|
|
|
|
|
3755
|
|
|
|
|
|
|
|
3756
|
|
|
|
|
|
|
|
3757
|
16
|
|
33
|
|
|
57
|
while (!$_matched && !$commit) |
3758
|
|
|
|
|
|
|
{ |
3759
|
|
|
|
|
|
|
|
3760
|
16
|
50
|
|
|
|
30
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [NOTDQUOTE SLASHEDDQUOTE PDQUOTE]}, |
3761
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3762
|
|
|
|
|
|
|
q{PDQUOTE}, |
3763
|
|
|
|
|
|
|
$tracelevel) |
3764
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3765
|
16
|
|
|
|
|
27
|
my $thisprod = $thisrule->{"prods"}[0]; |
3766
|
16
|
|
|
|
|
26
|
$text = $_[1]; |
3767
|
16
|
|
|
|
|
15
|
my $_savetext; |
3768
|
16
|
|
|
|
|
23
|
@item = (q{PDQUOTE}); |
3769
|
16
|
|
|
|
|
35
|
%item = (__RULE__ => q{PDQUOTE}); |
3770
|
16
|
|
|
|
|
18
|
my $repcount = 0; |
3771
|
|
|
|
|
|
|
|
3772
|
|
|
|
|
|
|
|
3773
|
16
|
50
|
|
|
|
29
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [NOTDQUOTE]}, |
3774
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3775
|
|
|
|
|
|
|
q{PDQUOTE}, |
3776
|
|
|
|
|
|
|
$tracelevel) |
3777
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3778
|
2
|
|
|
2
|
|
159
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
464
|
|
|
16
|
|
|
|
|
14
|
|
3779
|
16
|
|
|
|
|
32
|
$expectation->is(q{})->at($text); |
3780
|
16
|
50
|
|
16
|
|
65
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::NOTDQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
16
|
|
|
|
|
28
|
|
3781
|
|
|
|
|
|
|
{ |
3782
|
|
|
|
|
|
|
|
3783
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [NOTDQUOTE]>>}, |
3784
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3785
|
|
|
|
|
|
|
q{PDQUOTE}, |
3786
|
|
|
|
|
|
|
$tracelevel) |
3787
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3788
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
3789
|
0
|
|
|
|
|
0
|
last; |
3790
|
|
|
|
|
|
|
} |
3791
|
16
|
50
|
|
|
|
46
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [NOTDQUOTE]<< (return value: [} |
3792
|
|
|
|
|
|
|
. $_tok . q{]}, |
3793
|
|
|
|
|
|
|
|
3794
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3795
|
|
|
|
|
|
|
q{PDQUOTE}, |
3796
|
|
|
|
|
|
|
$tracelevel) |
3797
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3798
|
16
|
|
|
|
|
27
|
$item{q{NOTDQUOTE}} = $_tok; |
3799
|
16
|
|
|
|
|
21
|
push @item, $_tok; |
3800
|
|
|
|
|
|
|
|
3801
|
|
|
|
|
|
|
} |
3802
|
|
|
|
|
|
|
|
3803
|
16
|
50
|
|
|
|
32
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [SLASHEDDQUOTE]}, |
3804
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3805
|
|
|
|
|
|
|
q{PDQUOTE}, |
3806
|
|
|
|
|
|
|
$tracelevel) |
3807
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3808
|
2
|
|
|
2
|
|
11
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
738
|
|
|
16
|
|
|
|
|
18
|
|
3809
|
16
|
|
|
|
|
30
|
$expectation->is(q{SLASHEDDQUOTE})->at($text); |
3810
|
16
|
100
|
|
16
|
|
62
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SLASHEDDQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
16
|
|
|
|
|
28
|
|
3811
|
|
|
|
|
|
|
{ |
3812
|
|
|
|
|
|
|
|
3813
|
8
|
50
|
|
|
|
19
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [SLASHEDDQUOTE]>>}, |
3814
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3815
|
|
|
|
|
|
|
q{PDQUOTE}, |
3816
|
|
|
|
|
|
|
$tracelevel) |
3817
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3818
|
8
|
|
|
|
|
12
|
$expectation->failed(); |
3819
|
8
|
|
|
|
|
14
|
last; |
3820
|
|
|
|
|
|
|
} |
3821
|
8
|
50
|
|
|
|
27
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [SLASHEDDQUOTE]<< (return value: [} |
3822
|
|
|
|
|
|
|
. $_tok . q{]}, |
3823
|
|
|
|
|
|
|
|
3824
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3825
|
|
|
|
|
|
|
q{PDQUOTE}, |
3826
|
|
|
|
|
|
|
$tracelevel) |
3827
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3828
|
8
|
|
|
|
|
16
|
$item{q{SLASHEDDQUOTE}} = $_tok; |
3829
|
8
|
|
|
|
|
14
|
push @item, $_tok; |
3830
|
|
|
|
|
|
|
|
3831
|
|
|
|
|
|
|
} |
3832
|
|
|
|
|
|
|
|
3833
|
8
|
50
|
|
|
|
17
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PDQUOTE]}, |
3834
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3835
|
|
|
|
|
|
|
q{PDQUOTE}, |
3836
|
|
|
|
|
|
|
$tracelevel) |
3837
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3838
|
2
|
|
|
2
|
|
11
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
968
|
|
|
8
|
|
|
|
|
9
|
|
3839
|
8
|
|
|
|
|
20
|
$expectation->is(q{PDQUOTE})->at($text); |
3840
|
8
|
50
|
|
8
|
|
42
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PDQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
8
|
|
|
|
|
16
|
|
3841
|
|
|
|
|
|
|
{ |
3842
|
|
|
|
|
|
|
|
3843
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PDQUOTE]>>}, |
3844
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3845
|
|
|
|
|
|
|
q{PDQUOTE}, |
3846
|
|
|
|
|
|
|
$tracelevel) |
3847
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3848
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
3849
|
0
|
|
|
|
|
0
|
last; |
3850
|
|
|
|
|
|
|
} |
3851
|
8
|
50
|
|
|
|
24
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PDQUOTE]<< (return value: [} |
3852
|
|
|
|
|
|
|
. $_tok . q{]}, |
3853
|
|
|
|
|
|
|
|
3854
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3855
|
|
|
|
|
|
|
q{PDQUOTE}, |
3856
|
|
|
|
|
|
|
$tracelevel) |
3857
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3858
|
8
|
|
|
|
|
14
|
$item{q{PDQUOTE}} = $_tok; |
3859
|
8
|
|
|
|
|
11
|
push @item, $_tok; |
3860
|
|
|
|
|
|
|
|
3861
|
|
|
|
|
|
|
} |
3862
|
|
|
|
|
|
|
|
3863
|
8
|
50
|
|
|
|
16
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
3864
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3865
|
|
|
|
|
|
|
q{PDQUOTE}, |
3866
|
|
|
|
|
|
|
$tracelevel) |
3867
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3868
|
|
|
|
|
|
|
|
3869
|
|
|
|
|
|
|
|
3870
|
8
|
50
|
|
|
|
13
|
$_tok = ($_noactions) ? 0 : do {$return = $item{NOTDQUOTE}.$item{SLASHEDDQUOTE}.$item{PDQUOTE}}; |
|
8
|
|
|
|
|
27
|
|
3871
|
8
|
50
|
|
|
|
24
|
unless (defined $_tok) |
3872
|
|
|
|
|
|
|
{ |
3873
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
3874
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3875
|
0
|
|
|
|
|
0
|
last; |
3876
|
|
|
|
|
|
|
} |
3877
|
8
|
50
|
|
|
|
17
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
3878
|
|
|
|
|
|
|
. $_tok . q{])}, |
3879
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
3880
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3881
|
8
|
|
|
|
|
11
|
push @item, $_tok; |
3882
|
8
|
|
|
|
|
11
|
$item{__ACTION1__}=$_tok; |
3883
|
|
|
|
|
|
|
|
3884
|
|
|
|
|
|
|
|
3885
|
8
|
50
|
|
|
|
19
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [NOTDQUOTE SLASHEDDQUOTE PDQUOTE]<<}, |
3886
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3887
|
|
|
|
|
|
|
q{PDQUOTE}, |
3888
|
|
|
|
|
|
|
$tracelevel) |
3889
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3890
|
|
|
|
|
|
|
|
3891
|
|
|
|
|
|
|
|
3892
|
|
|
|
|
|
|
|
3893
|
8
|
|
|
|
|
8
|
$_matched = 1; |
3894
|
8
|
|
|
|
|
10
|
last; |
3895
|
|
|
|
|
|
|
} |
3896
|
|
|
|
|
|
|
|
3897
|
|
|
|
|
|
|
|
3898
|
16
|
|
66
|
|
|
58
|
while (!$_matched && !$commit) |
3899
|
|
|
|
|
|
|
{ |
3900
|
|
|
|
|
|
|
|
3901
|
8
|
50
|
|
|
|
22
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [NOTDQUOTE]}, |
3902
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3903
|
|
|
|
|
|
|
q{PDQUOTE}, |
3904
|
|
|
|
|
|
|
$tracelevel) |
3905
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3906
|
8
|
|
|
|
|
13
|
my $thisprod = $thisrule->{"prods"}[1]; |
3907
|
8
|
|
|
|
|
14
|
$text = $_[1]; |
3908
|
8
|
|
|
|
|
7
|
my $_savetext; |
3909
|
8
|
|
|
|
|
19
|
@item = (q{PDQUOTE}); |
3910
|
8
|
|
|
|
|
19
|
%item = (__RULE__ => q{PDQUOTE}); |
3911
|
8
|
|
|
|
|
11
|
my $repcount = 0; |
3912
|
|
|
|
|
|
|
|
3913
|
|
|
|
|
|
|
|
3914
|
8
|
50
|
|
|
|
17
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [NOTDQUOTE]}, |
3915
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3916
|
|
|
|
|
|
|
q{PDQUOTE}, |
3917
|
|
|
|
|
|
|
$tracelevel) |
3918
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3919
|
2
|
|
|
2
|
|
16
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
1210
|
|
|
8
|
|
|
|
|
8
|
|
3920
|
8
|
|
|
|
|
18
|
$expectation->is(q{})->at($text); |
3921
|
8
|
50
|
|
8
|
|
32
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::NOTDQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
8
|
|
|
|
|
15
|
|
3922
|
|
|
|
|
|
|
{ |
3923
|
|
|
|
|
|
|
|
3924
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [NOTDQUOTE]>>}, |
3925
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3926
|
|
|
|
|
|
|
q{PDQUOTE}, |
3927
|
|
|
|
|
|
|
$tracelevel) |
3928
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3929
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
3930
|
0
|
|
|
|
|
0
|
last; |
3931
|
|
|
|
|
|
|
} |
3932
|
8
|
50
|
|
|
|
23
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [NOTDQUOTE]<< (return value: [} |
3933
|
|
|
|
|
|
|
. $_tok . q{]}, |
3934
|
|
|
|
|
|
|
|
3935
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3936
|
|
|
|
|
|
|
q{PDQUOTE}, |
3937
|
|
|
|
|
|
|
$tracelevel) |
3938
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3939
|
8
|
|
|
|
|
16
|
$item{q{NOTDQUOTE}} = $_tok; |
3940
|
8
|
|
|
|
|
11
|
push @item, $_tok; |
3941
|
|
|
|
|
|
|
|
3942
|
|
|
|
|
|
|
} |
3943
|
|
|
|
|
|
|
|
3944
|
8
|
50
|
|
|
|
15
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [NOTDQUOTE]<<}, |
3945
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3946
|
|
|
|
|
|
|
q{PDQUOTE}, |
3947
|
|
|
|
|
|
|
$tracelevel) |
3948
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3949
|
|
|
|
|
|
|
|
3950
|
|
|
|
|
|
|
|
3951
|
|
|
|
|
|
|
|
3952
|
8
|
|
|
|
|
10
|
$_matched = 1; |
3953
|
8
|
|
|
|
|
10
|
last; |
3954
|
|
|
|
|
|
|
} |
3955
|
|
|
|
|
|
|
|
3956
|
|
|
|
|
|
|
|
3957
|
16
|
50
|
33
|
|
|
36
|
unless ( $_matched || defined($score) ) |
3958
|
|
|
|
|
|
|
{ |
3959
|
|
|
|
|
|
|
|
3960
|
|
|
|
|
|
|
|
3961
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
3962
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
3963
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
3964
|
|
|
|
|
|
|
q{PDQUOTE}, |
3965
|
|
|
|
|
|
|
$tracelevel) |
3966
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3967
|
0
|
|
|
|
|
0
|
return undef; |
3968
|
|
|
|
|
|
|
} |
3969
|
16
|
50
|
66
|
|
|
55
|
if (!defined($return) && defined($score)) |
3970
|
|
|
|
|
|
|
{ |
3971
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
3972
|
|
|
|
|
|
|
q{PDQUOTE}, |
3973
|
|
|
|
|
|
|
$tracelevel) |
3974
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
3975
|
0
|
|
|
|
|
0
|
$return = $score_return; |
3976
|
|
|
|
|
|
|
} |
3977
|
16
|
|
|
|
|
16
|
splice @{$thisparser->{errors}}, $err_at; |
|
16
|
|
|
|
|
26
|
|
3978
|
16
|
100
|
|
|
|
36
|
$return = $item[$#item] unless defined $return; |
3979
|
16
|
50
|
|
|
|
25
|
if (defined $::RD_TRACE) |
3980
|
|
|
|
|
|
|
{ |
3981
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
3982
|
|
|
|
|
|
|
$return . q{])}, "", |
3983
|
|
|
|
|
|
|
q{PDQUOTE}, |
3984
|
|
|
|
|
|
|
$tracelevel); |
3985
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
3986
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
3987
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
3988
|
|
|
|
|
|
|
, q{PDQUOTE}, |
3989
|
|
|
|
|
|
|
$tracelevel) |
3990
|
|
|
|
|
|
|
} |
3991
|
16
|
|
|
|
|
69
|
$_[1] = $text; |
3992
|
16
|
|
|
|
|
103
|
return $return; |
3993
|
|
|
|
|
|
|
} |
3994
|
|
|
|
|
|
|
|
3995
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
3996
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BNAME |
3997
|
|
|
|
|
|
|
{ |
3998
|
336
|
|
|
336
|
|
450
|
my $thisparser = $_[0]; |
3999
|
2
|
|
|
2
|
|
12
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
1361
|
|
4000
|
336
|
|
50
|
|
|
765
|
local $tracelevel = ($tracelevel||0)+1; |
4001
|
336
|
|
|
|
|
392
|
$ERRORS = 0; |
4002
|
336
|
|
|
|
|
532
|
my $thisrule = $thisparser->{"rules"}{"BNAME"}; |
4003
|
|
|
|
|
|
|
|
4004
|
336
|
50
|
|
|
|
654
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [BNAME]}, |
4005
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4006
|
|
|
|
|
|
|
q{BNAME}, |
4007
|
|
|
|
|
|
|
$tracelevel) |
4008
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4009
|
|
|
|
|
|
|
|
4010
|
|
|
|
|
|
|
|
4011
|
336
|
|
|
|
|
371
|
my $err_at = @{$thisparser->{errors}}; |
|
336
|
|
|
|
|
575
|
|
4012
|
|
|
|
|
|
|
|
4013
|
336
|
|
|
|
|
393
|
my $score; |
4014
|
|
|
|
|
|
|
my $score_return; |
4015
|
0
|
|
|
|
|
0
|
my $_tok; |
4016
|
336
|
|
|
|
|
337
|
my $return = undef; |
4017
|
336
|
|
|
|
|
336
|
my $_matched=0; |
4018
|
336
|
|
|
|
|
304
|
my $commit=0; |
4019
|
336
|
|
|
|
|
458
|
my @item = (); |
4020
|
336
|
|
|
|
|
451
|
my %item = (); |
4021
|
336
|
|
|
|
|
416
|
my $repeating = $_[2]; |
4022
|
336
|
|
|
|
|
383
|
my $_noactions = $_[3]; |
4023
|
336
|
50
|
|
|
|
604
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
336
|
|
|
|
|
334
|
|
|
336
|
|
|
|
|
554
|
|
4024
|
336
|
|
|
|
|
412
|
my $_itempos = $_[5]; |
4025
|
336
|
50
|
|
|
|
829
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
4026
|
336
|
|
|
|
|
368
|
my $text; |
4027
|
|
|
|
|
|
|
my $lastsep; |
4028
|
0
|
|
|
|
|
0
|
my $current_match; |
4029
|
336
|
|
|
|
|
681
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/[A-Z]\\w*::/, or /[A-Z]\\w*/}); |
4030
|
336
|
|
|
|
|
700
|
$expectation->at($_[1]); |
4031
|
|
|
|
|
|
|
|
4032
|
336
|
|
|
|
|
328
|
my $thisline; |
4033
|
336
|
|
|
|
|
801
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
4034
|
|
|
|
|
|
|
|
4035
|
|
|
|
|
|
|
|
4036
|
|
|
|
|
|
|
|
4037
|
336
|
|
33
|
|
|
1063
|
while (!$_matched && !$commit) |
4038
|
|
|
|
|
|
|
{ |
4039
|
|
|
|
|
|
|
|
4040
|
336
|
50
|
|
|
|
660
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/[A-Z]\\w*::/ BNAME]}, |
4041
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4042
|
|
|
|
|
|
|
q{BNAME}, |
4043
|
|
|
|
|
|
|
$tracelevel) |
4044
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4045
|
336
|
|
|
|
|
582
|
my $thisprod = $thisrule->{"prods"}[0]; |
4046
|
336
|
|
|
|
|
453
|
$text = $_[1]; |
4047
|
336
|
|
|
|
|
310
|
my $_savetext; |
4048
|
336
|
|
|
|
|
485
|
@item = (q{BNAME}); |
4049
|
336
|
|
|
|
|
563
|
%item = (__RULE__ => q{BNAME}); |
4050
|
336
|
|
|
|
|
406
|
my $repcount = 0; |
4051
|
|
|
|
|
|
|
|
4052
|
|
|
|
|
|
|
|
4053
|
336
|
50
|
|
|
|
627
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/[A-Z]\\w*::/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
4054
|
|
|
|
|
|
|
q{BNAME}, |
4055
|
|
|
|
|
|
|
$tracelevel) |
4056
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4057
|
336
|
|
|
|
|
411
|
undef $lastsep; |
4058
|
336
|
|
|
|
|
790
|
$expectation->is(q{})->at($text); |
4059
|
|
|
|
|
|
|
|
4060
|
|
|
|
|
|
|
|
4061
|
336
|
100
|
66
|
|
|
1427
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[A-Z]\w*::)/) |
|
336
|
100
|
|
|
|
2857
|
|
4062
|
|
|
|
|
|
|
{ |
4063
|
252
|
50
|
|
|
|
734
|
$text = $lastsep . $text if defined $lastsep; |
4064
|
252
|
|
|
|
|
542
|
$expectation->failed(); |
4065
|
252
|
50
|
|
|
|
453
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
4066
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4067
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4068
|
|
|
|
|
|
|
|
4069
|
252
|
|
|
|
|
428
|
last; |
4070
|
|
|
|
|
|
|
} |
4071
|
84
|
|
|
|
|
448
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
4072
|
84
|
|
|
|
|
263
|
substr($text,0,length($current_match),q{}); |
4073
|
84
|
50
|
|
|
|
184
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
4074
|
|
|
|
|
|
|
. $current_match . q{])}, |
4075
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4076
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4077
|
84
|
|
|
|
|
186
|
push @item, $item{__PATTERN1__}=$current_match; |
4078
|
|
|
|
|
|
|
|
4079
|
|
|
|
|
|
|
|
4080
|
84
|
50
|
|
|
|
164
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [BNAME]}, |
4081
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4082
|
|
|
|
|
|
|
q{BNAME}, |
4083
|
|
|
|
|
|
|
$tracelevel) |
4084
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4085
|
2
|
|
|
2
|
|
12
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
2338
|
|
|
84
|
|
|
|
|
149
|
|
4086
|
84
|
|
|
|
|
177
|
$expectation->is(q{BNAME})->at($text); |
4087
|
84
|
50
|
|
84
|
|
381
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
84
|
|
|
|
|
168
|
|
4088
|
|
|
|
|
|
|
{ |
4089
|
|
|
|
|
|
|
|
4090
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [BNAME]>>}, |
4091
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4092
|
|
|
|
|
|
|
q{BNAME}, |
4093
|
|
|
|
|
|
|
$tracelevel) |
4094
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4095
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
4096
|
0
|
|
|
|
|
0
|
last; |
4097
|
|
|
|
|
|
|
} |
4098
|
84
|
50
|
|
|
|
282
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [BNAME]<< (return value: [} |
4099
|
|
|
|
|
|
|
. $_tok . q{]}, |
4100
|
|
|
|
|
|
|
|
4101
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4102
|
|
|
|
|
|
|
q{BNAME}, |
4103
|
|
|
|
|
|
|
$tracelevel) |
4104
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4105
|
84
|
|
|
|
|
176
|
$item{q{BNAME}} = $_tok; |
4106
|
84
|
|
|
|
|
133
|
push @item, $_tok; |
4107
|
|
|
|
|
|
|
|
4108
|
|
|
|
|
|
|
} |
4109
|
|
|
|
|
|
|
|
4110
|
84
|
50
|
|
|
|
160
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
4111
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4112
|
|
|
|
|
|
|
q{BNAME}, |
4113
|
|
|
|
|
|
|
$tracelevel) |
4114
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4115
|
|
|
|
|
|
|
|
4116
|
|
|
|
|
|
|
|
4117
|
84
|
50
|
|
|
|
153
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1].$item[2]}; |
|
84
|
|
|
|
|
177
|
|
4118
|
84
|
50
|
|
|
|
169
|
unless (defined $_tok) |
4119
|
|
|
|
|
|
|
{ |
4120
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
4121
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4122
|
0
|
|
|
|
|
0
|
last; |
4123
|
|
|
|
|
|
|
} |
4124
|
84
|
50
|
|
|
|
164
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
4125
|
|
|
|
|
|
|
. $_tok . q{])}, |
4126
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4127
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4128
|
84
|
|
|
|
|
101
|
push @item, $_tok; |
4129
|
84
|
|
|
|
|
119
|
$item{__ACTION1__}=$_tok; |
4130
|
|
|
|
|
|
|
|
4131
|
|
|
|
|
|
|
|
4132
|
84
|
50
|
|
|
|
167
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/[A-Z]\\w*::/ BNAME]<<}, |
4133
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4134
|
|
|
|
|
|
|
q{BNAME}, |
4135
|
|
|
|
|
|
|
$tracelevel) |
4136
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4137
|
|
|
|
|
|
|
|
4138
|
|
|
|
|
|
|
|
4139
|
|
|
|
|
|
|
|
4140
|
84
|
|
|
|
|
98
|
$_matched = 1; |
4141
|
84
|
|
|
|
|
144
|
last; |
4142
|
|
|
|
|
|
|
} |
4143
|
|
|
|
|
|
|
|
4144
|
|
|
|
|
|
|
|
4145
|
336
|
|
66
|
|
|
1030
|
while (!$_matched && !$commit) |
4146
|
|
|
|
|
|
|
{ |
4147
|
|
|
|
|
|
|
|
4148
|
252
|
50
|
|
|
|
473
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/[A-Z]\\w*/]}, |
4149
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4150
|
|
|
|
|
|
|
q{BNAME}, |
4151
|
|
|
|
|
|
|
$tracelevel) |
4152
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4153
|
252
|
|
|
|
|
389
|
my $thisprod = $thisrule->{"prods"}[1]; |
4154
|
252
|
|
|
|
|
385
|
$text = $_[1]; |
4155
|
252
|
|
|
|
|
236
|
my $_savetext; |
4156
|
252
|
|
|
|
|
396
|
@item = (q{BNAME}); |
4157
|
252
|
|
|
|
|
482
|
%item = (__RULE__ => q{BNAME}); |
4158
|
252
|
|
|
|
|
285
|
my $repcount = 0; |
4159
|
|
|
|
|
|
|
|
4160
|
|
|
|
|
|
|
|
4161
|
252
|
50
|
|
|
|
546
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/[A-Z]\\w*/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
4162
|
|
|
|
|
|
|
q{BNAME}, |
4163
|
|
|
|
|
|
|
$tracelevel) |
4164
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4165
|
252
|
|
|
|
|
300
|
undef $lastsep; |
4166
|
252
|
|
|
|
|
444
|
$expectation->is(q{})->at($text); |
4167
|
|
|
|
|
|
|
|
4168
|
|
|
|
|
|
|
|
4169
|
252
|
100
|
66
|
|
|
986
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[A-Z]\w*)/) |
|
252
|
100
|
|
|
|
1914
|
|
4170
|
|
|
|
|
|
|
{ |
4171
|
156
|
50
|
|
|
|
394
|
$text = $lastsep . $text if defined $lastsep; |
4172
|
156
|
|
|
|
|
332
|
$expectation->failed(); |
4173
|
156
|
50
|
|
|
|
332
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
4174
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4175
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4176
|
|
|
|
|
|
|
|
4177
|
156
|
|
|
|
|
247
|
last; |
4178
|
|
|
|
|
|
|
} |
4179
|
96
|
|
|
|
|
437
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
4180
|
96
|
|
|
|
|
268
|
substr($text,0,length($current_match),q{}); |
4181
|
96
|
50
|
|
|
|
198
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
4182
|
|
|
|
|
|
|
. $current_match . q{])}, |
4183
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4184
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4185
|
96
|
|
|
|
|
215
|
push @item, $item{__PATTERN1__}=$current_match; |
4186
|
|
|
|
|
|
|
|
4187
|
|
|
|
|
|
|
|
4188
|
96
|
50
|
|
|
|
185
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
4189
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4190
|
|
|
|
|
|
|
q{BNAME}, |
4191
|
|
|
|
|
|
|
$tracelevel) |
4192
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4193
|
|
|
|
|
|
|
|
4194
|
|
|
|
|
|
|
|
4195
|
96
|
50
|
|
|
|
183
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1]}; |
|
96
|
|
|
|
|
177
|
|
4196
|
96
|
50
|
|
|
|
220
|
unless (defined $_tok) |
4197
|
|
|
|
|
|
|
{ |
4198
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
4199
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4200
|
0
|
|
|
|
|
0
|
last; |
4201
|
|
|
|
|
|
|
} |
4202
|
96
|
50
|
|
|
|
239
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
4203
|
|
|
|
|
|
|
. $_tok . q{])}, |
4204
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4205
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4206
|
96
|
|
|
|
|
135
|
push @item, $_tok; |
4207
|
96
|
|
|
|
|
161
|
$item{__ACTION1__}=$_tok; |
4208
|
|
|
|
|
|
|
|
4209
|
|
|
|
|
|
|
|
4210
|
96
|
50
|
|
|
|
178
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/[A-Z]\\w*/]<<}, |
4211
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4212
|
|
|
|
|
|
|
q{BNAME}, |
4213
|
|
|
|
|
|
|
$tracelevel) |
4214
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4215
|
|
|
|
|
|
|
|
4216
|
|
|
|
|
|
|
|
4217
|
|
|
|
|
|
|
|
4218
|
96
|
|
|
|
|
103
|
$_matched = 1; |
4219
|
96
|
|
|
|
|
149
|
last; |
4220
|
|
|
|
|
|
|
} |
4221
|
|
|
|
|
|
|
|
4222
|
|
|
|
|
|
|
|
4223
|
336
|
100
|
66
|
|
|
1136
|
unless ( $_matched || defined($score) ) |
4224
|
|
|
|
|
|
|
{ |
4225
|
|
|
|
|
|
|
|
4226
|
|
|
|
|
|
|
|
4227
|
156
|
|
|
|
|
210
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
4228
|
156
|
50
|
|
|
|
285
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
4229
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4230
|
|
|
|
|
|
|
q{BNAME}, |
4231
|
|
|
|
|
|
|
$tracelevel) |
4232
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4233
|
156
|
|
|
|
|
921
|
return undef; |
4234
|
|
|
|
|
|
|
} |
4235
|
180
|
50
|
33
|
|
|
404
|
if (!defined($return) && defined($score)) |
4236
|
|
|
|
|
|
|
{ |
4237
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
4238
|
|
|
|
|
|
|
q{BNAME}, |
4239
|
|
|
|
|
|
|
$tracelevel) |
4240
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4241
|
0
|
|
|
|
|
0
|
$return = $score_return; |
4242
|
|
|
|
|
|
|
} |
4243
|
180
|
|
|
|
|
181
|
splice @{$thisparser->{errors}}, $err_at; |
|
180
|
|
|
|
|
465
|
|
4244
|
180
|
50
|
|
|
|
355
|
$return = $item[$#item] unless defined $return; |
4245
|
180
|
50
|
|
|
|
324
|
if (defined $::RD_TRACE) |
4246
|
|
|
|
|
|
|
{ |
4247
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
4248
|
|
|
|
|
|
|
$return . q{])}, "", |
4249
|
|
|
|
|
|
|
q{BNAME}, |
4250
|
|
|
|
|
|
|
$tracelevel); |
4251
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
4252
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
4253
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4254
|
|
|
|
|
|
|
, q{BNAME}, |
4255
|
|
|
|
|
|
|
$tracelevel) |
4256
|
|
|
|
|
|
|
} |
4257
|
180
|
|
|
|
|
293
|
$_[1] = $text; |
4258
|
180
|
|
|
|
|
1264
|
return $return; |
4259
|
|
|
|
|
|
|
} |
4260
|
|
|
|
|
|
|
|
4261
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
4262
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PNAME |
4263
|
|
|
|
|
|
|
{ |
4264
|
176
|
|
|
176
|
|
213
|
my $thisparser = $_[0]; |
4265
|
2
|
|
|
2
|
|
13
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
2039
|
|
4266
|
176
|
|
50
|
|
|
405
|
local $tracelevel = ($tracelevel||0)+1; |
4267
|
176
|
|
|
|
|
198
|
$ERRORS = 0; |
4268
|
176
|
|
|
|
|
284
|
my $thisrule = $thisparser->{"rules"}{"PNAME"}; |
4269
|
|
|
|
|
|
|
|
4270
|
176
|
50
|
|
|
|
348
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [PNAME]}, |
4271
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4272
|
|
|
|
|
|
|
q{PNAME}, |
4273
|
|
|
|
|
|
|
$tracelevel) |
4274
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4275
|
|
|
|
|
|
|
|
4276
|
|
|
|
|
|
|
|
4277
|
176
|
|
|
|
|
182
|
my $err_at = @{$thisparser->{errors}}; |
|
176
|
|
|
|
|
273
|
|
4278
|
|
|
|
|
|
|
|
4279
|
176
|
|
|
|
|
217
|
my $score; |
4280
|
|
|
|
|
|
|
my $score_return; |
4281
|
0
|
|
|
|
|
0
|
my $_tok; |
4282
|
176
|
|
|
|
|
201
|
my $return = undef; |
4283
|
176
|
|
|
|
|
167
|
my $_matched=0; |
4284
|
176
|
|
|
|
|
169
|
my $commit=0; |
4285
|
176
|
|
|
|
|
216
|
my @item = (); |
4286
|
176
|
|
|
|
|
223
|
my %item = (); |
4287
|
176
|
|
|
|
|
216
|
my $repeating = $_[2]; |
4288
|
176
|
|
|
|
|
205
|
my $_noactions = $_[3]; |
4289
|
176
|
50
|
|
|
|
332
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
176
|
|
|
|
|
179
|
|
|
176
|
|
|
|
|
295
|
|
4290
|
176
|
|
|
|
|
243
|
my $_itempos = $_[5]; |
4291
|
176
|
50
|
|
|
|
421
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
4292
|
176
|
|
|
|
|
221
|
my $text; |
4293
|
|
|
|
|
|
|
my $lastsep; |
4294
|
0
|
|
|
|
|
0
|
my $current_match; |
4295
|
176
|
|
|
|
|
326
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/\\w+/}); |
4296
|
176
|
|
|
|
|
355
|
$expectation->at($_[1]); |
4297
|
|
|
|
|
|
|
|
4298
|
176
|
|
|
|
|
178
|
my $thisline; |
4299
|
176
|
|
|
|
|
423
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
4300
|
|
|
|
|
|
|
|
4301
|
|
|
|
|
|
|
|
4302
|
|
|
|
|
|
|
|
4303
|
176
|
|
33
|
|
|
580
|
while (!$_matched && !$commit) |
4304
|
|
|
|
|
|
|
{ |
4305
|
|
|
|
|
|
|
|
4306
|
176
|
50
|
|
|
|
355
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/\\w+/]}, |
4307
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4308
|
|
|
|
|
|
|
q{PNAME}, |
4309
|
|
|
|
|
|
|
$tracelevel) |
4310
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4311
|
176
|
|
|
|
|
286
|
my $thisprod = $thisrule->{"prods"}[0]; |
4312
|
176
|
|
|
|
|
263
|
$text = $_[1]; |
4313
|
176
|
|
|
|
|
163
|
my $_savetext; |
4314
|
176
|
|
|
|
|
258
|
@item = (q{PNAME}); |
4315
|
176
|
|
|
|
|
401
|
%item = (__RULE__ => q{PNAME}); |
4316
|
176
|
|
|
|
|
201
|
my $repcount = 0; |
4317
|
|
|
|
|
|
|
|
4318
|
|
|
|
|
|
|
|
4319
|
176
|
50
|
|
|
|
313
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/\\w+/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
4320
|
|
|
|
|
|
|
q{PNAME}, |
4321
|
|
|
|
|
|
|
$tracelevel) |
4322
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4323
|
176
|
|
|
|
|
208
|
undef $lastsep; |
4324
|
176
|
|
|
|
|
367
|
$expectation->is(q{})->at($text); |
4325
|
|
|
|
|
|
|
|
4326
|
|
|
|
|
|
|
|
4327
|
176
|
100
|
66
|
|
|
811
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\w+)/) |
|
176
|
100
|
|
|
|
1468
|
|
4328
|
|
|
|
|
|
|
{ |
4329
|
70
|
50
|
|
|
|
194
|
$text = $lastsep . $text if defined $lastsep; |
4330
|
70
|
|
|
|
|
151
|
$expectation->failed(); |
4331
|
70
|
50
|
|
|
|
134
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
4332
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4333
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4334
|
|
|
|
|
|
|
|
4335
|
70
|
|
|
|
|
133
|
last; |
4336
|
|
|
|
|
|
|
} |
4337
|
106
|
|
|
|
|
492
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
4338
|
106
|
|
|
|
|
318
|
substr($text,0,length($current_match),q{}); |
4339
|
106
|
50
|
|
|
|
241
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
4340
|
|
|
|
|
|
|
. $current_match . q{])}, |
4341
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4342
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4343
|
106
|
|
|
|
|
222
|
push @item, $item{__PATTERN1__}=$current_match; |
4344
|
|
|
|
|
|
|
|
4345
|
|
|
|
|
|
|
|
4346
|
106
|
50
|
|
|
|
213
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
4347
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4348
|
|
|
|
|
|
|
q{PNAME}, |
4349
|
|
|
|
|
|
|
$tracelevel) |
4350
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4351
|
|
|
|
|
|
|
|
4352
|
|
|
|
|
|
|
|
4353
|
106
|
50
|
|
|
|
193
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1]}; |
|
106
|
|
|
|
|
188
|
|
4354
|
106
|
50
|
|
|
|
225
|
unless (defined $_tok) |
4355
|
|
|
|
|
|
|
{ |
4356
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
4357
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4358
|
0
|
|
|
|
|
0
|
last; |
4359
|
|
|
|
|
|
|
} |
4360
|
106
|
50
|
|
|
|
204
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
4361
|
|
|
|
|
|
|
. $_tok . q{])}, |
4362
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4363
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4364
|
106
|
|
|
|
|
146
|
push @item, $_tok; |
4365
|
106
|
|
|
|
|
182
|
$item{__ACTION1__}=$_tok; |
4366
|
|
|
|
|
|
|
|
4367
|
|
|
|
|
|
|
|
4368
|
106
|
50
|
|
|
|
209
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/\\w+/]<<}, |
4369
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4370
|
|
|
|
|
|
|
q{PNAME}, |
4371
|
|
|
|
|
|
|
$tracelevel) |
4372
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4373
|
|
|
|
|
|
|
|
4374
|
|
|
|
|
|
|
|
4375
|
|
|
|
|
|
|
|
4376
|
106
|
|
|
|
|
125
|
$_matched = 1; |
4377
|
106
|
|
|
|
|
169
|
last; |
4378
|
|
|
|
|
|
|
} |
4379
|
|
|
|
|
|
|
|
4380
|
|
|
|
|
|
|
|
4381
|
176
|
100
|
66
|
|
|
584
|
unless ( $_matched || defined($score) ) |
4382
|
|
|
|
|
|
|
{ |
4383
|
|
|
|
|
|
|
|
4384
|
|
|
|
|
|
|
|
4385
|
70
|
|
|
|
|
109
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
4386
|
70
|
50
|
|
|
|
137
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
4387
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4388
|
|
|
|
|
|
|
q{PNAME}, |
4389
|
|
|
|
|
|
|
$tracelevel) |
4390
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4391
|
70
|
|
|
|
|
421
|
return undef; |
4392
|
|
|
|
|
|
|
} |
4393
|
106
|
50
|
33
|
|
|
280
|
if (!defined($return) && defined($score)) |
4394
|
|
|
|
|
|
|
{ |
4395
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
4396
|
|
|
|
|
|
|
q{PNAME}, |
4397
|
|
|
|
|
|
|
$tracelevel) |
4398
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4399
|
0
|
|
|
|
|
0
|
$return = $score_return; |
4400
|
|
|
|
|
|
|
} |
4401
|
106
|
|
|
|
|
115
|
splice @{$thisparser->{errors}}, $err_at; |
|
106
|
|
|
|
|
209
|
|
4402
|
106
|
50
|
|
|
|
203
|
$return = $item[$#item] unless defined $return; |
4403
|
106
|
50
|
|
|
|
215
|
if (defined $::RD_TRACE) |
4404
|
|
|
|
|
|
|
{ |
4405
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
4406
|
|
|
|
|
|
|
$return . q{])}, "", |
4407
|
|
|
|
|
|
|
q{PNAME}, |
4408
|
|
|
|
|
|
|
$tracelevel); |
4409
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
4410
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
4411
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4412
|
|
|
|
|
|
|
, q{PNAME}, |
4413
|
|
|
|
|
|
|
$tracelevel) |
4414
|
|
|
|
|
|
|
} |
4415
|
106
|
|
|
|
|
189
|
$_[1] = $text; |
4416
|
106
|
|
|
|
|
761
|
return $return; |
4417
|
|
|
|
|
|
|
} |
4418
|
|
|
|
|
|
|
|
4419
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
4420
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::NOTSQUOTE |
4421
|
|
|
|
|
|
|
{ |
4422
|
24
|
|
|
24
|
|
29
|
my $thisparser = $_[0]; |
4423
|
2
|
|
|
2
|
|
11
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1727
|
|
4424
|
24
|
|
50
|
|
|
50
|
local $tracelevel = ($tracelevel||0)+1; |
4425
|
24
|
|
|
|
|
25
|
$ERRORS = 0; |
4426
|
24
|
|
|
|
|
42
|
my $thisrule = $thisparser->{"rules"}{"NOTSQUOTE"}; |
4427
|
|
|
|
|
|
|
|
4428
|
24
|
50
|
|
|
|
44
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [NOTSQUOTE]}, |
4429
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4430
|
|
|
|
|
|
|
q{NOTSQUOTE}, |
4431
|
|
|
|
|
|
|
$tracelevel) |
4432
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4433
|
|
|
|
|
|
|
|
4434
|
|
|
|
|
|
|
|
4435
|
24
|
|
|
|
|
17
|
my $err_at = @{$thisparser->{errors}}; |
|
24
|
|
|
|
|
41
|
|
4436
|
|
|
|
|
|
|
|
4437
|
24
|
|
|
|
|
28
|
my $score; |
4438
|
|
|
|
|
|
|
my $score_return; |
4439
|
0
|
|
|
|
|
0
|
my $_tok; |
4440
|
24
|
|
|
|
|
22
|
my $return = undef; |
4441
|
24
|
|
|
|
|
29
|
my $_matched=0; |
4442
|
24
|
|
|
|
|
24
|
my $commit=0; |
4443
|
24
|
|
|
|
|
28
|
my @item = (); |
4444
|
24
|
|
|
|
|
28
|
my %item = (); |
4445
|
24
|
|
|
|
|
27
|
my $repeating = $_[2]; |
4446
|
24
|
|
|
|
|
25
|
my $_noactions = $_[3]; |
4447
|
24
|
50
|
|
|
|
44
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
24
|
|
|
|
|
21
|
|
|
24
|
|
|
|
|
39
|
|
4448
|
24
|
|
|
|
|
28
|
my $_itempos = $_[5]; |
4449
|
24
|
50
|
|
|
|
52
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
4450
|
24
|
|
|
|
|
28
|
my $text; |
4451
|
|
|
|
|
|
|
my $lastsep; |
4452
|
0
|
|
|
|
|
0
|
my $current_match; |
4453
|
24
|
|
|
|
|
43
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/[^']*[^'\\\\]/}); |
4454
|
24
|
|
|
|
|
44
|
$expectation->at($_[1]); |
4455
|
|
|
|
|
|
|
|
4456
|
24
|
|
|
|
|
23
|
my $thisline; |
4457
|
24
|
|
|
|
|
56
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
4458
|
|
|
|
|
|
|
|
4459
|
|
|
|
|
|
|
|
4460
|
|
|
|
|
|
|
|
4461
|
24
|
|
33
|
|
|
80
|
while (!$_matched && !$commit) |
4462
|
|
|
|
|
|
|
{ |
4463
|
|
|
|
|
|
|
|
4464
|
24
|
50
|
|
|
|
46
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/[^']*[^'\\\\]/]}, |
4465
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4466
|
|
|
|
|
|
|
q{NOTSQUOTE}, |
4467
|
|
|
|
|
|
|
$tracelevel) |
4468
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4469
|
24
|
|
|
|
|
42
|
my $thisprod = $thisrule->{"prods"}[0]; |
4470
|
24
|
|
|
|
|
28
|
$text = $_[1]; |
4471
|
24
|
|
|
|
|
23
|
my $_savetext; |
4472
|
24
|
|
|
|
|
29
|
@item = (q{NOTSQUOTE}); |
4473
|
24
|
|
|
|
|
67
|
%item = (__RULE__ => q{NOTSQUOTE}); |
4474
|
24
|
|
|
|
|
27
|
my $repcount = 0; |
4475
|
|
|
|
|
|
|
|
4476
|
|
|
|
|
|
|
|
4477
|
24
|
50
|
|
|
|
46
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/[^']*[^'\\\\]/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
4478
|
|
|
|
|
|
|
q{NOTSQUOTE}, |
4479
|
|
|
|
|
|
|
$tracelevel) |
4480
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4481
|
24
|
|
|
|
|
27
|
undef $lastsep; |
4482
|
24
|
|
|
|
|
42
|
$expectation->is(q{})->at($text); |
4483
|
|
|
|
|
|
|
|
4484
|
|
|
|
|
|
|
|
4485
|
24
|
50
|
33
|
|
|
140
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[^']*[^'\\])/) |
|
24
|
50
|
|
|
|
196
|
|
4486
|
|
|
|
|
|
|
{ |
4487
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
4488
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
4489
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
4490
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4491
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4492
|
|
|
|
|
|
|
|
4493
|
0
|
|
|
|
|
0
|
last; |
4494
|
|
|
|
|
|
|
} |
4495
|
24
|
|
|
|
|
107
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
4496
|
24
|
|
|
|
|
70
|
substr($text,0,length($current_match),q{}); |
4497
|
24
|
50
|
|
|
|
46
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
4498
|
|
|
|
|
|
|
. $current_match . q{])}, |
4499
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4500
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4501
|
24
|
|
|
|
|
45
|
push @item, $item{__PATTERN1__}=$current_match; |
4502
|
|
|
|
|
|
|
|
4503
|
|
|
|
|
|
|
|
4504
|
24
|
50
|
|
|
|
42
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/[^']*[^'\\\\]/]<<}, |
4505
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4506
|
|
|
|
|
|
|
q{NOTSQUOTE}, |
4507
|
|
|
|
|
|
|
$tracelevel) |
4508
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4509
|
|
|
|
|
|
|
|
4510
|
|
|
|
|
|
|
|
4511
|
|
|
|
|
|
|
|
4512
|
24
|
|
|
|
|
26
|
$_matched = 1; |
4513
|
24
|
|
|
|
|
36
|
last; |
4514
|
|
|
|
|
|
|
} |
4515
|
|
|
|
|
|
|
|
4516
|
|
|
|
|
|
|
|
4517
|
24
|
50
|
33
|
|
|
59
|
unless ( $_matched || defined($score) ) |
4518
|
|
|
|
|
|
|
{ |
4519
|
|
|
|
|
|
|
|
4520
|
|
|
|
|
|
|
|
4521
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
4522
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
4523
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4524
|
|
|
|
|
|
|
q{NOTSQUOTE}, |
4525
|
|
|
|
|
|
|
$tracelevel) |
4526
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4527
|
0
|
|
|
|
|
0
|
return undef; |
4528
|
|
|
|
|
|
|
} |
4529
|
24
|
50
|
33
|
|
|
98
|
if (!defined($return) && defined($score)) |
4530
|
|
|
|
|
|
|
{ |
4531
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
4532
|
|
|
|
|
|
|
q{NOTSQUOTE}, |
4533
|
|
|
|
|
|
|
$tracelevel) |
4534
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4535
|
0
|
|
|
|
|
0
|
$return = $score_return; |
4536
|
|
|
|
|
|
|
} |
4537
|
24
|
|
|
|
|
25
|
splice @{$thisparser->{errors}}, $err_at; |
|
24
|
|
|
|
|
43
|
|
4538
|
24
|
50
|
|
|
|
55
|
$return = $item[$#item] unless defined $return; |
4539
|
24
|
50
|
|
|
|
48
|
if (defined $::RD_TRACE) |
4540
|
|
|
|
|
|
|
{ |
4541
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
4542
|
|
|
|
|
|
|
$return . q{])}, "", |
4543
|
|
|
|
|
|
|
q{NOTSQUOTE}, |
4544
|
|
|
|
|
|
|
$tracelevel); |
4545
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
4546
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
4547
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4548
|
|
|
|
|
|
|
, q{NOTSQUOTE}, |
4549
|
|
|
|
|
|
|
$tracelevel) |
4550
|
|
|
|
|
|
|
} |
4551
|
24
|
|
|
|
|
34
|
$_[1] = $text; |
4552
|
24
|
|
|
|
|
155
|
return $return; |
4553
|
|
|
|
|
|
|
} |
4554
|
|
|
|
|
|
|
|
4555
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
4556
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::INCLUDE |
4557
|
|
|
|
|
|
|
{ |
4558
|
140
|
|
|
140
|
|
186
|
my $thisparser = $_[0]; |
4559
|
2
|
|
|
2
|
|
11
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
3046
|
|
4560
|
140
|
|
50
|
|
|
344
|
local $tracelevel = ($tracelevel||0)+1; |
4561
|
140
|
|
|
|
|
178
|
$ERRORS = 0; |
4562
|
140
|
|
|
|
|
247
|
my $thisrule = $thisparser->{"rules"}{"INCLUDE"}; |
4563
|
|
|
|
|
|
|
|
4564
|
140
|
50
|
|
|
|
556
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [INCLUDE]}, |
4565
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4566
|
|
|
|
|
|
|
q{INCLUDE}, |
4567
|
|
|
|
|
|
|
$tracelevel) |
4568
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4569
|
|
|
|
|
|
|
|
4570
|
|
|
|
|
|
|
|
4571
|
140
|
|
|
|
|
145
|
my $err_at = @{$thisparser->{errors}}; |
|
140
|
|
|
|
|
217
|
|
4572
|
|
|
|
|
|
|
|
4573
|
140
|
|
|
|
|
177
|
my $score; |
4574
|
|
|
|
|
|
|
my $score_return; |
4575
|
0
|
|
|
|
|
0
|
my $_tok; |
4576
|
140
|
|
|
|
|
195
|
my $return = undef; |
4577
|
140
|
|
|
|
|
171
|
my $_matched=0; |
4578
|
140
|
|
|
|
|
137
|
my $commit=0; |
4579
|
140
|
|
|
|
|
181
|
my @item = (); |
4580
|
140
|
|
|
|
|
191
|
my %item = (); |
4581
|
140
|
|
|
|
|
182
|
my $repeating = $_[2]; |
4582
|
140
|
|
|
|
|
162
|
my $_noactions = $_[3]; |
4583
|
140
|
50
|
|
|
|
252
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
140
|
|
|
|
|
201
|
|
|
140
|
|
|
|
|
271
|
|
4584
|
140
|
|
|
|
|
187
|
my $_itempos = $_[5]; |
4585
|
140
|
50
|
|
|
|
362
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
4586
|
140
|
|
|
|
|
225
|
my $text; |
4587
|
|
|
|
|
|
|
my $lastsep; |
4588
|
0
|
|
|
|
|
0
|
my $current_match; |
4589
|
140
|
|
|
|
|
313
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/\\/\\S+\\.scen/, or /[^\\/#]\\S+\\.scen/}); |
4590
|
140
|
|
|
|
|
307
|
$expectation->at($_[1]); |
4591
|
|
|
|
|
|
|
|
4592
|
140
|
|
|
|
|
143
|
my $thisline; |
4593
|
140
|
|
|
|
|
351
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
4594
|
|
|
|
|
|
|
|
4595
|
|
|
|
|
|
|
|
4596
|
|
|
|
|
|
|
|
4597
|
140
|
|
33
|
|
|
524
|
while (!$_matched && !$commit) |
4598
|
|
|
|
|
|
|
{ |
4599
|
|
|
|
|
|
|
|
4600
|
140
|
50
|
|
|
|
296
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/\\/\\S+\\.scen/]}, |
4601
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4602
|
|
|
|
|
|
|
q{INCLUDE}, |
4603
|
|
|
|
|
|
|
$tracelevel) |
4604
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4605
|
140
|
|
|
|
|
238
|
my $thisprod = $thisrule->{"prods"}[0]; |
4606
|
140
|
|
|
|
|
191
|
$text = $_[1]; |
4607
|
140
|
|
|
|
|
175
|
my $_savetext; |
4608
|
140
|
|
|
|
|
225
|
@item = (q{INCLUDE}); |
4609
|
140
|
|
|
|
|
252
|
%item = (__RULE__ => q{INCLUDE}); |
4610
|
140
|
|
|
|
|
167
|
my $repcount = 0; |
4611
|
|
|
|
|
|
|
|
4612
|
|
|
|
|
|
|
|
4613
|
140
|
50
|
|
|
|
276
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/\\/\\S+\\.scen/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
4614
|
|
|
|
|
|
|
q{INCLUDE}, |
4615
|
|
|
|
|
|
|
$tracelevel) |
4616
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4617
|
140
|
|
|
|
|
185
|
undef $lastsep; |
4618
|
140
|
|
|
|
|
318
|
$expectation->is(q{})->at($text); |
4619
|
|
|
|
|
|
|
|
4620
|
|
|
|
|
|
|
|
4621
|
140
|
100
|
33
|
|
|
723
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\/\S+\.scen)/) |
|
140
|
50
|
|
|
|
1286
|
|
4622
|
|
|
|
|
|
|
{ |
4623
|
140
|
50
|
|
|
|
360
|
$text = $lastsep . $text if defined $lastsep; |
4624
|
140
|
|
|
|
|
349
|
$expectation->failed(); |
4625
|
140
|
50
|
|
|
|
261
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
4626
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4627
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4628
|
|
|
|
|
|
|
|
4629
|
140
|
|
|
|
|
248
|
last; |
4630
|
|
|
|
|
|
|
} |
4631
|
0
|
|
|
|
|
0
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
4632
|
0
|
|
|
|
|
0
|
substr($text,0,length($current_match),q{}); |
4633
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
4634
|
|
|
|
|
|
|
. $current_match . q{])}, |
4635
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4636
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4637
|
0
|
|
|
|
|
0
|
push @item, $item{__PATTERN1__}=$current_match; |
4638
|
|
|
|
|
|
|
|
4639
|
|
|
|
|
|
|
|
4640
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
4641
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4642
|
|
|
|
|
|
|
q{INCLUDE}, |
4643
|
|
|
|
|
|
|
$tracelevel) |
4644
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4645
|
|
|
|
|
|
|
|
4646
|
|
|
|
|
|
|
|
4647
|
0
|
0
|
|
|
|
0
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1]}; |
|
0
|
|
|
|
|
0
|
|
4648
|
0
|
0
|
|
|
|
0
|
unless (defined $_tok) |
4649
|
|
|
|
|
|
|
{ |
4650
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
4651
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4652
|
0
|
|
|
|
|
0
|
last; |
4653
|
|
|
|
|
|
|
} |
4654
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
4655
|
|
|
|
|
|
|
. $_tok . q{])}, |
4656
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4657
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4658
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
4659
|
0
|
|
|
|
|
0
|
$item{__ACTION1__}=$_tok; |
4660
|
|
|
|
|
|
|
|
4661
|
|
|
|
|
|
|
|
4662
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/\\/\\S+\\.scen/]<<}, |
4663
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4664
|
|
|
|
|
|
|
q{INCLUDE}, |
4665
|
|
|
|
|
|
|
$tracelevel) |
4666
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4667
|
|
|
|
|
|
|
|
4668
|
|
|
|
|
|
|
|
4669
|
|
|
|
|
|
|
|
4670
|
0
|
|
|
|
|
0
|
$_matched = 1; |
4671
|
0
|
|
|
|
|
0
|
last; |
4672
|
|
|
|
|
|
|
} |
4673
|
|
|
|
|
|
|
|
4674
|
|
|
|
|
|
|
|
4675
|
140
|
|
33
|
|
|
507
|
while (!$_matched && !$commit) |
4676
|
|
|
|
|
|
|
{ |
4677
|
|
|
|
|
|
|
|
4678
|
140
|
50
|
|
|
|
267
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/[^\\/#]\\S+\\.scen/]}, |
4679
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4680
|
|
|
|
|
|
|
q{INCLUDE}, |
4681
|
|
|
|
|
|
|
$tracelevel) |
4682
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4683
|
140
|
|
|
|
|
253
|
my $thisprod = $thisrule->{"prods"}[1]; |
4684
|
140
|
|
|
|
|
213
|
$text = $_[1]; |
4685
|
140
|
|
|
|
|
145
|
my $_savetext; |
4686
|
140
|
|
|
|
|
248
|
@item = (q{INCLUDE}); |
4687
|
140
|
|
|
|
|
482
|
%item = (__RULE__ => q{INCLUDE}); |
4688
|
140
|
|
|
|
|
183
|
my $repcount = 0; |
4689
|
|
|
|
|
|
|
|
4690
|
|
|
|
|
|
|
|
4691
|
140
|
50
|
|
|
|
248
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/[^\\/#]\\S+\\.scen/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
4692
|
|
|
|
|
|
|
q{INCLUDE}, |
4693
|
|
|
|
|
|
|
$tracelevel) |
4694
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4695
|
140
|
|
|
|
|
162
|
undef $lastsep; |
4696
|
140
|
|
|
|
|
283
|
$expectation->is(q{})->at($text); |
4697
|
|
|
|
|
|
|
|
4698
|
|
|
|
|
|
|
|
4699
|
140
|
100
|
66
|
|
|
576
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[^\/#]\S+\.scen)/) |
|
140
|
100
|
|
|
|
1194
|
|
4700
|
|
|
|
|
|
|
{ |
4701
|
139
|
50
|
|
|
|
355
|
$text = $lastsep . $text if defined $lastsep; |
4702
|
139
|
|
|
|
|
325
|
$expectation->failed(); |
4703
|
139
|
50
|
|
|
|
288
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
4704
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4705
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4706
|
|
|
|
|
|
|
|
4707
|
139
|
|
|
|
|
211
|
last; |
4708
|
|
|
|
|
|
|
} |
4709
|
1
|
|
|
|
|
7
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
4710
|
1
|
|
|
|
|
4
|
substr($text,0,length($current_match),q{}); |
4711
|
1
|
50
|
|
|
|
5
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
4712
|
|
|
|
|
|
|
. $current_match . q{])}, |
4713
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4714
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4715
|
1
|
|
|
|
|
7
|
push @item, $item{__PATTERN1__}=$current_match; |
4716
|
|
|
|
|
|
|
|
4717
|
|
|
|
|
|
|
|
4718
|
1
|
50
|
|
|
|
4
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
4719
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4720
|
|
|
|
|
|
|
q{INCLUDE}, |
4721
|
|
|
|
|
|
|
$tracelevel) |
4722
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4723
|
|
|
|
|
|
|
|
4724
|
|
|
|
|
|
|
|
4725
|
1
|
50
|
|
|
|
4
|
$_tok = ($_noactions) ? 0 : do { my $from_file = $arg[0]; |
|
1
|
|
|
|
|
2
|
|
4726
|
1
|
50
|
|
|
|
4
|
if (length $from_file) { |
4727
|
1
|
|
|
|
|
79
|
$return = dirname($from_file) . "/$item[1]"; |
4728
|
|
|
|
|
|
|
} else { |
4729
|
0
|
|
|
|
|
0
|
$return = "./$item[1]"; |
4730
|
|
|
|
|
|
|
} |
4731
|
|
|
|
|
|
|
}; |
4732
|
1
|
50
|
|
|
|
6
|
unless (defined $_tok) |
4733
|
|
|
|
|
|
|
{ |
4734
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
4735
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4736
|
0
|
|
|
|
|
0
|
last; |
4737
|
|
|
|
|
|
|
} |
4738
|
1
|
50
|
|
|
|
5
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
4739
|
|
|
|
|
|
|
. $_tok . q{])}, |
4740
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4741
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4742
|
1
|
|
|
|
|
3
|
push @item, $_tok; |
4743
|
1
|
|
|
|
|
4
|
$item{__ACTION1__}=$_tok; |
4744
|
|
|
|
|
|
|
|
4745
|
|
|
|
|
|
|
|
4746
|
1
|
50
|
|
|
|
3
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/[^\\/#]\\S+\\.scen/]<<}, |
4747
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4748
|
|
|
|
|
|
|
q{INCLUDE}, |
4749
|
|
|
|
|
|
|
$tracelevel) |
4750
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4751
|
|
|
|
|
|
|
|
4752
|
|
|
|
|
|
|
|
4753
|
|
|
|
|
|
|
|
4754
|
1
|
|
|
|
|
4
|
$_matched = 1; |
4755
|
1
|
|
|
|
|
3
|
last; |
4756
|
|
|
|
|
|
|
} |
4757
|
|
|
|
|
|
|
|
4758
|
|
|
|
|
|
|
|
4759
|
140
|
100
|
66
|
|
|
595
|
unless ( $_matched || defined($score) ) |
4760
|
|
|
|
|
|
|
{ |
4761
|
|
|
|
|
|
|
|
4762
|
|
|
|
|
|
|
|
4763
|
139
|
|
|
|
|
206
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
4764
|
139
|
50
|
|
|
|
265
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
4765
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4766
|
|
|
|
|
|
|
q{INCLUDE}, |
4767
|
|
|
|
|
|
|
$tracelevel) |
4768
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4769
|
139
|
|
|
|
|
933
|
return undef; |
4770
|
|
|
|
|
|
|
} |
4771
|
1
|
50
|
33
|
|
|
5
|
if (!defined($return) && defined($score)) |
4772
|
|
|
|
|
|
|
{ |
4773
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
4774
|
|
|
|
|
|
|
q{INCLUDE}, |
4775
|
|
|
|
|
|
|
$tracelevel) |
4776
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4777
|
0
|
|
|
|
|
0
|
$return = $score_return; |
4778
|
|
|
|
|
|
|
} |
4779
|
1
|
|
|
|
|
2
|
splice @{$thisparser->{errors}}, $err_at; |
|
1
|
|
|
|
|
2
|
|
4780
|
1
|
50
|
|
|
|
4
|
$return = $item[$#item] unless defined $return; |
4781
|
1
|
50
|
|
|
|
4
|
if (defined $::RD_TRACE) |
4782
|
|
|
|
|
|
|
{ |
4783
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
4784
|
|
|
|
|
|
|
$return . q{])}, "", |
4785
|
|
|
|
|
|
|
q{INCLUDE}, |
4786
|
|
|
|
|
|
|
$tracelevel); |
4787
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
4788
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
4789
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4790
|
|
|
|
|
|
|
, q{INCLUDE}, |
4791
|
|
|
|
|
|
|
$tracelevel) |
4792
|
|
|
|
|
|
|
} |
4793
|
1
|
|
|
|
|
3
|
$_[1] = $text; |
4794
|
1
|
|
|
|
|
8
|
return $return; |
4795
|
|
|
|
|
|
|
} |
4796
|
|
|
|
|
|
|
|
4797
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
4798
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BLOCK |
4799
|
|
|
|
|
|
|
{ |
4800
|
140
|
|
|
140
|
|
182
|
my $thisparser = $_[0]; |
4801
|
2
|
|
|
2
|
|
12
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
728
|
|
4802
|
140
|
|
50
|
|
|
330
|
local $tracelevel = ($tracelevel||0)+1; |
4803
|
140
|
|
|
|
|
158
|
$ERRORS = 0; |
4804
|
140
|
|
|
|
|
264
|
my $thisrule = $thisparser->{"rules"}{"BLOCK"}; |
4805
|
|
|
|
|
|
|
|
4806
|
140
|
50
|
|
|
|
328
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [BLOCK]}, |
4807
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4808
|
|
|
|
|
|
|
q{BLOCK}, |
4809
|
|
|
|
|
|
|
$tracelevel) |
4810
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4811
|
|
|
|
|
|
|
|
4812
|
|
|
|
|
|
|
|
4813
|
140
|
|
|
|
|
148
|
my $err_at = @{$thisparser->{errors}}; |
|
140
|
|
|
|
|
236
|
|
4814
|
|
|
|
|
|
|
|
4815
|
140
|
|
|
|
|
180
|
my $score; |
4816
|
|
|
|
|
|
|
my $score_return; |
4817
|
0
|
|
|
|
|
0
|
my $_tok; |
4818
|
140
|
|
|
|
|
173
|
my $return = undef; |
4819
|
140
|
|
|
|
|
293
|
my $_matched=0; |
4820
|
140
|
|
|
|
|
145
|
my $commit=0; |
4821
|
140
|
|
|
|
|
194
|
my @item = (); |
4822
|
140
|
|
|
|
|
206
|
my %item = (); |
4823
|
140
|
|
|
|
|
170
|
my $repeating = $_[2]; |
4824
|
140
|
|
|
|
|
186
|
my $_noactions = $_[3]; |
4825
|
140
|
50
|
|
|
|
280
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
140
|
|
|
|
|
139
|
|
|
140
|
|
|
|
|
263
|
|
4826
|
140
|
|
|
|
|
193
|
my $_itempos = $_[5]; |
4827
|
140
|
50
|
|
|
|
375
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
4828
|
140
|
|
|
|
|
253
|
my $text; |
4829
|
|
|
|
|
|
|
my $lastsep; |
4830
|
0
|
|
|
|
|
0
|
my $current_match; |
4831
|
140
|
|
|
|
|
274
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{INCLUDE, or SCENMODULE, or TBNAME}); |
4832
|
140
|
|
|
|
|
300
|
$expectation->at($_[1]); |
4833
|
|
|
|
|
|
|
|
4834
|
140
|
|
|
|
|
157
|
my $thisline; |
4835
|
140
|
|
|
|
|
355
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
4836
|
|
|
|
|
|
|
|
4837
|
|
|
|
|
|
|
|
4838
|
|
|
|
|
|
|
|
4839
|
140
|
|
33
|
|
|
498
|
while (!$_matched && !$commit) |
4840
|
|
|
|
|
|
|
{ |
4841
|
|
|
|
|
|
|
|
4842
|
140
|
50
|
|
|
|
291
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [INCLUDE]}, |
4843
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4844
|
|
|
|
|
|
|
q{BLOCK}, |
4845
|
|
|
|
|
|
|
$tracelevel) |
4846
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4847
|
140
|
|
|
|
|
242
|
my $thisprod = $thisrule->{"prods"}[0]; |
4848
|
140
|
|
|
|
|
182
|
$text = $_[1]; |
4849
|
140
|
|
|
|
|
193
|
my $_savetext; |
4850
|
140
|
|
|
|
|
217
|
@item = (q{BLOCK}); |
4851
|
140
|
|
|
|
|
275
|
%item = (__RULE__ => q{BLOCK}); |
4852
|
140
|
|
|
|
|
164
|
my $repcount = 0; |
4853
|
|
|
|
|
|
|
|
4854
|
|
|
|
|
|
|
|
4855
|
140
|
50
|
|
|
|
297
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [INCLUDE]}, |
4856
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4857
|
|
|
|
|
|
|
q{BLOCK}, |
4858
|
|
|
|
|
|
|
$tracelevel) |
4859
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4860
|
2
|
|
|
2
|
|
10
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
944
|
|
|
140
|
|
|
|
|
142
|
|
4861
|
140
|
|
|
|
|
280
|
$expectation->is(q{})->at($text); |
4862
|
140
|
100
|
|
140
|
|
548
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::INCLUDE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
140
|
|
|
|
|
289
|
|
4863
|
|
|
|
|
|
|
{ |
4864
|
|
|
|
|
|
|
|
4865
|
139
|
50
|
|
|
|
270
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [INCLUDE]>>}, |
4866
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4867
|
|
|
|
|
|
|
q{BLOCK}, |
4868
|
|
|
|
|
|
|
$tracelevel) |
4869
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4870
|
139
|
|
|
|
|
285
|
$expectation->failed(); |
4871
|
139
|
|
|
|
|
198
|
last; |
4872
|
|
|
|
|
|
|
} |
4873
|
1
|
50
|
|
|
|
6
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [INCLUDE]<< (return value: [} |
4874
|
|
|
|
|
|
|
. $_tok . q{]}, |
4875
|
|
|
|
|
|
|
|
4876
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4877
|
|
|
|
|
|
|
q{BLOCK}, |
4878
|
|
|
|
|
|
|
$tracelevel) |
4879
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4880
|
1
|
|
|
|
|
3
|
$item{q{INCLUDE}} = $_tok; |
4881
|
1
|
|
|
|
|
3
|
push @item, $_tok; |
4882
|
|
|
|
|
|
|
|
4883
|
|
|
|
|
|
|
} |
4884
|
|
|
|
|
|
|
|
4885
|
1
|
50
|
|
|
|
3
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
4886
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4887
|
|
|
|
|
|
|
q{BLOCK}, |
4888
|
|
|
|
|
|
|
$tracelevel) |
4889
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4890
|
|
|
|
|
|
|
|
4891
|
|
|
|
|
|
|
|
4892
|
1
|
50
|
|
|
|
4
|
$_tok = ($_noactions) ? 0 : do { |
4893
|
1
|
|
|
|
|
8
|
my $included = read_file( $item{INCLUDE}, binmode => ':utf8' ); |
4894
|
1
|
|
|
|
|
226
|
my $result = $thisparser->startrule( $included, 1, $item{INCLUDE} ); |
4895
|
1
|
50
|
33
|
|
|
12
|
if (defined $result and ref $result eq 'ARRAY') { |
4896
|
1
|
|
|
|
|
4
|
$return = [@$result]; |
4897
|
|
|
|
|
|
|
} else { |
4898
|
0
|
|
|
|
|
0
|
$return = undef; |
4899
|
|
|
|
|
|
|
} |
4900
|
|
|
|
|
|
|
}; |
4901
|
1
|
50
|
|
|
|
5
|
unless (defined $_tok) |
4902
|
|
|
|
|
|
|
{ |
4903
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
4904
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4905
|
0
|
|
|
|
|
0
|
last; |
4906
|
|
|
|
|
|
|
} |
4907
|
1
|
50
|
|
|
|
4
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
4908
|
|
|
|
|
|
|
. $_tok . q{])}, |
4909
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
4910
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4911
|
1
|
|
|
|
|
3
|
push @item, $_tok; |
4912
|
1
|
|
|
|
|
3
|
$item{__ACTION1__}=$_tok; |
4913
|
|
|
|
|
|
|
|
4914
|
|
|
|
|
|
|
|
4915
|
1
|
50
|
|
|
|
6
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [INCLUDE]<<}, |
4916
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4917
|
|
|
|
|
|
|
q{BLOCK}, |
4918
|
|
|
|
|
|
|
$tracelevel) |
4919
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4920
|
|
|
|
|
|
|
|
4921
|
|
|
|
|
|
|
|
4922
|
|
|
|
|
|
|
|
4923
|
1
|
|
|
|
|
3
|
$_matched = 1; |
4924
|
1
|
|
|
|
|
2
|
last; |
4925
|
|
|
|
|
|
|
} |
4926
|
|
|
|
|
|
|
|
4927
|
|
|
|
|
|
|
|
4928
|
140
|
|
66
|
|
|
627
|
while (!$_matched && !$commit) |
4929
|
|
|
|
|
|
|
{ |
4930
|
|
|
|
|
|
|
|
4931
|
139
|
50
|
|
|
|
284
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [SCENMODULE PARAMS]}, |
4932
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
4933
|
|
|
|
|
|
|
q{BLOCK}, |
4934
|
|
|
|
|
|
|
$tracelevel) |
4935
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4936
|
139
|
|
|
|
|
245
|
my $thisprod = $thisrule->{"prods"}[1]; |
4937
|
139
|
|
|
|
|
204
|
$text = $_[1]; |
4938
|
139
|
|
|
|
|
242
|
my $_savetext; |
4939
|
139
|
|
|
|
|
245
|
@item = (q{BLOCK}); |
4940
|
139
|
|
|
|
|
273
|
%item = (__RULE__ => q{BLOCK}); |
4941
|
139
|
|
|
|
|
152
|
my $repcount = 0; |
4942
|
|
|
|
|
|
|
|
4943
|
|
|
|
|
|
|
|
4944
|
139
|
50
|
|
|
|
261
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [SCENMODULE]}, |
4945
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4946
|
|
|
|
|
|
|
q{BLOCK}, |
4947
|
|
|
|
|
|
|
$tracelevel) |
4948
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4949
|
2
|
|
|
2
|
|
10
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
485
|
|
|
139
|
|
|
|
|
147
|
|
4950
|
139
|
|
|
|
|
272
|
$expectation->is(q{})->at($text); |
4951
|
139
|
50
|
|
139
|
|
581
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SCENMODULE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
139
|
|
|
|
|
271
|
|
4952
|
|
|
|
|
|
|
{ |
4953
|
|
|
|
|
|
|
|
4954
|
139
|
50
|
|
|
|
295
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [SCENMODULE]>>}, |
4955
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4956
|
|
|
|
|
|
|
q{BLOCK}, |
4957
|
|
|
|
|
|
|
$tracelevel) |
4958
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4959
|
139
|
|
|
|
|
257
|
$expectation->failed(); |
4960
|
139
|
|
|
|
|
192
|
last; |
4961
|
|
|
|
|
|
|
} |
4962
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [SCENMODULE]<< (return value: [} |
4963
|
|
|
|
|
|
|
. $_tok . q{]}, |
4964
|
|
|
|
|
|
|
|
4965
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4966
|
|
|
|
|
|
|
q{BLOCK}, |
4967
|
|
|
|
|
|
|
$tracelevel) |
4968
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4969
|
0
|
|
|
|
|
0
|
$item{q{SCENMODULE}} = $_tok; |
4970
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
4971
|
|
|
|
|
|
|
|
4972
|
|
|
|
|
|
|
} |
4973
|
|
|
|
|
|
|
|
4974
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PARAMS]}, |
4975
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4976
|
|
|
|
|
|
|
q{BLOCK}, |
4977
|
|
|
|
|
|
|
$tracelevel) |
4978
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4979
|
2
|
|
|
2
|
|
11
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1423
|
|
|
0
|
|
|
|
|
0
|
|
4980
|
0
|
|
|
|
|
0
|
$expectation->is(q{PARAMS})->at($text); |
4981
|
0
|
0
|
|
0
|
|
0
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAMS($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
0
|
|
|
|
|
0
|
|
4982
|
|
|
|
|
|
|
{ |
4983
|
|
|
|
|
|
|
|
4984
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PARAMS]>>}, |
4985
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4986
|
|
|
|
|
|
|
q{BLOCK}, |
4987
|
|
|
|
|
|
|
$tracelevel) |
4988
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4989
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
4990
|
0
|
|
|
|
|
0
|
last; |
4991
|
|
|
|
|
|
|
} |
4992
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PARAMS]<< (return value: [} |
4993
|
|
|
|
|
|
|
. $_tok . q{]}, |
4994
|
|
|
|
|
|
|
|
4995
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
4996
|
|
|
|
|
|
|
q{BLOCK}, |
4997
|
|
|
|
|
|
|
$tracelevel) |
4998
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
4999
|
0
|
|
|
|
|
0
|
$item{q{PARAMS}} = $_tok; |
5000
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
5001
|
|
|
|
|
|
|
|
5002
|
|
|
|
|
|
|
} |
5003
|
|
|
|
|
|
|
|
5004
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
5005
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5006
|
|
|
|
|
|
|
q{BLOCK}, |
5007
|
|
|
|
|
|
|
$tracelevel) |
5008
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5009
|
|
|
|
|
|
|
|
5010
|
|
|
|
|
|
|
|
5011
|
0
|
0
|
|
|
|
0
|
$_tok = ($_noactions) ? 0 : do { |
5012
|
0
|
|
|
|
|
0
|
my $modulename = $item{SCENMODULE}; |
5013
|
0
|
0
|
|
|
|
0
|
eval "use $modulename; 1;" or die "Can't use $modulename !\n$@\n"; |
5014
|
0
|
|
|
|
|
0
|
my %params = map {my ($name,$value) = split /=/, $_, 2; ($name, $value)} @{$item{PARAMS}}; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
5015
|
0
|
|
|
|
|
0
|
my $scenmod = $modulename->new(\%params); |
5016
|
0
|
|
|
|
|
0
|
my $string = $scenmod->get_scenario_string(); |
5017
|
0
|
|
|
|
|
0
|
my $result = $thisparser->startrule( $string, 0, '' ); |
5018
|
0
|
0
|
0
|
|
|
0
|
if (defined $result and ref $result eq 'ARRAY') { |
5019
|
0
|
|
|
|
|
0
|
$return = [@$result]; |
5020
|
|
|
|
|
|
|
} else { |
5021
|
0
|
|
|
|
|
0
|
log_fatal "Syntax error in '$modulename' scenario:\n<BEGIN SCENARIO>\n$string\n<END SCENARIO>"; |
5022
|
|
|
|
|
|
|
} |
5023
|
|
|
|
|
|
|
}; |
5024
|
0
|
0
|
|
|
|
0
|
unless (defined $_tok) |
5025
|
|
|
|
|
|
|
{ |
5026
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
5027
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5028
|
0
|
|
|
|
|
0
|
last; |
5029
|
|
|
|
|
|
|
} |
5030
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
5031
|
|
|
|
|
|
|
. $_tok . q{])}, |
5032
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5033
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5034
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
5035
|
0
|
|
|
|
|
0
|
$item{__ACTION1__}=$_tok; |
5036
|
|
|
|
|
|
|
|
5037
|
|
|
|
|
|
|
|
5038
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [SCENMODULE PARAMS]<<}, |
5039
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5040
|
|
|
|
|
|
|
q{BLOCK}, |
5041
|
|
|
|
|
|
|
$tracelevel) |
5042
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5043
|
|
|
|
|
|
|
|
5044
|
|
|
|
|
|
|
|
5045
|
|
|
|
|
|
|
|
5046
|
0
|
|
|
|
|
0
|
$_matched = 1; |
5047
|
0
|
|
|
|
|
0
|
last; |
5048
|
|
|
|
|
|
|
} |
5049
|
|
|
|
|
|
|
|
5050
|
|
|
|
|
|
|
|
5051
|
140
|
|
66
|
|
|
590
|
while (!$_matched && !$commit) |
5052
|
|
|
|
|
|
|
{ |
5053
|
|
|
|
|
|
|
|
5054
|
139
|
50
|
|
|
|
379
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [SCENMODULE]}, |
5055
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5056
|
|
|
|
|
|
|
q{BLOCK}, |
5057
|
|
|
|
|
|
|
$tracelevel) |
5058
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5059
|
139
|
|
|
|
|
233
|
my $thisprod = $thisrule->{"prods"}[2]; |
5060
|
139
|
|
|
|
|
206
|
$text = $_[1]; |
5061
|
139
|
|
|
|
|
138
|
my $_savetext; |
5062
|
139
|
|
|
|
|
244
|
@item = (q{BLOCK}); |
5063
|
139
|
|
|
|
|
284
|
%item = (__RULE__ => q{BLOCK}); |
5064
|
139
|
|
|
|
|
158
|
my $repcount = 0; |
5065
|
|
|
|
|
|
|
|
5066
|
|
|
|
|
|
|
|
5067
|
139
|
50
|
|
|
|
318
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [SCENMODULE]}, |
5068
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5069
|
|
|
|
|
|
|
q{BLOCK}, |
5070
|
|
|
|
|
|
|
$tracelevel) |
5071
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5072
|
2
|
|
|
2
|
|
13
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
1463
|
|
|
139
|
|
|
|
|
147
|
|
5073
|
139
|
|
|
|
|
263
|
$expectation->is(q{})->at($text); |
5074
|
139
|
50
|
|
139
|
|
501
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SCENMODULE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
139
|
|
|
|
|
293
|
|
5075
|
|
|
|
|
|
|
{ |
5076
|
|
|
|
|
|
|
|
5077
|
139
|
50
|
|
|
|
275
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [SCENMODULE]>>}, |
5078
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5079
|
|
|
|
|
|
|
q{BLOCK}, |
5080
|
|
|
|
|
|
|
$tracelevel) |
5081
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5082
|
139
|
|
|
|
|
270
|
$expectation->failed(); |
5083
|
139
|
|
|
|
|
194
|
last; |
5084
|
|
|
|
|
|
|
} |
5085
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [SCENMODULE]<< (return value: [} |
5086
|
|
|
|
|
|
|
. $_tok . q{]}, |
5087
|
|
|
|
|
|
|
|
5088
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5089
|
|
|
|
|
|
|
q{BLOCK}, |
5090
|
|
|
|
|
|
|
$tracelevel) |
5091
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5092
|
0
|
|
|
|
|
0
|
$item{q{SCENMODULE}} = $_tok; |
5093
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
5094
|
|
|
|
|
|
|
|
5095
|
|
|
|
|
|
|
} |
5096
|
|
|
|
|
|
|
|
5097
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
5098
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5099
|
|
|
|
|
|
|
q{BLOCK}, |
5100
|
|
|
|
|
|
|
$tracelevel) |
5101
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5102
|
|
|
|
|
|
|
|
5103
|
|
|
|
|
|
|
|
5104
|
0
|
0
|
|
|
|
0
|
$_tok = ($_noactions) ? 0 : do { |
5105
|
0
|
|
|
|
|
0
|
my $modulename = $item{SCENMODULE}; |
5106
|
0
|
0
|
|
|
|
0
|
eval "use $modulename; 1;" or die "Can't use $modulename !\n$@\n"; |
5107
|
0
|
|
|
|
|
0
|
my $scenmod = $modulename->new(); |
5108
|
0
|
|
|
|
|
0
|
my $string = $scenmod->get_scenario_string(); |
5109
|
0
|
|
|
|
|
0
|
my $result = $thisparser->startrule( $string, 0, '' ); |
5110
|
0
|
0
|
0
|
|
|
0
|
if (defined $result and ref $result eq 'ARRAY') { |
5111
|
0
|
|
|
|
|
0
|
$return = [@$result]; |
5112
|
|
|
|
|
|
|
} else { |
5113
|
0
|
|
|
|
|
0
|
log_fatal "Syntax error in '$modulename' scenario:\n<BEGIN SCENARIO>\n$string\n<END SCENARIO>"; |
5114
|
|
|
|
|
|
|
} |
5115
|
|
|
|
|
|
|
}; |
5116
|
0
|
0
|
|
|
|
0
|
unless (defined $_tok) |
5117
|
|
|
|
|
|
|
{ |
5118
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
5119
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5120
|
0
|
|
|
|
|
0
|
last; |
5121
|
|
|
|
|
|
|
} |
5122
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
5123
|
|
|
|
|
|
|
. $_tok . q{])}, |
5124
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5125
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5126
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
5127
|
0
|
|
|
|
|
0
|
$item{__ACTION1__}=$_tok; |
5128
|
|
|
|
|
|
|
|
5129
|
|
|
|
|
|
|
|
5130
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [SCENMODULE]<<}, |
5131
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5132
|
|
|
|
|
|
|
q{BLOCK}, |
5133
|
|
|
|
|
|
|
$tracelevel) |
5134
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5135
|
|
|
|
|
|
|
|
5136
|
|
|
|
|
|
|
|
5137
|
|
|
|
|
|
|
|
5138
|
0
|
|
|
|
|
0
|
$_matched = 1; |
5139
|
0
|
|
|
|
|
0
|
last; |
5140
|
|
|
|
|
|
|
} |
5141
|
|
|
|
|
|
|
|
5142
|
|
|
|
|
|
|
|
5143
|
140
|
|
66
|
|
|
589
|
while (!$_matched && !$commit) |
5144
|
|
|
|
|
|
|
{ |
5145
|
|
|
|
|
|
|
|
5146
|
139
|
50
|
|
|
|
268
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [TBNAME PARAMS]}, |
5147
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5148
|
|
|
|
|
|
|
q{BLOCK}, |
5149
|
|
|
|
|
|
|
$tracelevel) |
5150
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5151
|
139
|
|
|
|
|
228
|
my $thisprod = $thisrule->{"prods"}[3]; |
5152
|
139
|
|
|
|
|
197
|
$text = $_[1]; |
5153
|
139
|
|
|
|
|
138
|
my $_savetext; |
5154
|
139
|
|
|
|
|
247
|
@item = (q{BLOCK}); |
5155
|
139
|
|
|
|
|
268
|
%item = (__RULE__ => q{BLOCK}); |
5156
|
139
|
|
|
|
|
173
|
my $repcount = 0; |
5157
|
|
|
|
|
|
|
|
5158
|
|
|
|
|
|
|
|
5159
|
139
|
50
|
|
|
|
262
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [TBNAME]}, |
5160
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5161
|
|
|
|
|
|
|
q{BLOCK}, |
5162
|
|
|
|
|
|
|
$tracelevel) |
5163
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5164
|
2
|
|
|
2
|
|
13
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
540
|
|
|
139
|
|
|
|
|
138
|
|
5165
|
139
|
|
|
|
|
301
|
$expectation->is(q{})->at($text); |
5166
|
139
|
100
|
|
139
|
|
570
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::TBNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
139
|
|
|
|
|
323
|
|
5167
|
|
|
|
|
|
|
{ |
5168
|
|
|
|
|
|
|
|
5169
|
78
|
50
|
|
|
|
164
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [TBNAME]>>}, |
5170
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5171
|
|
|
|
|
|
|
q{BLOCK}, |
5172
|
|
|
|
|
|
|
$tracelevel) |
5173
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5174
|
78
|
|
|
|
|
124
|
$expectation->failed(); |
5175
|
78
|
|
|
|
|
108
|
last; |
5176
|
|
|
|
|
|
|
} |
5177
|
61
|
50
|
|
|
|
357
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [TBNAME]<< (return value: [} |
5178
|
|
|
|
|
|
|
. $_tok . q{]}, |
5179
|
|
|
|
|
|
|
|
5180
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5181
|
|
|
|
|
|
|
q{BLOCK}, |
5182
|
|
|
|
|
|
|
$tracelevel) |
5183
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5184
|
61
|
|
|
|
|
111
|
$item{q{TBNAME}} = $_tok; |
5185
|
61
|
|
|
|
|
95
|
push @item, $_tok; |
5186
|
|
|
|
|
|
|
|
5187
|
|
|
|
|
|
|
} |
5188
|
|
|
|
|
|
|
|
5189
|
61
|
50
|
|
|
|
124
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PARAMS]}, |
5190
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5191
|
|
|
|
|
|
|
q{BLOCK}, |
5192
|
|
|
|
|
|
|
$tracelevel) |
5193
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5194
|
2
|
|
|
2
|
|
13
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1160
|
|
|
61
|
|
|
|
|
72
|
|
5195
|
61
|
|
|
|
|
134
|
$expectation->is(q{PARAMS})->at($text); |
5196
|
61
|
100
|
|
61
|
|
296
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAMS($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
61
|
|
|
|
|
127
|
|
5197
|
|
|
|
|
|
|
{ |
5198
|
|
|
|
|
|
|
|
5199
|
35
|
50
|
|
|
|
84
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PARAMS]>>}, |
5200
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5201
|
|
|
|
|
|
|
q{BLOCK}, |
5202
|
|
|
|
|
|
|
$tracelevel) |
5203
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5204
|
35
|
|
|
|
|
66
|
$expectation->failed(); |
5205
|
35
|
|
|
|
|
53
|
last; |
5206
|
|
|
|
|
|
|
} |
5207
|
26
|
50
|
|
|
|
109
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PARAMS]<< (return value: [} |
5208
|
|
|
|
|
|
|
. $_tok . q{]}, |
5209
|
|
|
|
|
|
|
|
5210
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5211
|
|
|
|
|
|
|
q{BLOCK}, |
5212
|
|
|
|
|
|
|
$tracelevel) |
5213
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5214
|
26
|
|
|
|
|
54
|
$item{q{PARAMS}} = $_tok; |
5215
|
26
|
|
|
|
|
46
|
push @item, $_tok; |
5216
|
|
|
|
|
|
|
|
5217
|
|
|
|
|
|
|
} |
5218
|
|
|
|
|
|
|
|
5219
|
26
|
50
|
|
|
|
68
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
5220
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5221
|
|
|
|
|
|
|
q{BLOCK}, |
5222
|
|
|
|
|
|
|
$tracelevel) |
5223
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5224
|
|
|
|
|
|
|
|
5225
|
|
|
|
|
|
|
|
5226
|
26
|
50
|
|
|
|
49
|
$_tok = ($_noactions) ? 0 : do {$return = [{ |
5227
|
|
|
|
|
|
|
block_name=>$item{TBNAME}, |
5228
|
|
|
|
|
|
|
block_parameters=>$item{PARAMS}, |
5229
|
26
|
|
|
|
|
157
|
}] |
5230
|
|
|
|
|
|
|
}; |
5231
|
26
|
50
|
|
|
|
65
|
unless (defined $_tok) |
5232
|
|
|
|
|
|
|
{ |
5233
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
5234
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5235
|
0
|
|
|
|
|
0
|
last; |
5236
|
|
|
|
|
|
|
} |
5237
|
26
|
50
|
|
|
|
63
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
5238
|
|
|
|
|
|
|
. $_tok . q{])}, |
5239
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5240
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5241
|
26
|
|
|
|
|
37
|
push @item, $_tok; |
5242
|
26
|
|
|
|
|
46
|
$item{__ACTION1__}=$_tok; |
5243
|
|
|
|
|
|
|
|
5244
|
|
|
|
|
|
|
|
5245
|
26
|
50
|
|
|
|
60
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [TBNAME PARAMS]<<}, |
5246
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5247
|
|
|
|
|
|
|
q{BLOCK}, |
5248
|
|
|
|
|
|
|
$tracelevel) |
5249
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5250
|
|
|
|
|
|
|
|
5251
|
|
|
|
|
|
|
|
5252
|
|
|
|
|
|
|
|
5253
|
26
|
|
|
|
|
39
|
$_matched = 1; |
5254
|
26
|
|
|
|
|
49
|
last; |
5255
|
|
|
|
|
|
|
} |
5256
|
|
|
|
|
|
|
|
5257
|
|
|
|
|
|
|
|
5258
|
140
|
|
66
|
|
|
565
|
while (!$_matched && !$commit) |
5259
|
|
|
|
|
|
|
{ |
5260
|
|
|
|
|
|
|
|
5261
|
113
|
50
|
|
|
|
248
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [TBNAME]}, |
5262
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5263
|
|
|
|
|
|
|
q{BLOCK}, |
5264
|
|
|
|
|
|
|
$tracelevel) |
5265
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5266
|
113
|
|
|
|
|
197
|
my $thisprod = $thisrule->{"prods"}[4]; |
5267
|
113
|
|
|
|
|
157
|
$text = $_[1]; |
5268
|
113
|
|
|
|
|
109
|
my $_savetext; |
5269
|
113
|
|
|
|
|
207
|
@item = (q{BLOCK}); |
5270
|
113
|
|
|
|
|
240
|
%item = (__RULE__ => q{BLOCK}); |
5271
|
113
|
|
|
|
|
151
|
my $repcount = 0; |
5272
|
|
|
|
|
|
|
|
5273
|
|
|
|
|
|
|
|
5274
|
113
|
50
|
|
|
|
221
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [TBNAME]}, |
5275
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5276
|
|
|
|
|
|
|
q{BLOCK}, |
5277
|
|
|
|
|
|
|
$tracelevel) |
5278
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5279
|
2
|
|
|
2
|
|
12
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
2097
|
|
|
113
|
|
|
|
|
123
|
|
5280
|
113
|
|
|
|
|
231
|
$expectation->is(q{})->at($text); |
5281
|
113
|
100
|
|
113
|
|
434
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::TBNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
113
|
|
|
|
|
212
|
|
5282
|
|
|
|
|
|
|
{ |
5283
|
|
|
|
|
|
|
|
5284
|
78
|
50
|
|
|
|
165
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [TBNAME]>>}, |
5285
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5286
|
|
|
|
|
|
|
q{BLOCK}, |
5287
|
|
|
|
|
|
|
$tracelevel) |
5288
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5289
|
78
|
|
|
|
|
145
|
$expectation->failed(); |
5290
|
78
|
|
|
|
|
103
|
last; |
5291
|
|
|
|
|
|
|
} |
5292
|
35
|
50
|
|
|
|
125
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [TBNAME]<< (return value: [} |
5293
|
|
|
|
|
|
|
. $_tok . q{]}, |
5294
|
|
|
|
|
|
|
|
5295
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5296
|
|
|
|
|
|
|
q{BLOCK}, |
5297
|
|
|
|
|
|
|
$tracelevel) |
5298
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5299
|
35
|
|
|
|
|
53
|
$item{q{TBNAME}} = $_tok; |
5300
|
35
|
|
|
|
|
59
|
push @item, $_tok; |
5301
|
|
|
|
|
|
|
|
5302
|
|
|
|
|
|
|
} |
5303
|
|
|
|
|
|
|
|
5304
|
35
|
50
|
|
|
|
73
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
5305
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5306
|
|
|
|
|
|
|
q{BLOCK}, |
5307
|
|
|
|
|
|
|
$tracelevel) |
5308
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5309
|
|
|
|
|
|
|
|
5310
|
|
|
|
|
|
|
|
5311
|
35
|
50
|
|
|
|
61
|
$_tok = ($_noactions) ? 0 : do {$return = [{ |
5312
|
|
|
|
|
|
|
block_name=>$item{TBNAME}, |
5313
|
35
|
|
|
|
|
147
|
block_parameters=>[], |
5314
|
|
|
|
|
|
|
}] |
5315
|
|
|
|
|
|
|
}; |
5316
|
35
|
50
|
|
|
|
88
|
unless (defined $_tok) |
5317
|
|
|
|
|
|
|
{ |
5318
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
5319
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5320
|
0
|
|
|
|
|
0
|
last; |
5321
|
|
|
|
|
|
|
} |
5322
|
35
|
50
|
|
|
|
92
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
5323
|
|
|
|
|
|
|
. $_tok . q{])}, |
5324
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5325
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5326
|
35
|
|
|
|
|
53
|
push @item, $_tok; |
5327
|
35
|
|
|
|
|
58
|
$item{__ACTION1__}=$_tok; |
5328
|
|
|
|
|
|
|
|
5329
|
|
|
|
|
|
|
|
5330
|
35
|
50
|
|
|
|
75
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [TBNAME]<<}, |
5331
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5332
|
|
|
|
|
|
|
q{BLOCK}, |
5333
|
|
|
|
|
|
|
$tracelevel) |
5334
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5335
|
|
|
|
|
|
|
|
5336
|
|
|
|
|
|
|
|
5337
|
|
|
|
|
|
|
|
5338
|
35
|
|
|
|
|
40
|
$_matched = 1; |
5339
|
35
|
|
|
|
|
46
|
last; |
5340
|
|
|
|
|
|
|
} |
5341
|
|
|
|
|
|
|
|
5342
|
|
|
|
|
|
|
|
5343
|
140
|
100
|
66
|
|
|
560
|
unless ( $_matched || defined($score) ) |
5344
|
|
|
|
|
|
|
{ |
5345
|
|
|
|
|
|
|
|
5346
|
|
|
|
|
|
|
|
5347
|
78
|
|
|
|
|
103
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
5348
|
78
|
50
|
|
|
|
170
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
5349
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5350
|
|
|
|
|
|
|
q{BLOCK}, |
5351
|
|
|
|
|
|
|
$tracelevel) |
5352
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5353
|
78
|
|
|
|
|
454
|
return undef; |
5354
|
|
|
|
|
|
|
} |
5355
|
62
|
50
|
33
|
|
|
173
|
if (!defined($return) && defined($score)) |
5356
|
|
|
|
|
|
|
{ |
5357
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
5358
|
|
|
|
|
|
|
q{BLOCK}, |
5359
|
|
|
|
|
|
|
$tracelevel) |
5360
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5361
|
0
|
|
|
|
|
0
|
$return = $score_return; |
5362
|
|
|
|
|
|
|
} |
5363
|
62
|
|
|
|
|
64
|
splice @{$thisparser->{errors}}, $err_at; |
|
62
|
|
|
|
|
219
|
|
5364
|
62
|
50
|
|
|
|
140
|
$return = $item[$#item] unless defined $return; |
5365
|
62
|
50
|
|
|
|
131
|
if (defined $::RD_TRACE) |
5366
|
|
|
|
|
|
|
{ |
5367
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
5368
|
|
|
|
|
|
|
$return . q{])}, "", |
5369
|
|
|
|
|
|
|
q{BLOCK}, |
5370
|
|
|
|
|
|
|
$tracelevel); |
5371
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
5372
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
5373
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5374
|
|
|
|
|
|
|
, q{BLOCK}, |
5375
|
|
|
|
|
|
|
$tracelevel) |
5376
|
|
|
|
|
|
|
} |
5377
|
62
|
|
|
|
|
105
|
$_[1] = $text; |
5378
|
62
|
|
|
|
|
484
|
return $return; |
5379
|
|
|
|
|
|
|
} |
5380
|
|
|
|
|
|
|
|
5381
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
5382
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SLASHEDDQUOTE |
5383
|
|
|
|
|
|
|
{ |
5384
|
16
|
|
|
16
|
|
21
|
my $thisparser = $_[0]; |
5385
|
2
|
|
|
2
|
|
15
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
2207
|
|
5386
|
16
|
|
50
|
|
|
39
|
local $tracelevel = ($tracelevel||0)+1; |
5387
|
16
|
|
|
|
|
17
|
$ERRORS = 0; |
5388
|
16
|
|
|
|
|
23
|
my $thisrule = $thisparser->{"rules"}{"SLASHEDDQUOTE"}; |
5389
|
|
|
|
|
|
|
|
5390
|
16
|
50
|
|
|
|
34
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [SLASHEDDQUOTE]}, |
5391
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5392
|
|
|
|
|
|
|
q{SLASHEDDQUOTE}, |
5393
|
|
|
|
|
|
|
$tracelevel) |
5394
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5395
|
|
|
|
|
|
|
|
5396
|
|
|
|
|
|
|
|
5397
|
16
|
|
|
|
|
15
|
my $err_at = @{$thisparser->{errors}}; |
|
16
|
|
|
|
|
24
|
|
5398
|
|
|
|
|
|
|
|
5399
|
16
|
|
|
|
|
20
|
my $score; |
5400
|
|
|
|
|
|
|
my $score_return; |
5401
|
0
|
|
|
|
|
0
|
my $_tok; |
5402
|
16
|
|
|
|
|
20
|
my $return = undef; |
5403
|
16
|
|
|
|
|
14
|
my $_matched=0; |
5404
|
16
|
|
|
|
|
22
|
my $commit=0; |
5405
|
16
|
|
|
|
|
21
|
my @item = (); |
5406
|
16
|
|
|
|
|
23
|
my %item = (); |
5407
|
16
|
|
|
|
|
16
|
my $repeating = $_[2]; |
5408
|
16
|
|
|
|
|
17
|
my $_noactions = $_[3]; |
5409
|
16
|
50
|
|
|
|
31
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
16
|
|
|
|
|
18
|
|
|
16
|
|
|
|
|
27
|
|
5410
|
16
|
|
|
|
|
22
|
my $_itempos = $_[5]; |
5411
|
16
|
50
|
|
|
|
40
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
5412
|
16
|
|
|
|
|
20
|
my $text; |
5413
|
|
|
|
|
|
|
my $lastsep; |
5414
|
0
|
|
|
|
|
0
|
my $current_match; |
5415
|
16
|
|
|
|
|
31
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/\\\\"/}); |
5416
|
16
|
|
|
|
|
33
|
$expectation->at($_[1]); |
5417
|
|
|
|
|
|
|
|
5418
|
16
|
|
|
|
|
13
|
my $thisline; |
5419
|
16
|
|
|
|
|
41
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
5420
|
|
|
|
|
|
|
|
5421
|
|
|
|
|
|
|
|
5422
|
|
|
|
|
|
|
|
5423
|
16
|
|
33
|
|
|
55
|
while (!$_matched && !$commit) |
5424
|
|
|
|
|
|
|
{ |
5425
|
|
|
|
|
|
|
|
5426
|
16
|
50
|
|
|
|
30
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/\\\\"/]}, |
5427
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5428
|
|
|
|
|
|
|
q{SLASHEDDQUOTE}, |
5429
|
|
|
|
|
|
|
$tracelevel) |
5430
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5431
|
16
|
|
|
|
|
26
|
my $thisprod = $thisrule->{"prods"}[0]; |
5432
|
16
|
|
|
|
|
18
|
$text = $_[1]; |
5433
|
16
|
|
|
|
|
16
|
my $_savetext; |
5434
|
16
|
|
|
|
|
30
|
@item = (q{SLASHEDDQUOTE}); |
5435
|
16
|
|
|
|
|
27
|
%item = (__RULE__ => q{SLASHEDDQUOTE}); |
5436
|
16
|
|
|
|
|
18
|
my $repcount = 0; |
5437
|
|
|
|
|
|
|
|
5438
|
|
|
|
|
|
|
|
5439
|
16
|
50
|
|
|
|
28
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/\\\\"/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
5440
|
|
|
|
|
|
|
q{SLASHEDDQUOTE}, |
5441
|
|
|
|
|
|
|
$tracelevel) |
5442
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5443
|
16
|
|
|
|
|
19
|
undef $lastsep; |
5444
|
16
|
|
|
|
|
32
|
$expectation->is(q{})->at($text); |
5445
|
|
|
|
|
|
|
|
5446
|
|
|
|
|
|
|
|
5447
|
16
|
50
|
66
|
|
|
65
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\\")/) |
|
16
|
100
|
|
|
|
127
|
|
5448
|
|
|
|
|
|
|
{ |
5449
|
8
|
50
|
|
|
|
24
|
$text = $lastsep . $text if defined $lastsep; |
5450
|
8
|
|
|
|
|
23
|
$expectation->failed(); |
5451
|
8
|
50
|
|
|
|
16
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
5452
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5453
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5454
|
|
|
|
|
|
|
|
5455
|
8
|
|
|
|
|
12
|
last; |
5456
|
|
|
|
|
|
|
} |
5457
|
8
|
|
|
|
|
35
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
5458
|
8
|
|
|
|
|
25
|
substr($text,0,length($current_match),q{}); |
5459
|
8
|
50
|
|
|
|
17
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
5460
|
|
|
|
|
|
|
. $current_match . q{])}, |
5461
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5462
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5463
|
8
|
|
|
|
|
20
|
push @item, $item{__PATTERN1__}=$current_match; |
5464
|
|
|
|
|
|
|
|
5465
|
|
|
|
|
|
|
|
5466
|
8
|
50
|
|
|
|
17
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
5467
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5468
|
|
|
|
|
|
|
q{SLASHEDDQUOTE}, |
5469
|
|
|
|
|
|
|
$tracelevel) |
5470
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5471
|
|
|
|
|
|
|
|
5472
|
|
|
|
|
|
|
|
5473
|
8
|
50
|
|
|
|
12
|
$_tok = ($_noactions) ? 0 : do {$return = '"'}; |
|
8
|
|
|
|
|
16
|
|
5474
|
8
|
50
|
|
|
|
20
|
unless (defined $_tok) |
5475
|
|
|
|
|
|
|
{ |
5476
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
5477
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5478
|
0
|
|
|
|
|
0
|
last; |
5479
|
|
|
|
|
|
|
} |
5480
|
8
|
50
|
|
|
|
16
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
5481
|
|
|
|
|
|
|
. $_tok . q{])}, |
5482
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5483
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5484
|
8
|
|
|
|
|
15
|
push @item, $_tok; |
5485
|
8
|
|
|
|
|
15
|
$item{__ACTION1__}=$_tok; |
5486
|
|
|
|
|
|
|
|
5487
|
|
|
|
|
|
|
|
5488
|
8
|
50
|
|
|
|
17
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/\\\\"/]<<}, |
5489
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5490
|
|
|
|
|
|
|
q{SLASHEDDQUOTE}, |
5491
|
|
|
|
|
|
|
$tracelevel) |
5492
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5493
|
|
|
|
|
|
|
|
5494
|
|
|
|
|
|
|
|
5495
|
|
|
|
|
|
|
|
5496
|
8
|
|
|
|
|
9
|
$_matched = 1; |
5497
|
8
|
|
|
|
|
14
|
last; |
5498
|
|
|
|
|
|
|
} |
5499
|
|
|
|
|
|
|
|
5500
|
|
|
|
|
|
|
|
5501
|
16
|
100
|
66
|
|
|
54
|
unless ( $_matched || defined($score) ) |
5502
|
|
|
|
|
|
|
{ |
5503
|
|
|
|
|
|
|
|
5504
|
|
|
|
|
|
|
|
5505
|
8
|
|
|
|
|
14
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
5506
|
8
|
50
|
|
|
|
16
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
5507
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5508
|
|
|
|
|
|
|
q{SLASHEDDQUOTE}, |
5509
|
|
|
|
|
|
|
$tracelevel) |
5510
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5511
|
8
|
|
|
|
|
48
|
return undef; |
5512
|
|
|
|
|
|
|
} |
5513
|
8
|
50
|
33
|
|
|
21
|
if (!defined($return) && defined($score)) |
5514
|
|
|
|
|
|
|
{ |
5515
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
5516
|
|
|
|
|
|
|
q{SLASHEDDQUOTE}, |
5517
|
|
|
|
|
|
|
$tracelevel) |
5518
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5519
|
0
|
|
|
|
|
0
|
$return = $score_return; |
5520
|
|
|
|
|
|
|
} |
5521
|
8
|
|
|
|
|
12
|
splice @{$thisparser->{errors}}, $err_at; |
|
8
|
|
|
|
|
18
|
|
5522
|
8
|
50
|
|
|
|
19
|
$return = $item[$#item] unless defined $return; |
5523
|
8
|
50
|
|
|
|
20
|
if (defined $::RD_TRACE) |
5524
|
|
|
|
|
|
|
{ |
5525
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
5526
|
|
|
|
|
|
|
$return . q{])}, "", |
5527
|
|
|
|
|
|
|
q{SLASHEDDQUOTE}, |
5528
|
|
|
|
|
|
|
$tracelevel); |
5529
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
5530
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
5531
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5532
|
|
|
|
|
|
|
, q{SLASHEDDQUOTE}, |
5533
|
|
|
|
|
|
|
$tracelevel) |
5534
|
|
|
|
|
|
|
} |
5535
|
8
|
|
|
|
|
12
|
$_[1] = $text; |
5536
|
8
|
|
|
|
|
56
|
return $return; |
5537
|
|
|
|
|
|
|
} |
5538
|
|
|
|
|
|
|
|
5539
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
5540
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::NOTDQUOTE |
5541
|
|
|
|
|
|
|
{ |
5542
|
24
|
|
|
24
|
|
31
|
my $thisparser = $_[0]; |
5543
|
2
|
|
|
2
|
|
12
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
2130
|
|
5544
|
24
|
|
50
|
|
|
59
|
local $tracelevel = ($tracelevel||0)+1; |
5545
|
24
|
|
|
|
|
25
|
$ERRORS = 0; |
5546
|
24
|
|
|
|
|
40
|
my $thisrule = $thisparser->{"rules"}{"NOTDQUOTE"}; |
5547
|
|
|
|
|
|
|
|
5548
|
24
|
50
|
|
|
|
44
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [NOTDQUOTE]}, |
5549
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5550
|
|
|
|
|
|
|
q{NOTDQUOTE}, |
5551
|
|
|
|
|
|
|
$tracelevel) |
5552
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5553
|
|
|
|
|
|
|
|
5554
|
|
|
|
|
|
|
|
5555
|
24
|
|
|
|
|
27
|
my $err_at = @{$thisparser->{errors}}; |
|
24
|
|
|
|
|
37
|
|
5556
|
|
|
|
|
|
|
|
5557
|
24
|
|
|
|
|
27
|
my $score; |
5558
|
|
|
|
|
|
|
my $score_return; |
5559
|
0
|
|
|
|
|
0
|
my $_tok; |
5560
|
24
|
|
|
|
|
28
|
my $return = undef; |
5561
|
24
|
|
|
|
|
24
|
my $_matched=0; |
5562
|
24
|
|
|
|
|
22
|
my $commit=0; |
5563
|
24
|
|
|
|
|
29
|
my @item = (); |
5564
|
24
|
|
|
|
|
29
|
my %item = (); |
5565
|
24
|
|
|
|
|
27
|
my $repeating = $_[2]; |
5566
|
24
|
|
|
|
|
27
|
my $_noactions = $_[3]; |
5567
|
24
|
50
|
|
|
|
44
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
24
|
|
|
|
|
24
|
|
|
24
|
|
|
|
|
40
|
|
5568
|
24
|
|
|
|
|
30
|
my $_itempos = $_[5]; |
5569
|
24
|
50
|
|
|
|
55
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
5570
|
24
|
|
|
|
|
28
|
my $text; |
5571
|
|
|
|
|
|
|
my $lastsep; |
5572
|
0
|
|
|
|
|
0
|
my $current_match; |
5573
|
24
|
|
|
|
|
48
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/[^"]*[^"\\\\]/}); |
5574
|
24
|
|
|
|
|
50
|
$expectation->at($_[1]); |
5575
|
|
|
|
|
|
|
|
5576
|
24
|
|
|
|
|
24
|
my $thisline; |
5577
|
24
|
|
|
|
|
58
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
5578
|
|
|
|
|
|
|
|
5579
|
|
|
|
|
|
|
|
5580
|
|
|
|
|
|
|
|
5581
|
24
|
|
33
|
|
|
74
|
while (!$_matched && !$commit) |
5582
|
|
|
|
|
|
|
{ |
5583
|
|
|
|
|
|
|
|
5584
|
24
|
50
|
|
|
|
46
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/[^"]*[^"\\\\]/]}, |
5585
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5586
|
|
|
|
|
|
|
q{NOTDQUOTE}, |
5587
|
|
|
|
|
|
|
$tracelevel) |
5588
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5589
|
24
|
|
|
|
|
40
|
my $thisprod = $thisrule->{"prods"}[0]; |
5590
|
24
|
|
|
|
|
30
|
$text = $_[1]; |
5591
|
24
|
|
|
|
|
26
|
my $_savetext; |
5592
|
24
|
|
|
|
|
32
|
@item = (q{NOTDQUOTE}); |
5593
|
24
|
|
|
|
|
42
|
%item = (__RULE__ => q{NOTDQUOTE}); |
5594
|
24
|
|
|
|
|
24
|
my $repcount = 0; |
5595
|
|
|
|
|
|
|
|
5596
|
|
|
|
|
|
|
|
5597
|
24
|
50
|
|
|
|
41
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/[^"]*[^"\\\\]/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
5598
|
|
|
|
|
|
|
q{NOTDQUOTE}, |
5599
|
|
|
|
|
|
|
$tracelevel) |
5600
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5601
|
24
|
|
|
|
|
31
|
undef $lastsep; |
5602
|
24
|
|
|
|
|
42
|
$expectation->is(q{})->at($text); |
5603
|
|
|
|
|
|
|
|
5604
|
|
|
|
|
|
|
|
5605
|
24
|
50
|
33
|
|
|
116
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[^"]*[^"\\])/) |
|
24
|
50
|
|
|
|
198
|
|
5606
|
|
|
|
|
|
|
{ |
5607
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
5608
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
5609
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
5610
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5611
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5612
|
|
|
|
|
|
|
|
5613
|
0
|
|
|
|
|
0
|
last; |
5614
|
|
|
|
|
|
|
} |
5615
|
24
|
|
|
|
|
113
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
5616
|
24
|
|
|
|
|
66
|
substr($text,0,length($current_match),q{}); |
5617
|
24
|
50
|
|
|
|
51
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
5618
|
|
|
|
|
|
|
. $current_match . q{])}, |
5619
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5620
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5621
|
24
|
|
|
|
|
42
|
push @item, $item{__PATTERN1__}=$current_match; |
5622
|
|
|
|
|
|
|
|
5623
|
|
|
|
|
|
|
|
5624
|
24
|
50
|
|
|
|
52
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/[^"]*[^"\\\\]/]<<}, |
5625
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5626
|
|
|
|
|
|
|
q{NOTDQUOTE}, |
5627
|
|
|
|
|
|
|
$tracelevel) |
5628
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5629
|
|
|
|
|
|
|
|
5630
|
|
|
|
|
|
|
|
5631
|
|
|
|
|
|
|
|
5632
|
24
|
|
|
|
|
29
|
$_matched = 1; |
5633
|
24
|
|
|
|
|
37
|
last; |
5634
|
|
|
|
|
|
|
} |
5635
|
|
|
|
|
|
|
|
5636
|
|
|
|
|
|
|
|
5637
|
24
|
50
|
33
|
|
|
60
|
unless ( $_matched || defined($score) ) |
5638
|
|
|
|
|
|
|
{ |
5639
|
|
|
|
|
|
|
|
5640
|
|
|
|
|
|
|
|
5641
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
5642
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
5643
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5644
|
|
|
|
|
|
|
q{NOTDQUOTE}, |
5645
|
|
|
|
|
|
|
$tracelevel) |
5646
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5647
|
0
|
|
|
|
|
0
|
return undef; |
5648
|
|
|
|
|
|
|
} |
5649
|
24
|
50
|
33
|
|
|
92
|
if (!defined($return) && defined($score)) |
5650
|
|
|
|
|
|
|
{ |
5651
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
5652
|
|
|
|
|
|
|
q{NOTDQUOTE}, |
5653
|
|
|
|
|
|
|
$tracelevel) |
5654
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5655
|
0
|
|
|
|
|
0
|
$return = $score_return; |
5656
|
|
|
|
|
|
|
} |
5657
|
24
|
|
|
|
|
24
|
splice @{$thisparser->{errors}}, $err_at; |
|
24
|
|
|
|
|
42
|
|
5658
|
24
|
50
|
|
|
|
65
|
$return = $item[$#item] unless defined $return; |
5659
|
24
|
50
|
|
|
|
43
|
if (defined $::RD_TRACE) |
5660
|
|
|
|
|
|
|
{ |
5661
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
5662
|
|
|
|
|
|
|
$return . q{])}, "", |
5663
|
|
|
|
|
|
|
q{NOTDQUOTE}, |
5664
|
|
|
|
|
|
|
$tracelevel); |
5665
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
5666
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
5667
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5668
|
|
|
|
|
|
|
, q{NOTDQUOTE}, |
5669
|
|
|
|
|
|
|
$tracelevel) |
5670
|
|
|
|
|
|
|
} |
5671
|
24
|
|
|
|
|
37
|
$_[1] = $text; |
5672
|
24
|
|
|
|
|
154
|
return $return; |
5673
|
|
|
|
|
|
|
} |
5674
|
|
|
|
|
|
|
|
5675
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
5676
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PTICKED |
5677
|
|
|
|
|
|
|
{ |
5678
|
0
|
|
|
0
|
|
0
|
my $thisparser = $_[0]; |
5679
|
2
|
|
|
2
|
|
13
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
2038
|
|
5680
|
0
|
|
0
|
|
|
0
|
local $tracelevel = ($tracelevel||0)+1; |
5681
|
0
|
|
|
|
|
0
|
$ERRORS = 0; |
5682
|
0
|
|
|
|
|
0
|
my $thisrule = $thisparser->{"rules"}{"PTICKED"}; |
5683
|
|
|
|
|
|
|
|
5684
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [PTICKED]}, |
5685
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5686
|
|
|
|
|
|
|
q{PTICKED}, |
5687
|
|
|
|
|
|
|
$tracelevel) |
5688
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5689
|
|
|
|
|
|
|
|
5690
|
|
|
|
|
|
|
|
5691
|
0
|
|
|
|
|
0
|
my $err_at = @{$thisparser->{errors}}; |
|
0
|
|
|
|
|
0
|
|
5692
|
|
|
|
|
|
|
|
5693
|
0
|
|
|
|
|
0
|
my $score; |
5694
|
|
|
|
|
|
|
my $score_return; |
5695
|
0
|
|
|
|
|
0
|
my $_tok; |
5696
|
0
|
|
|
|
|
0
|
my $return = undef; |
5697
|
0
|
|
|
|
|
0
|
my $_matched=0; |
5698
|
0
|
|
|
|
|
0
|
my $commit=0; |
5699
|
0
|
|
|
|
|
0
|
my @item = (); |
5700
|
0
|
|
|
|
|
0
|
my %item = (); |
5701
|
0
|
|
|
|
|
0
|
my $repeating = $_[2]; |
5702
|
0
|
|
|
|
|
0
|
my $_noactions = $_[3]; |
5703
|
0
|
0
|
|
|
|
0
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
5704
|
0
|
|
|
|
|
0
|
my $_itempos = $_[5]; |
5705
|
0
|
0
|
|
|
|
0
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
5706
|
0
|
|
|
|
|
0
|
my $text; |
5707
|
|
|
|
|
|
|
my $lastsep; |
5708
|
0
|
|
|
|
|
0
|
my $current_match; |
5709
|
0
|
|
|
|
|
0
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/[^`]+/}); |
5710
|
0
|
|
|
|
|
0
|
$expectation->at($_[1]); |
5711
|
|
|
|
|
|
|
|
5712
|
0
|
|
|
|
|
0
|
my $thisline; |
5713
|
0
|
|
|
|
|
0
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
5714
|
|
|
|
|
|
|
|
5715
|
|
|
|
|
|
|
|
5716
|
|
|
|
|
|
|
|
5717
|
0
|
|
0
|
|
|
0
|
while (!$_matched && !$commit) |
5718
|
|
|
|
|
|
|
{ |
5719
|
|
|
|
|
|
|
|
5720
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/[^`]+/]}, |
5721
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5722
|
|
|
|
|
|
|
q{PTICKED}, |
5723
|
|
|
|
|
|
|
$tracelevel) |
5724
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5725
|
0
|
|
|
|
|
0
|
my $thisprod = $thisrule->{"prods"}[0]; |
5726
|
0
|
|
|
|
|
0
|
$text = $_[1]; |
5727
|
0
|
|
|
|
|
0
|
my $_savetext; |
5728
|
0
|
|
|
|
|
0
|
@item = (q{PTICKED}); |
5729
|
0
|
|
|
|
|
0
|
%item = (__RULE__ => q{PTICKED}); |
5730
|
0
|
|
|
|
|
0
|
my $repcount = 0; |
5731
|
|
|
|
|
|
|
|
5732
|
|
|
|
|
|
|
|
5733
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/[^`]+/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
5734
|
|
|
|
|
|
|
q{PTICKED}, |
5735
|
|
|
|
|
|
|
$tracelevel) |
5736
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5737
|
0
|
|
|
|
|
0
|
undef $lastsep; |
5738
|
0
|
|
|
|
|
0
|
$expectation->is(q{})->at($text); |
5739
|
|
|
|
|
|
|
|
5740
|
|
|
|
|
|
|
|
5741
|
0
|
0
|
0
|
|
|
0
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[^`]+)/) |
|
0
|
0
|
|
|
|
0
|
|
5742
|
|
|
|
|
|
|
{ |
5743
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
5744
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
5745
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
5746
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5747
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5748
|
|
|
|
|
|
|
|
5749
|
0
|
|
|
|
|
0
|
last; |
5750
|
|
|
|
|
|
|
} |
5751
|
0
|
|
|
|
|
0
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
5752
|
0
|
|
|
|
|
0
|
substr($text,0,length($current_match),q{}); |
5753
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
5754
|
|
|
|
|
|
|
. $current_match . q{])}, |
5755
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5756
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5757
|
0
|
|
|
|
|
0
|
push @item, $item{__PATTERN1__}=$current_match; |
5758
|
|
|
|
|
|
|
|
5759
|
|
|
|
|
|
|
|
5760
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
5761
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5762
|
|
|
|
|
|
|
q{PTICKED}, |
5763
|
|
|
|
|
|
|
$tracelevel) |
5764
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5765
|
|
|
|
|
|
|
|
5766
|
|
|
|
|
|
|
|
5767
|
0
|
0
|
|
|
|
0
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1]}; |
|
0
|
|
|
|
|
0
|
|
5768
|
0
|
0
|
|
|
|
0
|
unless (defined $_tok) |
5769
|
|
|
|
|
|
|
{ |
5770
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
5771
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5772
|
0
|
|
|
|
|
0
|
last; |
5773
|
|
|
|
|
|
|
} |
5774
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
5775
|
|
|
|
|
|
|
. $_tok . q{])}, |
5776
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5777
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5778
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
5779
|
0
|
|
|
|
|
0
|
$item{__ACTION1__}=$_tok; |
5780
|
|
|
|
|
|
|
|
5781
|
|
|
|
|
|
|
|
5782
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/[^`]+/]<<}, |
5783
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5784
|
|
|
|
|
|
|
q{PTICKED}, |
5785
|
|
|
|
|
|
|
$tracelevel) |
5786
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5787
|
|
|
|
|
|
|
|
5788
|
|
|
|
|
|
|
|
5789
|
|
|
|
|
|
|
|
5790
|
0
|
|
|
|
|
0
|
$_matched = 1; |
5791
|
0
|
|
|
|
|
0
|
last; |
5792
|
|
|
|
|
|
|
} |
5793
|
|
|
|
|
|
|
|
5794
|
|
|
|
|
|
|
|
5795
|
0
|
0
|
0
|
|
|
0
|
unless ( $_matched || defined($score) ) |
5796
|
|
|
|
|
|
|
{ |
5797
|
|
|
|
|
|
|
|
5798
|
|
|
|
|
|
|
|
5799
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
5800
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
5801
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5802
|
|
|
|
|
|
|
q{PTICKED}, |
5803
|
|
|
|
|
|
|
$tracelevel) |
5804
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5805
|
0
|
|
|
|
|
0
|
return undef; |
5806
|
|
|
|
|
|
|
} |
5807
|
0
|
0
|
0
|
|
|
0
|
if (!defined($return) && defined($score)) |
5808
|
|
|
|
|
|
|
{ |
5809
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
5810
|
|
|
|
|
|
|
q{PTICKED}, |
5811
|
|
|
|
|
|
|
$tracelevel) |
5812
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5813
|
0
|
|
|
|
|
0
|
$return = $score_return; |
5814
|
|
|
|
|
|
|
} |
5815
|
0
|
|
|
|
|
0
|
splice @{$thisparser->{errors}}, $err_at; |
|
0
|
|
|
|
|
0
|
|
5816
|
0
|
0
|
|
|
|
0
|
$return = $item[$#item] unless defined $return; |
5817
|
0
|
0
|
|
|
|
0
|
if (defined $::RD_TRACE) |
5818
|
|
|
|
|
|
|
{ |
5819
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
5820
|
|
|
|
|
|
|
$return . q{])}, "", |
5821
|
|
|
|
|
|
|
q{PTICKED}, |
5822
|
|
|
|
|
|
|
$tracelevel); |
5823
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
5824
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
5825
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5826
|
|
|
|
|
|
|
, q{PTICKED}, |
5827
|
|
|
|
|
|
|
$tracelevel) |
5828
|
|
|
|
|
|
|
} |
5829
|
0
|
|
|
|
|
0
|
$_[1] = $text; |
5830
|
0
|
|
|
|
|
0
|
return $return; |
5831
|
|
|
|
|
|
|
} |
5832
|
|
|
|
|
|
|
|
5833
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
5834
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SLASHEDSQUOTE |
5835
|
|
|
|
|
|
|
{ |
5836
|
16
|
|
|
16
|
|
22
|
my $thisparser = $_[0]; |
5837
|
2
|
|
|
2
|
|
18
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
2355
|
|
5838
|
16
|
|
50
|
|
|
39
|
local $tracelevel = ($tracelevel||0)+1; |
5839
|
16
|
|
|
|
|
19
|
$ERRORS = 0; |
5840
|
16
|
|
|
|
|
24
|
my $thisrule = $thisparser->{"rules"}{"SLASHEDSQUOTE"}; |
5841
|
|
|
|
|
|
|
|
5842
|
16
|
50
|
|
|
|
31
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [SLASHEDSQUOTE]}, |
5843
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5844
|
|
|
|
|
|
|
q{SLASHEDSQUOTE}, |
5845
|
|
|
|
|
|
|
$tracelevel) |
5846
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5847
|
|
|
|
|
|
|
|
5848
|
|
|
|
|
|
|
|
5849
|
16
|
|
|
|
|
15
|
my $err_at = @{$thisparser->{errors}}; |
|
16
|
|
|
|
|
24
|
|
5850
|
|
|
|
|
|
|
|
5851
|
16
|
|
|
|
|
18
|
my $score; |
5852
|
|
|
|
|
|
|
my $score_return; |
5853
|
0
|
|
|
|
|
0
|
my $_tok; |
5854
|
16
|
|
|
|
|
16
|
my $return = undef; |
5855
|
16
|
|
|
|
|
17
|
my $_matched=0; |
5856
|
16
|
|
|
|
|
15
|
my $commit=0; |
5857
|
16
|
|
|
|
|
20
|
my @item = (); |
5858
|
16
|
|
|
|
|
19
|
my %item = (); |
5859
|
16
|
|
|
|
|
19
|
my $repeating = $_[2]; |
5860
|
16
|
|
|
|
|
17
|
my $_noactions = $_[3]; |
5861
|
16
|
50
|
|
|
|
28
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
16
|
|
|
|
|
17
|
|
|
16
|
|
|
|
|
28
|
|
5862
|
16
|
|
|
|
|
20
|
my $_itempos = $_[5]; |
5863
|
16
|
50
|
|
|
|
37
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
5864
|
16
|
|
|
|
|
22
|
my $text; |
5865
|
|
|
|
|
|
|
my $lastsep; |
5866
|
0
|
|
|
|
|
0
|
my $current_match; |
5867
|
16
|
|
|
|
|
28
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/\\\\'/}); |
5868
|
16
|
|
|
|
|
33
|
$expectation->at($_[1]); |
5869
|
|
|
|
|
|
|
|
5870
|
16
|
|
|
|
|
14
|
my $thisline; |
5871
|
16
|
|
|
|
|
39
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
5872
|
|
|
|
|
|
|
|
5873
|
|
|
|
|
|
|
|
5874
|
|
|
|
|
|
|
|
5875
|
16
|
|
33
|
|
|
56
|
while (!$_matched && !$commit) |
5876
|
|
|
|
|
|
|
{ |
5877
|
|
|
|
|
|
|
|
5878
|
16
|
50
|
|
|
|
27
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/\\\\'/]}, |
5879
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5880
|
|
|
|
|
|
|
q{SLASHEDSQUOTE}, |
5881
|
|
|
|
|
|
|
$tracelevel) |
5882
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5883
|
16
|
|
|
|
|
27
|
my $thisprod = $thisrule->{"prods"}[0]; |
5884
|
16
|
|
|
|
|
18
|
$text = $_[1]; |
5885
|
16
|
|
|
|
|
16
|
my $_savetext; |
5886
|
16
|
|
|
|
|
20
|
@item = (q{SLASHEDSQUOTE}); |
5887
|
16
|
|
|
|
|
28
|
%item = (__RULE__ => q{SLASHEDSQUOTE}); |
5888
|
16
|
|
|
|
|
18
|
my $repcount = 0; |
5889
|
|
|
|
|
|
|
|
5890
|
|
|
|
|
|
|
|
5891
|
16
|
50
|
|
|
|
29
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/\\\\'/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
5892
|
|
|
|
|
|
|
q{SLASHEDSQUOTE}, |
5893
|
|
|
|
|
|
|
$tracelevel) |
5894
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5895
|
16
|
|
|
|
|
21
|
undef $lastsep; |
5896
|
16
|
|
|
|
|
87
|
$expectation->is(q{})->at($text); |
5897
|
|
|
|
|
|
|
|
5898
|
|
|
|
|
|
|
|
5899
|
16
|
50
|
66
|
|
|
72
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\\')/) |
|
16
|
100
|
|
|
|
116
|
|
5900
|
|
|
|
|
|
|
{ |
5901
|
8
|
50
|
|
|
|
23
|
$text = $lastsep . $text if defined $lastsep; |
5902
|
8
|
|
|
|
|
20
|
$expectation->failed(); |
5903
|
8
|
50
|
|
|
|
16
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
5904
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5905
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5906
|
|
|
|
|
|
|
|
5907
|
8
|
|
|
|
|
15
|
last; |
5908
|
|
|
|
|
|
|
} |
5909
|
8
|
|
|
|
|
34
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
5910
|
8
|
|
|
|
|
24
|
substr($text,0,length($current_match),q{}); |
5911
|
8
|
50
|
|
|
|
16
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
5912
|
|
|
|
|
|
|
. $current_match . q{])}, |
5913
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5914
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5915
|
8
|
|
|
|
|
19
|
push @item, $item{__PATTERN1__}=$current_match; |
5916
|
|
|
|
|
|
|
|
5917
|
|
|
|
|
|
|
|
5918
|
8
|
50
|
|
|
|
17
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
5919
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5920
|
|
|
|
|
|
|
q{SLASHEDSQUOTE}, |
5921
|
|
|
|
|
|
|
$tracelevel) |
5922
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5923
|
|
|
|
|
|
|
|
5924
|
|
|
|
|
|
|
|
5925
|
8
|
50
|
|
|
|
17
|
$_tok = ($_noactions) ? 0 : do {$return = "'"}; |
|
8
|
|
|
|
|
11
|
|
5926
|
8
|
50
|
|
|
|
20
|
unless (defined $_tok) |
5927
|
|
|
|
|
|
|
{ |
5928
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
5929
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5930
|
0
|
|
|
|
|
0
|
last; |
5931
|
|
|
|
|
|
|
} |
5932
|
8
|
50
|
|
|
|
17
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
5933
|
|
|
|
|
|
|
. $_tok . q{])}, |
5934
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
5935
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5936
|
8
|
|
|
|
|
11
|
push @item, $_tok; |
5937
|
8
|
|
|
|
|
13
|
$item{__ACTION1__}=$_tok; |
5938
|
|
|
|
|
|
|
|
5939
|
|
|
|
|
|
|
|
5940
|
8
|
50
|
|
|
|
17
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/\\\\'/]<<}, |
5941
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5942
|
|
|
|
|
|
|
q{SLASHEDSQUOTE}, |
5943
|
|
|
|
|
|
|
$tracelevel) |
5944
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5945
|
|
|
|
|
|
|
|
5946
|
|
|
|
|
|
|
|
5947
|
|
|
|
|
|
|
|
5948
|
8
|
|
|
|
|
9
|
$_matched = 1; |
5949
|
8
|
|
|
|
|
13
|
last; |
5950
|
|
|
|
|
|
|
} |
5951
|
|
|
|
|
|
|
|
5952
|
|
|
|
|
|
|
|
5953
|
16
|
100
|
66
|
|
|
49
|
unless ( $_matched || defined($score) ) |
5954
|
|
|
|
|
|
|
{ |
5955
|
|
|
|
|
|
|
|
5956
|
|
|
|
|
|
|
|
5957
|
8
|
|
|
|
|
11
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
5958
|
8
|
50
|
|
|
|
16
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
5959
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
5960
|
|
|
|
|
|
|
q{SLASHEDSQUOTE}, |
5961
|
|
|
|
|
|
|
$tracelevel) |
5962
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5963
|
8
|
|
|
|
|
45
|
return undef; |
5964
|
|
|
|
|
|
|
} |
5965
|
8
|
50
|
33
|
|
|
23
|
if (!defined($return) && defined($score)) |
5966
|
|
|
|
|
|
|
{ |
5967
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
5968
|
|
|
|
|
|
|
q{SLASHEDSQUOTE}, |
5969
|
|
|
|
|
|
|
$tracelevel) |
5970
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
5971
|
0
|
|
|
|
|
0
|
$return = $score_return; |
5972
|
|
|
|
|
|
|
} |
5973
|
8
|
|
|
|
|
8
|
splice @{$thisparser->{errors}}, $err_at; |
|
8
|
|
|
|
|
17
|
|
5974
|
8
|
50
|
|
|
|
19
|
$return = $item[$#item] unless defined $return; |
5975
|
8
|
50
|
|
|
|
15
|
if (defined $::RD_TRACE) |
5976
|
|
|
|
|
|
|
{ |
5977
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
5978
|
|
|
|
|
|
|
$return . q{])}, "", |
5979
|
|
|
|
|
|
|
q{SLASHEDSQUOTE}, |
5980
|
|
|
|
|
|
|
$tracelevel); |
5981
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
5982
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
5983
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
5984
|
|
|
|
|
|
|
, q{SLASHEDSQUOTE}, |
5985
|
|
|
|
|
|
|
$tracelevel) |
5986
|
|
|
|
|
|
|
} |
5987
|
8
|
|
|
|
|
11
|
$_[1] = $text; |
5988
|
8
|
|
|
|
|
52
|
return $return; |
5989
|
|
|
|
|
|
|
} |
5990
|
|
|
|
|
|
|
|
5991
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
5992
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAMS |
5993
|
|
|
|
|
|
|
{ |
5994
|
89
|
|
|
89
|
|
122
|
my $thisparser = $_[0]; |
5995
|
2
|
|
|
2
|
|
14
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
890
|
|
5996
|
89
|
|
50
|
|
|
217
|
local $tracelevel = ($tracelevel||0)+1; |
5997
|
89
|
|
|
|
|
128
|
$ERRORS = 0; |
5998
|
89
|
|
|
|
|
177
|
my $thisrule = $thisparser->{"rules"}{"PARAMS"}; |
5999
|
|
|
|
|
|
|
|
6000
|
89
|
50
|
|
|
|
177
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [PARAMS]}, |
6001
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6002
|
|
|
|
|
|
|
q{PARAMS}, |
6003
|
|
|
|
|
|
|
$tracelevel) |
6004
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6005
|
|
|
|
|
|
|
|
6006
|
|
|
|
|
|
|
|
6007
|
89
|
|
|
|
|
93
|
my $err_at = @{$thisparser->{errors}}; |
|
89
|
|
|
|
|
153
|
|
6008
|
|
|
|
|
|
|
|
6009
|
89
|
|
|
|
|
104
|
my $score; |
6010
|
|
|
|
|
|
|
my $score_return; |
6011
|
0
|
|
|
|
|
0
|
my $_tok; |
6012
|
89
|
|
|
|
|
103
|
my $return = undef; |
6013
|
89
|
|
|
|
|
97
|
my $_matched=0; |
6014
|
89
|
|
|
|
|
103
|
my $commit=0; |
6015
|
89
|
|
|
|
|
173
|
my @item = (); |
6016
|
89
|
|
|
|
|
134
|
my %item = (); |
6017
|
89
|
|
|
|
|
107
|
my $repeating = $_[2]; |
6018
|
89
|
|
|
|
|
101
|
my $_noactions = $_[3]; |
6019
|
89
|
50
|
|
|
|
191
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
89
|
|
|
|
|
95
|
|
|
89
|
|
|
|
|
148
|
|
6020
|
89
|
|
|
|
|
130
|
my $_itempos = $_[5]; |
6021
|
89
|
50
|
|
|
|
295
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
6022
|
89
|
|
|
|
|
113
|
my $text; |
6023
|
|
|
|
|
|
|
my $lastsep; |
6024
|
0
|
|
|
|
|
0
|
my $current_match; |
6025
|
89
|
|
|
|
|
193
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{PARAM}); |
6026
|
89
|
|
|
|
|
208
|
$expectation->at($_[1]); |
6027
|
|
|
|
|
|
|
|
6028
|
89
|
|
|
|
|
90
|
my $thisline; |
6029
|
89
|
|
|
|
|
253
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
6030
|
|
|
|
|
|
|
|
6031
|
|
|
|
|
|
|
|
6032
|
|
|
|
|
|
|
|
6033
|
89
|
|
33
|
|
|
316
|
while (!$_matched && !$commit) |
6034
|
|
|
|
|
|
|
{ |
6035
|
|
|
|
|
|
|
|
6036
|
89
|
50
|
|
|
|
208
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [PARAM PARAMS]}, |
6037
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6038
|
|
|
|
|
|
|
q{PARAMS}, |
6039
|
|
|
|
|
|
|
$tracelevel) |
6040
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6041
|
89
|
|
|
|
|
158
|
my $thisprod = $thisrule->{"prods"}[0]; |
6042
|
89
|
|
|
|
|
134
|
$text = $_[1]; |
6043
|
89
|
|
|
|
|
85
|
my $_savetext; |
6044
|
89
|
|
|
|
|
146
|
@item = (q{PARAMS}); |
6045
|
89
|
|
|
|
|
175
|
%item = (__RULE__ => q{PARAMS}); |
6046
|
89
|
|
|
|
|
116
|
my $repcount = 0; |
6047
|
|
|
|
|
|
|
|
6048
|
|
|
|
|
|
|
|
6049
|
89
|
50
|
|
|
|
207
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PARAM]}, |
6050
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6051
|
|
|
|
|
|
|
q{PARAMS}, |
6052
|
|
|
|
|
|
|
$tracelevel) |
6053
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6054
|
2
|
|
|
2
|
|
13
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
442
|
|
|
89
|
|
|
|
|
93
|
|
6055
|
89
|
|
|
|
|
186
|
$expectation->is(q{})->at($text); |
6056
|
89
|
100
|
|
89
|
|
376
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAM($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
89
|
|
|
|
|
212
|
|
6057
|
|
|
|
|
|
|
{ |
6058
|
|
|
|
|
|
|
|
6059
|
61
|
50
|
|
|
|
142
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PARAM]>>}, |
6060
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6061
|
|
|
|
|
|
|
q{PARAMS}, |
6062
|
|
|
|
|
|
|
$tracelevel) |
6063
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6064
|
61
|
|
|
|
|
112
|
$expectation->failed(); |
6065
|
61
|
|
|
|
|
96
|
last; |
6066
|
|
|
|
|
|
|
} |
6067
|
28
|
50
|
|
|
|
105
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PARAM]<< (return value: [} |
6068
|
|
|
|
|
|
|
. $_tok . q{]}, |
6069
|
|
|
|
|
|
|
|
6070
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6071
|
|
|
|
|
|
|
q{PARAMS}, |
6072
|
|
|
|
|
|
|
$tracelevel) |
6073
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6074
|
28
|
|
|
|
|
57
|
$item{q{PARAM}} = $_tok; |
6075
|
28
|
|
|
|
|
47
|
push @item, $_tok; |
6076
|
|
|
|
|
|
|
|
6077
|
|
|
|
|
|
|
} |
6078
|
|
|
|
|
|
|
|
6079
|
28
|
50
|
|
|
|
64
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PARAMS]}, |
6080
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6081
|
|
|
|
|
|
|
q{PARAMS}, |
6082
|
|
|
|
|
|
|
$tracelevel) |
6083
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6084
|
2
|
|
|
2
|
|
11
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
880
|
|
|
28
|
|
|
|
|
34
|
|
6085
|
28
|
|
|
|
|
73
|
$expectation->is(q{PARAMS})->at($text); |
6086
|
28
|
100
|
|
28
|
|
239
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAMS($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
28
|
|
|
|
|
68
|
|
6087
|
|
|
|
|
|
|
{ |
6088
|
|
|
|
|
|
|
|
6089
|
26
|
50
|
|
|
|
63
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PARAMS]>>}, |
6090
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6091
|
|
|
|
|
|
|
q{PARAMS}, |
6092
|
|
|
|
|
|
|
$tracelevel) |
6093
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6094
|
26
|
|
|
|
|
52
|
$expectation->failed(); |
6095
|
26
|
|
|
|
|
38
|
last; |
6096
|
|
|
|
|
|
|
} |
6097
|
2
|
50
|
|
|
|
11
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PARAMS]<< (return value: [} |
6098
|
|
|
|
|
|
|
. $_tok . q{]}, |
6099
|
|
|
|
|
|
|
|
6100
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6101
|
|
|
|
|
|
|
q{PARAMS}, |
6102
|
|
|
|
|
|
|
$tracelevel) |
6103
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6104
|
2
|
|
|
|
|
6
|
$item{q{PARAMS}} = $_tok; |
6105
|
2
|
|
|
|
|
3
|
push @item, $_tok; |
6106
|
|
|
|
|
|
|
|
6107
|
|
|
|
|
|
|
} |
6108
|
|
|
|
|
|
|
|
6109
|
2
|
50
|
|
|
|
8
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
6110
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6111
|
|
|
|
|
|
|
q{PARAMS}, |
6112
|
|
|
|
|
|
|
$tracelevel) |
6113
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6114
|
|
|
|
|
|
|
|
6115
|
|
|
|
|
|
|
|
6116
|
2
|
50
|
|
|
|
4
|
$_tok = ($_noactions) ? 0 : do {$return = [$item{PARAM}, @{$item{PARAMS}}]}; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
9
|
|
6117
|
2
|
50
|
|
|
|
6
|
unless (defined $_tok) |
6118
|
|
|
|
|
|
|
{ |
6119
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
6120
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6121
|
0
|
|
|
|
|
0
|
last; |
6122
|
|
|
|
|
|
|
} |
6123
|
2
|
50
|
|
|
|
6
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
6124
|
|
|
|
|
|
|
. $_tok . q{])}, |
6125
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6126
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6127
|
2
|
|
|
|
|
4
|
push @item, $_tok; |
6128
|
2
|
|
|
|
|
5
|
$item{__ACTION1__}=$_tok; |
6129
|
|
|
|
|
|
|
|
6130
|
|
|
|
|
|
|
|
6131
|
2
|
50
|
|
|
|
5
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [PARAM PARAMS]<<}, |
6132
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6133
|
|
|
|
|
|
|
q{PARAMS}, |
6134
|
|
|
|
|
|
|
$tracelevel) |
6135
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6136
|
|
|
|
|
|
|
|
6137
|
|
|
|
|
|
|
|
6138
|
|
|
|
|
|
|
|
6139
|
2
|
|
|
|
|
4
|
$_matched = 1; |
6140
|
2
|
|
|
|
|
3
|
last; |
6141
|
|
|
|
|
|
|
} |
6142
|
|
|
|
|
|
|
|
6143
|
|
|
|
|
|
|
|
6144
|
89
|
|
66
|
|
|
403
|
while (!$_matched && !$commit) |
6145
|
|
|
|
|
|
|
{ |
6146
|
|
|
|
|
|
|
|
6147
|
87
|
50
|
|
|
|
186
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [PARAM]}, |
6148
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6149
|
|
|
|
|
|
|
q{PARAMS}, |
6150
|
|
|
|
|
|
|
$tracelevel) |
6151
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6152
|
87
|
|
|
|
|
166
|
my $thisprod = $thisrule->{"prods"}[1]; |
6153
|
87
|
|
|
|
|
153
|
$text = $_[1]; |
6154
|
87
|
|
|
|
|
108
|
my $_savetext; |
6155
|
87
|
|
|
|
|
191
|
@item = (q{PARAMS}); |
6156
|
87
|
|
|
|
|
193
|
%item = (__RULE__ => q{PARAMS}); |
6157
|
87
|
|
|
|
|
105
|
my $repcount = 0; |
6158
|
|
|
|
|
|
|
|
6159
|
|
|
|
|
|
|
|
6160
|
87
|
50
|
|
|
|
203
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PARAM]}, |
6161
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6162
|
|
|
|
|
|
|
q{PARAMS}, |
6163
|
|
|
|
|
|
|
$tracelevel) |
6164
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6165
|
2
|
|
|
2
|
|
11
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
2008
|
|
|
87
|
|
|
|
|
97
|
|
6166
|
87
|
|
|
|
|
174
|
$expectation->is(q{})->at($text); |
6167
|
87
|
100
|
|
87
|
|
353
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAM($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
87
|
|
|
|
|
184
|
|
6168
|
|
|
|
|
|
|
{ |
6169
|
|
|
|
|
|
|
|
6170
|
61
|
50
|
|
|
|
130
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PARAM]>>}, |
6171
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6172
|
|
|
|
|
|
|
q{PARAMS}, |
6173
|
|
|
|
|
|
|
$tracelevel) |
6174
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6175
|
61
|
|
|
|
|
137
|
$expectation->failed(); |
6176
|
61
|
|
|
|
|
88
|
last; |
6177
|
|
|
|
|
|
|
} |
6178
|
26
|
50
|
|
|
|
95
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PARAM]<< (return value: [} |
6179
|
|
|
|
|
|
|
. $_tok . q{]}, |
6180
|
|
|
|
|
|
|
|
6181
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6182
|
|
|
|
|
|
|
q{PARAMS}, |
6183
|
|
|
|
|
|
|
$tracelevel) |
6184
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6185
|
26
|
|
|
|
|
58
|
$item{q{PARAM}} = $_tok; |
6186
|
26
|
|
|
|
|
48
|
push @item, $_tok; |
6187
|
|
|
|
|
|
|
|
6188
|
|
|
|
|
|
|
} |
6189
|
|
|
|
|
|
|
|
6190
|
26
|
50
|
|
|
|
71
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
6191
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6192
|
|
|
|
|
|
|
q{PARAMS}, |
6193
|
|
|
|
|
|
|
$tracelevel) |
6194
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6195
|
|
|
|
|
|
|
|
6196
|
|
|
|
|
|
|
|
6197
|
26
|
50
|
|
|
|
62
|
$_tok = ($_noactions) ? 0 : do {$return = [$item{PARAM}]}; |
|
26
|
|
|
|
|
73
|
|
6198
|
26
|
50
|
|
|
|
71
|
unless (defined $_tok) |
6199
|
|
|
|
|
|
|
{ |
6200
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
6201
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6202
|
0
|
|
|
|
|
0
|
last; |
6203
|
|
|
|
|
|
|
} |
6204
|
26
|
50
|
|
|
|
68
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
6205
|
|
|
|
|
|
|
. $_tok . q{])}, |
6206
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6207
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6208
|
26
|
|
|
|
|
35
|
push @item, $_tok; |
6209
|
26
|
|
|
|
|
57
|
$item{__ACTION1__}=$_tok; |
6210
|
|
|
|
|
|
|
|
6211
|
|
|
|
|
|
|
|
6212
|
26
|
50
|
|
|
|
56
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [PARAM]<<}, |
6213
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6214
|
|
|
|
|
|
|
q{PARAMS}, |
6215
|
|
|
|
|
|
|
$tracelevel) |
6216
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6217
|
|
|
|
|
|
|
|
6218
|
|
|
|
|
|
|
|
6219
|
|
|
|
|
|
|
|
6220
|
26
|
|
|
|
|
34
|
$_matched = 1; |
6221
|
26
|
|
|
|
|
36
|
last; |
6222
|
|
|
|
|
|
|
} |
6223
|
|
|
|
|
|
|
|
6224
|
|
|
|
|
|
|
|
6225
|
89
|
100
|
66
|
|
|
429
|
unless ( $_matched || defined($score) ) |
6226
|
|
|
|
|
|
|
{ |
6227
|
|
|
|
|
|
|
|
6228
|
|
|
|
|
|
|
|
6229
|
61
|
|
|
|
|
89
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
6230
|
61
|
50
|
|
|
|
129
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
6231
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6232
|
|
|
|
|
|
|
q{PARAMS}, |
6233
|
|
|
|
|
|
|
$tracelevel) |
6234
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6235
|
61
|
|
|
|
|
361
|
return undef; |
6236
|
|
|
|
|
|
|
} |
6237
|
28
|
50
|
33
|
|
|
82
|
if (!defined($return) && defined($score)) |
6238
|
|
|
|
|
|
|
{ |
6239
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
6240
|
|
|
|
|
|
|
q{PARAMS}, |
6241
|
|
|
|
|
|
|
$tracelevel) |
6242
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6243
|
0
|
|
|
|
|
0
|
$return = $score_return; |
6244
|
|
|
|
|
|
|
} |
6245
|
28
|
|
|
|
|
32
|
splice @{$thisparser->{errors}}, $err_at; |
|
28
|
|
|
|
|
71
|
|
6246
|
28
|
50
|
|
|
|
67
|
$return = $item[$#item] unless defined $return; |
6247
|
28
|
50
|
|
|
|
59
|
if (defined $::RD_TRACE) |
6248
|
|
|
|
|
|
|
{ |
6249
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
6250
|
|
|
|
|
|
|
$return . q{])}, "", |
6251
|
|
|
|
|
|
|
q{PARAMS}, |
6252
|
|
|
|
|
|
|
$tracelevel); |
6253
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
6254
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
6255
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6256
|
|
|
|
|
|
|
, q{PARAMS}, |
6257
|
|
|
|
|
|
|
$tracelevel) |
6258
|
|
|
|
|
|
|
} |
6259
|
28
|
|
|
|
|
42
|
$_[1] = $text; |
6260
|
28
|
|
|
|
|
197
|
return $return; |
6261
|
|
|
|
|
|
|
} |
6262
|
|
|
|
|
|
|
|
6263
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
6264
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::EOF |
6265
|
|
|
|
|
|
|
{ |
6266
|
12
|
|
|
12
|
|
29
|
my $thisparser = $_[0]; |
6267
|
2
|
|
|
2
|
|
14
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
1992
|
|
6268
|
12
|
|
50
|
|
|
46
|
local $tracelevel = ($tracelevel||0)+1; |
6269
|
12
|
|
|
|
|
21
|
$ERRORS = 0; |
6270
|
12
|
|
|
|
|
43
|
my $thisrule = $thisparser->{"rules"}{"EOF"}; |
6271
|
|
|
|
|
|
|
|
6272
|
12
|
50
|
|
|
|
47
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [EOF]}, |
6273
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6274
|
|
|
|
|
|
|
q{EOF}, |
6275
|
|
|
|
|
|
|
$tracelevel) |
6276
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6277
|
|
|
|
|
|
|
|
6278
|
|
|
|
|
|
|
|
6279
|
12
|
|
|
|
|
20
|
my $err_at = @{$thisparser->{errors}}; |
|
12
|
|
|
|
|
34
|
|
6280
|
|
|
|
|
|
|
|
6281
|
12
|
|
|
|
|
22
|
my $score; |
6282
|
|
|
|
|
|
|
my $score_return; |
6283
|
0
|
|
|
|
|
0
|
my $_tok; |
6284
|
12
|
|
|
|
|
18
|
my $return = undef; |
6285
|
12
|
|
|
|
|
16
|
my $_matched=0; |
6286
|
12
|
|
|
|
|
19
|
my $commit=0; |
6287
|
12
|
|
|
|
|
31
|
my @item = (); |
6288
|
12
|
|
|
|
|
20
|
my %item = (); |
6289
|
12
|
|
|
|
|
24
|
my $repeating = $_[2]; |
6290
|
12
|
|
|
|
|
15
|
my $_noactions = $_[3]; |
6291
|
12
|
50
|
|
|
|
29
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
12
|
|
|
|
|
17
|
|
|
12
|
|
|
|
|
33
|
|
6292
|
12
|
|
|
|
|
22
|
my $_itempos = $_[5]; |
6293
|
12
|
50
|
|
|
|
47
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
6294
|
12
|
|
|
|
|
20
|
my $text; |
6295
|
|
|
|
|
|
|
my $lastsep; |
6296
|
0
|
|
|
|
|
0
|
my $current_match; |
6297
|
12
|
|
|
|
|
37
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/^\\Z/}); |
6298
|
12
|
|
|
|
|
41
|
$expectation->at($_[1]); |
6299
|
|
|
|
|
|
|
|
6300
|
12
|
|
|
|
|
15
|
my $thisline; |
6301
|
12
|
|
|
|
|
44
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
6302
|
|
|
|
|
|
|
|
6303
|
|
|
|
|
|
|
|
6304
|
|
|
|
|
|
|
|
6305
|
12
|
|
33
|
|
|
74
|
while (!$_matched && !$commit) |
6306
|
|
|
|
|
|
|
{ |
6307
|
|
|
|
|
|
|
|
6308
|
12
|
50
|
|
|
|
34
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/^\\Z/]}, |
6309
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6310
|
|
|
|
|
|
|
q{EOF}, |
6311
|
|
|
|
|
|
|
$tracelevel) |
6312
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6313
|
12
|
|
|
|
|
39
|
my $thisprod = $thisrule->{"prods"}[0]; |
6314
|
12
|
|
|
|
|
17
|
$text = $_[1]; |
6315
|
12
|
|
|
|
|
23
|
my $_savetext; |
6316
|
12
|
|
|
|
|
29
|
@item = (q{EOF}); |
6317
|
12
|
|
|
|
|
39
|
%item = (__RULE__ => q{EOF}); |
6318
|
12
|
|
|
|
|
18
|
my $repcount = 0; |
6319
|
|
|
|
|
|
|
|
6320
|
|
|
|
|
|
|
|
6321
|
12
|
50
|
|
|
|
37
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/^\\Z/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
6322
|
|
|
|
|
|
|
q{EOF}, |
6323
|
|
|
|
|
|
|
$tracelevel) |
6324
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6325
|
12
|
|
|
|
|
23
|
undef $lastsep; |
6326
|
12
|
|
|
|
|
27
|
$expectation->is(q{})->at($text); |
6327
|
|
|
|
|
|
|
|
6328
|
|
|
|
|
|
|
|
6329
|
12
|
100
|
33
|
|
|
120
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^\Z)/) |
|
12
|
50
|
|
|
|
144
|
|
6330
|
|
|
|
|
|
|
{ |
6331
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
6332
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
6333
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
6334
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6335
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6336
|
|
|
|
|
|
|
|
6337
|
0
|
|
|
|
|
0
|
last; |
6338
|
|
|
|
|
|
|
} |
6339
|
12
|
|
|
|
|
69
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
6340
|
12
|
|
|
|
|
43
|
substr($text,0,length($current_match),q{}); |
6341
|
12
|
50
|
|
|
|
36
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
6342
|
|
|
|
|
|
|
. $current_match . q{])}, |
6343
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6344
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6345
|
12
|
|
|
|
|
34
|
push @item, $item{__PATTERN1__}=$current_match; |
6346
|
|
|
|
|
|
|
|
6347
|
|
|
|
|
|
|
|
6348
|
12
|
50
|
|
|
|
29
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/^\\Z/]<<}, |
6349
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6350
|
|
|
|
|
|
|
q{EOF}, |
6351
|
|
|
|
|
|
|
$tracelevel) |
6352
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6353
|
|
|
|
|
|
|
|
6354
|
|
|
|
|
|
|
|
6355
|
|
|
|
|
|
|
|
6356
|
12
|
|
|
|
|
20
|
$_matched = 1; |
6357
|
12
|
|
|
|
|
23
|
last; |
6358
|
|
|
|
|
|
|
} |
6359
|
|
|
|
|
|
|
|
6360
|
|
|
|
|
|
|
|
6361
|
12
|
50
|
33
|
|
|
44
|
unless ( $_matched || defined($score) ) |
6362
|
|
|
|
|
|
|
{ |
6363
|
|
|
|
|
|
|
|
6364
|
|
|
|
|
|
|
|
6365
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
6366
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
6367
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6368
|
|
|
|
|
|
|
q{EOF}, |
6369
|
|
|
|
|
|
|
$tracelevel) |
6370
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6371
|
0
|
|
|
|
|
0
|
return undef; |
6372
|
|
|
|
|
|
|
} |
6373
|
12
|
50
|
33
|
|
|
69
|
if (!defined($return) && defined($score)) |
6374
|
|
|
|
|
|
|
{ |
6375
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
6376
|
|
|
|
|
|
|
q{EOF}, |
6377
|
|
|
|
|
|
|
$tracelevel) |
6378
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6379
|
0
|
|
|
|
|
0
|
$return = $score_return; |
6380
|
|
|
|
|
|
|
} |
6381
|
12
|
|
|
|
|
19
|
splice @{$thisparser->{errors}}, $err_at; |
|
12
|
|
|
|
|
28
|
|
6382
|
12
|
50
|
|
|
|
43
|
$return = $item[$#item] unless defined $return; |
6383
|
12
|
50
|
|
|
|
47
|
if (defined $::RD_TRACE) |
6384
|
|
|
|
|
|
|
{ |
6385
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
6386
|
|
|
|
|
|
|
$return . q{])}, "", |
6387
|
|
|
|
|
|
|
q{EOF}, |
6388
|
|
|
|
|
|
|
$tracelevel); |
6389
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
6390
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
6391
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6392
|
|
|
|
|
|
|
, q{EOF}, |
6393
|
|
|
|
|
|
|
$tracelevel) |
6394
|
|
|
|
|
|
|
} |
6395
|
12
|
|
|
|
|
17
|
$_[1] = $text; |
6396
|
12
|
|
|
|
|
100
|
return $return; |
6397
|
|
|
|
|
|
|
} |
6398
|
|
|
|
|
|
|
|
6399
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
6400
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SCEN |
6401
|
|
|
|
|
|
|
{ |
6402
|
49
|
|
|
49
|
|
78
|
my $thisparser = $_[0]; |
6403
|
2
|
|
|
2
|
|
14
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
791
|
|
6404
|
49
|
|
50
|
|
|
150
|
local $tracelevel = ($tracelevel||0)+1; |
6405
|
49
|
|
|
|
|
76
|
$ERRORS = 0; |
6406
|
49
|
|
|
|
|
106
|
my $thisrule = $thisparser->{"rules"}{"SCEN"}; |
6407
|
|
|
|
|
|
|
|
6408
|
49
|
50
|
|
|
|
232
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [SCEN]}, |
6409
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6410
|
|
|
|
|
|
|
q{SCEN}, |
6411
|
|
|
|
|
|
|
$tracelevel) |
6412
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6413
|
|
|
|
|
|
|
|
6414
|
|
|
|
|
|
|
|
6415
|
49
|
|
|
|
|
63
|
my $err_at = @{$thisparser->{errors}}; |
|
49
|
|
|
|
|
105
|
|
6416
|
|
|
|
|
|
|
|
6417
|
49
|
|
|
|
|
68
|
my $score; |
6418
|
|
|
|
|
|
|
my $score_return; |
6419
|
0
|
|
|
|
|
0
|
my $_tok; |
6420
|
49
|
|
|
|
|
63
|
my $return = undef; |
6421
|
49
|
|
|
|
|
61
|
my $_matched=0; |
6422
|
49
|
|
|
|
|
76
|
my $commit=0; |
6423
|
49
|
|
|
|
|
98
|
my @item = (); |
6424
|
49
|
|
|
|
|
91
|
my %item = (); |
6425
|
49
|
|
|
|
|
65
|
my $repeating = $_[2]; |
6426
|
49
|
|
|
|
|
64
|
my $_noactions = $_[3]; |
6427
|
49
|
50
|
|
|
|
122
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
49
|
|
|
|
|
63
|
|
|
49
|
|
|
|
|
104
|
|
6428
|
49
|
|
|
|
|
88
|
my $_itempos = $_[5]; |
6429
|
49
|
50
|
|
|
|
169
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
6430
|
49
|
|
|
|
|
69
|
my $text; |
6431
|
|
|
|
|
|
|
my $lastsep; |
6432
|
0
|
|
|
|
|
0
|
my $current_match; |
6433
|
49
|
|
|
|
|
127
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{LINE}); |
6434
|
49
|
|
|
|
|
126
|
$expectation->at($_[1]); |
6435
|
|
|
|
|
|
|
|
6436
|
49
|
|
|
|
|
58
|
my $thisline; |
6437
|
49
|
|
|
|
|
152
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
6438
|
|
|
|
|
|
|
|
6439
|
|
|
|
|
|
|
|
6440
|
|
|
|
|
|
|
|
6441
|
49
|
|
33
|
|
|
228
|
while (!$_matched && !$commit) |
6442
|
|
|
|
|
|
|
{ |
6443
|
|
|
|
|
|
|
|
6444
|
49
|
50
|
|
|
|
124
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [LINE SCEN]}, |
6445
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6446
|
|
|
|
|
|
|
q{SCEN}, |
6447
|
|
|
|
|
|
|
$tracelevel) |
6448
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6449
|
49
|
|
|
|
|
109
|
my $thisprod = $thisrule->{"prods"}[0]; |
6450
|
49
|
|
|
|
|
83
|
$text = $_[1]; |
6451
|
49
|
|
|
|
|
57
|
my $_savetext; |
6452
|
49
|
|
|
|
|
140
|
@item = (q{SCEN}); |
6453
|
49
|
|
|
|
|
123
|
%item = (__RULE__ => q{SCEN}); |
6454
|
49
|
|
|
|
|
74
|
my $repcount = 0; |
6455
|
|
|
|
|
|
|
|
6456
|
|
|
|
|
|
|
|
6457
|
49
|
50
|
|
|
|
110
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [LINE]}, |
6458
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6459
|
|
|
|
|
|
|
q{SCEN}, |
6460
|
|
|
|
|
|
|
$tracelevel) |
6461
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6462
|
2
|
|
|
2
|
|
12
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
468
|
|
|
49
|
|
|
|
|
58
|
|
6463
|
49
|
|
|
|
|
115
|
$expectation->is(q{})->at($text); |
6464
|
49
|
100
|
|
10
|
|
276
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::LINE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
49
|
|
|
|
|
107
|
|
6465
|
|
|
|
|
|
|
{ |
6466
|
|
|
|
|
|
|
|
6467
|
14
|
50
|
|
|
|
51
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [LINE]>>}, |
6468
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6469
|
|
|
|
|
|
|
q{SCEN}, |
6470
|
|
|
|
|
|
|
$tracelevel) |
6471
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6472
|
14
|
|
|
|
|
343
|
$expectation->failed(); |
6473
|
14
|
|
|
|
|
25
|
last; |
6474
|
|
|
|
|
|
|
} |
6475
|
35
|
50
|
|
|
|
153
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [LINE]<< (return value: [} |
6476
|
|
|
|
|
|
|
. $_tok . q{]}, |
6477
|
|
|
|
|
|
|
|
6478
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6479
|
|
|
|
|
|
|
q{SCEN}, |
6480
|
|
|
|
|
|
|
$tracelevel) |
6481
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6482
|
35
|
|
|
|
|
78
|
$item{q{LINE}} = $_tok; |
6483
|
35
|
|
|
|
|
63
|
push @item, $_tok; |
6484
|
|
|
|
|
|
|
|
6485
|
|
|
|
|
|
|
} |
6486
|
|
|
|
|
|
|
|
6487
|
35
|
50
|
|
|
|
87
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [SCEN]}, |
6488
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6489
|
|
|
|
|
|
|
q{SCEN}, |
6490
|
|
|
|
|
|
|
$tracelevel) |
6491
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6492
|
2
|
|
|
2
|
|
14
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
1119
|
|
|
35
|
|
|
|
|
39
|
|
6493
|
35
|
|
|
|
|
94
|
$expectation->is(q{SCEN})->at($text); |
6494
|
35
|
100
|
|
7
|
|
272
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SCEN($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
35
|
|
|
|
|
90
|
|
6495
|
|
|
|
|
|
|
{ |
6496
|
|
|
|
|
|
|
|
6497
|
12
|
50
|
|
|
|
36
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [SCEN]>>}, |
6498
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6499
|
|
|
|
|
|
|
q{SCEN}, |
6500
|
|
|
|
|
|
|
$tracelevel) |
6501
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6502
|
12
|
|
|
|
|
28
|
$expectation->failed(); |
6503
|
12
|
|
|
|
|
26
|
last; |
6504
|
|
|
|
|
|
|
} |
6505
|
23
|
50
|
|
|
|
105
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [SCEN]<< (return value: [} |
6506
|
|
|
|
|
|
|
. $_tok . q{]}, |
6507
|
|
|
|
|
|
|
|
6508
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6509
|
|
|
|
|
|
|
q{SCEN}, |
6510
|
|
|
|
|
|
|
$tracelevel) |
6511
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6512
|
23
|
|
|
|
|
45
|
$item{q{SCEN}} = $_tok; |
6513
|
23
|
|
|
|
|
43
|
push @item, $_tok; |
6514
|
|
|
|
|
|
|
|
6515
|
|
|
|
|
|
|
} |
6516
|
|
|
|
|
|
|
|
6517
|
23
|
50
|
|
|
|
60
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
6518
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6519
|
|
|
|
|
|
|
q{SCEN}, |
6520
|
|
|
|
|
|
|
$tracelevel) |
6521
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6522
|
|
|
|
|
|
|
|
6523
|
|
|
|
|
|
|
|
6524
|
23
|
50
|
|
|
|
51
|
$_tok = ($_noactions) ? 0 : do {$return = [@{$item{LINE}},@{$item{SCEN}}]}; |
|
23
|
|
|
|
|
35
|
|
|
23
|
|
|
|
|
49
|
|
|
23
|
|
|
|
|
60
|
|
6525
|
23
|
50
|
|
|
|
63
|
unless (defined $_tok) |
6526
|
|
|
|
|
|
|
{ |
6527
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
6528
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6529
|
0
|
|
|
|
|
0
|
last; |
6530
|
|
|
|
|
|
|
} |
6531
|
23
|
50
|
|
|
|
53
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
6532
|
|
|
|
|
|
|
. $_tok . q{])}, |
6533
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6534
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6535
|
23
|
|
|
|
|
29
|
push @item, $_tok; |
6536
|
23
|
|
|
|
|
46
|
$item{__ACTION1__}=$_tok; |
6537
|
|
|
|
|
|
|
|
6538
|
|
|
|
|
|
|
|
6539
|
23
|
50
|
|
|
|
51
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [LINE SCEN]<<}, |
6540
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6541
|
|
|
|
|
|
|
q{SCEN}, |
6542
|
|
|
|
|
|
|
$tracelevel) |
6543
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6544
|
|
|
|
|
|
|
|
6545
|
|
|
|
|
|
|
|
6546
|
|
|
|
|
|
|
|
6547
|
23
|
|
|
|
|
30
|
$_matched = 1; |
6548
|
23
|
|
|
|
|
46
|
last; |
6549
|
|
|
|
|
|
|
} |
6550
|
|
|
|
|
|
|
|
6551
|
|
|
|
|
|
|
|
6552
|
49
|
|
66
|
|
|
188
|
while (!$_matched && !$commit) |
6553
|
|
|
|
|
|
|
{ |
6554
|
|
|
|
|
|
|
|
6555
|
26
|
50
|
|
|
|
55
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [LINE]}, |
6556
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6557
|
|
|
|
|
|
|
q{SCEN}, |
6558
|
|
|
|
|
|
|
$tracelevel) |
6559
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6560
|
26
|
|
|
|
|
56
|
my $thisprod = $thisrule->{"prods"}[1]; |
6561
|
26
|
|
|
|
|
45
|
$text = $_[1]; |
6562
|
26
|
|
|
|
|
28
|
my $_savetext; |
6563
|
26
|
|
|
|
|
57
|
@item = (q{SCEN}); |
6564
|
26
|
|
|
|
|
83
|
%item = (__RULE__ => q{SCEN}); |
6565
|
26
|
|
|
|
|
46
|
my $repcount = 0; |
6566
|
|
|
|
|
|
|
|
6567
|
|
|
|
|
|
|
|
6568
|
26
|
50
|
|
|
|
66
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [LINE]}, |
6569
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6570
|
|
|
|
|
|
|
q{SCEN}, |
6571
|
|
|
|
|
|
|
$tracelevel) |
6572
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6573
|
2
|
|
|
2
|
|
15
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
1507
|
|
|
26
|
|
|
|
|
28
|
|
6574
|
26
|
|
|
|
|
81
|
$expectation->is(q{})->at($text); |
6575
|
26
|
100
|
|
6
|
|
116
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::LINE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
26
|
|
|
|
|
74
|
|
6576
|
|
|
|
|
|
|
{ |
6577
|
|
|
|
|
|
|
|
6578
|
14
|
50
|
|
|
|
41
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [LINE]>>}, |
6579
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6580
|
|
|
|
|
|
|
q{SCEN}, |
6581
|
|
|
|
|
|
|
$tracelevel) |
6582
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6583
|
14
|
|
|
|
|
38
|
$expectation->failed(); |
6584
|
14
|
|
|
|
|
25
|
last; |
6585
|
|
|
|
|
|
|
} |
6586
|
12
|
50
|
|
|
|
64
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [LINE]<< (return value: [} |
6587
|
|
|
|
|
|
|
. $_tok . q{]}, |
6588
|
|
|
|
|
|
|
|
6589
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6590
|
|
|
|
|
|
|
q{SCEN}, |
6591
|
|
|
|
|
|
|
$tracelevel) |
6592
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6593
|
12
|
|
|
|
|
40
|
$item{q{LINE}} = $_tok; |
6594
|
12
|
|
|
|
|
25
|
push @item, $_tok; |
6595
|
|
|
|
|
|
|
|
6596
|
|
|
|
|
|
|
} |
6597
|
|
|
|
|
|
|
|
6598
|
12
|
50
|
|
|
|
38
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
6599
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6600
|
|
|
|
|
|
|
q{SCEN}, |
6601
|
|
|
|
|
|
|
$tracelevel) |
6602
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6603
|
|
|
|
|
|
|
|
6604
|
|
|
|
|
|
|
|
6605
|
12
|
50
|
|
|
|
33
|
$_tok = ($_noactions) ? 0 : do {$return = [@{$item{LINE}}]}; |
|
12
|
|
|
|
|
26
|
|
|
12
|
|
|
|
|
37
|
|
6606
|
12
|
50
|
|
|
|
46
|
unless (defined $_tok) |
6607
|
|
|
|
|
|
|
{ |
6608
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
6609
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6610
|
0
|
|
|
|
|
0
|
last; |
6611
|
|
|
|
|
|
|
} |
6612
|
12
|
50
|
|
|
|
32
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
6613
|
|
|
|
|
|
|
. $_tok . q{])}, |
6614
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6615
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6616
|
12
|
|
|
|
|
25
|
push @item, $_tok; |
6617
|
12
|
|
|
|
|
28
|
$item{__ACTION1__}=$_tok; |
6618
|
|
|
|
|
|
|
|
6619
|
|
|
|
|
|
|
|
6620
|
12
|
50
|
|
|
|
33
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [LINE]<<}, |
6621
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6622
|
|
|
|
|
|
|
q{SCEN}, |
6623
|
|
|
|
|
|
|
$tracelevel) |
6624
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6625
|
|
|
|
|
|
|
|
6626
|
|
|
|
|
|
|
|
6627
|
|
|
|
|
|
|
|
6628
|
12
|
|
|
|
|
25
|
$_matched = 1; |
6629
|
12
|
|
|
|
|
24
|
last; |
6630
|
|
|
|
|
|
|
} |
6631
|
|
|
|
|
|
|
|
6632
|
|
|
|
|
|
|
|
6633
|
49
|
100
|
66
|
|
|
193
|
unless ( $_matched || defined($score) ) |
6634
|
|
|
|
|
|
|
{ |
6635
|
|
|
|
|
|
|
|
6636
|
|
|
|
|
|
|
|
6637
|
14
|
|
|
|
|
30
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
6638
|
14
|
50
|
|
|
|
46
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
6639
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6640
|
|
|
|
|
|
|
q{SCEN}, |
6641
|
|
|
|
|
|
|
$tracelevel) |
6642
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6643
|
14
|
|
|
|
|
103
|
return undef; |
6644
|
|
|
|
|
|
|
} |
6645
|
35
|
50
|
33
|
|
|
95
|
if (!defined($return) && defined($score)) |
6646
|
|
|
|
|
|
|
{ |
6647
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
6648
|
|
|
|
|
|
|
q{SCEN}, |
6649
|
|
|
|
|
|
|
$tracelevel) |
6650
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6651
|
0
|
|
|
|
|
0
|
$return = $score_return; |
6652
|
|
|
|
|
|
|
} |
6653
|
35
|
|
|
|
|
44
|
splice @{$thisparser->{errors}}, $err_at; |
|
35
|
|
|
|
|
80
|
|
6654
|
35
|
50
|
|
|
|
80
|
$return = $item[$#item] unless defined $return; |
6655
|
35
|
50
|
|
|
|
81
|
if (defined $::RD_TRACE) |
6656
|
|
|
|
|
|
|
{ |
6657
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
6658
|
|
|
|
|
|
|
$return . q{])}, "", |
6659
|
|
|
|
|
|
|
q{SCEN}, |
6660
|
|
|
|
|
|
|
$tracelevel); |
6661
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
6662
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
6663
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6664
|
|
|
|
|
|
|
, q{SCEN}, |
6665
|
|
|
|
|
|
|
$tracelevel) |
6666
|
|
|
|
|
|
|
} |
6667
|
35
|
|
|
|
|
71
|
$_[1] = $text; |
6668
|
35
|
|
|
|
|
374
|
return $return; |
6669
|
|
|
|
|
|
|
} |
6670
|
|
|
|
|
|
|
|
6671
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
6672
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PVALUE |
6673
|
|
|
|
|
|
|
{ |
6674
|
54
|
|
|
54
|
|
77
|
my $thisparser = $_[0]; |
6675
|
2
|
|
|
2
|
|
13
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1243
|
|
6676
|
54
|
|
50
|
|
|
145
|
local $tracelevel = ($tracelevel||0)+1; |
6677
|
54
|
|
|
|
|
69
|
$ERRORS = 0; |
6678
|
54
|
|
|
|
|
111
|
my $thisrule = $thisparser->{"rules"}{"PVALUE"}; |
6679
|
|
|
|
|
|
|
|
6680
|
54
|
50
|
|
|
|
123
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [PVALUE]}, |
6681
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6682
|
|
|
|
|
|
|
q{PVALUE}, |
6683
|
|
|
|
|
|
|
$tracelevel) |
6684
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6685
|
|
|
|
|
|
|
|
6686
|
|
|
|
|
|
|
|
6687
|
54
|
|
|
|
|
57
|
my $err_at = @{$thisparser->{errors}}; |
|
54
|
|
|
|
|
94
|
|
6688
|
|
|
|
|
|
|
|
6689
|
54
|
|
|
|
|
75
|
my $score; |
6690
|
|
|
|
|
|
|
my $score_return; |
6691
|
0
|
|
|
|
|
0
|
my $_tok; |
6692
|
54
|
|
|
|
|
59
|
my $return = undef; |
6693
|
54
|
|
|
|
|
59
|
my $_matched=0; |
6694
|
54
|
|
|
|
|
73
|
my $commit=0; |
6695
|
54
|
|
|
|
|
78
|
my @item = (); |
6696
|
54
|
|
|
|
|
81
|
my %item = (); |
6697
|
54
|
|
|
|
|
73
|
my $repeating = $_[2]; |
6698
|
54
|
|
|
|
|
66
|
my $_noactions = $_[3]; |
6699
|
54
|
50
|
|
|
|
118
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
54
|
|
|
|
|
56
|
|
|
54
|
|
|
|
|
109
|
|
6700
|
54
|
|
|
|
|
74
|
my $_itempos = $_[5]; |
6701
|
54
|
50
|
|
|
|
154
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
6702
|
54
|
|
|
|
|
67
|
my $text; |
6703
|
|
|
|
|
|
|
my $lastsep; |
6704
|
0
|
|
|
|
|
0
|
my $current_match; |
6705
|
54
|
|
|
|
|
130
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/'/, or /"/, or /`/, or PNOTQUOTED}); |
6706
|
54
|
|
|
|
|
128
|
$expectation->at($_[1]); |
6707
|
|
|
|
|
|
|
|
6708
|
54
|
|
|
|
|
60
|
my $thisline; |
6709
|
54
|
|
|
|
|
143
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
6710
|
|
|
|
|
|
|
|
6711
|
|
|
|
|
|
|
|
6712
|
|
|
|
|
|
|
|
6713
|
54
|
|
33
|
|
|
204
|
while (!$_matched && !$commit) |
6714
|
|
|
|
|
|
|
{ |
6715
|
|
|
|
|
|
|
|
6716
|
54
|
50
|
|
|
|
109
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/'/ PSQUOTE /'/]}, |
6717
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6718
|
|
|
|
|
|
|
q{PVALUE}, |
6719
|
|
|
|
|
|
|
$tracelevel) |
6720
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6721
|
54
|
|
|
|
|
101
|
my $thisprod = $thisrule->{"prods"}[0]; |
6722
|
54
|
|
|
|
|
89
|
$text = $_[1]; |
6723
|
54
|
|
|
|
|
65
|
my $_savetext; |
6724
|
54
|
|
|
|
|
95
|
@item = (q{PVALUE}); |
6725
|
54
|
|
|
|
|
131
|
%item = (__RULE__ => q{PVALUE}); |
6726
|
54
|
|
|
|
|
58
|
my $repcount = 0; |
6727
|
|
|
|
|
|
|
|
6728
|
|
|
|
|
|
|
|
6729
|
54
|
50
|
|
|
|
105
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/'/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
6730
|
|
|
|
|
|
|
q{PVALUE}, |
6731
|
|
|
|
|
|
|
$tracelevel) |
6732
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6733
|
54
|
|
|
|
|
64
|
undef $lastsep; |
6734
|
54
|
|
|
|
|
102
|
$expectation->is(q{})->at($text); |
6735
|
|
|
|
|
|
|
|
6736
|
|
|
|
|
|
|
|
6737
|
54
|
50
|
66
|
|
|
276
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:')/) |
|
54
|
100
|
|
|
|
432
|
|
6738
|
|
|
|
|
|
|
{ |
6739
|
46
|
50
|
|
|
|
185
|
$text = $lastsep . $text if defined $lastsep; |
6740
|
46
|
|
|
|
|
102
|
$expectation->failed(); |
6741
|
46
|
50
|
|
|
|
102
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
6742
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6743
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6744
|
|
|
|
|
|
|
|
6745
|
46
|
|
|
|
|
82
|
last; |
6746
|
|
|
|
|
|
|
} |
6747
|
8
|
|
|
|
|
37
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
6748
|
8
|
|
|
|
|
24
|
substr($text,0,length($current_match),q{}); |
6749
|
8
|
50
|
|
|
|
19
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
6750
|
|
|
|
|
|
|
. $current_match . q{])}, |
6751
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6752
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6753
|
8
|
|
|
|
|
18
|
push @item, $item{__PATTERN1__}=$current_match; |
6754
|
|
|
|
|
|
|
|
6755
|
|
|
|
|
|
|
|
6756
|
8
|
50
|
|
|
|
17
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PSQUOTE]}, |
6757
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6758
|
|
|
|
|
|
|
q{PVALUE}, |
6759
|
|
|
|
|
|
|
$tracelevel) |
6760
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6761
|
2
|
|
|
2
|
|
14
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
1979
|
|
|
8
|
|
|
|
|
10
|
|
6762
|
8
|
|
|
|
|
19
|
$expectation->is(q{PSQUOTE})->at($text); |
6763
|
8
|
50
|
|
8
|
|
36
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PSQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
8
|
|
|
|
|
16
|
|
6764
|
|
|
|
|
|
|
{ |
6765
|
|
|
|
|
|
|
|
6766
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PSQUOTE]>>}, |
6767
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6768
|
|
|
|
|
|
|
q{PVALUE}, |
6769
|
|
|
|
|
|
|
$tracelevel) |
6770
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6771
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
6772
|
0
|
|
|
|
|
0
|
last; |
6773
|
|
|
|
|
|
|
} |
6774
|
8
|
50
|
|
|
|
25
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PSQUOTE]<< (return value: [} |
6775
|
|
|
|
|
|
|
. $_tok . q{]}, |
6776
|
|
|
|
|
|
|
|
6777
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6778
|
|
|
|
|
|
|
q{PVALUE}, |
6779
|
|
|
|
|
|
|
$tracelevel) |
6780
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6781
|
8
|
|
|
|
|
11
|
$item{q{PSQUOTE}} = $_tok; |
6782
|
8
|
|
|
|
|
13
|
push @item, $_tok; |
6783
|
|
|
|
|
|
|
|
6784
|
|
|
|
|
|
|
} |
6785
|
|
|
|
|
|
|
|
6786
|
8
|
50
|
|
|
|
14
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/'/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
6787
|
|
|
|
|
|
|
q{PVALUE}, |
6788
|
|
|
|
|
|
|
$tracelevel) |
6789
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6790
|
8
|
|
|
|
|
11
|
undef $lastsep; |
6791
|
8
|
|
|
|
|
14
|
$expectation->is(q{/'/})->at($text); |
6792
|
|
|
|
|
|
|
|
6793
|
|
|
|
|
|
|
|
6794
|
8
|
50
|
33
|
|
|
34
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:')/) |
|
8
|
50
|
|
|
|
76
|
|
6795
|
|
|
|
|
|
|
{ |
6796
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
6797
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
6798
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
6799
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6800
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6801
|
|
|
|
|
|
|
|
6802
|
0
|
|
|
|
|
0
|
last; |
6803
|
|
|
|
|
|
|
} |
6804
|
8
|
|
|
|
|
33
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
6805
|
8
|
|
|
|
|
21
|
substr($text,0,length($current_match),q{}); |
6806
|
8
|
50
|
|
|
|
18
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
6807
|
|
|
|
|
|
|
. $current_match . q{])}, |
6808
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6809
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6810
|
8
|
|
|
|
|
18
|
push @item, $item{__PATTERN2__}=$current_match; |
6811
|
|
|
|
|
|
|
|
6812
|
|
|
|
|
|
|
|
6813
|
8
|
50
|
|
|
|
17
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
6814
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6815
|
|
|
|
|
|
|
q{PVALUE}, |
6816
|
|
|
|
|
|
|
$tracelevel) |
6817
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6818
|
|
|
|
|
|
|
|
6819
|
|
|
|
|
|
|
|
6820
|
8
|
50
|
|
|
|
12
|
$_tok = ($_noactions) ? 0 : do {$return = $item{PSQUOTE}}; |
|
8
|
|
|
|
|
14
|
|
6821
|
8
|
50
|
|
|
|
17
|
unless (defined $_tok) |
6822
|
|
|
|
|
|
|
{ |
6823
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
6824
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6825
|
0
|
|
|
|
|
0
|
last; |
6826
|
|
|
|
|
|
|
} |
6827
|
8
|
50
|
|
|
|
16
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
6828
|
|
|
|
|
|
|
. $_tok . q{])}, |
6829
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6830
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6831
|
8
|
|
|
|
|
11
|
push @item, $_tok; |
6832
|
8
|
|
|
|
|
12
|
$item{__ACTION1__}=$_tok; |
6833
|
|
|
|
|
|
|
|
6834
|
|
|
|
|
|
|
|
6835
|
8
|
50
|
|
|
|
18
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/'/ PSQUOTE /'/]<<}, |
6836
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6837
|
|
|
|
|
|
|
q{PVALUE}, |
6838
|
|
|
|
|
|
|
$tracelevel) |
6839
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6840
|
|
|
|
|
|
|
|
6841
|
|
|
|
|
|
|
|
6842
|
|
|
|
|
|
|
|
6843
|
8
|
|
|
|
|
9
|
$_matched = 1; |
6844
|
8
|
|
|
|
|
13
|
last; |
6845
|
|
|
|
|
|
|
} |
6846
|
|
|
|
|
|
|
|
6847
|
|
|
|
|
|
|
|
6848
|
54
|
|
66
|
|
|
196
|
while (!$_matched && !$commit) |
6849
|
|
|
|
|
|
|
{ |
6850
|
|
|
|
|
|
|
|
6851
|
46
|
50
|
|
|
|
112
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/"/ PDQUOTE /"/]}, |
6852
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6853
|
|
|
|
|
|
|
q{PVALUE}, |
6854
|
|
|
|
|
|
|
$tracelevel) |
6855
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6856
|
46
|
|
|
|
|
96
|
my $thisprod = $thisrule->{"prods"}[1]; |
6857
|
46
|
|
|
|
|
72
|
$text = $_[1]; |
6858
|
46
|
|
|
|
|
53
|
my $_savetext; |
6859
|
46
|
|
|
|
|
89
|
@item = (q{PVALUE}); |
6860
|
46
|
|
|
|
|
94
|
%item = (__RULE__ => q{PVALUE}); |
6861
|
46
|
|
|
|
|
64
|
my $repcount = 0; |
6862
|
|
|
|
|
|
|
|
6863
|
|
|
|
|
|
|
|
6864
|
46
|
50
|
|
|
|
90
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/"/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
6865
|
|
|
|
|
|
|
q{PVALUE}, |
6866
|
|
|
|
|
|
|
$tracelevel) |
6867
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6868
|
46
|
|
|
|
|
58
|
undef $lastsep; |
6869
|
46
|
|
|
|
|
100
|
$expectation->is(q{})->at($text); |
6870
|
|
|
|
|
|
|
|
6871
|
|
|
|
|
|
|
|
6872
|
46
|
50
|
66
|
|
|
201
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:")/) |
|
46
|
100
|
|
|
|
372
|
|
6873
|
|
|
|
|
|
|
{ |
6874
|
38
|
50
|
|
|
|
100
|
$text = $lastsep . $text if defined $lastsep; |
6875
|
38
|
|
|
|
|
85
|
$expectation->failed(); |
6876
|
38
|
50
|
|
|
|
84
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
6877
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6878
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6879
|
|
|
|
|
|
|
|
6880
|
38
|
|
|
|
|
63
|
last; |
6881
|
|
|
|
|
|
|
} |
6882
|
8
|
|
|
|
|
38
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
6883
|
8
|
|
|
|
|
27
|
substr($text,0,length($current_match),q{}); |
6884
|
8
|
50
|
|
|
|
19
|
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
|
8
|
|
|
|
|
22
|
push @item, $item{__PATTERN1__}=$current_match; |
6889
|
|
|
|
|
|
|
|
6890
|
|
|
|
|
|
|
|
6891
|
8
|
50
|
|
|
|
15
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PDQUOTE]}, |
6892
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6893
|
|
|
|
|
|
|
q{PVALUE}, |
6894
|
|
|
|
|
|
|
$tracelevel) |
6895
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6896
|
2
|
|
|
2
|
|
12
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
2096
|
|
|
8
|
|
|
|
|
11
|
|
6897
|
8
|
|
|
|
|
18
|
$expectation->is(q{PDQUOTE})->at($text); |
6898
|
8
|
50
|
|
8
|
|
39
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PDQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
8
|
|
|
|
|
20
|
|
6899
|
|
|
|
|
|
|
{ |
6900
|
|
|
|
|
|
|
|
6901
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PDQUOTE]>>}, |
6902
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6903
|
|
|
|
|
|
|
q{PVALUE}, |
6904
|
|
|
|
|
|
|
$tracelevel) |
6905
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6906
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
6907
|
0
|
|
|
|
|
0
|
last; |
6908
|
|
|
|
|
|
|
} |
6909
|
8
|
50
|
|
|
|
27
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PDQUOTE]<< (return value: [} |
6910
|
|
|
|
|
|
|
. $_tok . q{]}, |
6911
|
|
|
|
|
|
|
|
6912
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6913
|
|
|
|
|
|
|
q{PVALUE}, |
6914
|
|
|
|
|
|
|
$tracelevel) |
6915
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6916
|
8
|
|
|
|
|
15
|
$item{q{PDQUOTE}} = $_tok; |
6917
|
8
|
|
|
|
|
13
|
push @item, $_tok; |
6918
|
|
|
|
|
|
|
|
6919
|
|
|
|
|
|
|
} |
6920
|
|
|
|
|
|
|
|
6921
|
8
|
50
|
|
|
|
14
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/"/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
6922
|
|
|
|
|
|
|
q{PVALUE}, |
6923
|
|
|
|
|
|
|
$tracelevel) |
6924
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6925
|
8
|
|
|
|
|
10
|
undef $lastsep; |
6926
|
8
|
|
|
|
|
18
|
$expectation->is(q{/"/})->at($text); |
6927
|
|
|
|
|
|
|
|
6928
|
|
|
|
|
|
|
|
6929
|
8
|
50
|
33
|
|
|
40
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:")/) |
|
8
|
50
|
|
|
|
70
|
|
6930
|
|
|
|
|
|
|
{ |
6931
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
6932
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
6933
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
6934
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6935
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6936
|
|
|
|
|
|
|
|
6937
|
0
|
|
|
|
|
0
|
last; |
6938
|
|
|
|
|
|
|
} |
6939
|
8
|
|
|
|
|
34
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
6940
|
8
|
|
|
|
|
23
|
substr($text,0,length($current_match),q{}); |
6941
|
8
|
50
|
|
|
|
19
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
6942
|
|
|
|
|
|
|
. $current_match . q{])}, |
6943
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6944
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6945
|
8
|
|
|
|
|
17
|
push @item, $item{__PATTERN2__}=$current_match; |
6946
|
|
|
|
|
|
|
|
6947
|
|
|
|
|
|
|
|
6948
|
8
|
50
|
|
|
|
18
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
6949
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6950
|
|
|
|
|
|
|
q{PVALUE}, |
6951
|
|
|
|
|
|
|
$tracelevel) |
6952
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6953
|
|
|
|
|
|
|
|
6954
|
|
|
|
|
|
|
|
6955
|
8
|
50
|
|
|
|
16
|
$_tok = ($_noactions) ? 0 : do {$return = $item{PDQUOTE}}; |
|
8
|
|
|
|
|
18
|
|
6956
|
8
|
50
|
|
|
|
18
|
unless (defined $_tok) |
6957
|
|
|
|
|
|
|
{ |
6958
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
6959
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6960
|
0
|
|
|
|
|
0
|
last; |
6961
|
|
|
|
|
|
|
} |
6962
|
8
|
50
|
|
|
|
17
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
6963
|
|
|
|
|
|
|
. $_tok . q{])}, |
6964
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
6965
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6966
|
8
|
|
|
|
|
11
|
push @item, $_tok; |
6967
|
8
|
|
|
|
|
13
|
$item{__ACTION1__}=$_tok; |
6968
|
|
|
|
|
|
|
|
6969
|
|
|
|
|
|
|
|
6970
|
8
|
50
|
|
|
|
20
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/"/ PDQUOTE /"/]<<}, |
6971
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
6972
|
|
|
|
|
|
|
q{PVALUE}, |
6973
|
|
|
|
|
|
|
$tracelevel) |
6974
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6975
|
|
|
|
|
|
|
|
6976
|
|
|
|
|
|
|
|
6977
|
|
|
|
|
|
|
|
6978
|
8
|
|
|
|
|
9
|
$_matched = 1; |
6979
|
8
|
|
|
|
|
20
|
last; |
6980
|
|
|
|
|
|
|
} |
6981
|
|
|
|
|
|
|
|
6982
|
|
|
|
|
|
|
|
6983
|
54
|
|
66
|
|
|
184
|
while (!$_matched && !$commit) |
6984
|
|
|
|
|
|
|
{ |
6985
|
|
|
|
|
|
|
|
6986
|
38
|
50
|
|
|
|
83
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/`/ PTICKED /`/]}, |
6987
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
6988
|
|
|
|
|
|
|
q{PVALUE}, |
6989
|
|
|
|
|
|
|
$tracelevel) |
6990
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
6991
|
38
|
|
|
|
|
58
|
my $thisprod = $thisrule->{"prods"}[2]; |
6992
|
38
|
|
|
|
|
64
|
$text = $_[1]; |
6993
|
38
|
|
|
|
|
37
|
my $_savetext; |
6994
|
38
|
|
|
|
|
63
|
@item = (q{PVALUE}); |
6995
|
38
|
|
|
|
|
78
|
%item = (__RULE__ => q{PVALUE}); |
6996
|
38
|
|
|
|
|
47
|
my $repcount = 0; |
6997
|
|
|
|
|
|
|
|
6998
|
|
|
|
|
|
|
|
6999
|
38
|
50
|
|
|
|
80
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/`/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
7000
|
|
|
|
|
|
|
q{PVALUE}, |
7001
|
|
|
|
|
|
|
$tracelevel) |
7002
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7003
|
38
|
|
|
|
|
43
|
undef $lastsep; |
7004
|
38
|
|
|
|
|
82
|
$expectation->is(q{})->at($text); |
7005
|
|
|
|
|
|
|
|
7006
|
|
|
|
|
|
|
|
7007
|
38
|
50
|
33
|
|
|
157
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:`)/) |
|
38
|
50
|
|
|
|
289
|
|
7008
|
|
|
|
|
|
|
{ |
7009
|
38
|
50
|
|
|
|
105
|
$text = $lastsep . $text if defined $lastsep; |
7010
|
38
|
|
|
|
|
86
|
$expectation->failed(); |
7011
|
38
|
50
|
|
|
|
86
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
7012
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7013
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7014
|
|
|
|
|
|
|
|
7015
|
38
|
|
|
|
|
61
|
last; |
7016
|
|
|
|
|
|
|
} |
7017
|
0
|
|
|
|
|
0
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
7018
|
0
|
|
|
|
|
0
|
substr($text,0,length($current_match),q{}); |
7019
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
7020
|
|
|
|
|
|
|
. $current_match . q{])}, |
7021
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7022
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7023
|
0
|
|
|
|
|
0
|
push @item, $item{__PATTERN1__}=$current_match; |
7024
|
|
|
|
|
|
|
|
7025
|
|
|
|
|
|
|
|
7026
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PTICKED]}, |
7027
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7028
|
|
|
|
|
|
|
q{PVALUE}, |
7029
|
|
|
|
|
|
|
$tracelevel) |
7030
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7031
|
2
|
|
|
2
|
|
16
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
1670
|
|
|
0
|
|
|
|
|
0
|
|
7032
|
0
|
|
|
|
|
0
|
$expectation->is(q{PTICKED})->at($text); |
7033
|
0
|
0
|
|
0
|
|
0
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PTICKED($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
0
|
|
|
|
|
0
|
|
7034
|
|
|
|
|
|
|
{ |
7035
|
|
|
|
|
|
|
|
7036
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PTICKED]>>}, |
7037
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7038
|
|
|
|
|
|
|
q{PVALUE}, |
7039
|
|
|
|
|
|
|
$tracelevel) |
7040
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7041
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
7042
|
0
|
|
|
|
|
0
|
last; |
7043
|
|
|
|
|
|
|
} |
7044
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PTICKED]<< (return value: [} |
7045
|
|
|
|
|
|
|
. $_tok . q{]}, |
7046
|
|
|
|
|
|
|
|
7047
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7048
|
|
|
|
|
|
|
q{PVALUE}, |
7049
|
|
|
|
|
|
|
$tracelevel) |
7050
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7051
|
0
|
|
|
|
|
0
|
$item{q{PTICKED}} = $_tok; |
7052
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
7053
|
|
|
|
|
|
|
|
7054
|
|
|
|
|
|
|
} |
7055
|
|
|
|
|
|
|
|
7056
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/`/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
7057
|
|
|
|
|
|
|
q{PVALUE}, |
7058
|
|
|
|
|
|
|
$tracelevel) |
7059
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7060
|
0
|
|
|
|
|
0
|
undef $lastsep; |
7061
|
0
|
|
|
|
|
0
|
$expectation->is(q{/`/})->at($text); |
7062
|
|
|
|
|
|
|
|
7063
|
|
|
|
|
|
|
|
7064
|
0
|
0
|
0
|
|
|
0
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:`)/) |
|
0
|
0
|
|
|
|
0
|
|
7065
|
|
|
|
|
|
|
{ |
7066
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
7067
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
7068
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
7069
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7070
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7071
|
|
|
|
|
|
|
|
7072
|
0
|
|
|
|
|
0
|
last; |
7073
|
|
|
|
|
|
|
} |
7074
|
0
|
|
|
|
|
0
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
7075
|
0
|
|
|
|
|
0
|
substr($text,0,length($current_match),q{}); |
7076
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
7077
|
|
|
|
|
|
|
. $current_match . q{])}, |
7078
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7079
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7080
|
0
|
|
|
|
|
0
|
push @item, $item{__PATTERN2__}=$current_match; |
7081
|
|
|
|
|
|
|
|
7082
|
|
|
|
|
|
|
|
7083
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
7084
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7085
|
|
|
|
|
|
|
q{PVALUE}, |
7086
|
|
|
|
|
|
|
$tracelevel) |
7087
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7088
|
|
|
|
|
|
|
|
7089
|
|
|
|
|
|
|
|
7090
|
0
|
0
|
|
|
|
0
|
$_tok = ($_noactions) ? 0 : do {$return = $item[1].$item[2].$item[3]}; |
|
0
|
|
|
|
|
0
|
|
7091
|
0
|
0
|
|
|
|
0
|
unless (defined $_tok) |
7092
|
|
|
|
|
|
|
{ |
7093
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
7094
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7095
|
0
|
|
|
|
|
0
|
last; |
7096
|
|
|
|
|
|
|
} |
7097
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
7098
|
|
|
|
|
|
|
. $_tok . q{])}, |
7099
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7100
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7101
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
7102
|
0
|
|
|
|
|
0
|
$item{__ACTION1__}=$_tok; |
7103
|
|
|
|
|
|
|
|
7104
|
|
|
|
|
|
|
|
7105
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/`/ PTICKED /`/]<<}, |
7106
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7107
|
|
|
|
|
|
|
q{PVALUE}, |
7108
|
|
|
|
|
|
|
$tracelevel) |
7109
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7110
|
|
|
|
|
|
|
|
7111
|
|
|
|
|
|
|
|
7112
|
|
|
|
|
|
|
|
7113
|
0
|
|
|
|
|
0
|
$_matched = 1; |
7114
|
0
|
|
|
|
|
0
|
last; |
7115
|
|
|
|
|
|
|
} |
7116
|
|
|
|
|
|
|
|
7117
|
|
|
|
|
|
|
|
7118
|
54
|
|
66
|
|
|
185
|
while (!$_matched && !$commit) |
7119
|
|
|
|
|
|
|
{ |
7120
|
|
|
|
|
|
|
|
7121
|
38
|
50
|
|
|
|
72
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [PNOTQUOTED]}, |
7122
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7123
|
|
|
|
|
|
|
q{PVALUE}, |
7124
|
|
|
|
|
|
|
$tracelevel) |
7125
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7126
|
38
|
|
|
|
|
63
|
my $thisprod = $thisrule->{"prods"}[3]; |
7127
|
38
|
|
|
|
|
60
|
$text = $_[1]; |
7128
|
38
|
|
|
|
|
37
|
my $_savetext; |
7129
|
38
|
|
|
|
|
78
|
@item = (q{PVALUE}); |
7130
|
38
|
|
|
|
|
83
|
%item = (__RULE__ => q{PVALUE}); |
7131
|
38
|
|
|
|
|
43
|
my $repcount = 0; |
7132
|
|
|
|
|
|
|
|
7133
|
|
|
|
|
|
|
|
7134
|
38
|
50
|
|
|
|
74
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PNOTQUOTED]}, |
7135
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7136
|
|
|
|
|
|
|
q{PVALUE}, |
7137
|
|
|
|
|
|
|
$tracelevel) |
7138
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7139
|
2
|
|
|
2
|
|
15
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
1921
|
|
|
38
|
|
|
|
|
44
|
|
7140
|
38
|
|
|
|
|
81
|
$expectation->is(q{})->at($text); |
7141
|
38
|
50
|
|
38
|
|
175
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PNOTQUOTED($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
38
|
|
|
|
|
81
|
|
7142
|
|
|
|
|
|
|
{ |
7143
|
|
|
|
|
|
|
|
7144
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PNOTQUOTED]>>}, |
7145
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7146
|
|
|
|
|
|
|
q{PVALUE}, |
7147
|
|
|
|
|
|
|
$tracelevel) |
7148
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7149
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
7150
|
0
|
|
|
|
|
0
|
last; |
7151
|
|
|
|
|
|
|
} |
7152
|
38
|
50
|
|
|
|
136
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PNOTQUOTED]<< (return value: [} |
7153
|
|
|
|
|
|
|
. $_tok . q{]}, |
7154
|
|
|
|
|
|
|
|
7155
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7156
|
|
|
|
|
|
|
q{PVALUE}, |
7157
|
|
|
|
|
|
|
$tracelevel) |
7158
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7159
|
38
|
|
|
|
|
71
|
$item{q{PNOTQUOTED}} = $_tok; |
7160
|
38
|
|
|
|
|
61
|
push @item, $_tok; |
7161
|
|
|
|
|
|
|
|
7162
|
|
|
|
|
|
|
} |
7163
|
|
|
|
|
|
|
|
7164
|
38
|
50
|
|
|
|
78
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
7165
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7166
|
|
|
|
|
|
|
q{PVALUE}, |
7167
|
|
|
|
|
|
|
$tracelevel) |
7168
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7169
|
|
|
|
|
|
|
|
7170
|
|
|
|
|
|
|
|
7171
|
38
|
50
|
|
|
|
64
|
$_tok = ($_noactions) ? 0 : do {$return = $item{PNOTQUOTED}}; |
|
38
|
|
|
|
|
84
|
|
7172
|
38
|
50
|
|
|
|
102
|
unless (defined $_tok) |
7173
|
|
|
|
|
|
|
{ |
7174
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
7175
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7176
|
0
|
|
|
|
|
0
|
last; |
7177
|
|
|
|
|
|
|
} |
7178
|
38
|
50
|
|
|
|
81
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
7179
|
|
|
|
|
|
|
. $_tok . q{])}, |
7180
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7181
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7182
|
38
|
|
|
|
|
57
|
push @item, $_tok; |
7183
|
38
|
|
|
|
|
61
|
$item{__ACTION1__}=$_tok; |
7184
|
|
|
|
|
|
|
|
7185
|
|
|
|
|
|
|
|
7186
|
38
|
50
|
|
|
|
85
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [PNOTQUOTED]<<}, |
7187
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7188
|
|
|
|
|
|
|
q{PVALUE}, |
7189
|
|
|
|
|
|
|
$tracelevel) |
7190
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7191
|
|
|
|
|
|
|
|
7192
|
|
|
|
|
|
|
|
7193
|
|
|
|
|
|
|
|
7194
|
38
|
|
|
|
|
42
|
$_matched = 1; |
7195
|
38
|
|
|
|
|
57
|
last; |
7196
|
|
|
|
|
|
|
} |
7197
|
|
|
|
|
|
|
|
7198
|
|
|
|
|
|
|
|
7199
|
54
|
50
|
33
|
|
|
143
|
unless ( $_matched || defined($score) ) |
7200
|
|
|
|
|
|
|
{ |
7201
|
|
|
|
|
|
|
|
7202
|
|
|
|
|
|
|
|
7203
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
7204
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
7205
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7206
|
|
|
|
|
|
|
q{PVALUE}, |
7207
|
|
|
|
|
|
|
$tracelevel) |
7208
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7209
|
0
|
|
|
|
|
0
|
return undef; |
7210
|
|
|
|
|
|
|
} |
7211
|
54
|
50
|
33
|
|
|
160
|
if (!defined($return) && defined($score)) |
7212
|
|
|
|
|
|
|
{ |
7213
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
7214
|
|
|
|
|
|
|
q{PVALUE}, |
7215
|
|
|
|
|
|
|
$tracelevel) |
7216
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7217
|
0
|
|
|
|
|
0
|
$return = $score_return; |
7218
|
|
|
|
|
|
|
} |
7219
|
54
|
|
|
|
|
60
|
splice @{$thisparser->{errors}}, $err_at; |
|
54
|
|
|
|
|
98
|
|
7220
|
54
|
50
|
|
|
|
130
|
$return = $item[$#item] unless defined $return; |
7221
|
54
|
50
|
|
|
|
156
|
if (defined $::RD_TRACE) |
7222
|
|
|
|
|
|
|
{ |
7223
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
7224
|
|
|
|
|
|
|
$return . q{])}, "", |
7225
|
|
|
|
|
|
|
q{PVALUE}, |
7226
|
|
|
|
|
|
|
$tracelevel); |
7227
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
7228
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
7229
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7230
|
|
|
|
|
|
|
, q{PVALUE}, |
7231
|
|
|
|
|
|
|
$tracelevel) |
7232
|
|
|
|
|
|
|
} |
7233
|
54
|
|
|
|
|
98
|
$_[1] = $text; |
7234
|
54
|
|
|
|
|
391
|
return $return; |
7235
|
|
|
|
|
|
|
} |
7236
|
|
|
|
|
|
|
|
7237
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
7238
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::COMMENT |
7239
|
|
|
|
|
|
|
{ |
7240
|
75
|
|
|
75
|
|
141
|
my $thisparser = $_[0]; |
7241
|
2
|
|
|
2
|
|
16
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
2416
|
|
7242
|
75
|
|
50
|
|
|
201
|
local $tracelevel = ($tracelevel||0)+1; |
7243
|
75
|
|
|
|
|
102
|
$ERRORS = 0; |
7244
|
75
|
|
|
|
|
162
|
my $thisrule = $thisparser->{"rules"}{"COMMENT"}; |
7245
|
|
|
|
|
|
|
|
7246
|
75
|
50
|
|
|
|
150
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [COMMENT]}, |
7247
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7248
|
|
|
|
|
|
|
q{COMMENT}, |
7249
|
|
|
|
|
|
|
$tracelevel) |
7250
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7251
|
|
|
|
|
|
|
|
7252
|
|
|
|
|
|
|
|
7253
|
75
|
|
|
|
|
90
|
my $err_at = @{$thisparser->{errors}}; |
|
75
|
|
|
|
|
136
|
|
7254
|
|
|
|
|
|
|
|
7255
|
75
|
|
|
|
|
113
|
my $score; |
7256
|
|
|
|
|
|
|
my $score_return; |
7257
|
0
|
|
|
|
|
0
|
my $_tok; |
7258
|
75
|
|
|
|
|
89
|
my $return = undef; |
7259
|
75
|
|
|
|
|
91
|
my $_matched=0; |
7260
|
75
|
|
|
|
|
100
|
my $commit=0; |
7261
|
75
|
|
|
|
|
122
|
my @item = (); |
7262
|
75
|
|
|
|
|
107
|
my %item = (); |
7263
|
75
|
|
|
|
|
95
|
my $repeating = $_[2]; |
7264
|
75
|
|
|
|
|
105
|
my $_noactions = $_[3]; |
7265
|
75
|
50
|
|
|
|
155
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
75
|
|
|
|
|
83
|
|
|
75
|
|
|
|
|
141
|
|
7266
|
75
|
|
|
|
|
110
|
my $_itempos = $_[5]; |
7267
|
75
|
50
|
|
|
|
224
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
7268
|
75
|
|
|
|
|
101
|
my $text; |
7269
|
|
|
|
|
|
|
my $lastsep; |
7270
|
0
|
|
|
|
|
0
|
my $current_match; |
7271
|
75
|
|
|
|
|
163
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/#[^\\n]*/}); |
7272
|
75
|
|
|
|
|
186
|
$expectation->at($_[1]); |
7273
|
|
|
|
|
|
|
|
7274
|
75
|
|
|
|
|
86
|
my $thisline; |
7275
|
75
|
|
|
|
|
213
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
7276
|
|
|
|
|
|
|
|
7277
|
|
|
|
|
|
|
|
7278
|
|
|
|
|
|
|
|
7279
|
75
|
|
33
|
|
|
292
|
while (!$_matched && !$commit) |
7280
|
|
|
|
|
|
|
{ |
7281
|
|
|
|
|
|
|
|
7282
|
75
|
50
|
|
|
|
225
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/#[^\\n]*/]}, |
7283
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7284
|
|
|
|
|
|
|
q{COMMENT}, |
7285
|
|
|
|
|
|
|
$tracelevel) |
7286
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7287
|
75
|
|
|
|
|
158
|
my $thisprod = $thisrule->{"prods"}[0]; |
7288
|
75
|
|
|
|
|
116
|
$text = $_[1]; |
7289
|
75
|
|
|
|
|
97
|
my $_savetext; |
7290
|
75
|
|
|
|
|
126
|
@item = (q{COMMENT}); |
7291
|
75
|
|
|
|
|
142
|
%item = (__RULE__ => q{COMMENT}); |
7292
|
75
|
|
|
|
|
89
|
my $repcount = 0; |
7293
|
|
|
|
|
|
|
|
7294
|
|
|
|
|
|
|
|
7295
|
75
|
50
|
|
|
|
156
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/#[^\\n]*/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
7296
|
|
|
|
|
|
|
q{COMMENT}, |
7297
|
|
|
|
|
|
|
$tracelevel) |
7298
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7299
|
75
|
|
|
|
|
97
|
undef $lastsep; |
7300
|
75
|
|
|
|
|
195
|
$expectation->is(q{})->at($text); |
7301
|
|
|
|
|
|
|
|
7302
|
|
|
|
|
|
|
|
7303
|
75
|
100
|
66
|
|
|
383
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:#[^\n]*)/) |
|
75
|
100
|
|
|
|
789
|
|
7304
|
|
|
|
|
|
|
{ |
7305
|
54
|
50
|
|
|
|
153
|
$text = $lastsep . $text if defined $lastsep; |
7306
|
54
|
|
|
|
|
139
|
$expectation->failed(); |
7307
|
54
|
50
|
|
|
|
132
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
7308
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7309
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7310
|
|
|
|
|
|
|
|
7311
|
54
|
|
|
|
|
90
|
last; |
7312
|
|
|
|
|
|
|
} |
7313
|
21
|
|
|
|
|
127
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
7314
|
21
|
|
|
|
|
80
|
substr($text,0,length($current_match),q{}); |
7315
|
21
|
50
|
|
|
|
53
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
7316
|
|
|
|
|
|
|
. $current_match . q{])}, |
7317
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7318
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7319
|
21
|
|
|
|
|
47
|
push @item, $item{__PATTERN1__}=$current_match; |
7320
|
|
|
|
|
|
|
|
7321
|
|
|
|
|
|
|
|
7322
|
21
|
50
|
|
|
|
52
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
7323
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7324
|
|
|
|
|
|
|
q{COMMENT}, |
7325
|
|
|
|
|
|
|
$tracelevel) |
7326
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7327
|
|
|
|
|
|
|
|
7328
|
|
|
|
|
|
|
|
7329
|
21
|
50
|
|
|
|
48
|
$_tok = ($_noactions) ? 0 : do {$return = ''}; |
|
21
|
|
|
|
|
38
|
|
7330
|
21
|
50
|
|
|
|
58
|
unless (defined $_tok) |
7331
|
|
|
|
|
|
|
{ |
7332
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
7333
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7334
|
0
|
|
|
|
|
0
|
last; |
7335
|
|
|
|
|
|
|
} |
7336
|
21
|
50
|
|
|
|
42
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
7337
|
|
|
|
|
|
|
. $_tok . q{])}, |
7338
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7339
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7340
|
21
|
|
|
|
|
23
|
push @item, $_tok; |
7341
|
21
|
|
|
|
|
41
|
$item{__ACTION1__}=$_tok; |
7342
|
|
|
|
|
|
|
|
7343
|
|
|
|
|
|
|
|
7344
|
21
|
50
|
|
|
|
36
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/#[^\\n]*/]<<}, |
7345
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7346
|
|
|
|
|
|
|
q{COMMENT}, |
7347
|
|
|
|
|
|
|
$tracelevel) |
7348
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7349
|
|
|
|
|
|
|
|
7350
|
|
|
|
|
|
|
|
7351
|
|
|
|
|
|
|
|
7352
|
21
|
|
|
|
|
23
|
$_matched = 1; |
7353
|
21
|
|
|
|
|
32
|
last; |
7354
|
|
|
|
|
|
|
} |
7355
|
|
|
|
|
|
|
|
7356
|
|
|
|
|
|
|
|
7357
|
75
|
100
|
66
|
|
|
319
|
unless ( $_matched || defined($score) ) |
7358
|
|
|
|
|
|
|
{ |
7359
|
|
|
|
|
|
|
|
7360
|
|
|
|
|
|
|
|
7361
|
54
|
|
|
|
|
72
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
7362
|
54
|
50
|
|
|
|
120
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
7363
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7364
|
|
|
|
|
|
|
q{COMMENT}, |
7365
|
|
|
|
|
|
|
$tracelevel) |
7366
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7367
|
54
|
|
|
|
|
346
|
return undef; |
7368
|
|
|
|
|
|
|
} |
7369
|
21
|
50
|
33
|
|
|
55
|
if (!defined($return) && defined($score)) |
7370
|
|
|
|
|
|
|
{ |
7371
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
7372
|
|
|
|
|
|
|
q{COMMENT}, |
7373
|
|
|
|
|
|
|
$tracelevel) |
7374
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7375
|
0
|
|
|
|
|
0
|
$return = $score_return; |
7376
|
|
|
|
|
|
|
} |
7377
|
21
|
|
|
|
|
22
|
splice @{$thisparser->{errors}}, $err_at; |
|
21
|
|
|
|
|
45
|
|
7378
|
21
|
50
|
|
|
|
44
|
$return = $item[$#item] unless defined $return; |
7379
|
21
|
50
|
|
|
|
46
|
if (defined $::RD_TRACE) |
7380
|
|
|
|
|
|
|
{ |
7381
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
7382
|
|
|
|
|
|
|
$return . q{])}, "", |
7383
|
|
|
|
|
|
|
q{COMMENT}, |
7384
|
|
|
|
|
|
|
$tracelevel); |
7385
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
7386
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
7387
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7388
|
|
|
|
|
|
|
, q{COMMENT}, |
7389
|
|
|
|
|
|
|
$tracelevel) |
7390
|
|
|
|
|
|
|
} |
7391
|
21
|
|
|
|
|
36
|
$_[1] = $text; |
7392
|
21
|
|
|
|
|
150
|
return $return; |
7393
|
|
|
|
|
|
|
} |
7394
|
|
|
|
|
|
|
|
7395
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
7396
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PARAM |
7397
|
|
|
|
|
|
|
{ |
7398
|
176
|
|
|
176
|
|
241
|
my $thisparser = $_[0]; |
7399
|
2
|
|
|
2
|
|
16
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
799
|
|
7400
|
176
|
|
50
|
|
|
404
|
local $tracelevel = ($tracelevel||0)+1; |
7401
|
176
|
|
|
|
|
211
|
$ERRORS = 0; |
7402
|
176
|
|
|
|
|
294
|
my $thisrule = $thisparser->{"rules"}{"PARAM"}; |
7403
|
|
|
|
|
|
|
|
7404
|
176
|
50
|
|
|
|
350
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [PARAM]}, |
7405
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7406
|
|
|
|
|
|
|
q{PARAM}, |
7407
|
|
|
|
|
|
|
$tracelevel) |
7408
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7409
|
|
|
|
|
|
|
|
7410
|
|
|
|
|
|
|
|
7411
|
176
|
|
|
|
|
161
|
my $err_at = @{$thisparser->{errors}}; |
|
176
|
|
|
|
|
274
|
|
7412
|
|
|
|
|
|
|
|
7413
|
176
|
|
|
|
|
200
|
my $score; |
7414
|
|
|
|
|
|
|
my $score_return; |
7415
|
0
|
|
|
|
|
0
|
my $_tok; |
7416
|
176
|
|
|
|
|
202
|
my $return = undef; |
7417
|
176
|
|
|
|
|
197
|
my $_matched=0; |
7418
|
176
|
|
|
|
|
177
|
my $commit=0; |
7419
|
176
|
|
|
|
|
236
|
my @item = (); |
7420
|
176
|
|
|
|
|
257
|
my %item = (); |
7421
|
176
|
|
|
|
|
212
|
my $repeating = $_[2]; |
7422
|
176
|
|
|
|
|
179
|
my $_noactions = $_[3]; |
7423
|
176
|
50
|
|
|
|
309
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
176
|
|
|
|
|
168
|
|
|
176
|
|
|
|
|
307
|
|
7424
|
176
|
|
|
|
|
240
|
my $_itempos = $_[5]; |
7425
|
176
|
50
|
|
|
|
466
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
7426
|
176
|
|
|
|
|
212
|
my $text; |
7427
|
|
|
|
|
|
|
my $lastsep; |
7428
|
0
|
|
|
|
|
0
|
my $current_match; |
7429
|
176
|
|
|
|
|
361
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{PNAME}); |
7430
|
176
|
|
|
|
|
441
|
$expectation->at($_[1]); |
7431
|
|
|
|
|
|
|
|
7432
|
176
|
|
|
|
|
183
|
my $thisline; |
7433
|
176
|
|
|
|
|
440
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
7434
|
|
|
|
|
|
|
|
7435
|
|
|
|
|
|
|
|
7436
|
|
|
|
|
|
|
|
7437
|
176
|
|
33
|
|
|
620
|
while (!$_matched && !$commit) |
7438
|
|
|
|
|
|
|
{ |
7439
|
176
|
50
|
|
|
|
350
|
local $skip = defined($skip) ? $skip : $Parse::RecDescent::_Runtime::skip; |
7440
|
176
|
50
|
|
|
|
333
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [PNAME '=' <skip: qr//> PVALUE]}, |
7441
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7442
|
|
|
|
|
|
|
q{PARAM}, |
7443
|
|
|
|
|
|
|
$tracelevel) |
7444
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7445
|
176
|
|
|
|
|
288
|
my $thisprod = $thisrule->{"prods"}[0]; |
7446
|
176
|
|
|
|
|
214
|
$text = $_[1]; |
7447
|
176
|
|
|
|
|
179
|
my $_savetext; |
7448
|
176
|
|
|
|
|
267
|
@item = (q{PARAM}); |
7449
|
176
|
|
|
|
|
308
|
%item = (__RULE__ => q{PARAM}); |
7450
|
176
|
|
|
|
|
176
|
my $repcount = 0; |
7451
|
|
|
|
|
|
|
|
7452
|
|
|
|
|
|
|
|
7453
|
176
|
50
|
|
|
|
313
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PNAME]}, |
7454
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7455
|
|
|
|
|
|
|
q{PARAM}, |
7456
|
|
|
|
|
|
|
$tracelevel) |
7457
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7458
|
2
|
|
|
2
|
|
13
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1115
|
|
|
176
|
|
|
|
|
175
|
|
7459
|
176
|
|
|
|
|
313
|
$expectation->is(q{})->at($text); |
7460
|
176
|
100
|
|
176
|
|
686
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
176
|
|
|
|
|
343
|
|
7461
|
|
|
|
|
|
|
{ |
7462
|
|
|
|
|
|
|
|
7463
|
70
|
50
|
|
|
|
141
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PNAME]>>}, |
7464
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7465
|
|
|
|
|
|
|
q{PARAM}, |
7466
|
|
|
|
|
|
|
$tracelevel) |
7467
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7468
|
70
|
|
|
|
|
177
|
$expectation->failed(); |
7469
|
70
|
|
|
|
|
111
|
last; |
7470
|
|
|
|
|
|
|
} |
7471
|
106
|
50
|
|
|
|
323
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PNAME]<< (return value: [} |
7472
|
|
|
|
|
|
|
. $_tok . q{]}, |
7473
|
|
|
|
|
|
|
|
7474
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7475
|
|
|
|
|
|
|
q{PARAM}, |
7476
|
|
|
|
|
|
|
$tracelevel) |
7477
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7478
|
106
|
|
|
|
|
188
|
$item{q{PNAME}} = $_tok; |
7479
|
106
|
|
|
|
|
153
|
push @item, $_tok; |
7480
|
|
|
|
|
|
|
|
7481
|
|
|
|
|
|
|
} |
7482
|
|
|
|
|
|
|
|
7483
|
106
|
50
|
|
|
|
223
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: ['=']}, |
7484
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7485
|
|
|
|
|
|
|
q{PARAM}, |
7486
|
|
|
|
|
|
|
$tracelevel) |
7487
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7488
|
106
|
|
|
|
|
124
|
undef $lastsep; |
7489
|
106
|
|
|
|
|
237
|
$expectation->is(q{'='})->at($text); |
7490
|
|
|
|
|
|
|
|
7491
|
|
|
|
|
|
|
|
7492
|
106
|
50
|
66
|
|
|
464
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\=/) |
|
106
|
100
|
|
|
|
843
|
|
7493
|
|
|
|
|
|
|
{ |
7494
|
52
|
50
|
|
|
|
160
|
$text = $lastsep . $text if defined $lastsep; |
7495
|
|
|
|
|
|
|
|
7496
|
52
|
|
|
|
|
128
|
$expectation->failed(); |
7497
|
52
|
50
|
|
|
|
112
|
Parse::RecDescent::_Runtime::_trace(qq{<<Didn't match terminal>>}, |
7498
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7499
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7500
|
52
|
|
|
|
|
95
|
last; |
7501
|
|
|
|
|
|
|
} |
7502
|
54
|
|
|
|
|
244
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
7503
|
54
|
|
|
|
|
150
|
substr($text,0,length($current_match),q{}); |
7504
|
54
|
50
|
|
|
|
128
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
7505
|
|
|
|
|
|
|
. $current_match . q{])}, |
7506
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7507
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7508
|
54
|
|
|
|
|
120
|
push @item, $item{__STRING1__}=$current_match; |
7509
|
|
|
|
|
|
|
|
7510
|
|
|
|
|
|
|
|
7511
|
|
|
|
|
|
|
|
7512
|
|
|
|
|
|
|
|
7513
|
54
|
50
|
|
|
|
104
|
Parse::RecDescent::_Runtime::_trace(q{Trying directive: [<skip: qr//>]}, |
7514
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7515
|
|
|
|
|
|
|
q{PARAM}, |
7516
|
|
|
|
|
|
|
$tracelevel) |
7517
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7518
|
54
|
|
|
|
|
67
|
$_tok = do { my $oldskip = $skip; $skip= qr//; $oldskip }; |
|
54
|
|
|
|
|
81
|
|
|
54
|
|
|
|
|
172
|
|
|
54
|
|
|
|
|
105
|
|
7519
|
54
|
50
|
|
|
|
116
|
if (defined($_tok)) |
7520
|
|
|
|
|
|
|
{ |
7521
|
54
|
50
|
|
|
|
116
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched directive<< (return value: [} |
7522
|
|
|
|
|
|
|
. $_tok . q{])}, |
7523
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7524
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7525
|
|
|
|
|
|
|
} |
7526
|
|
|
|
|
|
|
else |
7527
|
|
|
|
|
|
|
{ |
7528
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match directive>>}, |
7529
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7530
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7531
|
|
|
|
|
|
|
} |
7532
|
|
|
|
|
|
|
|
7533
|
54
|
50
|
|
|
|
107
|
last unless defined $_tok; |
7534
|
54
|
|
|
|
|
98
|
push @item, $item{__DIRECTIVE1__}=$_tok; |
7535
|
|
|
|
|
|
|
|
7536
|
|
|
|
|
|
|
|
7537
|
54
|
50
|
|
|
|
123
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PVALUE]}, |
7538
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7539
|
|
|
|
|
|
|
q{PARAM}, |
7540
|
|
|
|
|
|
|
$tracelevel) |
7541
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7542
|
2
|
|
|
2
|
|
10
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
1319
|
|
|
54
|
|
|
|
|
78
|
|
7543
|
54
|
|
|
|
|
138
|
$expectation->is(q{PVALUE})->at($text); |
7544
|
54
|
50
|
|
54
|
|
250
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PVALUE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
54
|
|
|
|
|
112
|
|
7545
|
|
|
|
|
|
|
{ |
7546
|
|
|
|
|
|
|
|
7547
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PVALUE]>>}, |
7548
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7549
|
|
|
|
|
|
|
q{PARAM}, |
7550
|
|
|
|
|
|
|
$tracelevel) |
7551
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7552
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
7553
|
0
|
|
|
|
|
0
|
last; |
7554
|
|
|
|
|
|
|
} |
7555
|
54
|
50
|
|
|
|
172
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PVALUE]<< (return value: [} |
7556
|
|
|
|
|
|
|
. $_tok . q{]}, |
7557
|
|
|
|
|
|
|
|
7558
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7559
|
|
|
|
|
|
|
q{PARAM}, |
7560
|
|
|
|
|
|
|
$tracelevel) |
7561
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7562
|
54
|
|
|
|
|
107
|
$item{q{PVALUE}} = $_tok; |
7563
|
54
|
|
|
|
|
84
|
push @item, $_tok; |
7564
|
|
|
|
|
|
|
|
7565
|
|
|
|
|
|
|
} |
7566
|
|
|
|
|
|
|
|
7567
|
54
|
50
|
|
|
|
120
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
7568
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7569
|
|
|
|
|
|
|
q{PARAM}, |
7570
|
|
|
|
|
|
|
$tracelevel) |
7571
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7572
|
|
|
|
|
|
|
|
7573
|
|
|
|
|
|
|
|
7574
|
54
|
50
|
|
|
|
90
|
$_tok = ($_noactions) ? 0 : do {$return = $item{PNAME}.'='.$item{PVALUE}}; |
|
54
|
|
|
|
|
162
|
|
7575
|
54
|
50
|
|
|
|
118
|
unless (defined $_tok) |
7576
|
|
|
|
|
|
|
{ |
7577
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
7578
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7579
|
0
|
|
|
|
|
0
|
last; |
7580
|
|
|
|
|
|
|
} |
7581
|
54
|
50
|
|
|
|
116
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
7582
|
|
|
|
|
|
|
. $_tok . q{])}, |
7583
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7584
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7585
|
54
|
|
|
|
|
75
|
push @item, $_tok; |
7586
|
54
|
|
|
|
|
117
|
$item{__ACTION1__}=$_tok; |
7587
|
|
|
|
|
|
|
|
7588
|
|
|
|
|
|
|
|
7589
|
54
|
50
|
|
|
|
111
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [PNAME '=' <skip: qr//> PVALUE]<<}, |
7590
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7591
|
|
|
|
|
|
|
q{PARAM}, |
7592
|
|
|
|
|
|
|
$tracelevel) |
7593
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7594
|
|
|
|
|
|
|
|
7595
|
|
|
|
|
|
|
|
7596
|
|
|
|
|
|
|
|
7597
|
54
|
|
|
|
|
60
|
$_matched = 1; |
7598
|
54
|
|
|
|
|
169
|
last; |
7599
|
|
|
|
|
|
|
} |
7600
|
|
|
|
|
|
|
|
7601
|
|
|
|
|
|
|
|
7602
|
176
|
100
|
66
|
|
|
793
|
unless ( $_matched || defined($score) ) |
7603
|
|
|
|
|
|
|
{ |
7604
|
|
|
|
|
|
|
|
7605
|
|
|
|
|
|
|
|
7606
|
122
|
|
|
|
|
174
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
7607
|
122
|
50
|
|
|
|
223
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
7608
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7609
|
|
|
|
|
|
|
q{PARAM}, |
7610
|
|
|
|
|
|
|
$tracelevel) |
7611
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7612
|
122
|
|
|
|
|
738
|
return undef; |
7613
|
|
|
|
|
|
|
} |
7614
|
54
|
50
|
33
|
|
|
136
|
if (!defined($return) && defined($score)) |
7615
|
|
|
|
|
|
|
{ |
7616
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
7617
|
|
|
|
|
|
|
q{PARAM}, |
7618
|
|
|
|
|
|
|
$tracelevel) |
7619
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7620
|
0
|
|
|
|
|
0
|
$return = $score_return; |
7621
|
|
|
|
|
|
|
} |
7622
|
54
|
|
|
|
|
55
|
splice @{$thisparser->{errors}}, $err_at; |
|
54
|
|
|
|
|
105
|
|
7623
|
54
|
50
|
|
|
|
119
|
$return = $item[$#item] unless defined $return; |
7624
|
54
|
50
|
|
|
|
106
|
if (defined $::RD_TRACE) |
7625
|
|
|
|
|
|
|
{ |
7626
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
7627
|
|
|
|
|
|
|
$return . q{])}, "", |
7628
|
|
|
|
|
|
|
q{PARAM}, |
7629
|
|
|
|
|
|
|
$tracelevel); |
7630
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
7631
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
7632
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7633
|
|
|
|
|
|
|
, q{PARAM}, |
7634
|
|
|
|
|
|
|
$tracelevel) |
7635
|
|
|
|
|
|
|
} |
7636
|
54
|
|
|
|
|
103
|
$_[1] = $text; |
7637
|
54
|
|
|
|
|
421
|
return $return; |
7638
|
|
|
|
|
|
|
} |
7639
|
|
|
|
|
|
|
|
7640
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
7641
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::TBNAME |
7642
|
|
|
|
|
|
|
{ |
7643
|
252
|
|
|
252
|
|
346
|
my $thisparser = $_[0]; |
7644
|
2
|
|
|
2
|
|
11
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
1113
|
|
7645
|
252
|
|
50
|
|
|
597
|
local $tracelevel = ($tracelevel||0)+1; |
7646
|
252
|
|
|
|
|
279
|
$ERRORS = 0; |
7647
|
252
|
|
|
|
|
418
|
my $thisrule = $thisparser->{"rules"}{"TBNAME"}; |
7648
|
|
|
|
|
|
|
|
7649
|
252
|
50
|
|
|
|
551
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [TBNAME]}, |
7650
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7651
|
|
|
|
|
|
|
q{TBNAME}, |
7652
|
|
|
|
|
|
|
$tracelevel) |
7653
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7654
|
|
|
|
|
|
|
|
7655
|
|
|
|
|
|
|
|
7656
|
252
|
|
|
|
|
387
|
my $err_at = @{$thisparser->{errors}}; |
|
252
|
|
|
|
|
421
|
|
7657
|
|
|
|
|
|
|
|
7658
|
252
|
|
|
|
|
314
|
my $score; |
7659
|
|
|
|
|
|
|
my $score_return; |
7660
|
0
|
|
|
|
|
0
|
my $_tok; |
7661
|
252
|
|
|
|
|
270
|
my $return = undef; |
7662
|
252
|
|
|
|
|
272
|
my $_matched=0; |
7663
|
252
|
|
|
|
|
244
|
my $commit=0; |
7664
|
252
|
|
|
|
|
324
|
my @item = (); |
7665
|
252
|
|
|
|
|
347
|
my %item = (); |
7666
|
252
|
|
|
|
|
275
|
my $repeating = $_[2]; |
7667
|
252
|
|
|
|
|
266
|
my $_noactions = $_[3]; |
7668
|
252
|
50
|
|
|
|
444
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
252
|
|
|
|
|
240
|
|
|
252
|
|
|
|
|
409
|
|
7669
|
252
|
|
|
|
|
318
|
my $_itempos = $_[5]; |
7670
|
252
|
50
|
|
|
|
635
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
7671
|
252
|
|
|
|
|
285
|
my $text; |
7672
|
|
|
|
|
|
|
my $lastsep; |
7673
|
0
|
|
|
|
|
0
|
my $current_match; |
7674
|
252
|
|
|
|
|
570
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/::/, or BNAME}); |
7675
|
252
|
|
|
|
|
524
|
$expectation->at($_[1]); |
7676
|
|
|
|
|
|
|
|
7677
|
252
|
|
|
|
|
238
|
my $thisline; |
7678
|
252
|
|
|
|
|
641
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
7679
|
|
|
|
|
|
|
|
7680
|
|
|
|
|
|
|
|
7681
|
|
|
|
|
|
|
|
7682
|
252
|
|
33
|
|
|
864
|
while (!$_matched && !$commit) |
7683
|
|
|
|
|
|
|
{ |
7684
|
|
|
|
|
|
|
|
7685
|
252
|
50
|
|
|
|
476
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/::/ BNAME]}, |
7686
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7687
|
|
|
|
|
|
|
q{TBNAME}, |
7688
|
|
|
|
|
|
|
$tracelevel) |
7689
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7690
|
252
|
|
|
|
|
390
|
my $thisprod = $thisrule->{"prods"}[0]; |
7691
|
252
|
|
|
|
|
389
|
$text = $_[1]; |
7692
|
252
|
|
|
|
|
262
|
my $_savetext; |
7693
|
252
|
|
|
|
|
393
|
@item = (q{TBNAME}); |
7694
|
252
|
|
|
|
|
431
|
%item = (__RULE__ => q{TBNAME}); |
7695
|
252
|
|
|
|
|
262
|
my $repcount = 0; |
7696
|
|
|
|
|
|
|
|
7697
|
|
|
|
|
|
|
|
7698
|
252
|
50
|
|
|
|
456
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/::/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
7699
|
|
|
|
|
|
|
q{TBNAME}, |
7700
|
|
|
|
|
|
|
$tracelevel) |
7701
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7702
|
252
|
|
|
|
|
303
|
undef $lastsep; |
7703
|
252
|
|
|
|
|
530
|
$expectation->is(q{})->at($text); |
7704
|
|
|
|
|
|
|
|
7705
|
|
|
|
|
|
|
|
7706
|
252
|
100
|
66
|
|
|
1046
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:::)/) |
|
252
|
100
|
|
|
|
2137
|
|
7707
|
|
|
|
|
|
|
{ |
7708
|
248
|
50
|
|
|
|
632
|
$text = $lastsep . $text if defined $lastsep; |
7709
|
248
|
|
|
|
|
538
|
$expectation->failed(); |
7710
|
248
|
50
|
|
|
|
452
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
7711
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7712
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7713
|
|
|
|
|
|
|
|
7714
|
248
|
|
|
|
|
415
|
last; |
7715
|
|
|
|
|
|
|
} |
7716
|
4
|
|
|
|
|
15
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
7717
|
4
|
|
|
|
|
10
|
substr($text,0,length($current_match),q{}); |
7718
|
4
|
50
|
|
|
|
9
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
7719
|
|
|
|
|
|
|
. $current_match . q{])}, |
7720
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7721
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7722
|
4
|
|
|
|
|
9
|
push @item, $item{__PATTERN1__}=$current_match; |
7723
|
|
|
|
|
|
|
|
7724
|
|
|
|
|
|
|
|
7725
|
4
|
50
|
|
|
|
10
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [BNAME]}, |
7726
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7727
|
|
|
|
|
|
|
q{TBNAME}, |
7728
|
|
|
|
|
|
|
$tracelevel) |
7729
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7730
|
2
|
|
|
2
|
|
12
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
914
|
|
|
4
|
|
|
|
|
5
|
|
7731
|
4
|
|
|
|
|
10
|
$expectation->is(q{BNAME})->at($text); |
7732
|
4
|
50
|
|
4
|
|
16
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
4
|
|
|
|
|
8
|
|
7733
|
|
|
|
|
|
|
{ |
7734
|
|
|
|
|
|
|
|
7735
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [BNAME]>>}, |
7736
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7737
|
|
|
|
|
|
|
q{TBNAME}, |
7738
|
|
|
|
|
|
|
$tracelevel) |
7739
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7740
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
7741
|
0
|
|
|
|
|
0
|
last; |
7742
|
|
|
|
|
|
|
} |
7743
|
4
|
50
|
|
|
|
12
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [BNAME]<< (return value: [} |
7744
|
|
|
|
|
|
|
. $_tok . q{]}, |
7745
|
|
|
|
|
|
|
|
7746
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7747
|
|
|
|
|
|
|
q{TBNAME}, |
7748
|
|
|
|
|
|
|
$tracelevel) |
7749
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7750
|
4
|
|
|
|
|
8
|
$item{q{BNAME}} = $_tok; |
7751
|
4
|
|
|
|
|
5
|
push @item, $_tok; |
7752
|
|
|
|
|
|
|
|
7753
|
|
|
|
|
|
|
} |
7754
|
|
|
|
|
|
|
|
7755
|
4
|
50
|
|
|
|
10
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
7756
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7757
|
|
|
|
|
|
|
q{TBNAME}, |
7758
|
|
|
|
|
|
|
$tracelevel) |
7759
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7760
|
|
|
|
|
|
|
|
7761
|
|
|
|
|
|
|
|
7762
|
4
|
50
|
|
|
|
11
|
$_tok = ($_noactions) ? 0 : do {$return = $item{BNAME}}; |
|
4
|
|
|
|
|
6
|
|
7763
|
4
|
50
|
|
|
|
10
|
unless (defined $_tok) |
7764
|
|
|
|
|
|
|
{ |
7765
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
7766
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7767
|
0
|
|
|
|
|
0
|
last; |
7768
|
|
|
|
|
|
|
} |
7769
|
4
|
50
|
|
|
|
10
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
7770
|
|
|
|
|
|
|
. $_tok . q{])}, |
7771
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7772
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7773
|
4
|
|
|
|
|
6
|
push @item, $_tok; |
7774
|
4
|
|
|
|
|
7
|
$item{__ACTION1__}=$_tok; |
7775
|
|
|
|
|
|
|
|
7776
|
|
|
|
|
|
|
|
7777
|
4
|
50
|
|
|
|
7
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/::/ BNAME]<<}, |
7778
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7779
|
|
|
|
|
|
|
q{TBNAME}, |
7780
|
|
|
|
|
|
|
$tracelevel) |
7781
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7782
|
|
|
|
|
|
|
|
7783
|
|
|
|
|
|
|
|
7784
|
|
|
|
|
|
|
|
7785
|
4
|
|
|
|
|
13
|
$_matched = 1; |
7786
|
4
|
|
|
|
|
6
|
last; |
7787
|
|
|
|
|
|
|
} |
7788
|
|
|
|
|
|
|
|
7789
|
|
|
|
|
|
|
|
7790
|
252
|
|
66
|
|
|
853
|
while (!$_matched && !$commit) |
7791
|
|
|
|
|
|
|
{ |
7792
|
|
|
|
|
|
|
|
7793
|
248
|
50
|
|
|
|
450
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [BNAME]}, |
7794
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7795
|
|
|
|
|
|
|
q{TBNAME}, |
7796
|
|
|
|
|
|
|
$tracelevel) |
7797
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7798
|
248
|
|
|
|
|
436
|
my $thisprod = $thisrule->{"prods"}[1]; |
7799
|
248
|
|
|
|
|
352
|
$text = $_[1]; |
7800
|
248
|
|
|
|
|
246
|
my $_savetext; |
7801
|
248
|
|
|
|
|
384
|
@item = (q{TBNAME}); |
7802
|
248
|
|
|
|
|
461
|
%item = (__RULE__ => q{TBNAME}); |
7803
|
248
|
|
|
|
|
258
|
my $repcount = 0; |
7804
|
|
|
|
|
|
|
|
7805
|
|
|
|
|
|
|
|
7806
|
248
|
50
|
|
|
|
491
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [BNAME]}, |
7807
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7808
|
|
|
|
|
|
|
q{TBNAME}, |
7809
|
|
|
|
|
|
|
$tracelevel) |
7810
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7811
|
2
|
|
|
2
|
|
12
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1290
|
|
|
248
|
|
|
|
|
257
|
|
7812
|
248
|
|
|
|
|
479
|
$expectation->is(q{})->at($text); |
7813
|
248
|
100
|
|
248
|
|
996
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
248
|
|
|
|
|
529
|
|
7814
|
|
|
|
|
|
|
{ |
7815
|
|
|
|
|
|
|
|
7816
|
156
|
50
|
|
|
|
281
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [BNAME]>>}, |
7817
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7818
|
|
|
|
|
|
|
q{TBNAME}, |
7819
|
|
|
|
|
|
|
$tracelevel) |
7820
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7821
|
156
|
|
|
|
|
284
|
$expectation->failed(); |
7822
|
156
|
|
|
|
|
211
|
last; |
7823
|
|
|
|
|
|
|
} |
7824
|
92
|
50
|
|
|
|
289
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [BNAME]<< (return value: [} |
7825
|
|
|
|
|
|
|
. $_tok . q{]}, |
7826
|
|
|
|
|
|
|
|
7827
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7828
|
|
|
|
|
|
|
q{TBNAME}, |
7829
|
|
|
|
|
|
|
$tracelevel) |
7830
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7831
|
92
|
|
|
|
|
152
|
$item{q{BNAME}} = $_tok; |
7832
|
92
|
|
|
|
|
141
|
push @item, $_tok; |
7833
|
|
|
|
|
|
|
|
7834
|
|
|
|
|
|
|
} |
7835
|
|
|
|
|
|
|
|
7836
|
92
|
50
|
|
|
|
199
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
7837
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7838
|
|
|
|
|
|
|
q{TBNAME}, |
7839
|
|
|
|
|
|
|
$tracelevel) |
7840
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7841
|
|
|
|
|
|
|
|
7842
|
|
|
|
|
|
|
|
7843
|
92
|
50
|
|
|
|
153
|
$_tok = ($_noactions) ? 0 : do {$return = "Treex::Block::$item{BNAME}"}; |
|
92
|
|
|
|
|
227
|
|
7844
|
92
|
50
|
|
|
|
197
|
unless (defined $_tok) |
7845
|
|
|
|
|
|
|
{ |
7846
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
7847
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7848
|
0
|
|
|
|
|
0
|
last; |
7849
|
|
|
|
|
|
|
} |
7850
|
92
|
50
|
|
|
|
181
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
7851
|
|
|
|
|
|
|
. $_tok . q{])}, |
7852
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
7853
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7854
|
92
|
|
|
|
|
123
|
push @item, $_tok; |
7855
|
92
|
|
|
|
|
140
|
$item{__ACTION1__}=$_tok; |
7856
|
|
|
|
|
|
|
|
7857
|
|
|
|
|
|
|
|
7858
|
92
|
50
|
|
|
|
243
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [BNAME]<<}, |
7859
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7860
|
|
|
|
|
|
|
q{TBNAME}, |
7861
|
|
|
|
|
|
|
$tracelevel) |
7862
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7863
|
|
|
|
|
|
|
|
7864
|
|
|
|
|
|
|
|
7865
|
|
|
|
|
|
|
|
7866
|
92
|
|
|
|
|
160
|
$_matched = 1; |
7867
|
92
|
|
|
|
|
131
|
last; |
7868
|
|
|
|
|
|
|
} |
7869
|
|
|
|
|
|
|
|
7870
|
|
|
|
|
|
|
|
7871
|
252
|
100
|
66
|
|
|
1150
|
unless ( $_matched || defined($score) ) |
7872
|
|
|
|
|
|
|
{ |
7873
|
|
|
|
|
|
|
|
7874
|
|
|
|
|
|
|
|
7875
|
156
|
|
|
|
|
203
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
7876
|
156
|
50
|
|
|
|
290
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
7877
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7878
|
|
|
|
|
|
|
q{TBNAME}, |
7879
|
|
|
|
|
|
|
$tracelevel) |
7880
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7881
|
156
|
|
|
|
|
874
|
return undef; |
7882
|
|
|
|
|
|
|
} |
7883
|
96
|
50
|
33
|
|
|
241
|
if (!defined($return) && defined($score)) |
7884
|
|
|
|
|
|
|
{ |
7885
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
7886
|
|
|
|
|
|
|
q{TBNAME}, |
7887
|
|
|
|
|
|
|
$tracelevel) |
7888
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7889
|
0
|
|
|
|
|
0
|
$return = $score_return; |
7890
|
|
|
|
|
|
|
} |
7891
|
96
|
|
|
|
|
105
|
splice @{$thisparser->{errors}}, $err_at; |
|
96
|
|
|
|
|
159
|
|
7892
|
96
|
50
|
|
|
|
206
|
$return = $item[$#item] unless defined $return; |
7893
|
96
|
50
|
|
|
|
180
|
if (defined $::RD_TRACE) |
7894
|
|
|
|
|
|
|
{ |
7895
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
7896
|
|
|
|
|
|
|
$return . q{])}, "", |
7897
|
|
|
|
|
|
|
q{TBNAME}, |
7898
|
|
|
|
|
|
|
$tracelevel); |
7899
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
7900
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
7901
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7902
|
|
|
|
|
|
|
, q{TBNAME}, |
7903
|
|
|
|
|
|
|
$tracelevel) |
7904
|
|
|
|
|
|
|
} |
7905
|
96
|
|
|
|
|
145
|
$_[1] = $text; |
7906
|
96
|
|
|
|
|
679
|
return $return; |
7907
|
|
|
|
|
|
|
} |
7908
|
|
|
|
|
|
|
|
7909
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
7910
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PSQUOTE |
7911
|
|
|
|
|
|
|
{ |
7912
|
16
|
|
|
16
|
|
22
|
my $thisparser = $_[0]; |
7913
|
2
|
|
|
2
|
|
9
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
716
|
|
7914
|
16
|
|
50
|
|
|
35
|
local $tracelevel = ($tracelevel||0)+1; |
7915
|
16
|
|
|
|
|
21
|
$ERRORS = 0; |
7916
|
16
|
|
|
|
|
28
|
my $thisrule = $thisparser->{"rules"}{"PSQUOTE"}; |
7917
|
|
|
|
|
|
|
|
7918
|
16
|
50
|
|
|
|
33
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [PSQUOTE]}, |
7919
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7920
|
|
|
|
|
|
|
q{PSQUOTE}, |
7921
|
|
|
|
|
|
|
$tracelevel) |
7922
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7923
|
|
|
|
|
|
|
|
7924
|
|
|
|
|
|
|
|
7925
|
16
|
|
|
|
|
17
|
my $err_at = @{$thisparser->{errors}}; |
|
16
|
|
|
|
|
21
|
|
7926
|
|
|
|
|
|
|
|
7927
|
16
|
|
|
|
|
20
|
my $score; |
7928
|
|
|
|
|
|
|
my $score_return; |
7929
|
0
|
|
|
|
|
0
|
my $_tok; |
7930
|
16
|
|
|
|
|
19
|
my $return = undef; |
7931
|
16
|
|
|
|
|
20
|
my $_matched=0; |
7932
|
16
|
|
|
|
|
18
|
my $commit=0; |
7933
|
16
|
|
|
|
|
21
|
my @item = (); |
7934
|
16
|
|
|
|
|
21
|
my %item = (); |
7935
|
16
|
|
|
|
|
18
|
my $repeating = $_[2]; |
7936
|
16
|
|
|
|
|
16
|
my $_noactions = $_[3]; |
7937
|
16
|
50
|
|
|
|
31
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
16
|
|
|
|
|
15
|
|
|
16
|
|
|
|
|
32
|
|
7938
|
16
|
|
|
|
|
20
|
my $_itempos = $_[5]; |
7939
|
16
|
50
|
|
|
|
38
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
7940
|
16
|
|
|
|
|
20
|
my $text; |
7941
|
|
|
|
|
|
|
my $lastsep; |
7942
|
0
|
|
|
|
|
0
|
my $current_match; |
7943
|
16
|
|
|
|
|
34
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{NOTSQUOTE}); |
7944
|
16
|
|
|
|
|
31
|
$expectation->at($_[1]); |
7945
|
|
|
|
|
|
|
|
7946
|
16
|
|
|
|
|
15
|
my $thisline; |
7947
|
16
|
|
|
|
|
40
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
7948
|
|
|
|
|
|
|
|
7949
|
|
|
|
|
|
|
|
7950
|
|
|
|
|
|
|
|
7951
|
16
|
|
33
|
|
|
58
|
while (!$_matched && !$commit) |
7952
|
|
|
|
|
|
|
{ |
7953
|
|
|
|
|
|
|
|
7954
|
16
|
50
|
|
|
|
33
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [NOTSQUOTE SLASHEDSQUOTE PSQUOTE]}, |
7955
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
7956
|
|
|
|
|
|
|
q{PSQUOTE}, |
7957
|
|
|
|
|
|
|
$tracelevel) |
7958
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7959
|
16
|
|
|
|
|
24
|
my $thisprod = $thisrule->{"prods"}[0]; |
7960
|
16
|
|
|
|
|
26
|
$text = $_[1]; |
7961
|
16
|
|
|
|
|
15
|
my $_savetext; |
7962
|
16
|
|
|
|
|
21
|
@item = (q{PSQUOTE}); |
7963
|
16
|
|
|
|
|
28
|
%item = (__RULE__ => q{PSQUOTE}); |
7964
|
16
|
|
|
|
|
19
|
my $repcount = 0; |
7965
|
|
|
|
|
|
|
|
7966
|
|
|
|
|
|
|
|
7967
|
16
|
50
|
|
|
|
35
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [NOTSQUOTE]}, |
7968
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7969
|
|
|
|
|
|
|
q{PSQUOTE}, |
7970
|
|
|
|
|
|
|
$tracelevel) |
7971
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7972
|
2
|
|
|
2
|
|
10
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
517
|
|
|
16
|
|
|
|
|
16
|
|
7973
|
16
|
|
|
|
|
33
|
$expectation->is(q{})->at($text); |
7974
|
16
|
50
|
|
16
|
|
59
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::NOTSQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
16
|
|
|
|
|
47
|
|
7975
|
|
|
|
|
|
|
{ |
7976
|
|
|
|
|
|
|
|
7977
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [NOTSQUOTE]>>}, |
7978
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7979
|
|
|
|
|
|
|
q{PSQUOTE}, |
7980
|
|
|
|
|
|
|
$tracelevel) |
7981
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7982
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
7983
|
0
|
|
|
|
|
0
|
last; |
7984
|
|
|
|
|
|
|
} |
7985
|
16
|
50
|
|
|
|
47
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [NOTSQUOTE]<< (return value: [} |
7986
|
|
|
|
|
|
|
. $_tok . q{]}, |
7987
|
|
|
|
|
|
|
|
7988
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7989
|
|
|
|
|
|
|
q{PSQUOTE}, |
7990
|
|
|
|
|
|
|
$tracelevel) |
7991
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
7992
|
16
|
|
|
|
|
27
|
$item{q{NOTSQUOTE}} = $_tok; |
7993
|
16
|
|
|
|
|
21
|
push @item, $_tok; |
7994
|
|
|
|
|
|
|
|
7995
|
|
|
|
|
|
|
} |
7996
|
|
|
|
|
|
|
|
7997
|
16
|
50
|
|
|
|
29
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [SLASHEDSQUOTE]}, |
7998
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
7999
|
|
|
|
|
|
|
q{PSQUOTE}, |
8000
|
|
|
|
|
|
|
$tracelevel) |
8001
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8002
|
2
|
|
|
2
|
|
11
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
427
|
|
|
16
|
|
|
|
|
15
|
|
8003
|
16
|
|
|
|
|
35
|
$expectation->is(q{SLASHEDSQUOTE})->at($text); |
8004
|
16
|
100
|
|
16
|
|
62
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SLASHEDSQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
16
|
|
|
|
|
29
|
|
8005
|
|
|
|
|
|
|
{ |
8006
|
|
|
|
|
|
|
|
8007
|
8
|
50
|
|
|
|
18
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [SLASHEDSQUOTE]>>}, |
8008
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8009
|
|
|
|
|
|
|
q{PSQUOTE}, |
8010
|
|
|
|
|
|
|
$tracelevel) |
8011
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8012
|
8
|
|
|
|
|
15
|
$expectation->failed(); |
8013
|
8
|
|
|
|
|
11
|
last; |
8014
|
|
|
|
|
|
|
} |
8015
|
8
|
50
|
|
|
|
27
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [SLASHEDSQUOTE]<< (return value: [} |
8016
|
|
|
|
|
|
|
. $_tok . q{]}, |
8017
|
|
|
|
|
|
|
|
8018
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8019
|
|
|
|
|
|
|
q{PSQUOTE}, |
8020
|
|
|
|
|
|
|
$tracelevel) |
8021
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8022
|
8
|
|
|
|
|
15
|
$item{q{SLASHEDSQUOTE}} = $_tok; |
8023
|
8
|
|
|
|
|
11
|
push @item, $_tok; |
8024
|
|
|
|
|
|
|
|
8025
|
|
|
|
|
|
|
} |
8026
|
|
|
|
|
|
|
|
8027
|
8
|
50
|
|
|
|
16
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [PSQUOTE]}, |
8028
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8029
|
|
|
|
|
|
|
q{PSQUOTE}, |
8030
|
|
|
|
|
|
|
$tracelevel) |
8031
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8032
|
2
|
|
|
2
|
|
9
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
855
|
|
|
8
|
|
|
|
|
9
|
|
8033
|
8
|
|
|
|
|
18
|
$expectation->is(q{PSQUOTE})->at($text); |
8034
|
8
|
50
|
|
8
|
|
40
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::PSQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
8
|
|
|
|
|
16
|
|
8035
|
|
|
|
|
|
|
{ |
8036
|
|
|
|
|
|
|
|
8037
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [PSQUOTE]>>}, |
8038
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8039
|
|
|
|
|
|
|
q{PSQUOTE}, |
8040
|
|
|
|
|
|
|
$tracelevel) |
8041
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8042
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
8043
|
0
|
|
|
|
|
0
|
last; |
8044
|
|
|
|
|
|
|
} |
8045
|
8
|
50
|
|
|
|
25
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [PSQUOTE]<< (return value: [} |
8046
|
|
|
|
|
|
|
. $_tok . q{]}, |
8047
|
|
|
|
|
|
|
|
8048
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8049
|
|
|
|
|
|
|
q{PSQUOTE}, |
8050
|
|
|
|
|
|
|
$tracelevel) |
8051
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8052
|
8
|
|
|
|
|
13
|
$item{q{PSQUOTE}} = $_tok; |
8053
|
8
|
|
|
|
|
11
|
push @item, $_tok; |
8054
|
|
|
|
|
|
|
|
8055
|
|
|
|
|
|
|
} |
8056
|
|
|
|
|
|
|
|
8057
|
8
|
50
|
|
|
|
17
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
8058
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8059
|
|
|
|
|
|
|
q{PSQUOTE}, |
8060
|
|
|
|
|
|
|
$tracelevel) |
8061
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8062
|
|
|
|
|
|
|
|
8063
|
|
|
|
|
|
|
|
8064
|
8
|
50
|
|
|
|
13
|
$_tok = ($_noactions) ? 0 : do {$return = $item{NOTSQUOTE}.$item{SLASHEDSQUOTE}.$item{PSQUOTE}}; |
|
8
|
|
|
|
|
28
|
|
8065
|
8
|
50
|
|
|
|
20
|
unless (defined $_tok) |
8066
|
|
|
|
|
|
|
{ |
8067
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
8068
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8069
|
0
|
|
|
|
|
0
|
last; |
8070
|
|
|
|
|
|
|
} |
8071
|
8
|
50
|
|
|
|
20
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
8072
|
|
|
|
|
|
|
. $_tok . q{])}, |
8073
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8074
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8075
|
8
|
|
|
|
|
9
|
push @item, $_tok; |
8076
|
8
|
|
|
|
|
14
|
$item{__ACTION1__}=$_tok; |
8077
|
|
|
|
|
|
|
|
8078
|
|
|
|
|
|
|
|
8079
|
8
|
50
|
|
|
|
15
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [NOTSQUOTE SLASHEDSQUOTE PSQUOTE]<<}, |
8080
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8081
|
|
|
|
|
|
|
q{PSQUOTE}, |
8082
|
|
|
|
|
|
|
$tracelevel) |
8083
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8084
|
|
|
|
|
|
|
|
8085
|
|
|
|
|
|
|
|
8086
|
|
|
|
|
|
|
|
8087
|
8
|
|
|
|
|
9
|
$_matched = 1; |
8088
|
8
|
|
|
|
|
12
|
last; |
8089
|
|
|
|
|
|
|
} |
8090
|
|
|
|
|
|
|
|
8091
|
|
|
|
|
|
|
|
8092
|
16
|
|
66
|
|
|
51
|
while (!$_matched && !$commit) |
8093
|
|
|
|
|
|
|
{ |
8094
|
|
|
|
|
|
|
|
8095
|
8
|
50
|
|
|
|
17
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [NOTSQUOTE]}, |
8096
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8097
|
|
|
|
|
|
|
q{PSQUOTE}, |
8098
|
|
|
|
|
|
|
$tracelevel) |
8099
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8100
|
8
|
|
|
|
|
14
|
my $thisprod = $thisrule->{"prods"}[1]; |
8101
|
8
|
|
|
|
|
13
|
$text = $_[1]; |
8102
|
8
|
|
|
|
|
8
|
my $_savetext; |
8103
|
8
|
|
|
|
|
16
|
@item = (q{PSQUOTE}); |
8104
|
8
|
|
|
|
|
20
|
%item = (__RULE__ => q{PSQUOTE}); |
8105
|
8
|
|
|
|
|
9
|
my $repcount = 0; |
8106
|
|
|
|
|
|
|
|
8107
|
|
|
|
|
|
|
|
8108
|
8
|
50
|
|
|
|
16
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [NOTSQUOTE]}, |
8109
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8110
|
|
|
|
|
|
|
q{PSQUOTE}, |
8111
|
|
|
|
|
|
|
$tracelevel) |
8112
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8113
|
2
|
|
|
2
|
|
11
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1087
|
|
|
8
|
|
|
|
|
9
|
|
8114
|
8
|
|
|
|
|
16
|
$expectation->is(q{})->at($text); |
8115
|
8
|
50
|
|
8
|
|
31
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::NOTSQUOTE($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
8
|
|
|
|
|
15
|
|
8116
|
|
|
|
|
|
|
{ |
8117
|
|
|
|
|
|
|
|
8118
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [NOTSQUOTE]>>}, |
8119
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8120
|
|
|
|
|
|
|
q{PSQUOTE}, |
8121
|
|
|
|
|
|
|
$tracelevel) |
8122
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8123
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
8124
|
0
|
|
|
|
|
0
|
last; |
8125
|
|
|
|
|
|
|
} |
8126
|
8
|
50
|
|
|
|
25
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [NOTSQUOTE]<< (return value: [} |
8127
|
|
|
|
|
|
|
. $_tok . q{]}, |
8128
|
|
|
|
|
|
|
|
8129
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8130
|
|
|
|
|
|
|
q{PSQUOTE}, |
8131
|
|
|
|
|
|
|
$tracelevel) |
8132
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8133
|
8
|
|
|
|
|
12
|
$item{q{NOTSQUOTE}} = $_tok; |
8134
|
8
|
|
|
|
|
12
|
push @item, $_tok; |
8135
|
|
|
|
|
|
|
|
8136
|
|
|
|
|
|
|
} |
8137
|
|
|
|
|
|
|
|
8138
|
8
|
50
|
|
|
|
18
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [NOTSQUOTE]<<}, |
8139
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8140
|
|
|
|
|
|
|
q{PSQUOTE}, |
8141
|
|
|
|
|
|
|
$tracelevel) |
8142
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8143
|
|
|
|
|
|
|
|
8144
|
|
|
|
|
|
|
|
8145
|
|
|
|
|
|
|
|
8146
|
8
|
|
|
|
|
11
|
$_matched = 1; |
8147
|
8
|
|
|
|
|
12
|
last; |
8148
|
|
|
|
|
|
|
} |
8149
|
|
|
|
|
|
|
|
8150
|
|
|
|
|
|
|
|
8151
|
16
|
50
|
33
|
|
|
35
|
unless ( $_matched || defined($score) ) |
8152
|
|
|
|
|
|
|
{ |
8153
|
|
|
|
|
|
|
|
8154
|
|
|
|
|
|
|
|
8155
|
0
|
|
|
|
|
0
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
8156
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
8157
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8158
|
|
|
|
|
|
|
q{PSQUOTE}, |
8159
|
|
|
|
|
|
|
$tracelevel) |
8160
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8161
|
0
|
|
|
|
|
0
|
return undef; |
8162
|
|
|
|
|
|
|
} |
8163
|
16
|
50
|
66
|
|
|
48
|
if (!defined($return) && defined($score)) |
8164
|
|
|
|
|
|
|
{ |
8165
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
8166
|
|
|
|
|
|
|
q{PSQUOTE}, |
8167
|
|
|
|
|
|
|
$tracelevel) |
8168
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8169
|
0
|
|
|
|
|
0
|
$return = $score_return; |
8170
|
|
|
|
|
|
|
} |
8171
|
16
|
|
|
|
|
17
|
splice @{$thisparser->{errors}}, $err_at; |
|
16
|
|
|
|
|
27
|
|
8172
|
16
|
100
|
|
|
|
33
|
$return = $item[$#item] unless defined $return; |
8173
|
16
|
50
|
|
|
|
32
|
if (defined $::RD_TRACE) |
8174
|
|
|
|
|
|
|
{ |
8175
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
8176
|
|
|
|
|
|
|
$return . q{])}, "", |
8177
|
|
|
|
|
|
|
q{PSQUOTE}, |
8178
|
|
|
|
|
|
|
$tracelevel); |
8179
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
8180
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
8181
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8182
|
|
|
|
|
|
|
, q{PSQUOTE}, |
8183
|
|
|
|
|
|
|
$tracelevel) |
8184
|
|
|
|
|
|
|
} |
8185
|
16
|
|
|
|
|
25
|
$_[1] = $text; |
8186
|
16
|
|
|
|
|
99
|
return $return; |
8187
|
|
|
|
|
|
|
} |
8188
|
|
|
|
|
|
|
|
8189
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
8190
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::startrule |
8191
|
|
|
|
|
|
|
{ |
8192
|
14
|
|
|
14
|
|
32
|
my $thisparser = $_[0]; |
8193
|
2
|
|
|
2
|
|
11
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
731
|
|
8194
|
14
|
|
100
|
|
|
75
|
local $tracelevel = ($tracelevel||0)+1; |
8195
|
14
|
|
|
|
|
28
|
$ERRORS = 0; |
8196
|
14
|
|
|
|
|
44
|
my $thisrule = $thisparser->{"rules"}{"startrule"}; |
8197
|
|
|
|
|
|
|
|
8198
|
14
|
50
|
|
|
|
50
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [startrule]}, |
8199
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8200
|
|
|
|
|
|
|
q{startrule}, |
8201
|
|
|
|
|
|
|
$tracelevel) |
8202
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8203
|
|
|
|
|
|
|
|
8204
|
|
|
|
|
|
|
|
8205
|
14
|
|
|
|
|
24
|
my $err_at = @{$thisparser->{errors}}; |
|
14
|
|
|
|
|
51
|
|
8206
|
|
|
|
|
|
|
|
8207
|
14
|
|
|
|
|
27
|
my $score; |
8208
|
|
|
|
|
|
|
my $score_return; |
8209
|
0
|
|
|
|
|
0
|
my $_tok; |
8210
|
14
|
|
|
|
|
22
|
my $return = undef; |
8211
|
14
|
|
|
|
|
25
|
my $_matched=0; |
8212
|
14
|
|
|
|
|
30
|
my $commit=0; |
8213
|
14
|
|
|
|
|
32
|
my @item = (); |
8214
|
14
|
|
|
|
|
48
|
my %item = (); |
8215
|
14
|
|
|
|
|
25
|
my $repeating = $_[2]; |
8216
|
14
|
|
|
|
|
25
|
my $_noactions = $_[3]; |
8217
|
14
|
50
|
|
|
|
51
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
14
|
|
|
|
|
23
|
|
|
14
|
|
|
|
|
35
|
|
8218
|
14
|
|
|
|
|
37
|
my $_itempos = $_[5]; |
8219
|
14
|
50
|
|
|
|
75
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
8220
|
14
|
|
|
|
|
27
|
my $text; |
8221
|
|
|
|
|
|
|
my $lastsep; |
8222
|
0
|
|
|
|
|
0
|
my $current_match; |
8223
|
14
|
|
|
|
|
302
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{SCEN}); |
8224
|
14
|
|
|
|
|
66
|
$expectation->at($_[1]); |
8225
|
|
|
|
|
|
|
|
8226
|
14
|
|
|
|
|
32
|
my $thisline; |
8227
|
14
|
|
|
|
|
132
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
8228
|
|
|
|
|
|
|
|
8229
|
|
|
|
|
|
|
|
8230
|
|
|
|
|
|
|
|
8231
|
14
|
|
33
|
|
|
86
|
while (!$_matched && !$commit) |
8232
|
|
|
|
|
|
|
{ |
8233
|
|
|
|
|
|
|
|
8234
|
14
|
50
|
|
|
|
40
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [SCEN EOF]}, |
8235
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8236
|
|
|
|
|
|
|
q{startrule}, |
8237
|
|
|
|
|
|
|
$tracelevel) |
8238
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8239
|
14
|
|
|
|
|
49
|
my $thisprod = $thisrule->{"prods"}[0]; |
8240
|
14
|
|
|
|
|
28
|
$text = $_[1]; |
8241
|
14
|
|
|
|
|
24
|
my $_savetext; |
8242
|
14
|
|
|
|
|
34
|
@item = (q{startrule}); |
8243
|
14
|
|
|
|
|
49
|
%item = (__RULE__ => q{startrule}); |
8244
|
14
|
|
|
|
|
28
|
my $repcount = 0; |
8245
|
|
|
|
|
|
|
|
8246
|
|
|
|
|
|
|
|
8247
|
14
|
50
|
|
|
|
40
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [SCEN]}, |
8248
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8249
|
|
|
|
|
|
|
q{startrule}, |
8250
|
|
|
|
|
|
|
$tracelevel) |
8251
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8252
|
2
|
|
|
2
|
|
9
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
366
|
|
|
14
|
|
|
|
|
39
|
|
8253
|
14
|
|
|
|
|
62
|
$expectation->is(q{})->at($text); |
8254
|
14
|
100
|
|
14
|
|
177
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SCEN($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
14
|
|
|
|
|
43
|
|
8255
|
|
|
|
|
|
|
{ |
8256
|
|
|
|
|
|
|
|
8257
|
2
|
50
|
|
|
|
8
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [SCEN]>>}, |
8258
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8259
|
|
|
|
|
|
|
q{startrule}, |
8260
|
|
|
|
|
|
|
$tracelevel) |
8261
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8262
|
2
|
|
|
|
|
7
|
$expectation->failed(); |
8263
|
2
|
|
|
|
|
4
|
last; |
8264
|
|
|
|
|
|
|
} |
8265
|
12
|
50
|
|
|
|
76
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [SCEN]<< (return value: [} |
8266
|
|
|
|
|
|
|
. $_tok . q{]}, |
8267
|
|
|
|
|
|
|
|
8268
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8269
|
|
|
|
|
|
|
q{startrule}, |
8270
|
|
|
|
|
|
|
$tracelevel) |
8271
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8272
|
12
|
|
|
|
|
39
|
$item{q{SCEN}} = $_tok; |
8273
|
12
|
|
|
|
|
26
|
push @item, $_tok; |
8274
|
|
|
|
|
|
|
|
8275
|
|
|
|
|
|
|
} |
8276
|
|
|
|
|
|
|
|
8277
|
12
|
50
|
|
|
|
35
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [EOF]}, |
8278
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8279
|
|
|
|
|
|
|
q{startrule}, |
8280
|
|
|
|
|
|
|
$tracelevel) |
8281
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8282
|
2
|
|
|
2
|
|
10
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
1294
|
|
|
12
|
|
|
|
|
24
|
|
8283
|
12
|
|
|
|
|
40
|
$expectation->is(q{EOF})->at($text); |
8284
|
12
|
50
|
|
12
|
|
100
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::EOF($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
12
|
|
|
|
|
36
|
|
8285
|
|
|
|
|
|
|
{ |
8286
|
|
|
|
|
|
|
|
8287
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [EOF]>>}, |
8288
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8289
|
|
|
|
|
|
|
q{startrule}, |
8290
|
|
|
|
|
|
|
$tracelevel) |
8291
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8292
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
8293
|
0
|
|
|
|
|
0
|
last; |
8294
|
|
|
|
|
|
|
} |
8295
|
12
|
50
|
|
|
|
48
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [EOF]<< (return value: [} |
8296
|
|
|
|
|
|
|
. $_tok . q{]}, |
8297
|
|
|
|
|
|
|
|
8298
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8299
|
|
|
|
|
|
|
q{startrule}, |
8300
|
|
|
|
|
|
|
$tracelevel) |
8301
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8302
|
12
|
|
|
|
|
38
|
$item{q{EOF}} = $_tok; |
8303
|
12
|
|
|
|
|
27
|
push @item, $_tok; |
8304
|
|
|
|
|
|
|
|
8305
|
|
|
|
|
|
|
} |
8306
|
|
|
|
|
|
|
|
8307
|
12
|
50
|
|
|
|
43
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
8308
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8309
|
|
|
|
|
|
|
q{startrule}, |
8310
|
|
|
|
|
|
|
$tracelevel) |
8311
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8312
|
|
|
|
|
|
|
|
8313
|
|
|
|
|
|
|
|
8314
|
12
|
50
|
|
|
|
30
|
$_tok = ($_noactions) ? 0 : do {$return = $item{SCEN}}; |
|
12
|
|
|
|
|
34
|
|
8315
|
12
|
50
|
|
|
|
40
|
unless (defined $_tok) |
8316
|
|
|
|
|
|
|
{ |
8317
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
8318
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8319
|
0
|
|
|
|
|
0
|
last; |
8320
|
|
|
|
|
|
|
} |
8321
|
12
|
50
|
|
|
|
35
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
8322
|
|
|
|
|
|
|
. $_tok . q{])}, |
8323
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8324
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8325
|
12
|
|
|
|
|
29
|
push @item, $_tok; |
8326
|
12
|
|
|
|
|
38
|
$item{__ACTION1__}=$_tok; |
8327
|
|
|
|
|
|
|
|
8328
|
|
|
|
|
|
|
|
8329
|
12
|
50
|
|
|
|
40
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [SCEN EOF]<<}, |
8330
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8331
|
|
|
|
|
|
|
q{startrule}, |
8332
|
|
|
|
|
|
|
$tracelevel) |
8333
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8334
|
|
|
|
|
|
|
|
8335
|
|
|
|
|
|
|
|
8336
|
|
|
|
|
|
|
|
8337
|
12
|
|
|
|
|
19
|
$_matched = 1; |
8338
|
12
|
|
|
|
|
27
|
last; |
8339
|
|
|
|
|
|
|
} |
8340
|
|
|
|
|
|
|
|
8341
|
|
|
|
|
|
|
|
8342
|
14
|
100
|
66
|
|
|
68
|
unless ( $_matched || defined($score) ) |
8343
|
|
|
|
|
|
|
{ |
8344
|
|
|
|
|
|
|
|
8345
|
|
|
|
|
|
|
|
8346
|
2
|
|
|
|
|
4
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
8347
|
2
|
50
|
|
|
|
6
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
8348
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8349
|
|
|
|
|
|
|
q{startrule}, |
8350
|
|
|
|
|
|
|
$tracelevel) |
8351
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8352
|
2
|
|
|
|
|
18
|
return undef; |
8353
|
|
|
|
|
|
|
} |
8354
|
12
|
50
|
33
|
|
|
49
|
if (!defined($return) && defined($score)) |
8355
|
|
|
|
|
|
|
{ |
8356
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
8357
|
|
|
|
|
|
|
q{startrule}, |
8358
|
|
|
|
|
|
|
$tracelevel) |
8359
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8360
|
0
|
|
|
|
|
0
|
$return = $score_return; |
8361
|
|
|
|
|
|
|
} |
8362
|
12
|
|
|
|
|
25
|
splice @{$thisparser->{errors}}, $err_at; |
|
12
|
|
|
|
|
32
|
|
8363
|
12
|
50
|
|
|
|
34
|
$return = $item[$#item] unless defined $return; |
8364
|
12
|
50
|
|
|
|
40
|
if (defined $::RD_TRACE) |
8365
|
|
|
|
|
|
|
{ |
8366
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
8367
|
|
|
|
|
|
|
$return . q{])}, "", |
8368
|
|
|
|
|
|
|
q{startrule}, |
8369
|
|
|
|
|
|
|
$tracelevel); |
8370
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
8371
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
8372
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8373
|
|
|
|
|
|
|
, q{startrule}, |
8374
|
|
|
|
|
|
|
$tracelevel) |
8375
|
|
|
|
|
|
|
} |
8376
|
12
|
|
|
|
|
35
|
$_[1] = $text; |
8377
|
12
|
|
|
|
|
127
|
return $return; |
8378
|
|
|
|
|
|
|
} |
8379
|
|
|
|
|
|
|
|
8380
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
8381
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::SCENMODULE |
8382
|
|
|
|
|
|
|
{ |
8383
|
278
|
|
|
278
|
|
335
|
my $thisparser = $_[0]; |
8384
|
2
|
|
|
2
|
|
12
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
1097
|
|
8385
|
278
|
|
50
|
|
|
616
|
local $tracelevel = ($tracelevel||0)+1; |
8386
|
278
|
|
|
|
|
305
|
$ERRORS = 0; |
8387
|
278
|
|
|
|
|
463
|
my $thisrule = $thisparser->{"rules"}{"SCENMODULE"}; |
8388
|
|
|
|
|
|
|
|
8389
|
278
|
50
|
|
|
|
503
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [SCENMODULE]}, |
8390
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8391
|
|
|
|
|
|
|
q{SCENMODULE}, |
8392
|
|
|
|
|
|
|
$tracelevel) |
8393
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8394
|
|
|
|
|
|
|
|
8395
|
|
|
|
|
|
|
|
8396
|
278
|
|
|
|
|
287
|
my $err_at = @{$thisparser->{errors}}; |
|
278
|
|
|
|
|
461
|
|
8397
|
|
|
|
|
|
|
|
8398
|
278
|
|
|
|
|
333
|
my $score; |
8399
|
|
|
|
|
|
|
my $score_return; |
8400
|
0
|
|
|
|
|
0
|
my $_tok; |
8401
|
278
|
|
|
|
|
288
|
my $return = undef; |
8402
|
278
|
|
|
|
|
279
|
my $_matched=0; |
8403
|
278
|
|
|
|
|
279
|
my $commit=0; |
8404
|
278
|
|
|
|
|
380
|
my @item = (); |
8405
|
278
|
|
|
|
|
350
|
my %item = (); |
8406
|
278
|
|
|
|
|
316
|
my $repeating = $_[2]; |
8407
|
278
|
|
|
|
|
350
|
my $_noactions = $_[3]; |
8408
|
278
|
50
|
|
|
|
454
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
278
|
|
|
|
|
372
|
|
|
278
|
|
|
|
|
455
|
|
8409
|
278
|
|
|
|
|
352
|
my $_itempos = $_[5]; |
8410
|
278
|
50
|
|
|
|
671
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
8411
|
278
|
|
|
|
|
328
|
my $text; |
8412
|
|
|
|
|
|
|
my $lastsep; |
8413
|
0
|
|
|
|
|
0
|
my $current_match; |
8414
|
278
|
|
|
|
|
584
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{/Scen::/}); |
8415
|
278
|
|
|
|
|
567
|
$expectation->at($_[1]); |
8416
|
|
|
|
|
|
|
|
8417
|
278
|
|
|
|
|
265
|
my $thisline; |
8418
|
278
|
|
|
|
|
713
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
8419
|
|
|
|
|
|
|
|
8420
|
|
|
|
|
|
|
|
8421
|
|
|
|
|
|
|
|
8422
|
278
|
|
33
|
|
|
921
|
while (!$_matched && !$commit) |
8423
|
|
|
|
|
|
|
{ |
8424
|
|
|
|
|
|
|
|
8425
|
278
|
50
|
|
|
|
515
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [/Scen::/ BNAME]}, |
8426
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8427
|
|
|
|
|
|
|
q{SCENMODULE}, |
8428
|
|
|
|
|
|
|
$tracelevel) |
8429
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8430
|
278
|
|
|
|
|
442
|
my $thisprod = $thisrule->{"prods"}[0]; |
8431
|
278
|
|
|
|
|
327
|
$text = $_[1]; |
8432
|
278
|
|
|
|
|
257
|
my $_savetext; |
8433
|
278
|
|
|
|
|
401
|
@item = (q{SCENMODULE}); |
8434
|
278
|
|
|
|
|
501
|
%item = (__RULE__ => q{SCENMODULE}); |
8435
|
278
|
|
|
|
|
340
|
my $repcount = 0; |
8436
|
|
|
|
|
|
|
|
8437
|
|
|
|
|
|
|
|
8438
|
278
|
50
|
|
|
|
553
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [/Scen::/]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
8439
|
|
|
|
|
|
|
q{SCENMODULE}, |
8440
|
|
|
|
|
|
|
$tracelevel) |
8441
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8442
|
278
|
|
|
|
|
343
|
undef $lastsep; |
8443
|
278
|
|
|
|
|
547
|
$expectation->is(q{})->at($text); |
8444
|
|
|
|
|
|
|
|
8445
|
|
|
|
|
|
|
|
8446
|
278
|
100
|
33
|
|
|
1159
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:Scen::)/) |
|
278
|
50
|
|
|
|
2030
|
|
8447
|
|
|
|
|
|
|
{ |
8448
|
278
|
50
|
|
|
|
663
|
$text = $lastsep . $text if defined $lastsep; |
8449
|
278
|
|
|
|
|
644
|
$expectation->failed(); |
8450
|
278
|
50
|
|
|
|
512
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
8451
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8452
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8453
|
|
|
|
|
|
|
|
8454
|
278
|
|
|
|
|
426
|
last; |
8455
|
|
|
|
|
|
|
} |
8456
|
0
|
|
|
|
|
0
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
8457
|
0
|
|
|
|
|
0
|
substr($text,0,length($current_match),q{}); |
8458
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
8459
|
|
|
|
|
|
|
. $current_match . q{])}, |
8460
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8461
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8462
|
0
|
|
|
|
|
0
|
push @item, $item{__PATTERN1__}=$current_match; |
8463
|
|
|
|
|
|
|
|
8464
|
|
|
|
|
|
|
|
8465
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [BNAME]}, |
8466
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8467
|
|
|
|
|
|
|
q{SCENMODULE}, |
8468
|
|
|
|
|
|
|
$tracelevel) |
8469
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8470
|
2
|
|
|
2
|
|
10
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
1241
|
|
|
0
|
|
|
|
|
0
|
|
8471
|
0
|
|
|
|
|
0
|
$expectation->is(q{BNAME})->at($text); |
8472
|
0
|
0
|
|
0
|
|
0
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BNAME($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
0
|
|
|
|
|
0
|
|
8473
|
|
|
|
|
|
|
{ |
8474
|
|
|
|
|
|
|
|
8475
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [BNAME]>>}, |
8476
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8477
|
|
|
|
|
|
|
q{SCENMODULE}, |
8478
|
|
|
|
|
|
|
$tracelevel) |
8479
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8480
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
8481
|
0
|
|
|
|
|
0
|
last; |
8482
|
|
|
|
|
|
|
} |
8483
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [BNAME]<< (return value: [} |
8484
|
|
|
|
|
|
|
. $_tok . q{]}, |
8485
|
|
|
|
|
|
|
|
8486
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8487
|
|
|
|
|
|
|
q{SCENMODULE}, |
8488
|
|
|
|
|
|
|
$tracelevel) |
8489
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8490
|
0
|
|
|
|
|
0
|
$item{q{BNAME}} = $_tok; |
8491
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
8492
|
|
|
|
|
|
|
|
8493
|
|
|
|
|
|
|
} |
8494
|
|
|
|
|
|
|
|
8495
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
8496
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8497
|
|
|
|
|
|
|
q{SCENMODULE}, |
8498
|
|
|
|
|
|
|
$tracelevel) |
8499
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8500
|
|
|
|
|
|
|
|
8501
|
|
|
|
|
|
|
|
8502
|
0
|
0
|
|
|
|
0
|
$_tok = ($_noactions) ? 0 : do { $return = "Treex::Scen::$item{BNAME}"}; |
|
0
|
|
|
|
|
0
|
|
8503
|
0
|
0
|
|
|
|
0
|
unless (defined $_tok) |
8504
|
|
|
|
|
|
|
{ |
8505
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
8506
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8507
|
0
|
|
|
|
|
0
|
last; |
8508
|
|
|
|
|
|
|
} |
8509
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
8510
|
|
|
|
|
|
|
. $_tok . q{])}, |
8511
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8512
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8513
|
0
|
|
|
|
|
0
|
push @item, $_tok; |
8514
|
0
|
|
|
|
|
0
|
$item{__ACTION1__}=$_tok; |
8515
|
|
|
|
|
|
|
|
8516
|
|
|
|
|
|
|
|
8517
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [/Scen::/ BNAME]<<}, |
8518
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8519
|
|
|
|
|
|
|
q{SCENMODULE}, |
8520
|
|
|
|
|
|
|
$tracelevel) |
8521
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8522
|
|
|
|
|
|
|
|
8523
|
|
|
|
|
|
|
|
8524
|
|
|
|
|
|
|
|
8525
|
0
|
|
|
|
|
0
|
$_matched = 1; |
8526
|
0
|
|
|
|
|
0
|
last; |
8527
|
|
|
|
|
|
|
} |
8528
|
|
|
|
|
|
|
|
8529
|
|
|
|
|
|
|
|
8530
|
278
|
50
|
33
|
|
|
1112
|
unless ( $_matched || defined($score) ) |
8531
|
|
|
|
|
|
|
{ |
8532
|
|
|
|
|
|
|
|
8533
|
|
|
|
|
|
|
|
8534
|
278
|
|
|
|
|
354
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
8535
|
278
|
50
|
|
|
|
526
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
8536
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8537
|
|
|
|
|
|
|
q{SCENMODULE}, |
8538
|
|
|
|
|
|
|
$tracelevel) |
8539
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8540
|
278
|
|
|
|
|
1646
|
return undef; |
8541
|
|
|
|
|
|
|
} |
8542
|
0
|
0
|
0
|
|
|
0
|
if (!defined($return) && defined($score)) |
8543
|
|
|
|
|
|
|
{ |
8544
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
8545
|
|
|
|
|
|
|
q{SCENMODULE}, |
8546
|
|
|
|
|
|
|
$tracelevel) |
8547
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8548
|
0
|
|
|
|
|
0
|
$return = $score_return; |
8549
|
|
|
|
|
|
|
} |
8550
|
0
|
|
|
|
|
0
|
splice @{$thisparser->{errors}}, $err_at; |
|
0
|
|
|
|
|
0
|
|
8551
|
0
|
0
|
|
|
|
0
|
$return = $item[$#item] unless defined $return; |
8552
|
0
|
0
|
|
|
|
0
|
if (defined $::RD_TRACE) |
8553
|
|
|
|
|
|
|
{ |
8554
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
8555
|
|
|
|
|
|
|
$return . q{])}, "", |
8556
|
|
|
|
|
|
|
q{SCENMODULE}, |
8557
|
|
|
|
|
|
|
$tracelevel); |
8558
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
8559
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
8560
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8561
|
|
|
|
|
|
|
, q{SCENMODULE}, |
8562
|
|
|
|
|
|
|
$tracelevel) |
8563
|
|
|
|
|
|
|
} |
8564
|
0
|
|
|
|
|
0
|
$_[1] = $text; |
8565
|
0
|
|
|
|
|
0
|
return $return; |
8566
|
|
|
|
|
|
|
} |
8567
|
|
|
|
|
|
|
|
8568
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
8569
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::LINE |
8570
|
|
|
|
|
|
|
{ |
8571
|
75
|
|
|
75
|
|
131
|
my $thisparser = $_[0]; |
8572
|
2
|
|
|
2
|
|
10
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
778
|
|
8573
|
75
|
|
50
|
|
|
190
|
local $tracelevel = ($tracelevel||0)+1; |
8574
|
75
|
|
|
|
|
94
|
$ERRORS = 0; |
8575
|
75
|
|
|
|
|
171
|
my $thisrule = $thisparser->{"rules"}{"LINE"}; |
8576
|
|
|
|
|
|
|
|
8577
|
75
|
50
|
|
|
|
213
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [LINE]}, |
8578
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8579
|
|
|
|
|
|
|
q{LINE}, |
8580
|
|
|
|
|
|
|
$tracelevel) |
8581
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8582
|
|
|
|
|
|
|
|
8583
|
|
|
|
|
|
|
|
8584
|
75
|
|
|
|
|
94
|
my $err_at = @{$thisparser->{errors}}; |
|
75
|
|
|
|
|
199
|
|
8585
|
|
|
|
|
|
|
|
8586
|
75
|
|
|
|
|
95
|
my $score; |
8587
|
|
|
|
|
|
|
my $score_return; |
8588
|
0
|
|
|
|
|
0
|
my $_tok; |
8589
|
75
|
|
|
|
|
93
|
my $return = undef; |
8590
|
75
|
|
|
|
|
95
|
my $_matched=0; |
8591
|
75
|
|
|
|
|
78
|
my $commit=0; |
8592
|
75
|
|
|
|
|
108
|
my @item = (); |
8593
|
75
|
|
|
|
|
108
|
my %item = (); |
8594
|
75
|
|
|
|
|
102
|
my $repeating = $_[2]; |
8595
|
75
|
|
|
|
|
95
|
my $_noactions = $_[3]; |
8596
|
75
|
50
|
|
|
|
147
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
75
|
|
|
|
|
77
|
|
|
75
|
|
|
|
|
139
|
|
8597
|
75
|
|
|
|
|
141
|
my $_itempos = $_[5]; |
8598
|
75
|
50
|
|
|
|
286
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
8599
|
75
|
|
|
|
|
129
|
my $text; |
8600
|
|
|
|
|
|
|
my $lastsep; |
8601
|
0
|
|
|
|
|
0
|
my $current_match; |
8602
|
75
|
|
|
|
|
214
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{BLOCK, or COMMENT}); |
8603
|
75
|
|
|
|
|
192
|
$expectation->at($_[1]); |
8604
|
|
|
|
|
|
|
|
8605
|
75
|
|
|
|
|
82
|
my $thisline; |
8606
|
75
|
|
|
|
|
253
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
8607
|
|
|
|
|
|
|
|
8608
|
|
|
|
|
|
|
|
8609
|
|
|
|
|
|
|
|
8610
|
75
|
|
33
|
|
|
303
|
while (!$_matched && !$commit) |
8611
|
|
|
|
|
|
|
{ |
8612
|
|
|
|
|
|
|
|
8613
|
75
|
50
|
|
|
|
156
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [BLOCK COMMENT]}, |
8614
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8615
|
|
|
|
|
|
|
q{LINE}, |
8616
|
|
|
|
|
|
|
$tracelevel) |
8617
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8618
|
75
|
|
|
|
|
202
|
my $thisprod = $thisrule->{"prods"}[0]; |
8619
|
75
|
|
|
|
|
124
|
$text = $_[1]; |
8620
|
75
|
|
|
|
|
94
|
my $_savetext; |
8621
|
75
|
|
|
|
|
126
|
@item = (q{LINE}); |
8622
|
75
|
|
|
|
|
148
|
%item = (__RULE__ => q{LINE}); |
8623
|
75
|
|
|
|
|
92
|
my $repcount = 0; |
8624
|
|
|
|
|
|
|
|
8625
|
|
|
|
|
|
|
|
8626
|
75
|
50
|
|
|
|
148
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [BLOCK]}, |
8627
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8628
|
|
|
|
|
|
|
q{LINE}, |
8629
|
|
|
|
|
|
|
$tracelevel) |
8630
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8631
|
2
|
|
|
2
|
|
19
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
393
|
|
|
75
|
|
|
|
|
100
|
|
8632
|
75
|
|
|
|
|
160
|
$expectation->is(q{})->at($text); |
8633
|
75
|
100
|
|
75
|
|
373
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BLOCK($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
75
|
|
|
|
|
333
|
|
8634
|
|
|
|
|
|
|
{ |
8635
|
|
|
|
|
|
|
|
8636
|
39
|
50
|
|
|
|
100
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [BLOCK]>>}, |
8637
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8638
|
|
|
|
|
|
|
q{LINE}, |
8639
|
|
|
|
|
|
|
$tracelevel) |
8640
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8641
|
39
|
|
|
|
|
82
|
$expectation->failed(); |
8642
|
39
|
|
|
|
|
59
|
last; |
8643
|
|
|
|
|
|
|
} |
8644
|
36
|
50
|
|
|
|
140
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [BLOCK]<< (return value: [} |
8645
|
|
|
|
|
|
|
. $_tok . q{]}, |
8646
|
|
|
|
|
|
|
|
8647
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8648
|
|
|
|
|
|
|
q{LINE}, |
8649
|
|
|
|
|
|
|
$tracelevel) |
8650
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8651
|
36
|
|
|
|
|
91
|
$item{q{BLOCK}} = $_tok; |
8652
|
36
|
|
|
|
|
101
|
push @item, $_tok; |
8653
|
|
|
|
|
|
|
|
8654
|
|
|
|
|
|
|
} |
8655
|
|
|
|
|
|
|
|
8656
|
36
|
50
|
|
|
|
90
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [COMMENT]}, |
8657
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8658
|
|
|
|
|
|
|
q{LINE}, |
8659
|
|
|
|
|
|
|
$tracelevel) |
8660
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8661
|
2
|
|
|
2
|
|
10
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
883
|
|
|
36
|
|
|
|
|
43
|
|
8662
|
36
|
|
|
|
|
98
|
$expectation->is(q{COMMENT})->at($text); |
8663
|
36
|
100
|
|
36
|
|
196
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::COMMENT($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
36
|
|
|
|
|
84
|
|
8664
|
|
|
|
|
|
|
{ |
8665
|
|
|
|
|
|
|
|
8666
|
26
|
50
|
|
|
|
67
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [COMMENT]>>}, |
8667
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8668
|
|
|
|
|
|
|
q{LINE}, |
8669
|
|
|
|
|
|
|
$tracelevel) |
8670
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8671
|
26
|
|
|
|
|
60
|
$expectation->failed(); |
8672
|
26
|
|
|
|
|
51
|
last; |
8673
|
|
|
|
|
|
|
} |
8674
|
10
|
50
|
|
|
|
38
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [COMMENT]<< (return value: [} |
8675
|
|
|
|
|
|
|
. $_tok . q{]}, |
8676
|
|
|
|
|
|
|
|
8677
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8678
|
|
|
|
|
|
|
q{LINE}, |
8679
|
|
|
|
|
|
|
$tracelevel) |
8680
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8681
|
10
|
|
|
|
|
23
|
$item{q{COMMENT}} = $_tok; |
8682
|
10
|
|
|
|
|
16
|
push @item, $_tok; |
8683
|
|
|
|
|
|
|
|
8684
|
|
|
|
|
|
|
} |
8685
|
|
|
|
|
|
|
|
8686
|
10
|
50
|
|
|
|
31
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
8687
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8688
|
|
|
|
|
|
|
q{LINE}, |
8689
|
|
|
|
|
|
|
$tracelevel) |
8690
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8691
|
|
|
|
|
|
|
|
8692
|
|
|
|
|
|
|
|
8693
|
10
|
50
|
|
|
|
22
|
$_tok = ($_noactions) ? 0 : do {$return = [@{$item{BLOCK}}]}; |
|
10
|
|
|
|
|
11
|
|
|
10
|
|
|
|
|
31
|
|
8694
|
10
|
50
|
|
|
|
24
|
unless (defined $_tok) |
8695
|
|
|
|
|
|
|
{ |
8696
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
8697
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8698
|
0
|
|
|
|
|
0
|
last; |
8699
|
|
|
|
|
|
|
} |
8700
|
10
|
50
|
|
|
|
25
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
8701
|
|
|
|
|
|
|
. $_tok . q{])}, |
8702
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8703
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8704
|
10
|
|
|
|
|
14
|
push @item, $_tok; |
8705
|
10
|
|
|
|
|
20
|
$item{__ACTION1__}=$_tok; |
8706
|
|
|
|
|
|
|
|
8707
|
|
|
|
|
|
|
|
8708
|
10
|
50
|
|
|
|
22
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [BLOCK COMMENT]<<}, |
8709
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8710
|
|
|
|
|
|
|
q{LINE}, |
8711
|
|
|
|
|
|
|
$tracelevel) |
8712
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8713
|
|
|
|
|
|
|
|
8714
|
|
|
|
|
|
|
|
8715
|
|
|
|
|
|
|
|
8716
|
10
|
|
|
|
|
15
|
$_matched = 1; |
8717
|
10
|
|
|
|
|
17
|
last; |
8718
|
|
|
|
|
|
|
} |
8719
|
|
|
|
|
|
|
|
8720
|
|
|
|
|
|
|
|
8721
|
75
|
|
66
|
|
|
362
|
while (!$_matched && !$commit) |
8722
|
|
|
|
|
|
|
{ |
8723
|
|
|
|
|
|
|
|
8724
|
65
|
50
|
|
|
|
237
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [BLOCK]}, |
8725
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8726
|
|
|
|
|
|
|
q{LINE}, |
8727
|
|
|
|
|
|
|
$tracelevel) |
8728
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8729
|
65
|
|
|
|
|
123
|
my $thisprod = $thisrule->{"prods"}[1]; |
8730
|
65
|
|
|
|
|
98
|
$text = $_[1]; |
8731
|
65
|
|
|
|
|
70
|
my $_savetext; |
8732
|
65
|
|
|
|
|
132
|
@item = (q{LINE}); |
8733
|
65
|
|
|
|
|
178
|
%item = (__RULE__ => q{LINE}); |
8734
|
65
|
|
|
|
|
79
|
my $repcount = 0; |
8735
|
|
|
|
|
|
|
|
8736
|
|
|
|
|
|
|
|
8737
|
65
|
50
|
|
|
|
133
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [BLOCK]}, |
8738
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8739
|
|
|
|
|
|
|
q{LINE}, |
8740
|
|
|
|
|
|
|
$tracelevel) |
8741
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8742
|
2
|
|
|
2
|
|
9
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
903
|
|
|
65
|
|
|
|
|
71
|
|
8743
|
65
|
|
|
|
|
146
|
$expectation->is(q{})->at($text); |
8744
|
65
|
100
|
|
65
|
|
269
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::BLOCK($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
65
|
|
|
|
|
134
|
|
8745
|
|
|
|
|
|
|
{ |
8746
|
|
|
|
|
|
|
|
8747
|
39
|
50
|
|
|
|
88
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [BLOCK]>>}, |
8748
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8749
|
|
|
|
|
|
|
q{LINE}, |
8750
|
|
|
|
|
|
|
$tracelevel) |
8751
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8752
|
39
|
|
|
|
|
78
|
$expectation->failed(); |
8753
|
39
|
|
|
|
|
54
|
last; |
8754
|
|
|
|
|
|
|
} |
8755
|
26
|
50
|
|
|
|
100
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [BLOCK]<< (return value: [} |
8756
|
|
|
|
|
|
|
. $_tok . q{]}, |
8757
|
|
|
|
|
|
|
|
8758
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8759
|
|
|
|
|
|
|
q{LINE}, |
8760
|
|
|
|
|
|
|
$tracelevel) |
8761
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8762
|
26
|
|
|
|
|
53
|
$item{q{BLOCK}} = $_tok; |
8763
|
26
|
|
|
|
|
53
|
push @item, $_tok; |
8764
|
|
|
|
|
|
|
|
8765
|
|
|
|
|
|
|
} |
8766
|
|
|
|
|
|
|
|
8767
|
26
|
50
|
|
|
|
61
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
8768
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8769
|
|
|
|
|
|
|
q{LINE}, |
8770
|
|
|
|
|
|
|
$tracelevel) |
8771
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8772
|
|
|
|
|
|
|
|
8773
|
|
|
|
|
|
|
|
8774
|
26
|
50
|
|
|
|
60
|
$_tok = ($_noactions) ? 0 : do {$return = [@{$item{BLOCK}}]}; |
|
26
|
|
|
|
|
40
|
|
|
26
|
|
|
|
|
71
|
|
8775
|
26
|
50
|
|
|
|
71
|
unless (defined $_tok) |
8776
|
|
|
|
|
|
|
{ |
8777
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
8778
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8779
|
0
|
|
|
|
|
0
|
last; |
8780
|
|
|
|
|
|
|
} |
8781
|
26
|
50
|
|
|
|
73
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
8782
|
|
|
|
|
|
|
. $_tok . q{])}, |
8783
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8784
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8785
|
26
|
|
|
|
|
42
|
push @item, $_tok; |
8786
|
26
|
|
|
|
|
56
|
$item{__ACTION1__}=$_tok; |
8787
|
|
|
|
|
|
|
|
8788
|
|
|
|
|
|
|
|
8789
|
26
|
50
|
|
|
|
65
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [BLOCK]<<}, |
8790
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8791
|
|
|
|
|
|
|
q{LINE}, |
8792
|
|
|
|
|
|
|
$tracelevel) |
8793
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8794
|
|
|
|
|
|
|
|
8795
|
|
|
|
|
|
|
|
8796
|
|
|
|
|
|
|
|
8797
|
26
|
|
|
|
|
34
|
$_matched = 1; |
8798
|
26
|
|
|
|
|
45
|
last; |
8799
|
|
|
|
|
|
|
} |
8800
|
|
|
|
|
|
|
|
8801
|
|
|
|
|
|
|
|
8802
|
75
|
|
66
|
|
|
286
|
while (!$_matched && !$commit) |
8803
|
|
|
|
|
|
|
{ |
8804
|
|
|
|
|
|
|
|
8805
|
39
|
50
|
|
|
|
110
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [COMMENT]}, |
8806
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8807
|
|
|
|
|
|
|
q{LINE}, |
8808
|
|
|
|
|
|
|
$tracelevel) |
8809
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8810
|
39
|
|
|
|
|
74
|
my $thisprod = $thisrule->{"prods"}[2]; |
8811
|
39
|
|
|
|
|
56
|
$text = $_[1]; |
8812
|
39
|
|
|
|
|
44
|
my $_savetext; |
8813
|
39
|
|
|
|
|
93
|
@item = (q{LINE}); |
8814
|
39
|
|
|
|
|
83
|
%item = (__RULE__ => q{LINE}); |
8815
|
39
|
|
|
|
|
54
|
my $repcount = 0; |
8816
|
|
|
|
|
|
|
|
8817
|
|
|
|
|
|
|
|
8818
|
39
|
50
|
|
|
|
102
|
Parse::RecDescent::_Runtime::_trace(q{Trying subrule: [COMMENT]}, |
8819
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8820
|
|
|
|
|
|
|
q{LINE}, |
8821
|
|
|
|
|
|
|
$tracelevel) |
8822
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8823
|
2
|
|
|
2
|
|
14
|
if (1) { no strict qw{refs}; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
1448
|
|
|
39
|
|
|
|
|
46
|
|
8824
|
39
|
|
|
|
|
95
|
$expectation->is(q{})->at($text); |
8825
|
39
|
100
|
|
39
|
|
181
|
unless (defined ($_tok = Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::COMMENT($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef))) |
|
39
|
|
|
|
|
80
|
|
8826
|
|
|
|
|
|
|
{ |
8827
|
|
|
|
|
|
|
|
8828
|
28
|
50
|
|
|
|
60
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match subrule: [COMMENT]>>}, |
8829
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8830
|
|
|
|
|
|
|
q{LINE}, |
8831
|
|
|
|
|
|
|
$tracelevel) |
8832
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8833
|
28
|
|
|
|
|
74
|
$expectation->failed(); |
8834
|
28
|
|
|
|
|
37
|
last; |
8835
|
|
|
|
|
|
|
} |
8836
|
11
|
50
|
|
|
|
40
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched subrule: [COMMENT]<< (return value: [} |
8837
|
|
|
|
|
|
|
. $_tok . q{]}, |
8838
|
|
|
|
|
|
|
|
8839
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8840
|
|
|
|
|
|
|
q{LINE}, |
8841
|
|
|
|
|
|
|
$tracelevel) |
8842
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8843
|
11
|
|
|
|
|
17
|
$item{q{COMMENT}} = $_tok; |
8844
|
11
|
|
|
|
|
19
|
push @item, $_tok; |
8845
|
|
|
|
|
|
|
|
8846
|
|
|
|
|
|
|
} |
8847
|
|
|
|
|
|
|
|
8848
|
11
|
50
|
|
|
|
25
|
Parse::RecDescent::_Runtime::_trace(q{Trying action}, |
8849
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8850
|
|
|
|
|
|
|
q{LINE}, |
8851
|
|
|
|
|
|
|
$tracelevel) |
8852
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8853
|
|
|
|
|
|
|
|
8854
|
|
|
|
|
|
|
|
8855
|
11
|
50
|
|
|
|
20
|
$_tok = ($_noactions) ? 0 : do {$return = []}; |
|
11
|
|
|
|
|
20
|
|
8856
|
11
|
50
|
|
|
|
26
|
unless (defined $_tok) |
8857
|
|
|
|
|
|
|
{ |
8858
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])}) |
8859
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8860
|
0
|
|
|
|
|
0
|
last; |
8861
|
|
|
|
|
|
|
} |
8862
|
11
|
50
|
|
|
|
26
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched action<< (return value: [} |
8863
|
|
|
|
|
|
|
. $_tok . q{])}, |
8864
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8865
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8866
|
11
|
|
|
|
|
14
|
push @item, $_tok; |
8867
|
11
|
|
|
|
|
22
|
$item{__ACTION1__}=$_tok; |
8868
|
|
|
|
|
|
|
|
8869
|
|
|
|
|
|
|
|
8870
|
11
|
50
|
|
|
|
24
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [COMMENT]<<}, |
8871
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8872
|
|
|
|
|
|
|
q{LINE}, |
8873
|
|
|
|
|
|
|
$tracelevel) |
8874
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8875
|
|
|
|
|
|
|
|
8876
|
|
|
|
|
|
|
|
8877
|
|
|
|
|
|
|
|
8878
|
11
|
|
|
|
|
13
|
$_matched = 1; |
8879
|
11
|
|
|
|
|
20
|
last; |
8880
|
|
|
|
|
|
|
} |
8881
|
|
|
|
|
|
|
|
8882
|
|
|
|
|
|
|
|
8883
|
75
|
100
|
66
|
|
|
305
|
unless ( $_matched || defined($score) ) |
8884
|
|
|
|
|
|
|
{ |
8885
|
|
|
|
|
|
|
|
8886
|
|
|
|
|
|
|
|
8887
|
28
|
|
|
|
|
35
|
$_[1] = $text; # NOT SURE THIS IS NEEDED |
8888
|
28
|
50
|
|
|
|
65
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match rule>>}, |
8889
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8890
|
|
|
|
|
|
|
q{LINE}, |
8891
|
|
|
|
|
|
|
$tracelevel) |
8892
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8893
|
28
|
|
|
|
|
178
|
return undef; |
8894
|
|
|
|
|
|
|
} |
8895
|
47
|
50
|
33
|
|
|
155
|
if (!defined($return) && defined($score)) |
8896
|
|
|
|
|
|
|
{ |
8897
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
8898
|
|
|
|
|
|
|
q{LINE}, |
8899
|
|
|
|
|
|
|
$tracelevel) |
8900
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8901
|
0
|
|
|
|
|
0
|
$return = $score_return; |
8902
|
|
|
|
|
|
|
} |
8903
|
47
|
|
|
|
|
59
|
splice @{$thisparser->{errors}}, $err_at; |
|
47
|
|
|
|
|
90
|
|
8904
|
47
|
50
|
|
|
|
107
|
$return = $item[$#item] unless defined $return; |
8905
|
47
|
50
|
|
|
|
119
|
if (defined $::RD_TRACE) |
8906
|
|
|
|
|
|
|
{ |
8907
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
8908
|
|
|
|
|
|
|
$return . q{])}, "", |
8909
|
|
|
|
|
|
|
q{LINE}, |
8910
|
|
|
|
|
|
|
$tracelevel); |
8911
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{(consumed: [} . |
8912
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])}, |
8913
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
8914
|
|
|
|
|
|
|
, q{LINE}, |
8915
|
|
|
|
|
|
|
$tracelevel) |
8916
|
|
|
|
|
|
|
} |
8917
|
47
|
|
|
|
|
89
|
$_[1] = $text; |
8918
|
47
|
|
|
|
|
371
|
return $return; |
8919
|
|
|
|
|
|
|
} |
8920
|
|
|
|
|
|
|
|
8921
|
|
|
|
|
|
|
# ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos) |
8922
|
|
|
|
|
|
|
sub Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::EMPTY |
8923
|
|
|
|
|
|
|
{ |
8924
|
0
|
|
|
0
|
|
0
|
my $thisparser = $_[0]; |
8925
|
2
|
|
|
2
|
|
12
|
use vars q{$tracelevel}; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
10059
|
|
8926
|
0
|
|
0
|
|
|
0
|
local $tracelevel = ($tracelevel||0)+1; |
8927
|
0
|
|
|
|
|
0
|
$ERRORS = 0; |
8928
|
0
|
|
|
|
|
0
|
my $thisrule = $thisparser->{"rules"}{"EMPTY"}; |
8929
|
|
|
|
|
|
|
|
8930
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying rule: [EMPTY]}, |
8931
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8932
|
|
|
|
|
|
|
q{EMPTY}, |
8933
|
|
|
|
|
|
|
$tracelevel) |
8934
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8935
|
|
|
|
|
|
|
|
8936
|
|
|
|
|
|
|
|
8937
|
0
|
|
|
|
|
0
|
my $err_at = @{$thisparser->{errors}}; |
|
0
|
|
|
|
|
0
|
|
8938
|
|
|
|
|
|
|
|
8939
|
0
|
|
|
|
|
0
|
my $score; |
8940
|
|
|
|
|
|
|
my $score_return; |
8941
|
0
|
|
|
|
|
0
|
my $_tok; |
8942
|
0
|
|
|
|
|
0
|
my $return = undef; |
8943
|
0
|
|
|
|
|
0
|
my $_matched=0; |
8944
|
0
|
|
|
|
|
0
|
my $commit=0; |
8945
|
0
|
|
|
|
|
0
|
my @item = (); |
8946
|
0
|
|
|
|
|
0
|
my %item = (); |
8947
|
0
|
|
|
|
|
0
|
my $repeating = $_[2]; |
8948
|
0
|
|
|
|
|
0
|
my $_noactions = $_[3]; |
8949
|
0
|
0
|
|
|
|
0
|
my @arg = defined $_[4] ? @{ &{$_[4]} } : (); |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
8950
|
0
|
|
|
|
|
0
|
my $_itempos = $_[5]; |
8951
|
0
|
0
|
|
|
|
0
|
my %arg = ($#arg & 01) ? @arg : (@arg, undef); |
8952
|
0
|
|
|
|
|
0
|
my $text; |
8953
|
|
|
|
|
|
|
my $lastsep; |
8954
|
0
|
|
|
|
|
0
|
my $current_match; |
8955
|
0
|
|
|
|
|
0
|
my $expectation = new Parse::RecDescent::_Runtime::Expectation(q{//}); |
8956
|
0
|
|
|
|
|
0
|
$expectation->at($_[1]); |
8957
|
|
|
|
|
|
|
|
8958
|
0
|
|
|
|
|
0
|
my $thisline; |
8959
|
0
|
|
|
|
|
0
|
tie $thisline, q{Parse::RecDescent::_Runtime::LineCounter}, \$text, $thisparser; |
8960
|
|
|
|
|
|
|
|
8961
|
|
|
|
|
|
|
|
8962
|
|
|
|
|
|
|
|
8963
|
0
|
|
0
|
|
|
0
|
while (!$_matched && !$commit) |
8964
|
|
|
|
|
|
|
{ |
8965
|
|
|
|
|
|
|
|
8966
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying production: [//]}, |
8967
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($_[1]), |
8968
|
|
|
|
|
|
|
q{EMPTY}, |
8969
|
|
|
|
|
|
|
$tracelevel) |
8970
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8971
|
0
|
|
|
|
|
0
|
my $thisprod = $thisrule->{"prods"}[0]; |
8972
|
0
|
|
|
|
|
0
|
$text = $_[1]; |
8973
|
0
|
|
|
|
|
0
|
my $_savetext; |
8974
|
0
|
|
|
|
|
0
|
@item = (q{EMPTY}); |
8975
|
0
|
|
|
|
|
0
|
%item = (__RULE__ => q{EMPTY}); |
8976
|
0
|
|
|
|
|
0
|
my $repcount = 0; |
8977
|
|
|
|
|
|
|
|
8978
|
|
|
|
|
|
|
|
8979
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{Trying terminal: [//]}, Parse::RecDescent::_Runtime::_tracefirst($text), |
8980
|
|
|
|
|
|
|
q{EMPTY}, |
8981
|
|
|
|
|
|
|
$tracelevel) |
8982
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8983
|
0
|
|
|
|
|
0
|
undef $lastsep; |
8984
|
0
|
|
|
|
|
0
|
$expectation->is(q{})->at($text); |
8985
|
|
|
|
|
|
|
|
8986
|
|
|
|
|
|
|
|
8987
|
0
|
0
|
0
|
|
|
0
|
unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:)/) |
|
0
|
0
|
|
|
|
0
|
|
8988
|
|
|
|
|
|
|
{ |
8989
|
0
|
0
|
|
|
|
0
|
$text = $lastsep . $text if defined $lastsep; |
8990
|
0
|
|
|
|
|
0
|
$expectation->failed(); |
8991
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{<<Didn't match terminal>>}, |
8992
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
8993
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
8994
|
|
|
|
|
|
|
|
8995
|
0
|
|
|
|
|
0
|
last; |
8996
|
|
|
|
|
|
|
} |
8997
|
0
|
|
|
|
|
0
|
$current_match = substr($text, $-[0], $+[0] - $-[0]); |
8998
|
0
|
|
|
|
|
0
|
substr($text,0,length($current_match),q{}); |
8999
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched terminal<< (return value: [} |
9000
|
|
|
|
|
|
|
. $current_match . q{])}, |
9001
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text)) |
9002
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
9003
|
0
|
|
|
|
|
0
|
push @item, $item{__PATTERN1__}=$current_match; |
9004
|
|
|
|
|
|
|
|
9005
|
|
|
|
|
|
|
|
9006
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched production: [//]<<}, |
9007
|
|
|
|
|
|
|
Parse::RecDescent::_Runtime::_tracefirst($text), |
9008
|
|
|
|
|
|
|
q{EMPTY}, |
9009
|
|
|
|
|
|
|
$tracelevel) |
9010
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
9011
|
|
|
|
|
|
|
|
9012
|
|
|
|
|
|
|
|
9013
|
|
|
|
|
|
|
|
9014
|
0
|
|
|
|
|
0
|
$_matched = 1; |
9015
|
0
|
|
|
|
|
0
|
last; |
9016
|
|
|
|
|
|
|
} |
9017
|
|
|
|
|
|
|
|
9018
|
|
|
|
|
|
|
|
9019
|
0
|
0
|
0
|
|
|
0
|
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{EMPTY}, |
9027
|
|
|
|
|
|
|
$tracelevel) |
9028
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
9029
|
0
|
|
|
|
|
0
|
return undef; |
9030
|
|
|
|
|
|
|
} |
9031
|
0
|
0
|
0
|
|
|
0
|
if (!defined($return) && defined($score)) |
9032
|
|
|
|
|
|
|
{ |
9033
|
0
|
0
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Accepted scored production<<}, "", |
9034
|
|
|
|
|
|
|
q{EMPTY}, |
9035
|
|
|
|
|
|
|
$tracelevel) |
9036
|
|
|
|
|
|
|
if defined $::RD_TRACE; |
9037
|
0
|
|
|
|
|
0
|
$return = $score_return; |
9038
|
|
|
|
|
|
|
} |
9039
|
0
|
|
|
|
|
0
|
splice @{$thisparser->{errors}}, $err_at; |
|
0
|
|
|
|
|
0
|
|
9040
|
0
|
0
|
|
|
|
0
|
$return = $item[$#item] unless defined $return; |
9041
|
0
|
0
|
|
|
|
0
|
if (defined $::RD_TRACE) |
9042
|
|
|
|
|
|
|
{ |
9043
|
0
|
|
|
|
|
0
|
Parse::RecDescent::_Runtime::_trace(q{>>Matched rule<< (return value: [} . |
9044
|
|
|
|
|
|
|
$return . q{])}, "", |
9045
|
|
|
|
|
|
|
q{EMPTY}, |
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{EMPTY}, |
9051
|
|
|
|
|
|
|
$tracelevel) |
9052
|
|
|
|
|
|
|
} |
9053
|
0
|
|
|
|
|
0
|
$_[1] = $text; |
9054
|
0
|
|
|
|
|
0
|
return $return; |
9055
|
|
|
|
|
|
|
} |
9056
|
|
|
|
|
|
|
} |
9057
|
13
|
|
|
13
|
0
|
10375
|
package Treex::Core::ScenarioParser; sub new { my $self = bless( { |
9058
|
|
|
|
|
|
|
'_AUTOTREE' => undef, |
9059
|
|
|
|
|
|
|
'namespace' => 'Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser', |
9060
|
|
|
|
|
|
|
'localvars' => '', |
9061
|
|
|
|
|
|
|
'_check' => { |
9062
|
|
|
|
|
|
|
'thisoffset' => '', |
9063
|
|
|
|
|
|
|
'thiscolumn' => '', |
9064
|
|
|
|
|
|
|
'itempos' => '', |
9065
|
|
|
|
|
|
|
'prevoffset' => '', |
9066
|
|
|
|
|
|
|
'prevline' => '', |
9067
|
|
|
|
|
|
|
'prevcolumn' => '' |
9068
|
|
|
|
|
|
|
}, |
9069
|
|
|
|
|
|
|
'_AUTOACTION' => undef, |
9070
|
|
|
|
|
|
|
'startcode' => '', |
9071
|
|
|
|
|
|
|
'rules' => { |
9072
|
|
|
|
|
|
|
'PNOTQUOTED' => bless( { |
9073
|
|
|
|
|
|
|
'calls' => [ |
9074
|
|
|
|
|
|
|
'EMPTY' |
9075
|
|
|
|
|
|
|
], |
9076
|
|
|
|
|
|
|
'impcount' => 0, |
9077
|
|
|
|
|
|
|
'line' => 90, |
9078
|
|
|
|
|
|
|
'vars' => '', |
9079
|
|
|
|
|
|
|
'changed' => 0, |
9080
|
|
|
|
|
|
|
'opcount' => 0, |
9081
|
|
|
|
|
|
|
'prods' => [ |
9082
|
|
|
|
|
|
|
bless( { |
9083
|
|
|
|
|
|
|
'items' => [ |
9084
|
|
|
|
|
|
|
bless( { |
9085
|
|
|
|
|
|
|
'line' => 90, |
9086
|
|
|
|
|
|
|
'description' => '/\\\\S+/', |
9087
|
|
|
|
|
|
|
'ldelim' => '/', |
9088
|
|
|
|
|
|
|
'pattern' => '\\S+', |
9089
|
|
|
|
|
|
|
'rdelim' => '/', |
9090
|
|
|
|
|
|
|
'mod' => '', |
9091
|
|
|
|
|
|
|
'lookahead' => 0, |
9092
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__' |
9093
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9094
|
|
|
|
|
|
|
bless( { |
9095
|
|
|
|
|
|
|
'line' => 90, |
9096
|
|
|
|
|
|
|
'lookahead' => 0, |
9097
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9098
|
|
|
|
|
|
|
'code' => '{$return = $item[1]}' |
9099
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9100
|
|
|
|
|
|
|
], |
9101
|
|
|
|
|
|
|
'strcount' => 0, |
9102
|
|
|
|
|
|
|
'actcount' => 1, |
9103
|
|
|
|
|
|
|
'line' => undef, |
9104
|
|
|
|
|
|
|
'error' => undef, |
9105
|
|
|
|
|
|
|
'uncommit' => undef, |
9106
|
|
|
|
|
|
|
'patcount' => 1, |
9107
|
|
|
|
|
|
|
'number' => 0, |
9108
|
|
|
|
|
|
|
'dircount' => 0 |
9109
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9110
|
|
|
|
|
|
|
bless( { |
9111
|
|
|
|
|
|
|
'dircount' => 0, |
9112
|
|
|
|
|
|
|
'number' => 1, |
9113
|
|
|
|
|
|
|
'patcount' => 0, |
9114
|
|
|
|
|
|
|
'uncommit' => undef, |
9115
|
|
|
|
|
|
|
'line' => undef, |
9116
|
|
|
|
|
|
|
'error' => undef, |
9117
|
|
|
|
|
|
|
'actcount' => 1, |
9118
|
|
|
|
|
|
|
'strcount' => 0, |
9119
|
|
|
|
|
|
|
'items' => [ |
9120
|
|
|
|
|
|
|
bless( { |
9121
|
|
|
|
|
|
|
'implicit' => undef, |
9122
|
|
|
|
|
|
|
'argcode' => undef, |
9123
|
|
|
|
|
|
|
'lookahead' => 0, |
9124
|
|
|
|
|
|
|
'subrule' => 'EMPTY', |
9125
|
|
|
|
|
|
|
'matchrule' => 0, |
9126
|
|
|
|
|
|
|
'line' => 91 |
9127
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9128
|
|
|
|
|
|
|
bless( { |
9129
|
|
|
|
|
|
|
'lookahead' => 0, |
9130
|
|
|
|
|
|
|
'code' => '{$return = \'\'}', |
9131
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9132
|
|
|
|
|
|
|
'line' => 91 |
9133
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9134
|
|
|
|
|
|
|
] |
9135
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9136
|
|
|
|
|
|
|
], |
9137
|
|
|
|
|
|
|
'name' => 'PNOTQUOTED' |
9138
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9139
|
|
|
|
|
|
|
'SPACE' => bless( { |
9140
|
|
|
|
|
|
|
'prods' => [ |
9141
|
|
|
|
|
|
|
bless( { |
9142
|
|
|
|
|
|
|
'dircount' => 0, |
9143
|
|
|
|
|
|
|
'number' => 0, |
9144
|
|
|
|
|
|
|
'uncommit' => undef, |
9145
|
|
|
|
|
|
|
'patcount' => 1, |
9146
|
|
|
|
|
|
|
'actcount' => 1, |
9147
|
|
|
|
|
|
|
'line' => undef, |
9148
|
|
|
|
|
|
|
'error' => undef, |
9149
|
|
|
|
|
|
|
'strcount' => 0, |
9150
|
|
|
|
|
|
|
'items' => [ |
9151
|
|
|
|
|
|
|
bless( { |
9152
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9153
|
|
|
|
|
|
|
'lookahead' => 0, |
9154
|
|
|
|
|
|
|
'rdelim' => '/', |
9155
|
|
|
|
|
|
|
'mod' => '', |
9156
|
|
|
|
|
|
|
'description' => '/\\\\s+/', |
9157
|
|
|
|
|
|
|
'pattern' => '\\s+', |
9158
|
|
|
|
|
|
|
'ldelim' => '/', |
9159
|
|
|
|
|
|
|
'line' => 94 |
9160
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9161
|
|
|
|
|
|
|
bless( { |
9162
|
|
|
|
|
|
|
'lookahead' => 0, |
9163
|
|
|
|
|
|
|
'code' => '{$return = $item[1]}', |
9164
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9165
|
|
|
|
|
|
|
'line' => 94 |
9166
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9167
|
|
|
|
|
|
|
] |
9168
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9169
|
|
|
|
|
|
|
], |
9170
|
|
|
|
|
|
|
'name' => 'SPACE', |
9171
|
|
|
|
|
|
|
'changed' => 0, |
9172
|
|
|
|
|
|
|
'opcount' => 0, |
9173
|
|
|
|
|
|
|
'vars' => '', |
9174
|
|
|
|
|
|
|
'calls' => [], |
9175
|
|
|
|
|
|
|
'impcount' => 0, |
9176
|
|
|
|
|
|
|
'line' => 94 |
9177
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9178
|
|
|
|
|
|
|
'PDQUOTE' => bless( { |
9179
|
|
|
|
|
|
|
'changed' => 0, |
9180
|
|
|
|
|
|
|
'opcount' => 0, |
9181
|
|
|
|
|
|
|
'name' => 'PDQUOTE', |
9182
|
|
|
|
|
|
|
'prods' => [ |
9183
|
|
|
|
|
|
|
bless( { |
9184
|
|
|
|
|
|
|
'actcount' => 1, |
9185
|
|
|
|
|
|
|
'line' => undef, |
9186
|
|
|
|
|
|
|
'error' => undef, |
9187
|
|
|
|
|
|
|
'strcount' => 0, |
9188
|
|
|
|
|
|
|
'number' => 0, |
9189
|
|
|
|
|
|
|
'dircount' => 0, |
9190
|
|
|
|
|
|
|
'uncommit' => undef, |
9191
|
|
|
|
|
|
|
'patcount' => 0, |
9192
|
|
|
|
|
|
|
'items' => [ |
9193
|
|
|
|
|
|
|
bless( { |
9194
|
|
|
|
|
|
|
'lookahead' => 0, |
9195
|
|
|
|
|
|
|
'argcode' => undef, |
9196
|
|
|
|
|
|
|
'implicit' => undef, |
9197
|
|
|
|
|
|
|
'subrule' => 'NOTDQUOTE', |
9198
|
|
|
|
|
|
|
'matchrule' => 0, |
9199
|
|
|
|
|
|
|
'line' => 85 |
9200
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9201
|
|
|
|
|
|
|
bless( { |
9202
|
|
|
|
|
|
|
'subrule' => 'SLASHEDDQUOTE', |
9203
|
|
|
|
|
|
|
'implicit' => undef, |
9204
|
|
|
|
|
|
|
'lookahead' => 0, |
9205
|
|
|
|
|
|
|
'argcode' => undef, |
9206
|
|
|
|
|
|
|
'line' => 85, |
9207
|
|
|
|
|
|
|
'matchrule' => 0 |
9208
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9209
|
|
|
|
|
|
|
bless( { |
9210
|
|
|
|
|
|
|
'matchrule' => 0, |
9211
|
|
|
|
|
|
|
'line' => 85, |
9212
|
|
|
|
|
|
|
'argcode' => undef, |
9213
|
|
|
|
|
|
|
'lookahead' => 0, |
9214
|
|
|
|
|
|
|
'implicit' => undef, |
9215
|
|
|
|
|
|
|
'subrule' => 'PDQUOTE' |
9216
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9217
|
|
|
|
|
|
|
bless( { |
9218
|
|
|
|
|
|
|
'line' => 85, |
9219
|
|
|
|
|
|
|
'code' => '{$return = $item{NOTDQUOTE}.$item{SLASHEDDQUOTE}.$item{PDQUOTE}}', |
9220
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9221
|
|
|
|
|
|
|
'lookahead' => 0 |
9222
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9223
|
|
|
|
|
|
|
] |
9224
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9225
|
|
|
|
|
|
|
bless( { |
9226
|
|
|
|
|
|
|
'dircount' => 0, |
9227
|
|
|
|
|
|
|
'number' => 1, |
9228
|
|
|
|
|
|
|
'patcount' => 0, |
9229
|
|
|
|
|
|
|
'uncommit' => undef, |
9230
|
|
|
|
|
|
|
'error' => undef, |
9231
|
|
|
|
|
|
|
'line' => undef, |
9232
|
|
|
|
|
|
|
'actcount' => 0, |
9233
|
|
|
|
|
|
|
'strcount' => 0, |
9234
|
|
|
|
|
|
|
'items' => [ |
9235
|
|
|
|
|
|
|
bless( { |
9236
|
|
|
|
|
|
|
'line' => 86, |
9237
|
|
|
|
|
|
|
'matchrule' => 0, |
9238
|
|
|
|
|
|
|
'subrule' => 'NOTDQUOTE', |
9239
|
|
|
|
|
|
|
'implicit' => undef, |
9240
|
|
|
|
|
|
|
'lookahead' => 0, |
9241
|
|
|
|
|
|
|
'argcode' => undef |
9242
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ) |
9243
|
|
|
|
|
|
|
] |
9244
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9245
|
|
|
|
|
|
|
], |
9246
|
|
|
|
|
|
|
'line' => 85, |
9247
|
|
|
|
|
|
|
'impcount' => 0, |
9248
|
|
|
|
|
|
|
'calls' => [ |
9249
|
|
|
|
|
|
|
'NOTDQUOTE', |
9250
|
|
|
|
|
|
|
'SLASHEDDQUOTE', |
9251
|
|
|
|
|
|
|
'PDQUOTE' |
9252
|
|
|
|
|
|
|
], |
9253
|
|
|
|
|
|
|
'vars' => '' |
9254
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9255
|
|
|
|
|
|
|
'BNAME' => bless( { |
9256
|
|
|
|
|
|
|
'opcount' => 0, |
9257
|
|
|
|
|
|
|
'changed' => 0, |
9258
|
|
|
|
|
|
|
'prods' => [ |
9259
|
|
|
|
|
|
|
bless( { |
9260
|
|
|
|
|
|
|
'items' => [ |
9261
|
|
|
|
|
|
|
bless( { |
9262
|
|
|
|
|
|
|
'description' => '/[A-Z]\\\\w*::/', |
9263
|
|
|
|
|
|
|
'pattern' => '[A-Z]\\w*::', |
9264
|
|
|
|
|
|
|
'ldelim' => '/', |
9265
|
|
|
|
|
|
|
'line' => 71, |
9266
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9267
|
|
|
|
|
|
|
'lookahead' => 0, |
9268
|
|
|
|
|
|
|
'rdelim' => '/', |
9269
|
|
|
|
|
|
|
'mod' => '' |
9270
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9271
|
|
|
|
|
|
|
bless( { |
9272
|
|
|
|
|
|
|
'subrule' => 'BNAME', |
9273
|
|
|
|
|
|
|
'lookahead' => 0, |
9274
|
|
|
|
|
|
|
'argcode' => undef, |
9275
|
|
|
|
|
|
|
'implicit' => undef, |
9276
|
|
|
|
|
|
|
'line' => 71, |
9277
|
|
|
|
|
|
|
'matchrule' => 0 |
9278
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9279
|
|
|
|
|
|
|
bless( { |
9280
|
|
|
|
|
|
|
'code' => '{$return = $item[1].$item[2]}', |
9281
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9282
|
|
|
|
|
|
|
'lookahead' => 0, |
9283
|
|
|
|
|
|
|
'line' => 71 |
9284
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9285
|
|
|
|
|
|
|
], |
9286
|
|
|
|
|
|
|
'uncommit' => undef, |
9287
|
|
|
|
|
|
|
'patcount' => 1, |
9288
|
|
|
|
|
|
|
'number' => 0, |
9289
|
|
|
|
|
|
|
'dircount' => 0, |
9290
|
|
|
|
|
|
|
'strcount' => 0, |
9291
|
|
|
|
|
|
|
'actcount' => 1, |
9292
|
|
|
|
|
|
|
'error' => undef, |
9293
|
|
|
|
|
|
|
'line' => undef |
9294
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9295
|
|
|
|
|
|
|
bless( { |
9296
|
|
|
|
|
|
|
'items' => [ |
9297
|
|
|
|
|
|
|
bless( { |
9298
|
|
|
|
|
|
|
'ldelim' => '/', |
9299
|
|
|
|
|
|
|
'pattern' => '[A-Z]\\w*', |
9300
|
|
|
|
|
|
|
'description' => '/[A-Z]\\\\w*/', |
9301
|
|
|
|
|
|
|
'line' => 72, |
9302
|
|
|
|
|
|
|
'lookahead' => 0, |
9303
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9304
|
|
|
|
|
|
|
'mod' => '', |
9305
|
|
|
|
|
|
|
'rdelim' => '/' |
9306
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9307
|
|
|
|
|
|
|
bless( { |
9308
|
|
|
|
|
|
|
'line' => 72, |
9309
|
|
|
|
|
|
|
'code' => '{$return = $item[1]}', |
9310
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9311
|
|
|
|
|
|
|
'lookahead' => 0 |
9312
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9313
|
|
|
|
|
|
|
], |
9314
|
|
|
|
|
|
|
'dircount' => 0, |
9315
|
|
|
|
|
|
|
'number' => 1, |
9316
|
|
|
|
|
|
|
'uncommit' => undef, |
9317
|
|
|
|
|
|
|
'patcount' => 1, |
9318
|
|
|
|
|
|
|
'actcount' => 1, |
9319
|
|
|
|
|
|
|
'error' => undef, |
9320
|
|
|
|
|
|
|
'line' => undef, |
9321
|
|
|
|
|
|
|
'strcount' => 0 |
9322
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9323
|
|
|
|
|
|
|
], |
9324
|
|
|
|
|
|
|
'name' => 'BNAME', |
9325
|
|
|
|
|
|
|
'impcount' => 0, |
9326
|
|
|
|
|
|
|
'calls' => [ |
9327
|
|
|
|
|
|
|
'BNAME' |
9328
|
|
|
|
|
|
|
], |
9329
|
|
|
|
|
|
|
'line' => 70, |
9330
|
|
|
|
|
|
|
'vars' => '' |
9331
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9332
|
|
|
|
|
|
|
'PNAME' => bless( { |
9333
|
|
|
|
|
|
|
'changed' => 0, |
9334
|
|
|
|
|
|
|
'opcount' => 0, |
9335
|
|
|
|
|
|
|
'prods' => [ |
9336
|
|
|
|
|
|
|
bless( { |
9337
|
|
|
|
|
|
|
'uncommit' => undef, |
9338
|
|
|
|
|
|
|
'patcount' => 1, |
9339
|
|
|
|
|
|
|
'number' => 0, |
9340
|
|
|
|
|
|
|
'dircount' => 0, |
9341
|
|
|
|
|
|
|
'strcount' => 0, |
9342
|
|
|
|
|
|
|
'actcount' => 1, |
9343
|
|
|
|
|
|
|
'error' => undef, |
9344
|
|
|
|
|
|
|
'line' => undef, |
9345
|
|
|
|
|
|
|
'items' => [ |
9346
|
|
|
|
|
|
|
bless( { |
9347
|
|
|
|
|
|
|
'description' => '/\\\\w+/', |
9348
|
|
|
|
|
|
|
'ldelim' => '/', |
9349
|
|
|
|
|
|
|
'pattern' => '\\w+', |
9350
|
|
|
|
|
|
|
'line' => 76, |
9351
|
|
|
|
|
|
|
'lookahead' => 0, |
9352
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9353
|
|
|
|
|
|
|
'rdelim' => '/', |
9354
|
|
|
|
|
|
|
'mod' => '' |
9355
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9356
|
|
|
|
|
|
|
bless( { |
9357
|
|
|
|
|
|
|
'line' => 76, |
9358
|
|
|
|
|
|
|
'lookahead' => 0, |
9359
|
|
|
|
|
|
|
'code' => '{$return = $item[1]}', |
9360
|
|
|
|
|
|
|
'hashname' => '__ACTION1__' |
9361
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9362
|
|
|
|
|
|
|
] |
9363
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9364
|
|
|
|
|
|
|
], |
9365
|
|
|
|
|
|
|
'name' => 'PNAME', |
9366
|
|
|
|
|
|
|
'calls' => [], |
9367
|
|
|
|
|
|
|
'impcount' => 0, |
9368
|
|
|
|
|
|
|
'line' => 76, |
9369
|
|
|
|
|
|
|
'vars' => '' |
9370
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9371
|
|
|
|
|
|
|
'NOTSQUOTE' => bless( { |
9372
|
|
|
|
|
|
|
'impcount' => 0, |
9373
|
|
|
|
|
|
|
'calls' => [], |
9374
|
|
|
|
|
|
|
'line' => 83, |
9375
|
|
|
|
|
|
|
'vars' => '', |
9376
|
|
|
|
|
|
|
'opcount' => 0, |
9377
|
|
|
|
|
|
|
'changed' => 0, |
9378
|
|
|
|
|
|
|
'prods' => [ |
9379
|
|
|
|
|
|
|
bless( { |
9380
|
|
|
|
|
|
|
'items' => [ |
9381
|
|
|
|
|
|
|
bless( { |
9382
|
|
|
|
|
|
|
'line' => 83, |
9383
|
|
|
|
|
|
|
'description' => '/[^\']*[^\'\\\\\\\\]/', |
9384
|
|
|
|
|
|
|
'ldelim' => '/', |
9385
|
|
|
|
|
|
|
'pattern' => '[^\']*[^\'\\\\]', |
9386
|
|
|
|
|
|
|
'rdelim' => '/', |
9387
|
|
|
|
|
|
|
'mod' => '', |
9388
|
|
|
|
|
|
|
'lookahead' => 0, |
9389
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__' |
9390
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ) |
9391
|
|
|
|
|
|
|
], |
9392
|
|
|
|
|
|
|
'strcount' => 0, |
9393
|
|
|
|
|
|
|
'actcount' => 0, |
9394
|
|
|
|
|
|
|
'error' => undef, |
9395
|
|
|
|
|
|
|
'line' => undef, |
9396
|
|
|
|
|
|
|
'uncommit' => undef, |
9397
|
|
|
|
|
|
|
'patcount' => 1, |
9398
|
|
|
|
|
|
|
'number' => 0, |
9399
|
|
|
|
|
|
|
'dircount' => 0 |
9400
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9401
|
|
|
|
|
|
|
], |
9402
|
|
|
|
|
|
|
'name' => 'NOTSQUOTE' |
9403
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9404
|
|
|
|
|
|
|
'INCLUDE' => bless( { |
9405
|
|
|
|
|
|
|
'opcount' => 0, |
9406
|
|
|
|
|
|
|
'changed' => 0, |
9407
|
|
|
|
|
|
|
'prods' => [ |
9408
|
|
|
|
|
|
|
bless( { |
9409
|
|
|
|
|
|
|
'items' => [ |
9410
|
|
|
|
|
|
|
bless( { |
9411
|
|
|
|
|
|
|
'lookahead' => 0, |
9412
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9413
|
|
|
|
|
|
|
'mod' => '', |
9414
|
|
|
|
|
|
|
'rdelim' => '/', |
9415
|
|
|
|
|
|
|
'ldelim' => '/', |
9416
|
|
|
|
|
|
|
'pattern' => '\\/\\S+\\.scen', |
9417
|
|
|
|
|
|
|
'description' => '/\\\\/\\\\S+\\\\.scen/', |
9418
|
|
|
|
|
|
|
'line' => 61 |
9419
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9420
|
|
|
|
|
|
|
bless( { |
9421
|
|
|
|
|
|
|
'line' => 61, |
9422
|
|
|
|
|
|
|
'lookahead' => 0, |
9423
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9424
|
|
|
|
|
|
|
'code' => '{$return = $item[1]}' |
9425
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9426
|
|
|
|
|
|
|
], |
9427
|
|
|
|
|
|
|
'strcount' => 0, |
9428
|
|
|
|
|
|
|
'line' => undef, |
9429
|
|
|
|
|
|
|
'error' => undef, |
9430
|
|
|
|
|
|
|
'actcount' => 1, |
9431
|
|
|
|
|
|
|
'patcount' => 1, |
9432
|
|
|
|
|
|
|
'uncommit' => undef, |
9433
|
|
|
|
|
|
|
'dircount' => 0, |
9434
|
|
|
|
|
|
|
'number' => 0 |
9435
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9436
|
|
|
|
|
|
|
bless( { |
9437
|
|
|
|
|
|
|
'items' => [ |
9438
|
|
|
|
|
|
|
bless( { |
9439
|
|
|
|
|
|
|
'description' => '/[^\\\\/#]\\\\S+\\\\.scen/', |
9440
|
|
|
|
|
|
|
'pattern' => '[^\\/#]\\S+\\.scen', |
9441
|
|
|
|
|
|
|
'ldelim' => '/', |
9442
|
|
|
|
|
|
|
'line' => 62, |
9443
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9444
|
|
|
|
|
|
|
'lookahead' => 0, |
9445
|
|
|
|
|
|
|
'rdelim' => '/', |
9446
|
|
|
|
|
|
|
'mod' => '' |
9447
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9448
|
|
|
|
|
|
|
bless( { |
9449
|
|
|
|
|
|
|
'line' => 62, |
9450
|
|
|
|
|
|
|
'lookahead' => 0, |
9451
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9452
|
|
|
|
|
|
|
'code' => '{ my $from_file = $arg[0]; |
9453
|
|
|
|
|
|
|
if (length $from_file) { |
9454
|
|
|
|
|
|
|
$return = dirname($from_file) . "/$item[1]"; |
9455
|
|
|
|
|
|
|
} else { |
9456
|
|
|
|
|
|
|
$return = "./$item[1]"; |
9457
|
|
|
|
|
|
|
} |
9458
|
|
|
|
|
|
|
}' |
9459
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9460
|
|
|
|
|
|
|
], |
9461
|
|
|
|
|
|
|
'error' => undef, |
9462
|
|
|
|
|
|
|
'line' => undef, |
9463
|
|
|
|
|
|
|
'actcount' => 1, |
9464
|
|
|
|
|
|
|
'strcount' => 0, |
9465
|
|
|
|
|
|
|
'number' => 1, |
9466
|
|
|
|
|
|
|
'dircount' => 0, |
9467
|
|
|
|
|
|
|
'patcount' => 1, |
9468
|
|
|
|
|
|
|
'uncommit' => undef |
9469
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9470
|
|
|
|
|
|
|
], |
9471
|
|
|
|
|
|
|
'name' => 'INCLUDE', |
9472
|
|
|
|
|
|
|
'impcount' => 0, |
9473
|
|
|
|
|
|
|
'calls' => [], |
9474
|
|
|
|
|
|
|
'line' => 61, |
9475
|
|
|
|
|
|
|
'vars' => '' |
9476
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9477
|
|
|
|
|
|
|
'BLOCK' => bless( { |
9478
|
|
|
|
|
|
|
'vars' => '', |
9479
|
|
|
|
|
|
|
'line' => 16, |
9480
|
|
|
|
|
|
|
'impcount' => 0, |
9481
|
|
|
|
|
|
|
'calls' => [ |
9482
|
|
|
|
|
|
|
'INCLUDE', |
9483
|
|
|
|
|
|
|
'SCENMODULE', |
9484
|
|
|
|
|
|
|
'PARAMS', |
9485
|
|
|
|
|
|
|
'TBNAME' |
9486
|
|
|
|
|
|
|
], |
9487
|
|
|
|
|
|
|
'name' => 'BLOCK', |
9488
|
|
|
|
|
|
|
'prods' => [ |
9489
|
|
|
|
|
|
|
bless( { |
9490
|
|
|
|
|
|
|
'items' => [ |
9491
|
|
|
|
|
|
|
bless( { |
9492
|
|
|
|
|
|
|
'line' => 16, |
9493
|
|
|
|
|
|
|
'matchrule' => 0, |
9494
|
|
|
|
|
|
|
'subrule' => 'INCLUDE', |
9495
|
|
|
|
|
|
|
'lookahead' => 0, |
9496
|
|
|
|
|
|
|
'argcode' => undef, |
9497
|
|
|
|
|
|
|
'implicit' => undef |
9498
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9499
|
|
|
|
|
|
|
bless( { |
9500
|
|
|
|
|
|
|
'line' => 16, |
9501
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9502
|
|
|
|
|
|
|
'code' => '{ |
9503
|
|
|
|
|
|
|
my $included = read_file( $item{INCLUDE}, binmode => \':utf8\' ); |
9504
|
|
|
|
|
|
|
my $result = $thisparser->startrule( $included, 1, $item{INCLUDE} ); |
9505
|
|
|
|
|
|
|
if (defined $result and ref $result eq \'ARRAY\') { |
9506
|
|
|
|
|
|
|
$return = [@$result]; |
9507
|
|
|
|
|
|
|
} else { |
9508
|
|
|
|
|
|
|
$return = undef; |
9509
|
|
|
|
|
|
|
} |
9510
|
|
|
|
|
|
|
}', |
9511
|
|
|
|
|
|
|
'lookahead' => 0 |
9512
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9513
|
|
|
|
|
|
|
], |
9514
|
|
|
|
|
|
|
'strcount' => 0, |
9515
|
|
|
|
|
|
|
'error' => undef, |
9516
|
|
|
|
|
|
|
'line' => undef, |
9517
|
|
|
|
|
|
|
'actcount' => 1, |
9518
|
|
|
|
|
|
|
'patcount' => 0, |
9519
|
|
|
|
|
|
|
'uncommit' => undef, |
9520
|
|
|
|
|
|
|
'dircount' => 0, |
9521
|
|
|
|
|
|
|
'number' => 0 |
9522
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9523
|
|
|
|
|
|
|
bless( { |
9524
|
|
|
|
|
|
|
'items' => [ |
9525
|
|
|
|
|
|
|
bless( { |
9526
|
|
|
|
|
|
|
'line' => 25, |
9527
|
|
|
|
|
|
|
'matchrule' => 0, |
9528
|
|
|
|
|
|
|
'subrule' => 'SCENMODULE', |
9529
|
|
|
|
|
|
|
'argcode' => undef, |
9530
|
|
|
|
|
|
|
'lookahead' => 0, |
9531
|
|
|
|
|
|
|
'implicit' => undef |
9532
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9533
|
|
|
|
|
|
|
bless( { |
9534
|
|
|
|
|
|
|
'subrule' => 'PARAMS', |
9535
|
|
|
|
|
|
|
'argcode' => undef, |
9536
|
|
|
|
|
|
|
'lookahead' => 0, |
9537
|
|
|
|
|
|
|
'implicit' => undef, |
9538
|
|
|
|
|
|
|
'line' => 25, |
9539
|
|
|
|
|
|
|
'matchrule' => 0 |
9540
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9541
|
|
|
|
|
|
|
bless( { |
9542
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9543
|
|
|
|
|
|
|
'code' => '{ |
9544
|
|
|
|
|
|
|
my $modulename = $item{SCENMODULE}; |
9545
|
|
|
|
|
|
|
eval "use $modulename; 1;" or die "Can\'t use $modulename !\\n$@\\n"; |
9546
|
|
|
|
|
|
|
my %params = map {my ($name,$value) = split /=/, $_, 2; ($name, $value)} @{$item{PARAMS}}; |
9547
|
|
|
|
|
|
|
my $scenmod = $modulename->new(\\%params); |
9548
|
|
|
|
|
|
|
my $string = $scenmod->get_scenario_string(); |
9549
|
|
|
|
|
|
|
my $result = $thisparser->startrule( $string, 0, \'\' ); |
9550
|
|
|
|
|
|
|
if (defined $result and ref $result eq \'ARRAY\') { |
9551
|
|
|
|
|
|
|
$return = [@$result]; |
9552
|
|
|
|
|
|
|
} else { |
9553
|
|
|
|
|
|
|
log_fatal "Syntax error in \'$modulename\' scenario:\\n<BEGIN SCENARIO>\\n$string\\n<END SCENARIO>"; |
9554
|
|
|
|
|
|
|
} |
9555
|
|
|
|
|
|
|
}', |
9556
|
|
|
|
|
|
|
'lookahead' => 0, |
9557
|
|
|
|
|
|
|
'line' => 25 |
9558
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9559
|
|
|
|
|
|
|
], |
9560
|
|
|
|
|
|
|
'strcount' => 0, |
9561
|
|
|
|
|
|
|
'actcount' => 1, |
9562
|
|
|
|
|
|
|
'error' => undef, |
9563
|
|
|
|
|
|
|
'line' => undef, |
9564
|
|
|
|
|
|
|
'uncommit' => undef, |
9565
|
|
|
|
|
|
|
'patcount' => 0, |
9566
|
|
|
|
|
|
|
'dircount' => 0, |
9567
|
|
|
|
|
|
|
'number' => 1 |
9568
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9569
|
|
|
|
|
|
|
bless( { |
9570
|
|
|
|
|
|
|
'strcount' => 0, |
9571
|
|
|
|
|
|
|
'actcount' => 1, |
9572
|
|
|
|
|
|
|
'error' => undef, |
9573
|
|
|
|
|
|
|
'line' => undef, |
9574
|
|
|
|
|
|
|
'uncommit' => undef, |
9575
|
|
|
|
|
|
|
'patcount' => 0, |
9576
|
|
|
|
|
|
|
'dircount' => 0, |
9577
|
|
|
|
|
|
|
'number' => 2, |
9578
|
|
|
|
|
|
|
'items' => [ |
9579
|
|
|
|
|
|
|
bless( { |
9580
|
|
|
|
|
|
|
'matchrule' => 0, |
9581
|
|
|
|
|
|
|
'line' => 38, |
9582
|
|
|
|
|
|
|
'argcode' => undef, |
9583
|
|
|
|
|
|
|
'lookahead' => 0, |
9584
|
|
|
|
|
|
|
'implicit' => undef, |
9585
|
|
|
|
|
|
|
'subrule' => 'SCENMODULE' |
9586
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9587
|
|
|
|
|
|
|
bless( { |
9588
|
|
|
|
|
|
|
'code' => '{ |
9589
|
|
|
|
|
|
|
my $modulename = $item{SCENMODULE}; |
9590
|
|
|
|
|
|
|
eval "use $modulename; 1;" or die "Can\'t use $modulename !\\n$@\\n"; |
9591
|
|
|
|
|
|
|
my $scenmod = $modulename->new(); |
9592
|
|
|
|
|
|
|
my $string = $scenmod->get_scenario_string(); |
9593
|
|
|
|
|
|
|
my $result = $thisparser->startrule( $string, 0, \'\' ); |
9594
|
|
|
|
|
|
|
if (defined $result and ref $result eq \'ARRAY\') { |
9595
|
|
|
|
|
|
|
$return = [@$result]; |
9596
|
|
|
|
|
|
|
} else { |
9597
|
|
|
|
|
|
|
log_fatal "Syntax error in \'$modulename\' scenario:\\n<BEGIN SCENARIO>\\n$string\\n<END SCENARIO>"; |
9598
|
|
|
|
|
|
|
} |
9599
|
|
|
|
|
|
|
}', |
9600
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9601
|
|
|
|
|
|
|
'lookahead' => 0, |
9602
|
|
|
|
|
|
|
'line' => 38 |
9603
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9604
|
|
|
|
|
|
|
] |
9605
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9606
|
|
|
|
|
|
|
bless( { |
9607
|
|
|
|
|
|
|
'items' => [ |
9608
|
|
|
|
|
|
|
bless( { |
9609
|
|
|
|
|
|
|
'line' => 50, |
9610
|
|
|
|
|
|
|
'matchrule' => 0, |
9611
|
|
|
|
|
|
|
'subrule' => 'TBNAME', |
9612
|
|
|
|
|
|
|
'implicit' => undef, |
9613
|
|
|
|
|
|
|
'argcode' => undef, |
9614
|
|
|
|
|
|
|
'lookahead' => 0 |
9615
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9616
|
|
|
|
|
|
|
bless( { |
9617
|
|
|
|
|
|
|
'matchrule' => 0, |
9618
|
|
|
|
|
|
|
'line' => 50, |
9619
|
|
|
|
|
|
|
'implicit' => undef, |
9620
|
|
|
|
|
|
|
'argcode' => undef, |
9621
|
|
|
|
|
|
|
'lookahead' => 0, |
9622
|
|
|
|
|
|
|
'subrule' => 'PARAMS' |
9623
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9624
|
|
|
|
|
|
|
bless( { |
9625
|
|
|
|
|
|
|
'code' => '{$return = [{ |
9626
|
|
|
|
|
|
|
block_name=>$item{TBNAME}, |
9627
|
|
|
|
|
|
|
block_parameters=>$item{PARAMS}, |
9628
|
|
|
|
|
|
|
}] |
9629
|
|
|
|
|
|
|
}', |
9630
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9631
|
|
|
|
|
|
|
'lookahead' => 0, |
9632
|
|
|
|
|
|
|
'line' => 50 |
9633
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9634
|
|
|
|
|
|
|
], |
9635
|
|
|
|
|
|
|
'strcount' => 0, |
9636
|
|
|
|
|
|
|
'actcount' => 1, |
9637
|
|
|
|
|
|
|
'error' => undef, |
9638
|
|
|
|
|
|
|
'line' => undef, |
9639
|
|
|
|
|
|
|
'uncommit' => undef, |
9640
|
|
|
|
|
|
|
'patcount' => 0, |
9641
|
|
|
|
|
|
|
'dircount' => 0, |
9642
|
|
|
|
|
|
|
'number' => 3 |
9643
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9644
|
|
|
|
|
|
|
bless( { |
9645
|
|
|
|
|
|
|
'strcount' => 0, |
9646
|
|
|
|
|
|
|
'actcount' => 1, |
9647
|
|
|
|
|
|
|
'line' => undef, |
9648
|
|
|
|
|
|
|
'error' => undef, |
9649
|
|
|
|
|
|
|
'uncommit' => undef, |
9650
|
|
|
|
|
|
|
'patcount' => 0, |
9651
|
|
|
|
|
|
|
'dircount' => 0, |
9652
|
|
|
|
|
|
|
'number' => 4, |
9653
|
|
|
|
|
|
|
'items' => [ |
9654
|
|
|
|
|
|
|
bless( { |
9655
|
|
|
|
|
|
|
'argcode' => undef, |
9656
|
|
|
|
|
|
|
'lookahead' => 0, |
9657
|
|
|
|
|
|
|
'implicit' => undef, |
9658
|
|
|
|
|
|
|
'subrule' => 'TBNAME', |
9659
|
|
|
|
|
|
|
'matchrule' => 0, |
9660
|
|
|
|
|
|
|
'line' => 55 |
9661
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9662
|
|
|
|
|
|
|
bless( { |
9663
|
|
|
|
|
|
|
'lookahead' => 0, |
9664
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9665
|
|
|
|
|
|
|
'code' => '{$return = [{ |
9666
|
|
|
|
|
|
|
block_name=>$item{TBNAME}, |
9667
|
|
|
|
|
|
|
block_parameters=>[], |
9668
|
|
|
|
|
|
|
}] |
9669
|
|
|
|
|
|
|
}', |
9670
|
|
|
|
|
|
|
'line' => 55 |
9671
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9672
|
|
|
|
|
|
|
] |
9673
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9674
|
|
|
|
|
|
|
], |
9675
|
|
|
|
|
|
|
'opcount' => 0, |
9676
|
|
|
|
|
|
|
'changed' => 0 |
9677
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9678
|
|
|
|
|
|
|
'SLASHEDDQUOTE' => bless( { |
9679
|
|
|
|
|
|
|
'opcount' => 0, |
9680
|
|
|
|
|
|
|
'changed' => 0, |
9681
|
|
|
|
|
|
|
'name' => 'SLASHEDDQUOTE', |
9682
|
|
|
|
|
|
|
'prods' => [ |
9683
|
|
|
|
|
|
|
bless( { |
9684
|
|
|
|
|
|
|
'items' => [ |
9685
|
|
|
|
|
|
|
bless( { |
9686
|
|
|
|
|
|
|
'description' => '/\\\\\\\\"/', |
9687
|
|
|
|
|
|
|
'ldelim' => '/', |
9688
|
|
|
|
|
|
|
'pattern' => '\\\\"', |
9689
|
|
|
|
|
|
|
'line' => 88, |
9690
|
|
|
|
|
|
|
'lookahead' => 0, |
9691
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9692
|
|
|
|
|
|
|
'rdelim' => '/', |
9693
|
|
|
|
|
|
|
'mod' => '' |
9694
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9695
|
|
|
|
|
|
|
bless( { |
9696
|
|
|
|
|
|
|
'line' => 88, |
9697
|
|
|
|
|
|
|
'lookahead' => 0, |
9698
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9699
|
|
|
|
|
|
|
'code' => '{$return = \'"\'}' |
9700
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9701
|
|
|
|
|
|
|
], |
9702
|
|
|
|
|
|
|
'uncommit' => undef, |
9703
|
|
|
|
|
|
|
'patcount' => 1, |
9704
|
|
|
|
|
|
|
'dircount' => 0, |
9705
|
|
|
|
|
|
|
'number' => 0, |
9706
|
|
|
|
|
|
|
'strcount' => 0, |
9707
|
|
|
|
|
|
|
'actcount' => 1, |
9708
|
|
|
|
|
|
|
'line' => undef, |
9709
|
|
|
|
|
|
|
'error' => undef |
9710
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9711
|
|
|
|
|
|
|
], |
9712
|
|
|
|
|
|
|
'line' => 88, |
9713
|
|
|
|
|
|
|
'impcount' => 0, |
9714
|
|
|
|
|
|
|
'calls' => [], |
9715
|
|
|
|
|
|
|
'vars' => '' |
9716
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9717
|
|
|
|
|
|
|
'NOTDQUOTE' => bless( { |
9718
|
|
|
|
|
|
|
'calls' => [], |
9719
|
|
|
|
|
|
|
'impcount' => 0, |
9720
|
|
|
|
|
|
|
'line' => 87, |
9721
|
|
|
|
|
|
|
'vars' => '', |
9722
|
|
|
|
|
|
|
'changed' => 0, |
9723
|
|
|
|
|
|
|
'opcount' => 0, |
9724
|
|
|
|
|
|
|
'prods' => [ |
9725
|
|
|
|
|
|
|
bless( { |
9726
|
|
|
|
|
|
|
'items' => [ |
9727
|
|
|
|
|
|
|
bless( { |
9728
|
|
|
|
|
|
|
'mod' => '', |
9729
|
|
|
|
|
|
|
'rdelim' => '/', |
9730
|
|
|
|
|
|
|
'lookahead' => 0, |
9731
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9732
|
|
|
|
|
|
|
'line' => 87, |
9733
|
|
|
|
|
|
|
'ldelim' => '/', |
9734
|
|
|
|
|
|
|
'pattern' => '[^"]*[^"\\\\]', |
9735
|
|
|
|
|
|
|
'description' => '/[^"]*[^"\\\\\\\\]/' |
9736
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ) |
9737
|
|
|
|
|
|
|
], |
9738
|
|
|
|
|
|
|
'error' => undef, |
9739
|
|
|
|
|
|
|
'line' => undef, |
9740
|
|
|
|
|
|
|
'actcount' => 0, |
9741
|
|
|
|
|
|
|
'strcount' => 0, |
9742
|
|
|
|
|
|
|
'dircount' => 0, |
9743
|
|
|
|
|
|
|
'number' => 0, |
9744
|
|
|
|
|
|
|
'patcount' => 1, |
9745
|
|
|
|
|
|
|
'uncommit' => undef |
9746
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9747
|
|
|
|
|
|
|
], |
9748
|
|
|
|
|
|
|
'name' => 'NOTDQUOTE' |
9749
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9750
|
|
|
|
|
|
|
'PTICKED' => bless( { |
9751
|
|
|
|
|
|
|
'vars' => '', |
9752
|
|
|
|
|
|
|
'line' => 92, |
9753
|
|
|
|
|
|
|
'calls' => [], |
9754
|
|
|
|
|
|
|
'impcount' => 0, |
9755
|
|
|
|
|
|
|
'name' => 'PTICKED', |
9756
|
|
|
|
|
|
|
'prods' => [ |
9757
|
|
|
|
|
|
|
bless( { |
9758
|
|
|
|
|
|
|
'items' => [ |
9759
|
|
|
|
|
|
|
bless( { |
9760
|
|
|
|
|
|
|
'line' => 92, |
9761
|
|
|
|
|
|
|
'description' => '/[^`]+/', |
9762
|
|
|
|
|
|
|
'pattern' => '[^`]+', |
9763
|
|
|
|
|
|
|
'ldelim' => '/', |
9764
|
|
|
|
|
|
|
'rdelim' => '/', |
9765
|
|
|
|
|
|
|
'mod' => '', |
9766
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9767
|
|
|
|
|
|
|
'lookahead' => 0 |
9768
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9769
|
|
|
|
|
|
|
bless( { |
9770
|
|
|
|
|
|
|
'line' => 92, |
9771
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9772
|
|
|
|
|
|
|
'code' => '{$return = $item[1]}', |
9773
|
|
|
|
|
|
|
'lookahead' => 0 |
9774
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9775
|
|
|
|
|
|
|
], |
9776
|
|
|
|
|
|
|
'dircount' => 0, |
9777
|
|
|
|
|
|
|
'number' => 0, |
9778
|
|
|
|
|
|
|
'uncommit' => undef, |
9779
|
|
|
|
|
|
|
'patcount' => 1, |
9780
|
|
|
|
|
|
|
'actcount' => 1, |
9781
|
|
|
|
|
|
|
'line' => undef, |
9782
|
|
|
|
|
|
|
'error' => undef, |
9783
|
|
|
|
|
|
|
'strcount' => 0 |
9784
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9785
|
|
|
|
|
|
|
], |
9786
|
|
|
|
|
|
|
'changed' => 0, |
9787
|
|
|
|
|
|
|
'opcount' => 0 |
9788
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9789
|
|
|
|
|
|
|
'SLASHEDSQUOTE' => bless( { |
9790
|
|
|
|
|
|
|
'vars' => '', |
9791
|
|
|
|
|
|
|
'line' => 84, |
9792
|
|
|
|
|
|
|
'impcount' => 0, |
9793
|
|
|
|
|
|
|
'calls' => [], |
9794
|
|
|
|
|
|
|
'name' => 'SLASHEDSQUOTE', |
9795
|
|
|
|
|
|
|
'prods' => [ |
9796
|
|
|
|
|
|
|
bless( { |
9797
|
|
|
|
|
|
|
'actcount' => 1, |
9798
|
|
|
|
|
|
|
'line' => undef, |
9799
|
|
|
|
|
|
|
'error' => undef, |
9800
|
|
|
|
|
|
|
'strcount' => 0, |
9801
|
|
|
|
|
|
|
'number' => 0, |
9802
|
|
|
|
|
|
|
'dircount' => 0, |
9803
|
|
|
|
|
|
|
'uncommit' => undef, |
9804
|
|
|
|
|
|
|
'patcount' => 1, |
9805
|
|
|
|
|
|
|
'items' => [ |
9806
|
|
|
|
|
|
|
bless( { |
9807
|
|
|
|
|
|
|
'mod' => '', |
9808
|
|
|
|
|
|
|
'rdelim' => '/', |
9809
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9810
|
|
|
|
|
|
|
'lookahead' => 0, |
9811
|
|
|
|
|
|
|
'line' => 84, |
9812
|
|
|
|
|
|
|
'pattern' => '\\\\\'', |
9813
|
|
|
|
|
|
|
'ldelim' => '/', |
9814
|
|
|
|
|
|
|
'description' => '/\\\\\\\\\'/' |
9815
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
9816
|
|
|
|
|
|
|
bless( { |
9817
|
|
|
|
|
|
|
'line' => 84, |
9818
|
|
|
|
|
|
|
'lookahead' => 0, |
9819
|
|
|
|
|
|
|
'code' => '{$return = "\'"}', |
9820
|
|
|
|
|
|
|
'hashname' => '__ACTION1__' |
9821
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9822
|
|
|
|
|
|
|
] |
9823
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9824
|
|
|
|
|
|
|
], |
9825
|
|
|
|
|
|
|
'changed' => 0, |
9826
|
|
|
|
|
|
|
'opcount' => 0 |
9827
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9828
|
|
|
|
|
|
|
'PARAMS' => bless( { |
9829
|
|
|
|
|
|
|
'impcount' => 0, |
9830
|
|
|
|
|
|
|
'calls' => [ |
9831
|
|
|
|
|
|
|
'PARAM', |
9832
|
|
|
|
|
|
|
'PARAMS' |
9833
|
|
|
|
|
|
|
], |
9834
|
|
|
|
|
|
|
'line' => 73, |
9835
|
|
|
|
|
|
|
'vars' => '', |
9836
|
|
|
|
|
|
|
'changed' => 0, |
9837
|
|
|
|
|
|
|
'opcount' => 0, |
9838
|
|
|
|
|
|
|
'prods' => [ |
9839
|
|
|
|
|
|
|
bless( { |
9840
|
|
|
|
|
|
|
'line' => undef, |
9841
|
|
|
|
|
|
|
'error' => undef, |
9842
|
|
|
|
|
|
|
'actcount' => 1, |
9843
|
|
|
|
|
|
|
'strcount' => 0, |
9844
|
|
|
|
|
|
|
'dircount' => 0, |
9845
|
|
|
|
|
|
|
'number' => 0, |
9846
|
|
|
|
|
|
|
'patcount' => 0, |
9847
|
|
|
|
|
|
|
'uncommit' => undef, |
9848
|
|
|
|
|
|
|
'items' => [ |
9849
|
|
|
|
|
|
|
bless( { |
9850
|
|
|
|
|
|
|
'line' => 73, |
9851
|
|
|
|
|
|
|
'matchrule' => 0, |
9852
|
|
|
|
|
|
|
'subrule' => 'PARAM', |
9853
|
|
|
|
|
|
|
'lookahead' => 0, |
9854
|
|
|
|
|
|
|
'argcode' => undef, |
9855
|
|
|
|
|
|
|
'implicit' => undef |
9856
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9857
|
|
|
|
|
|
|
bless( { |
9858
|
|
|
|
|
|
|
'implicit' => undef, |
9859
|
|
|
|
|
|
|
'argcode' => undef, |
9860
|
|
|
|
|
|
|
'lookahead' => 0, |
9861
|
|
|
|
|
|
|
'subrule' => 'PARAMS', |
9862
|
|
|
|
|
|
|
'matchrule' => 0, |
9863
|
|
|
|
|
|
|
'line' => 73 |
9864
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9865
|
|
|
|
|
|
|
bless( { |
9866
|
|
|
|
|
|
|
'lookahead' => 0, |
9867
|
|
|
|
|
|
|
'code' => '{$return = [$item{PARAM}, @{$item{PARAMS}}]}', |
9868
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9869
|
|
|
|
|
|
|
'line' => 73 |
9870
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9871
|
|
|
|
|
|
|
] |
9872
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9873
|
|
|
|
|
|
|
bless( { |
9874
|
|
|
|
|
|
|
'items' => [ |
9875
|
|
|
|
|
|
|
bless( { |
9876
|
|
|
|
|
|
|
'matchrule' => 0, |
9877
|
|
|
|
|
|
|
'line' => 74, |
9878
|
|
|
|
|
|
|
'argcode' => undef, |
9879
|
|
|
|
|
|
|
'lookahead' => 0, |
9880
|
|
|
|
|
|
|
'implicit' => undef, |
9881
|
|
|
|
|
|
|
'subrule' => 'PARAM' |
9882
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9883
|
|
|
|
|
|
|
bless( { |
9884
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9885
|
|
|
|
|
|
|
'code' => '{$return = [$item{PARAM}]}', |
9886
|
|
|
|
|
|
|
'lookahead' => 0, |
9887
|
|
|
|
|
|
|
'line' => 74 |
9888
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9889
|
|
|
|
|
|
|
], |
9890
|
|
|
|
|
|
|
'line' => undef, |
9891
|
|
|
|
|
|
|
'error' => undef, |
9892
|
|
|
|
|
|
|
'actcount' => 1, |
9893
|
|
|
|
|
|
|
'strcount' => 0, |
9894
|
|
|
|
|
|
|
'number' => 1, |
9895
|
|
|
|
|
|
|
'dircount' => 0, |
9896
|
|
|
|
|
|
|
'patcount' => 0, |
9897
|
|
|
|
|
|
|
'uncommit' => undef |
9898
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9899
|
|
|
|
|
|
|
], |
9900
|
|
|
|
|
|
|
'name' => 'PARAMS' |
9901
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9902
|
|
|
|
|
|
|
'EOF' => bless( { |
9903
|
|
|
|
|
|
|
'impcount' => 0, |
9904
|
|
|
|
|
|
|
'calls' => [], |
9905
|
|
|
|
|
|
|
'line' => 15, |
9906
|
|
|
|
|
|
|
'vars' => '', |
9907
|
|
|
|
|
|
|
'opcount' => 0, |
9908
|
|
|
|
|
|
|
'changed' => 0, |
9909
|
|
|
|
|
|
|
'prods' => [ |
9910
|
|
|
|
|
|
|
bless( { |
9911
|
|
|
|
|
|
|
'actcount' => 0, |
9912
|
|
|
|
|
|
|
'line' => undef, |
9913
|
|
|
|
|
|
|
'error' => undef, |
9914
|
|
|
|
|
|
|
'strcount' => 0, |
9915
|
|
|
|
|
|
|
'number' => 0, |
9916
|
|
|
|
|
|
|
'dircount' => 0, |
9917
|
|
|
|
|
|
|
'uncommit' => undef, |
9918
|
|
|
|
|
|
|
'patcount' => 1, |
9919
|
|
|
|
|
|
|
'items' => [ |
9920
|
|
|
|
|
|
|
bless( { |
9921
|
|
|
|
|
|
|
'lookahead' => 0, |
9922
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
9923
|
|
|
|
|
|
|
'rdelim' => '/', |
9924
|
|
|
|
|
|
|
'mod' => '', |
9925
|
|
|
|
|
|
|
'description' => '/^\\\\Z/', |
9926
|
|
|
|
|
|
|
'ldelim' => '/', |
9927
|
|
|
|
|
|
|
'pattern' => '^\\Z', |
9928
|
|
|
|
|
|
|
'line' => 15 |
9929
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ) |
9930
|
|
|
|
|
|
|
] |
9931
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
9932
|
|
|
|
|
|
|
], |
9933
|
|
|
|
|
|
|
'name' => 'EOF' |
9934
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
9935
|
|
|
|
|
|
|
'SCEN' => bless( { |
9936
|
|
|
|
|
|
|
'vars' => '', |
9937
|
|
|
|
|
|
|
'calls' => [ |
9938
|
|
|
|
|
|
|
'LINE', |
9939
|
|
|
|
|
|
|
'SCEN' |
9940
|
|
|
|
|
|
|
], |
9941
|
|
|
|
|
|
|
'impcount' => 0, |
9942
|
|
|
|
|
|
|
'line' => 10, |
9943
|
|
|
|
|
|
|
'prods' => [ |
9944
|
|
|
|
|
|
|
bless( { |
9945
|
|
|
|
|
|
|
'items' => [ |
9946
|
|
|
|
|
|
|
bless( { |
9947
|
|
|
|
|
|
|
'subrule' => 'LINE', |
9948
|
|
|
|
|
|
|
'implicit' => undef, |
9949
|
|
|
|
|
|
|
'lookahead' => 0, |
9950
|
|
|
|
|
|
|
'argcode' => undef, |
9951
|
|
|
|
|
|
|
'line' => 10, |
9952
|
|
|
|
|
|
|
'matchrule' => 0 |
9953
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9954
|
|
|
|
|
|
|
bless( { |
9955
|
|
|
|
|
|
|
'matchrule' => 0, |
9956
|
|
|
|
|
|
|
'line' => 10, |
9957
|
|
|
|
|
|
|
'argcode' => undef, |
9958
|
|
|
|
|
|
|
'lookahead' => 0, |
9959
|
|
|
|
|
|
|
'implicit' => undef, |
9960
|
|
|
|
|
|
|
'subrule' => 'SCEN' |
9961
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9962
|
|
|
|
|
|
|
bless( { |
9963
|
|
|
|
|
|
|
'line' => 10, |
9964
|
|
|
|
|
|
|
'lookahead' => 0, |
9965
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9966
|
|
|
|
|
|
|
'code' => '{$return = [@{$item{LINE}},@{$item{SCEN}}]}' |
9967
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9968
|
|
|
|
|
|
|
], |
9969
|
|
|
|
|
|
|
'line' => undef, |
9970
|
|
|
|
|
|
|
'error' => undef, |
9971
|
|
|
|
|
|
|
'actcount' => 1, |
9972
|
|
|
|
|
|
|
'strcount' => 0, |
9973
|
|
|
|
|
|
|
'dircount' => 0, |
9974
|
|
|
|
|
|
|
'number' => 0, |
9975
|
|
|
|
|
|
|
'patcount' => 0, |
9976
|
|
|
|
|
|
|
'uncommit' => undef |
9977
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
9978
|
|
|
|
|
|
|
bless( { |
9979
|
|
|
|
|
|
|
'items' => [ |
9980
|
|
|
|
|
|
|
bless( { |
9981
|
|
|
|
|
|
|
'matchrule' => 0, |
9982
|
|
|
|
|
|
|
'line' => 11, |
9983
|
|
|
|
|
|
|
'implicit' => undef, |
9984
|
|
|
|
|
|
|
'argcode' => undef, |
9985
|
|
|
|
|
|
|
'lookahead' => 0, |
9986
|
|
|
|
|
|
|
'subrule' => 'LINE' |
9987
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
9988
|
|
|
|
|
|
|
bless( { |
9989
|
|
|
|
|
|
|
'line' => 11, |
9990
|
|
|
|
|
|
|
'lookahead' => 0, |
9991
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
9992
|
|
|
|
|
|
|
'code' => '{$return = [@{$item{LINE}}]}' |
9993
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
9994
|
|
|
|
|
|
|
], |
9995
|
|
|
|
|
|
|
'strcount' => 0, |
9996
|
|
|
|
|
|
|
'actcount' => 1, |
9997
|
|
|
|
|
|
|
'line' => undef, |
9998
|
|
|
|
|
|
|
'error' => undef, |
9999
|
|
|
|
|
|
|
'uncommit' => undef, |
10000
|
|
|
|
|
|
|
'patcount' => 0, |
10001
|
|
|
|
|
|
|
'number' => 1, |
10002
|
|
|
|
|
|
|
'dircount' => 0 |
10003
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10004
|
|
|
|
|
|
|
], |
10005
|
|
|
|
|
|
|
'name' => 'SCEN', |
10006
|
|
|
|
|
|
|
'changed' => 0, |
10007
|
|
|
|
|
|
|
'opcount' => 0 |
10008
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
10009
|
|
|
|
|
|
|
'PVALUE' => bless( { |
10010
|
|
|
|
|
|
|
'prods' => [ |
10011
|
|
|
|
|
|
|
bless( { |
10012
|
|
|
|
|
|
|
'items' => [ |
10013
|
|
|
|
|
|
|
bless( { |
10014
|
|
|
|
|
|
|
'mod' => '', |
10015
|
|
|
|
|
|
|
'rdelim' => '/', |
10016
|
|
|
|
|
|
|
'lookahead' => 0, |
10017
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
10018
|
|
|
|
|
|
|
'line' => 77, |
10019
|
|
|
|
|
|
|
'ldelim' => '/', |
10020
|
|
|
|
|
|
|
'pattern' => '\'', |
10021
|
|
|
|
|
|
|
'description' => '/\'/' |
10022
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10023
|
|
|
|
|
|
|
bless( { |
10024
|
|
|
|
|
|
|
'matchrule' => 0, |
10025
|
|
|
|
|
|
|
'line' => 77, |
10026
|
|
|
|
|
|
|
'argcode' => undef, |
10027
|
|
|
|
|
|
|
'lookahead' => 0, |
10028
|
|
|
|
|
|
|
'implicit' => undef, |
10029
|
|
|
|
|
|
|
'subrule' => 'PSQUOTE' |
10030
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10031
|
|
|
|
|
|
|
bless( { |
10032
|
|
|
|
|
|
|
'ldelim' => '/', |
10033
|
|
|
|
|
|
|
'pattern' => '\'', |
10034
|
|
|
|
|
|
|
'description' => '/\'/', |
10035
|
|
|
|
|
|
|
'line' => 77, |
10036
|
|
|
|
|
|
|
'lookahead' => 0, |
10037
|
|
|
|
|
|
|
'hashname' => '__PATTERN2__', |
10038
|
|
|
|
|
|
|
'mod' => '', |
10039
|
|
|
|
|
|
|
'rdelim' => '/' |
10040
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10041
|
|
|
|
|
|
|
bless( { |
10042
|
|
|
|
|
|
|
'code' => '{$return = $item{PSQUOTE}}', |
10043
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10044
|
|
|
|
|
|
|
'lookahead' => 0, |
10045
|
|
|
|
|
|
|
'line' => 77 |
10046
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10047
|
|
|
|
|
|
|
], |
10048
|
|
|
|
|
|
|
'dircount' => 0, |
10049
|
|
|
|
|
|
|
'number' => 0, |
10050
|
|
|
|
|
|
|
'uncommit' => undef, |
10051
|
|
|
|
|
|
|
'patcount' => 2, |
10052
|
|
|
|
|
|
|
'actcount' => 1, |
10053
|
|
|
|
|
|
|
'error' => undef, |
10054
|
|
|
|
|
|
|
'line' => undef, |
10055
|
|
|
|
|
|
|
'strcount' => 0 |
10056
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
10057
|
|
|
|
|
|
|
bless( { |
10058
|
|
|
|
|
|
|
'items' => [ |
10059
|
|
|
|
|
|
|
bless( { |
10060
|
|
|
|
|
|
|
'pattern' => '"', |
10061
|
|
|
|
|
|
|
'ldelim' => '/', |
10062
|
|
|
|
|
|
|
'description' => '/"/', |
10063
|
|
|
|
|
|
|
'line' => 78, |
10064
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
10065
|
|
|
|
|
|
|
'lookahead' => 0, |
10066
|
|
|
|
|
|
|
'mod' => '', |
10067
|
|
|
|
|
|
|
'rdelim' => '/' |
10068
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10069
|
|
|
|
|
|
|
bless( { |
10070
|
|
|
|
|
|
|
'matchrule' => 0, |
10071
|
|
|
|
|
|
|
'line' => 78, |
10072
|
|
|
|
|
|
|
'implicit' => undef, |
10073
|
|
|
|
|
|
|
'lookahead' => 0, |
10074
|
|
|
|
|
|
|
'argcode' => undef, |
10075
|
|
|
|
|
|
|
'subrule' => 'PDQUOTE' |
10076
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10077
|
|
|
|
|
|
|
bless( { |
10078
|
|
|
|
|
|
|
'line' => 78, |
10079
|
|
|
|
|
|
|
'pattern' => '"', |
10080
|
|
|
|
|
|
|
'ldelim' => '/', |
10081
|
|
|
|
|
|
|
'description' => '/"/', |
10082
|
|
|
|
|
|
|
'mod' => '', |
10083
|
|
|
|
|
|
|
'rdelim' => '/', |
10084
|
|
|
|
|
|
|
'hashname' => '__PATTERN2__', |
10085
|
|
|
|
|
|
|
'lookahead' => 0 |
10086
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10087
|
|
|
|
|
|
|
bless( { |
10088
|
|
|
|
|
|
|
'line' => 78, |
10089
|
|
|
|
|
|
|
'lookahead' => 0, |
10090
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10091
|
|
|
|
|
|
|
'code' => '{$return = $item{PDQUOTE}}' |
10092
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10093
|
|
|
|
|
|
|
], |
10094
|
|
|
|
|
|
|
'actcount' => 1, |
10095
|
|
|
|
|
|
|
'line' => undef, |
10096
|
|
|
|
|
|
|
'error' => undef, |
10097
|
|
|
|
|
|
|
'strcount' => 0, |
10098
|
|
|
|
|
|
|
'dircount' => 0, |
10099
|
|
|
|
|
|
|
'number' => 1, |
10100
|
|
|
|
|
|
|
'uncommit' => undef, |
10101
|
|
|
|
|
|
|
'patcount' => 2 |
10102
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
10103
|
|
|
|
|
|
|
bless( { |
10104
|
|
|
|
|
|
|
'uncommit' => undef, |
10105
|
|
|
|
|
|
|
'patcount' => 2, |
10106
|
|
|
|
|
|
|
'dircount' => 0, |
10107
|
|
|
|
|
|
|
'number' => 2, |
10108
|
|
|
|
|
|
|
'strcount' => 0, |
10109
|
|
|
|
|
|
|
'actcount' => 1, |
10110
|
|
|
|
|
|
|
'error' => undef, |
10111
|
|
|
|
|
|
|
'line' => undef, |
10112
|
|
|
|
|
|
|
'items' => [ |
10113
|
|
|
|
|
|
|
bless( { |
10114
|
|
|
|
|
|
|
'line' => 79, |
10115
|
|
|
|
|
|
|
'pattern' => '`', |
10116
|
|
|
|
|
|
|
'ldelim' => '/', |
10117
|
|
|
|
|
|
|
'description' => '/`/', |
10118
|
|
|
|
|
|
|
'mod' => '', |
10119
|
|
|
|
|
|
|
'rdelim' => '/', |
10120
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
10121
|
|
|
|
|
|
|
'lookahead' => 0 |
10122
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10123
|
|
|
|
|
|
|
bless( { |
10124
|
|
|
|
|
|
|
'subrule' => 'PTICKED', |
10125
|
|
|
|
|
|
|
'argcode' => undef, |
10126
|
|
|
|
|
|
|
'lookahead' => 0, |
10127
|
|
|
|
|
|
|
'implicit' => undef, |
10128
|
|
|
|
|
|
|
'line' => 79, |
10129
|
|
|
|
|
|
|
'matchrule' => 0 |
10130
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10131
|
|
|
|
|
|
|
bless( { |
10132
|
|
|
|
|
|
|
'lookahead' => 0, |
10133
|
|
|
|
|
|
|
'hashname' => '__PATTERN2__', |
10134
|
|
|
|
|
|
|
'rdelim' => '/', |
10135
|
|
|
|
|
|
|
'mod' => '', |
10136
|
|
|
|
|
|
|
'description' => '/`/', |
10137
|
|
|
|
|
|
|
'ldelim' => '/', |
10138
|
|
|
|
|
|
|
'pattern' => '`', |
10139
|
|
|
|
|
|
|
'line' => 79 |
10140
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10141
|
|
|
|
|
|
|
bless( { |
10142
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10143
|
|
|
|
|
|
|
'code' => '{$return = $item[1].$item[2].$item[3]}', |
10144
|
|
|
|
|
|
|
'lookahead' => 0, |
10145
|
|
|
|
|
|
|
'line' => 79 |
10146
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10147
|
|
|
|
|
|
|
] |
10148
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
10149
|
|
|
|
|
|
|
bless( { |
10150
|
|
|
|
|
|
|
'actcount' => 1, |
10151
|
|
|
|
|
|
|
'error' => undef, |
10152
|
|
|
|
|
|
|
'line' => undef, |
10153
|
|
|
|
|
|
|
'strcount' => 0, |
10154
|
|
|
|
|
|
|
'dircount' => 0, |
10155
|
|
|
|
|
|
|
'number' => 3, |
10156
|
|
|
|
|
|
|
'uncommit' => undef, |
10157
|
|
|
|
|
|
|
'patcount' => 0, |
10158
|
|
|
|
|
|
|
'items' => [ |
10159
|
|
|
|
|
|
|
bless( { |
10160
|
|
|
|
|
|
|
'subrule' => 'PNOTQUOTED', |
10161
|
|
|
|
|
|
|
'argcode' => undef, |
10162
|
|
|
|
|
|
|
'lookahead' => 0, |
10163
|
|
|
|
|
|
|
'implicit' => undef, |
10164
|
|
|
|
|
|
|
'line' => 80, |
10165
|
|
|
|
|
|
|
'matchrule' => 0 |
10166
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10167
|
|
|
|
|
|
|
bless( { |
10168
|
|
|
|
|
|
|
'code' => '{$return = $item{PNOTQUOTED}}', |
10169
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10170
|
|
|
|
|
|
|
'lookahead' => 0, |
10171
|
|
|
|
|
|
|
'line' => 80 |
10172
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10173
|
|
|
|
|
|
|
] |
10174
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10175
|
|
|
|
|
|
|
], |
10176
|
|
|
|
|
|
|
'name' => 'PVALUE', |
10177
|
|
|
|
|
|
|
'changed' => 0, |
10178
|
|
|
|
|
|
|
'opcount' => 0, |
10179
|
|
|
|
|
|
|
'vars' => '', |
10180
|
|
|
|
|
|
|
'calls' => [ |
10181
|
|
|
|
|
|
|
'PSQUOTE', |
10182
|
|
|
|
|
|
|
'PDQUOTE', |
10183
|
|
|
|
|
|
|
'PTICKED', |
10184
|
|
|
|
|
|
|
'PNOTQUOTED' |
10185
|
|
|
|
|
|
|
], |
10186
|
|
|
|
|
|
|
'impcount' => 0, |
10187
|
|
|
|
|
|
|
'line' => 77 |
10188
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
10189
|
|
|
|
|
|
|
'COMMENT' => bless( { |
10190
|
|
|
|
|
|
|
'changed' => 0, |
10191
|
|
|
|
|
|
|
'opcount' => 0, |
10192
|
|
|
|
|
|
|
'prods' => [ |
10193
|
|
|
|
|
|
|
bless( { |
10194
|
|
|
|
|
|
|
'items' => [ |
10195
|
|
|
|
|
|
|
bless( { |
10196
|
|
|
|
|
|
|
'lookahead' => 0, |
10197
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
10198
|
|
|
|
|
|
|
'mod' => '', |
10199
|
|
|
|
|
|
|
'rdelim' => '/', |
10200
|
|
|
|
|
|
|
'ldelim' => '/', |
10201
|
|
|
|
|
|
|
'pattern' => '#[^\\n]*', |
10202
|
|
|
|
|
|
|
'description' => '/#[^\\\\n]*/', |
10203
|
|
|
|
|
|
|
'line' => 93 |
10204
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10205
|
|
|
|
|
|
|
bless( { |
10206
|
|
|
|
|
|
|
'line' => 93, |
10207
|
|
|
|
|
|
|
'lookahead' => 0, |
10208
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10209
|
|
|
|
|
|
|
'code' => '{$return = \'\'}' |
10210
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10211
|
|
|
|
|
|
|
], |
10212
|
|
|
|
|
|
|
'patcount' => 1, |
10213
|
|
|
|
|
|
|
'uncommit' => undef, |
10214
|
|
|
|
|
|
|
'number' => 0, |
10215
|
|
|
|
|
|
|
'dircount' => 0, |
10216
|
|
|
|
|
|
|
'strcount' => 0, |
10217
|
|
|
|
|
|
|
'error' => undef, |
10218
|
|
|
|
|
|
|
'line' => undef, |
10219
|
|
|
|
|
|
|
'actcount' => 1 |
10220
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10221
|
|
|
|
|
|
|
], |
10222
|
|
|
|
|
|
|
'name' => 'COMMENT', |
10223
|
|
|
|
|
|
|
'calls' => [], |
10224
|
|
|
|
|
|
|
'impcount' => 0, |
10225
|
|
|
|
|
|
|
'line' => 93, |
10226
|
|
|
|
|
|
|
'vars' => '' |
10227
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
10228
|
|
|
|
|
|
|
'PARAM' => bless( { |
10229
|
|
|
|
|
|
|
'vars' => '', |
10230
|
|
|
|
|
|
|
'line' => 75, |
10231
|
|
|
|
|
|
|
'calls' => [ |
10232
|
|
|
|
|
|
|
'PNAME', |
10233
|
|
|
|
|
|
|
'PVALUE' |
10234
|
|
|
|
|
|
|
], |
10235
|
|
|
|
|
|
|
'impcount' => 0, |
10236
|
|
|
|
|
|
|
'name' => 'PARAM', |
10237
|
|
|
|
|
|
|
'prods' => [ |
10238
|
|
|
|
|
|
|
bless( { |
10239
|
|
|
|
|
|
|
'items' => [ |
10240
|
|
|
|
|
|
|
bless( { |
10241
|
|
|
|
|
|
|
'subrule' => 'PNAME', |
10242
|
|
|
|
|
|
|
'lookahead' => 0, |
10243
|
|
|
|
|
|
|
'argcode' => undef, |
10244
|
|
|
|
|
|
|
'implicit' => undef, |
10245
|
|
|
|
|
|
|
'line' => 75, |
10246
|
|
|
|
|
|
|
'matchrule' => 0 |
10247
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10248
|
|
|
|
|
|
|
bless( { |
10249
|
|
|
|
|
|
|
'line' => 75, |
10250
|
|
|
|
|
|
|
'description' => '\'=\'', |
10251
|
|
|
|
|
|
|
'lookahead' => 0, |
10252
|
|
|
|
|
|
|
'hashname' => '__STRING1__', |
10253
|
|
|
|
|
|
|
'pattern' => '=' |
10254
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Literal' ), |
10255
|
|
|
|
|
|
|
bless( { |
10256
|
|
|
|
|
|
|
'name' => '<skip: qr//>', |
10257
|
|
|
|
|
|
|
'hashname' => '__DIRECTIVE1__', |
10258
|
|
|
|
|
|
|
'code' => 'my $oldskip = $skip; $skip= qr//; $oldskip', |
10259
|
|
|
|
|
|
|
'lookahead' => 0, |
10260
|
|
|
|
|
|
|
'line' => 75 |
10261
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Directive' ), |
10262
|
|
|
|
|
|
|
bless( { |
10263
|
|
|
|
|
|
|
'line' => 75, |
10264
|
|
|
|
|
|
|
'matchrule' => 0, |
10265
|
|
|
|
|
|
|
'subrule' => 'PVALUE', |
10266
|
|
|
|
|
|
|
'implicit' => undef, |
10267
|
|
|
|
|
|
|
'lookahead' => 0, |
10268
|
|
|
|
|
|
|
'argcode' => undef |
10269
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10270
|
|
|
|
|
|
|
bless( { |
10271
|
|
|
|
|
|
|
'line' => 75, |
10272
|
|
|
|
|
|
|
'lookahead' => 0, |
10273
|
|
|
|
|
|
|
'code' => '{$return = $item{PNAME}.\'=\'.$item{PVALUE}}', |
10274
|
|
|
|
|
|
|
'hashname' => '__ACTION1__' |
10275
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10276
|
|
|
|
|
|
|
], |
10277
|
|
|
|
|
|
|
'actcount' => 1, |
10278
|
|
|
|
|
|
|
'error' => undef, |
10279
|
|
|
|
|
|
|
'line' => undef, |
10280
|
|
|
|
|
|
|
'strcount' => 1, |
10281
|
|
|
|
|
|
|
'number' => 0, |
10282
|
|
|
|
|
|
|
'dircount' => 1, |
10283
|
|
|
|
|
|
|
'uncommit' => undef, |
10284
|
|
|
|
|
|
|
'patcount' => 0 |
10285
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10286
|
|
|
|
|
|
|
], |
10287
|
|
|
|
|
|
|
'opcount' => 0, |
10288
|
|
|
|
|
|
|
'changed' => 0 |
10289
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
10290
|
|
|
|
|
|
|
'TBNAME' => bless( { |
10291
|
|
|
|
|
|
|
'vars' => '', |
10292
|
|
|
|
|
|
|
'impcount' => 0, |
10293
|
|
|
|
|
|
|
'calls' => [ |
10294
|
|
|
|
|
|
|
'BNAME' |
10295
|
|
|
|
|
|
|
], |
10296
|
|
|
|
|
|
|
'line' => 69, |
10297
|
|
|
|
|
|
|
'prods' => [ |
10298
|
|
|
|
|
|
|
bless( { |
10299
|
|
|
|
|
|
|
'uncommit' => undef, |
10300
|
|
|
|
|
|
|
'patcount' => 1, |
10301
|
|
|
|
|
|
|
'number' => 0, |
10302
|
|
|
|
|
|
|
'dircount' => 0, |
10303
|
|
|
|
|
|
|
'strcount' => 0, |
10304
|
|
|
|
|
|
|
'actcount' => 1, |
10305
|
|
|
|
|
|
|
'line' => undef, |
10306
|
|
|
|
|
|
|
'error' => undef, |
10307
|
|
|
|
|
|
|
'items' => [ |
10308
|
|
|
|
|
|
|
bless( { |
10309
|
|
|
|
|
|
|
'description' => '/::/', |
10310
|
|
|
|
|
|
|
'pattern' => '::', |
10311
|
|
|
|
|
|
|
'ldelim' => '/', |
10312
|
|
|
|
|
|
|
'line' => 69, |
10313
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
10314
|
|
|
|
|
|
|
'lookahead' => 0, |
10315
|
|
|
|
|
|
|
'rdelim' => '/', |
10316
|
|
|
|
|
|
|
'mod' => '' |
10317
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10318
|
|
|
|
|
|
|
bless( { |
10319
|
|
|
|
|
|
|
'line' => 69, |
10320
|
|
|
|
|
|
|
'matchrule' => 0, |
10321
|
|
|
|
|
|
|
'subrule' => 'BNAME', |
10322
|
|
|
|
|
|
|
'lookahead' => 0, |
10323
|
|
|
|
|
|
|
'argcode' => undef, |
10324
|
|
|
|
|
|
|
'implicit' => undef |
10325
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10326
|
|
|
|
|
|
|
bless( { |
10327
|
|
|
|
|
|
|
'line' => 69, |
10328
|
|
|
|
|
|
|
'lookahead' => 0, |
10329
|
|
|
|
|
|
|
'code' => '{$return = $item{BNAME}}', |
10330
|
|
|
|
|
|
|
'hashname' => '__ACTION1__' |
10331
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10332
|
|
|
|
|
|
|
] |
10333
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
10334
|
|
|
|
|
|
|
bless( { |
10335
|
|
|
|
|
|
|
'items' => [ |
10336
|
|
|
|
|
|
|
bless( { |
10337
|
|
|
|
|
|
|
'subrule' => 'BNAME', |
10338
|
|
|
|
|
|
|
'implicit' => undef, |
10339
|
|
|
|
|
|
|
'argcode' => undef, |
10340
|
|
|
|
|
|
|
'lookahead' => 0, |
10341
|
|
|
|
|
|
|
'line' => 70, |
10342
|
|
|
|
|
|
|
'matchrule' => 0 |
10343
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10344
|
|
|
|
|
|
|
bless( { |
10345
|
|
|
|
|
|
|
'line' => 70, |
10346
|
|
|
|
|
|
|
'lookahead' => 0, |
10347
|
|
|
|
|
|
|
'code' => '{$return = "Treex::Block::$item{BNAME}"}', |
10348
|
|
|
|
|
|
|
'hashname' => '__ACTION1__' |
10349
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10350
|
|
|
|
|
|
|
], |
10351
|
|
|
|
|
|
|
'strcount' => 0, |
10352
|
|
|
|
|
|
|
'actcount' => 1, |
10353
|
|
|
|
|
|
|
'line' => undef, |
10354
|
|
|
|
|
|
|
'error' => undef, |
10355
|
|
|
|
|
|
|
'uncommit' => undef, |
10356
|
|
|
|
|
|
|
'patcount' => 0, |
10357
|
|
|
|
|
|
|
'number' => 1, |
10358
|
|
|
|
|
|
|
'dircount' => 0 |
10359
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10360
|
|
|
|
|
|
|
], |
10361
|
|
|
|
|
|
|
'name' => 'TBNAME', |
10362
|
|
|
|
|
|
|
'changed' => 0, |
10363
|
|
|
|
|
|
|
'opcount' => 0 |
10364
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
10365
|
|
|
|
|
|
|
'PSQUOTE' => bless( { |
10366
|
|
|
|
|
|
|
'prods' => [ |
10367
|
|
|
|
|
|
|
bless( { |
10368
|
|
|
|
|
|
|
'patcount' => 0, |
10369
|
|
|
|
|
|
|
'uncommit' => undef, |
10370
|
|
|
|
|
|
|
'dircount' => 0, |
10371
|
|
|
|
|
|
|
'number' => 0, |
10372
|
|
|
|
|
|
|
'strcount' => 0, |
10373
|
|
|
|
|
|
|
'line' => undef, |
10374
|
|
|
|
|
|
|
'error' => undef, |
10375
|
|
|
|
|
|
|
'actcount' => 1, |
10376
|
|
|
|
|
|
|
'items' => [ |
10377
|
|
|
|
|
|
|
bless( { |
10378
|
|
|
|
|
|
|
'implicit' => undef, |
10379
|
|
|
|
|
|
|
'argcode' => undef, |
10380
|
|
|
|
|
|
|
'lookahead' => 0, |
10381
|
|
|
|
|
|
|
'subrule' => 'NOTSQUOTE', |
10382
|
|
|
|
|
|
|
'matchrule' => 0, |
10383
|
|
|
|
|
|
|
'line' => 81 |
10384
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10385
|
|
|
|
|
|
|
bless( { |
10386
|
|
|
|
|
|
|
'matchrule' => 0, |
10387
|
|
|
|
|
|
|
'line' => 81, |
10388
|
|
|
|
|
|
|
'argcode' => undef, |
10389
|
|
|
|
|
|
|
'lookahead' => 0, |
10390
|
|
|
|
|
|
|
'implicit' => undef, |
10391
|
|
|
|
|
|
|
'subrule' => 'SLASHEDSQUOTE' |
10392
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10393
|
|
|
|
|
|
|
bless( { |
10394
|
|
|
|
|
|
|
'line' => 81, |
10395
|
|
|
|
|
|
|
'matchrule' => 0, |
10396
|
|
|
|
|
|
|
'subrule' => 'PSQUOTE', |
10397
|
|
|
|
|
|
|
'lookahead' => 0, |
10398
|
|
|
|
|
|
|
'argcode' => undef, |
10399
|
|
|
|
|
|
|
'implicit' => undef |
10400
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10401
|
|
|
|
|
|
|
bless( { |
10402
|
|
|
|
|
|
|
'lookahead' => 0, |
10403
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10404
|
|
|
|
|
|
|
'code' => '{$return = $item{NOTSQUOTE}.$item{SLASHEDSQUOTE}.$item{PSQUOTE}}', |
10405
|
|
|
|
|
|
|
'line' => 81 |
10406
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10407
|
|
|
|
|
|
|
] |
10408
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
10409
|
|
|
|
|
|
|
bless( { |
10410
|
|
|
|
|
|
|
'items' => [ |
10411
|
|
|
|
|
|
|
bless( { |
10412
|
|
|
|
|
|
|
'subrule' => 'NOTSQUOTE', |
10413
|
|
|
|
|
|
|
'argcode' => undef, |
10414
|
|
|
|
|
|
|
'lookahead' => 0, |
10415
|
|
|
|
|
|
|
'implicit' => undef, |
10416
|
|
|
|
|
|
|
'line' => 82, |
10417
|
|
|
|
|
|
|
'matchrule' => 0 |
10418
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ) |
10419
|
|
|
|
|
|
|
], |
10420
|
|
|
|
|
|
|
'error' => undef, |
10421
|
|
|
|
|
|
|
'line' => undef, |
10422
|
|
|
|
|
|
|
'actcount' => 0, |
10423
|
|
|
|
|
|
|
'strcount' => 0, |
10424
|
|
|
|
|
|
|
'number' => 1, |
10425
|
|
|
|
|
|
|
'dircount' => 0, |
10426
|
|
|
|
|
|
|
'patcount' => 0, |
10427
|
|
|
|
|
|
|
'uncommit' => undef |
10428
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10429
|
|
|
|
|
|
|
], |
10430
|
|
|
|
|
|
|
'name' => 'PSQUOTE', |
10431
|
|
|
|
|
|
|
'changed' => 0, |
10432
|
|
|
|
|
|
|
'opcount' => 0, |
10433
|
|
|
|
|
|
|
'vars' => '', |
10434
|
|
|
|
|
|
|
'impcount' => 0, |
10435
|
|
|
|
|
|
|
'calls' => [ |
10436
|
|
|
|
|
|
|
'NOTSQUOTE', |
10437
|
|
|
|
|
|
|
'SLASHEDSQUOTE', |
10438
|
|
|
|
|
|
|
'PSQUOTE' |
10439
|
|
|
|
|
|
|
], |
10440
|
|
|
|
|
|
|
'line' => 81 |
10441
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
10442
|
|
|
|
|
|
|
'startrule' => bless( { |
10443
|
|
|
|
|
|
|
'name' => 'startrule', |
10444
|
|
|
|
|
|
|
'prods' => [ |
10445
|
|
|
|
|
|
|
bless( { |
10446
|
|
|
|
|
|
|
'items' => [ |
10447
|
|
|
|
|
|
|
bless( { |
10448
|
|
|
|
|
|
|
'line' => 9, |
10449
|
|
|
|
|
|
|
'matchrule' => 0, |
10450
|
|
|
|
|
|
|
'subrule' => 'SCEN', |
10451
|
|
|
|
|
|
|
'lookahead' => 0, |
10452
|
|
|
|
|
|
|
'argcode' => undef, |
10453
|
|
|
|
|
|
|
'implicit' => undef |
10454
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10455
|
|
|
|
|
|
|
bless( { |
10456
|
|
|
|
|
|
|
'line' => 9, |
10457
|
|
|
|
|
|
|
'matchrule' => 0, |
10458
|
|
|
|
|
|
|
'subrule' => 'EOF', |
10459
|
|
|
|
|
|
|
'argcode' => undef, |
10460
|
|
|
|
|
|
|
'lookahead' => 0, |
10461
|
|
|
|
|
|
|
'implicit' => undef |
10462
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10463
|
|
|
|
|
|
|
bless( { |
10464
|
|
|
|
|
|
|
'lookahead' => 0, |
10465
|
|
|
|
|
|
|
'code' => '{$return = $item{SCEN}}', |
10466
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10467
|
|
|
|
|
|
|
'line' => 9 |
10468
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10469
|
|
|
|
|
|
|
], |
10470
|
|
|
|
|
|
|
'actcount' => 1, |
10471
|
|
|
|
|
|
|
'error' => undef, |
10472
|
|
|
|
|
|
|
'line' => undef, |
10473
|
|
|
|
|
|
|
'strcount' => 0, |
10474
|
|
|
|
|
|
|
'dircount' => 0, |
10475
|
|
|
|
|
|
|
'number' => 0, |
10476
|
|
|
|
|
|
|
'uncommit' => undef, |
10477
|
|
|
|
|
|
|
'patcount' => 0 |
10478
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10479
|
|
|
|
|
|
|
], |
10480
|
|
|
|
|
|
|
'changed' => 0, |
10481
|
|
|
|
|
|
|
'opcount' => 0, |
10482
|
|
|
|
|
|
|
'vars' => '', |
10483
|
|
|
|
|
|
|
'line' => 9, |
10484
|
|
|
|
|
|
|
'impcount' => 0, |
10485
|
|
|
|
|
|
|
'calls' => [ |
10486
|
|
|
|
|
|
|
'SCEN', |
10487
|
|
|
|
|
|
|
'EOF' |
10488
|
|
|
|
|
|
|
] |
10489
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
10490
|
|
|
|
|
|
|
'SCENMODULE' => bless( { |
10491
|
|
|
|
|
|
|
'line' => 60, |
10492
|
|
|
|
|
|
|
'calls' => [ |
10493
|
|
|
|
|
|
|
'BNAME' |
10494
|
|
|
|
|
|
|
], |
10495
|
|
|
|
|
|
|
'impcount' => 0, |
10496
|
|
|
|
|
|
|
'vars' => '', |
10497
|
|
|
|
|
|
|
'changed' => 0, |
10498
|
|
|
|
|
|
|
'opcount' => 0, |
10499
|
|
|
|
|
|
|
'name' => 'SCENMODULE', |
10500
|
|
|
|
|
|
|
'prods' => [ |
10501
|
|
|
|
|
|
|
bless( { |
10502
|
|
|
|
|
|
|
'items' => [ |
10503
|
|
|
|
|
|
|
bless( { |
10504
|
|
|
|
|
|
|
'description' => '/Scen::/', |
10505
|
|
|
|
|
|
|
'ldelim' => '/', |
10506
|
|
|
|
|
|
|
'pattern' => 'Scen::', |
10507
|
|
|
|
|
|
|
'line' => 60, |
10508
|
|
|
|
|
|
|
'lookahead' => 0, |
10509
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
10510
|
|
|
|
|
|
|
'rdelim' => '/', |
10511
|
|
|
|
|
|
|
'mod' => '' |
10512
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ), |
10513
|
|
|
|
|
|
|
bless( { |
10514
|
|
|
|
|
|
|
'matchrule' => 0, |
10515
|
|
|
|
|
|
|
'line' => 60, |
10516
|
|
|
|
|
|
|
'lookahead' => 0, |
10517
|
|
|
|
|
|
|
'argcode' => undef, |
10518
|
|
|
|
|
|
|
'implicit' => undef, |
10519
|
|
|
|
|
|
|
'subrule' => 'BNAME' |
10520
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10521
|
|
|
|
|
|
|
bless( { |
10522
|
|
|
|
|
|
|
'code' => '{ $return = "Treex::Scen::$item{BNAME}"}', |
10523
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10524
|
|
|
|
|
|
|
'lookahead' => 0, |
10525
|
|
|
|
|
|
|
'line' => 60 |
10526
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10527
|
|
|
|
|
|
|
], |
10528
|
|
|
|
|
|
|
'number' => 0, |
10529
|
|
|
|
|
|
|
'dircount' => 0, |
10530
|
|
|
|
|
|
|
'patcount' => 1, |
10531
|
|
|
|
|
|
|
'uncommit' => undef, |
10532
|
|
|
|
|
|
|
'error' => undef, |
10533
|
|
|
|
|
|
|
'line' => undef, |
10534
|
|
|
|
|
|
|
'actcount' => 1, |
10535
|
|
|
|
|
|
|
'strcount' => 0 |
10536
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10537
|
|
|
|
|
|
|
] |
10538
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
10539
|
|
|
|
|
|
|
'LINE' => bless( { |
10540
|
|
|
|
|
|
|
'prods' => [ |
10541
|
|
|
|
|
|
|
bless( { |
10542
|
|
|
|
|
|
|
'actcount' => 1, |
10543
|
|
|
|
|
|
|
'line' => undef, |
10544
|
|
|
|
|
|
|
'error' => undef, |
10545
|
|
|
|
|
|
|
'strcount' => 0, |
10546
|
|
|
|
|
|
|
'number' => 0, |
10547
|
|
|
|
|
|
|
'dircount' => 0, |
10548
|
|
|
|
|
|
|
'uncommit' => undef, |
10549
|
|
|
|
|
|
|
'patcount' => 0, |
10550
|
|
|
|
|
|
|
'items' => [ |
10551
|
|
|
|
|
|
|
bless( { |
10552
|
|
|
|
|
|
|
'line' => 12, |
10553
|
|
|
|
|
|
|
'matchrule' => 0, |
10554
|
|
|
|
|
|
|
'subrule' => 'BLOCK', |
10555
|
|
|
|
|
|
|
'implicit' => undef, |
10556
|
|
|
|
|
|
|
'lookahead' => 0, |
10557
|
|
|
|
|
|
|
'argcode' => undef |
10558
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10559
|
|
|
|
|
|
|
bless( { |
10560
|
|
|
|
|
|
|
'subrule' => 'COMMENT', |
10561
|
|
|
|
|
|
|
'lookahead' => 0, |
10562
|
|
|
|
|
|
|
'argcode' => undef, |
10563
|
|
|
|
|
|
|
'implicit' => undef, |
10564
|
|
|
|
|
|
|
'line' => 12, |
10565
|
|
|
|
|
|
|
'matchrule' => 0 |
10566
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10567
|
|
|
|
|
|
|
bless( { |
10568
|
|
|
|
|
|
|
'line' => 12, |
10569
|
|
|
|
|
|
|
'lookahead' => 0, |
10570
|
|
|
|
|
|
|
'code' => '{$return = [@{$item{BLOCK}}]}', |
10571
|
|
|
|
|
|
|
'hashname' => '__ACTION1__' |
10572
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10573
|
|
|
|
|
|
|
] |
10574
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
10575
|
|
|
|
|
|
|
bless( { |
10576
|
|
|
|
|
|
|
'dircount' => 0, |
10577
|
|
|
|
|
|
|
'number' => 1, |
10578
|
|
|
|
|
|
|
'patcount' => 0, |
10579
|
|
|
|
|
|
|
'uncommit' => undef, |
10580
|
|
|
|
|
|
|
'error' => undef, |
10581
|
|
|
|
|
|
|
'line' => undef, |
10582
|
|
|
|
|
|
|
'actcount' => 1, |
10583
|
|
|
|
|
|
|
'strcount' => 0, |
10584
|
|
|
|
|
|
|
'items' => [ |
10585
|
|
|
|
|
|
|
bless( { |
10586
|
|
|
|
|
|
|
'lookahead' => 0, |
10587
|
|
|
|
|
|
|
'argcode' => undef, |
10588
|
|
|
|
|
|
|
'implicit' => undef, |
10589
|
|
|
|
|
|
|
'subrule' => 'BLOCK', |
10590
|
|
|
|
|
|
|
'matchrule' => 0, |
10591
|
|
|
|
|
|
|
'line' => 13 |
10592
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10593
|
|
|
|
|
|
|
bless( { |
10594
|
|
|
|
|
|
|
'line' => 13, |
10595
|
|
|
|
|
|
|
'code' => '{$return = [@{$item{BLOCK}}]}', |
10596
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10597
|
|
|
|
|
|
|
'lookahead' => 0 |
10598
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10599
|
|
|
|
|
|
|
] |
10600
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ), |
10601
|
|
|
|
|
|
|
bless( { |
10602
|
|
|
|
|
|
|
'uncommit' => undef, |
10603
|
|
|
|
|
|
|
'patcount' => 0, |
10604
|
|
|
|
|
|
|
'dircount' => 0, |
10605
|
|
|
|
|
|
|
'number' => 2, |
10606
|
|
|
|
|
|
|
'strcount' => 0, |
10607
|
|
|
|
|
|
|
'actcount' => 1, |
10608
|
|
|
|
|
|
|
'line' => undef, |
10609
|
|
|
|
|
|
|
'error' => undef, |
10610
|
|
|
|
|
|
|
'items' => [ |
10611
|
|
|
|
|
|
|
bless( { |
10612
|
|
|
|
|
|
|
'line' => 14, |
10613
|
|
|
|
|
|
|
'matchrule' => 0, |
10614
|
|
|
|
|
|
|
'subrule' => 'COMMENT', |
10615
|
|
|
|
|
|
|
'implicit' => undef, |
10616
|
|
|
|
|
|
|
'argcode' => undef, |
10617
|
|
|
|
|
|
|
'lookahead' => 0 |
10618
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Subrule' ), |
10619
|
|
|
|
|
|
|
bless( { |
10620
|
|
|
|
|
|
|
'lookahead' => 0, |
10621
|
|
|
|
|
|
|
'code' => '{$return = []}', |
10622
|
|
|
|
|
|
|
'hashname' => '__ACTION1__', |
10623
|
|
|
|
|
|
|
'line' => 14 |
10624
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Action' ) |
10625
|
|
|
|
|
|
|
] |
10626
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10627
|
|
|
|
|
|
|
], |
10628
|
|
|
|
|
|
|
'name' => 'LINE', |
10629
|
|
|
|
|
|
|
'opcount' => 0, |
10630
|
|
|
|
|
|
|
'changed' => 0, |
10631
|
|
|
|
|
|
|
'vars' => '', |
10632
|
|
|
|
|
|
|
'calls' => [ |
10633
|
|
|
|
|
|
|
'BLOCK', |
10634
|
|
|
|
|
|
|
'COMMENT' |
10635
|
|
|
|
|
|
|
], |
10636
|
|
|
|
|
|
|
'impcount' => 0, |
10637
|
|
|
|
|
|
|
'line' => 12 |
10638
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ), |
10639
|
|
|
|
|
|
|
'EMPTY' => bless( { |
10640
|
|
|
|
|
|
|
'line' => 95, |
10641
|
|
|
|
|
|
|
'calls' => [], |
10642
|
|
|
|
|
|
|
'impcount' => 0, |
10643
|
|
|
|
|
|
|
'vars' => '', |
10644
|
|
|
|
|
|
|
'changed' => 0, |
10645
|
|
|
|
|
|
|
'opcount' => 0, |
10646
|
|
|
|
|
|
|
'name' => 'EMPTY', |
10647
|
|
|
|
|
|
|
'prods' => [ |
10648
|
|
|
|
|
|
|
bless( { |
10649
|
|
|
|
|
|
|
'items' => [ |
10650
|
|
|
|
|
|
|
bless( { |
10651
|
|
|
|
|
|
|
'description' => '//', |
10652
|
|
|
|
|
|
|
'ldelim' => '/', |
10653
|
|
|
|
|
|
|
'pattern' => '', |
10654
|
|
|
|
|
|
|
'line' => 95, |
10655
|
|
|
|
|
|
|
'lookahead' => 0, |
10656
|
|
|
|
|
|
|
'hashname' => '__PATTERN1__', |
10657
|
|
|
|
|
|
|
'rdelim' => '/', |
10658
|
|
|
|
|
|
|
'mod' => '' |
10659
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Token' ) |
10660
|
|
|
|
|
|
|
], |
10661
|
|
|
|
|
|
|
'dircount' => 0, |
10662
|
|
|
|
|
|
|
'number' => 0, |
10663
|
|
|
|
|
|
|
'uncommit' => undef, |
10664
|
|
|
|
|
|
|
'patcount' => 1, |
10665
|
|
|
|
|
|
|
'actcount' => 0, |
10666
|
|
|
|
|
|
|
'line' => undef, |
10667
|
|
|
|
|
|
|
'error' => undef, |
10668
|
|
|
|
|
|
|
'strcount' => 0 |
10669
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Production' ) |
10670
|
|
|
|
|
|
|
] |
10671
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime::Rule' ) |
10672
|
|
|
|
|
|
|
} |
10673
|
|
|
|
|
|
|
}, 'Parse::RecDescent::_Runtime' ); |
10674
|
|
|
|
|
|
|
} |