lib/Parse/FieldPath/Parser.pm

filter: Statementstmt 80.9% 642 / 793 Branchbran 41.5% 173 / 416 Conditioncond 41.5% 66 / 159 MC/DCmcdc 9.0% 9 / 100 Subroutinesub 95.3% 41 / 43 Podpod 0.0% 0 / 1 totaltotal 61.5% 931 / 1512 CC 269 SCAR 49.3
CC
269
Cov
64%
field_name
289.4
field
161.7
fields
132.3
CRAP 138.9
↑ Summary lib/Parse/FieldPath.pm »
1 package Parse::FieldPath::Parser;
2 {
3 10 $Parse::FieldPath::Parser::VERSION = '0.005';
4 }
5 10 ▶use Parse::RecDescent;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 10 { my $ERRORS;
8  
9  
10 package Parse::RecDescent::Parse::FieldPath::Parser;
11 {
12 10 $Parse::RecDescent::Parse::FieldPath::Parser::VERSION = '0.005';
13 }
14 10 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 10 ▶use vars qw($skip $AUTOLOAD );
Subroutine BEGIN: called CC=1 SCAR=0.0
16 10 @Parse::RecDescent::Parse::FieldPath::Parser::ISA = ();
17 10 $skip = '\s*';
18  
19  
20 {
21 0 ▶local $SIG{__WARN__} = sub {0};
Subroutine __ANON__: not called CC=1 SCAR=0.4
22 # PRETEND TO BE IN Parse::RecDescent NAMESPACE
23 *Parse::RecDescent::Parse::FieldPath::Parser::AUTOLOAD = sub
24 0 ▶{
Subroutine __ANON__: not called CC=1 SCAR=1.2
25 10 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
26 0 $AUTOLOAD =~ s/^Parse::RecDescent::Parse::FieldPath::Parser/Parse::RecDescent/;
27 0 goto &{$AUTOLOAD};
28 }
29 10 }
30  
31 10 push @Parse::RecDescent::Parse::FieldPath::Parser::ISA, 'Parse::RecDescent';
32 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
33 sub Parse::RecDescent::Parse::FieldPath::Parser::field_path
34 111 ▶{
Subroutine field_path: called CC=48 SCAR=48.8
35 111 my $thisparser = $_[0];
36 10 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
37 111 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$Parse::RecDescent::Parse::FieldPath::Parser::tracelevel || 0
l!l
1110
MC/DC0%0/1
$Parse::RecDescent::Parse::FieldPath::Parser::tracelevel || 0
$Parse::RecDescent::Parse::FieldPath::Parser::tracelevel
Truth table50%1/2
A
A= $Parse::RecDescent::Parse::FieldPath::Parser::tracelevel
Aresult
11
00
38 111 $ERRORS = 0;
39 111 my $thisrule = $thisparser->{"rules"}{"field_path"};
40
41 111 ▶ Parse::RecDescent::_trace(q{Trying rule: [field_path]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 111 111
42 Parse::RecDescent::_tracefirst($_[1]),
43 q{field_path},
44 $tracelevel)
45 if defined $::RD_TRACE;
46  
47
48 111 my $err_at = @{$thisparser->{errors}};
49  
50 111 my $score;
51 my $score_return;
52 111 my $_tok;
53 111 my $return = undef;
54 111 my $_matched=0;
55 111 my $commit=0;
56 111 my @item = ();
57 111 my %item = ();
58 111 ▶ my $repeating = defined($_[2]) && $_[2];
Condition33%1/3
defined $_[2] && $_[2]
!ll&&!rl&&r
01110
MC/DC0%0/2
defined $_[2] && $_[2]
defined $_[2] $_[2]
Truth table33%1/3
A && B
A= defined $_[2]B= $_[2]
ABresult
0X0
100
111
59 111 ▶ my $_noactions = defined($_[3]) && $_[3];
Condition33%1/3
defined $_[3] && $_[3]
!ll&&!rl&&r
01110
MC/DC0%0/2
defined $_[3] && $_[3]
defined $_[3] $_[3]
Truth table33%1/3
A && B
A= defined $_[3]B= $_[3]
ABresult
0X0
100
111
60 111 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 111 0 111
61 111 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 111 0 111
62 111 my $text;
63 111 my $lastsep="";
64 111 my $current_match;
65 111 my $expectation = new Parse::RecDescent::Expectation(q{<leftop: field_name /\\// field_name>});
66 111 $expectation->at($_[1]);
67
68 111 my $thisline;
69 111 tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
70  
71
72  
73 111 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 111 0 111
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00111
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
74 {
75
76 111 ▶ Parse::RecDescent::_trace(q{Trying production: [<leftop: field_name /\\// field_name>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 111 111
77 Parse::RecDescent::_tracefirst($_[1]),
78 q{field_path},
79 $tracelevel)
80 if defined $::RD_TRACE;
81 111 my $thisprod = $thisrule->{"prods"}[0];
82 111 $text = $_[1];
83 111 my $_savetext;
84 111 @item = (q{field_path});
85 111 %item = (__RULE__ => q{field_path});
86 111 my $repcount = 0;
87  
88  
89 111 ▶ Parse::RecDescent::_trace(q{Trying operator: [<leftop: field_name /\\// field_name>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 111 111
90 Parse::RecDescent::_tracefirst($text),
91 q{field_path},
92 $tracelevel)
93 if defined $::RD_TRACE;
94 111 $expectation->is(q{})->at($text);
95  
96 111 $_tok = undef;
97 111 OPLOOP: while (1)
98 {
99 111 $repcount = 0;
100 111 my @item;
101
102 # MATCH LEFTARG
103
104 111 ▶ Parse::RecDescent::_trace(q{Trying subrule: [field_name]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 111 111
105 Parse::RecDescent::_tracefirst($text),
106 q{field_path},
107 $tracelevel)
108 if defined $::RD_TRACE;
109 10 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
110 111 $expectation->is(q{field_name})->at($text);
111 111 ▶ unless (defined ($_tok = Parse::RecDescent::Parse::FieldPath::Parser::field_name($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = field_name($thisparser, $text, $repeating, $_noactions, sub { \@arg; } ))) 0 111 111
112 {
113
114 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match subrule: [field_name]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
115 Parse::RecDescent::_tracefirst($text),
116 q{field_path},
117 $tracelevel)
118 if defined $::RD_TRACE;
119 0 $expectation->failed();
120 0 last;
121 }
122 111 ▶ Parse::RecDescent::_trace(q{>>Matched subrule: [field_name]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 111 111
123 . $_tok . q{]},
124
125 Parse::RecDescent::_tracefirst($text),
126 q{field_path},
127 $tracelevel)
128 if defined $::RD_TRACE;
129 111 $item{q{field_name}} = $_tok;
130 111 push @item, $_tok;
131
132 }
133  
134  
135 111 $repcount++;
136  
137 111 my $savetext = $text;
138 111 my $backtrack;
139  
140 # MATCH (OP RIGHTARG)(s)
141 111 ▶ while ($repcount < 100000000)
Branch: 1 branch
BranchTrueFalseTotal
if ($repcount < 100000000) 145 0 145
142 {
143 145 $backtrack = 0;
144
145 145 ▶ Parse::RecDescent::_trace(q{Trying terminal: [/\\//]}, Parse::RecDescent::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 145 145
146 q{field_path},
147 $tracelevel)
148 if defined $::RD_TRACE;
149 145 $lastsep = "";
150 145 $expectation->is(q{/\\//})->at($text);
151
152  
153 145 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\/)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ m[\A(?:/)]) 111 34 145
Condition60%3/5
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ m[\A(?:/)]
!ll&&!rl&&r
011134
($lastsep = $1) && ''
!ll
1450
MC/DC50%1/2
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ m[\A(?:/)]
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e $text =~ m[\A(?:/)]
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ m[\A(?:/)]
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
154 {
155
156 111 $expectation->failed();
157 111 ▶ Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 111 111
158 Parse::RecDescent::_tracefirst($text))
159 if defined $::RD_TRACE;
160  
161 111 last;
162 }
163 34 $current_match = substr($text, $-[0], $+[0] - $-[0]);
164 34 substr($text,0,length($current_match),q{});
165 34 ▶ Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 34 34
166 . $current_match . q{])},
167 Parse::RecDescent::_tracefirst($text))
168 if defined $::RD_TRACE;
169 34 push @item, $item{__PATTERN1__}=$current_match;
170
171  
172 34 pop @item;
173 0 ▶ if (defined $1) {push @item, $item{'field_name(s)'}=$1; $backtrack=1;}
Branch: 1 branch
BranchTrueFalseTotal
if (defined $1) 0 34 34
174
175 34 ▶ Parse::RecDescent::_trace(q{Trying subrule: [field_name]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 34 34
176 Parse::RecDescent::_tracefirst($text),
177 q{field_path},
178 $tracelevel)
179 if defined $::RD_TRACE;
180 10 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
181 34 $expectation->is(q{field_name})->at($text);
182 34 ▶ unless (defined ($_tok = Parse::RecDescent::Parse::FieldPath::Parser::field_name($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = field_name($thisparser, $text, $repeating, $_noactions, sub { \@arg; } ))) 0 34 34
183 {
184
185 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match subrule: [field_name]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
186 Parse::RecDescent::_tracefirst($text),
187 q{field_path},
188 $tracelevel)
189 if defined $::RD_TRACE;
190 0 $expectation->failed();
191 0 last;
192 }
193 34 ▶ Parse::RecDescent::_trace(q{>>Matched subrule: [field_name]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 34 34
194 . $_tok . q{]},
195
196 Parse::RecDescent::_tracefirst($text),
197 q{field_path},
198 $tracelevel)
199 if defined $::RD_TRACE;
200 34 $item{q{field_name}} = $_tok;
201 34 push @item, $_tok;
202
203 }
204  
205 34 $savetext = $text;
206 34 $repcount++;
207 }
208 111 $text = $savetext;
209 111 ▶ pop @item if $backtrack;
Branch: 1 branch
BranchTrueFalseTotal
if $backtrack 0 111 111
210  
211 0 ▶ unless (@item) { undef $_tok; last }
Branch: 1 branch
BranchTrueFalseTotal
unless (@item) 0 111 111
212 111 $_tok = [ @item ];
213 111 last;
214 }
215  
216 111 ▶ unless ($repcount>=1)
Branch: 1 branch
BranchTrueFalseTotal
unless ($repcount >= 1) 0 111 111
217 {
218 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match operator: [<leftop: field_name /\\// field_name>]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
219 Parse::RecDescent::_tracefirst($text),
220 q{field_path},
221 $tracelevel)
222 if defined $::RD_TRACE;
223 0 $expectation->failed();
224 0 last;
225 }
226 111 ▶ Parse::RecDescent::_trace(q{>>Matched operator: [<leftop: field_name /\\// field_name>]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 111 111
227 0 ▶ . qq{@{$_tok||[]}} . q{]},
Condition0%0/2
$_tok || []
l!l
00
MC/DC0%0/1
$_tok || []
$_tok
Truth table0%0/2
A
A= $_tok
Aresult
11
00
228 Parse::RecDescent::_tracefirst($text),
229 q{field_path},
230 $tracelevel)
231 if defined $::RD_TRACE;
232  
233 111 ▶ push @item, $item{'field_name(s)'}=$_tok||[];
Condition50%1/2
$_tok || []
l!l
1110
MC/DC0%0/1
$_tok || []
$_tok
Truth table50%1/2
A
A= $_tok
Aresult
11
00
234  
235  
236 111 ▶ Parse::RecDescent::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 111 111
237 Parse::RecDescent::_tracefirst($text),
238 q{field_path},
239 $tracelevel)
240 if defined $::RD_TRACE;
241
242  
243 111 ▶ $_tok = ($_noactions) ? 0 : do {
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 111 111
244 10 ▶ use List::Util qw//;
Subroutine BEGIN: called CC=1 SCAR=0.0
245  
246 # Turn qw/a b c/ into { a => { b => { c => {} } } }
247 111 my $fields = {};
248 111 ▶ List::Util::reduce { $a->{$b} = {} if $b } $fields, @{$item{'field_name(s)'}};
Subroutine __ANON__: called CC=2 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
if $b 137 8 145
249 111 $return = $fields;
250 };
251 111 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 111 111
252 {
253 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
254 if defined $::RD_TRACE;
255 0 last;
256 }
257 111 ▶ Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 111 111
258 . $_tok . q{])},
259 Parse::RecDescent::_tracefirst($text))
260 if defined $::RD_TRACE;
261 111 push @item, $_tok;
262 111 $item{__ACTION1__}=$_tok;
263
264  
265  
266 111 ▶ Parse::RecDescent::_trace(q{>>Matched production: [<leftop: field_name /\\// field_name>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 111 111
267 Parse::RecDescent::_tracefirst($text),
268 q{field_path},
269 $tracelevel)
270 if defined $::RD_TRACE;
271 111 $_matched = 1;
272 111 last;
273 }
274  
275  
276 111 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 111 111
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
11100
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
277 {
278
279  
280 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
281 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
282 Parse::RecDescent::_tracefirst($_[1]),
283 q{field_path},
284 $tracelevel)
285 if defined $::RD_TRACE;
286 0 return undef;
287 }
288 111 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 111 111
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
11100
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
289 {
290 0 ▶ Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
291 q{field_path},
292 $tracelevel)
293 if defined $::RD_TRACE;
294 0 $return = $score_return;
295 }
296 111 splice @{$thisparser->{errors}}, $err_at;
297 111 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 111 111
298 111 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 111 111
299 {
300 0 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
301 $return . q{])}, "",
302 q{field_path},
303 $tracelevel);
304 0 Parse::RecDescent::_trace(q{(consumed: [} .
305 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
306 Parse::RecDescent::_tracefirst($text),
307 , q{field_path},
308 $tracelevel)
309 }
310 111 $_[1] = $text;
311 111 return $return;
312 }
313  
314 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
315 sub Parse::RecDescent::Parse::FieldPath::Parser::field_list
316 59 ▶{
Subroutine field_list: called CC=45 SCAR=46.1
317 59 my $thisparser = $_[0];
318 10 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
319 59 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$Parse::RecDescent::Parse::FieldPath::Parser::tracelevel || 0
l!l
590
MC/DC0%0/1
$Parse::RecDescent::Parse::FieldPath::Parser::tracelevel || 0
$Parse::RecDescent::Parse::FieldPath::Parser::tracelevel
Truth table50%1/2
A
A= $Parse::RecDescent::Parse::FieldPath::Parser::tracelevel
Aresult
11
00
320 59 $ERRORS = 0;
321 59 my $thisrule = $thisparser->{"rules"}{"field_list"};
322
323 59 ▶ Parse::RecDescent::_trace(q{Trying rule: [field_list]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 59 59
324 Parse::RecDescent::_tracefirst($_[1]),
325 q{field_list},
326 $tracelevel)
327 if defined $::RD_TRACE;
328  
329
330 59 my $err_at = @{$thisparser->{errors}};
331  
332 59 my $score;
333 my $score_return;
334 59 my $_tok;
335 59 my $return = undef;
336 59 my $_matched=0;
337 59 my $commit=0;
338 59 my @item = ();
339 59 my %item = ();
340 59 ▶ my $repeating = defined($_[2]) && $_[2];
Condition33%1/3
defined $_[2] && $_[2]
!ll&&!rl&&r
0590
MC/DC0%0/2
defined $_[2] && $_[2]
defined $_[2] $_[2]
Truth table33%1/3
A && B
A= defined $_[2]B= $_[2]
ABresult
0X0
100
111
341 59 ▶ my $_noactions = defined($_[3]) && $_[3];
Condition33%1/3
defined $_[3] && $_[3]
!ll&&!rl&&r
0590
MC/DC0%0/2
defined $_[3] && $_[3]
defined $_[3] $_[3]
Truth table33%1/3
A && B
A= defined $_[3]B= $_[3]
ABresult
0X0
100
111
342 59 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 59 0 59
343 59 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 59 0 59
344 59 my $text;
345 59 my $lastsep="";
346 59 my $current_match;
347 59 my $expectation = new Parse::RecDescent::Expectation(q{field_path});
348 59 $expectation->at($_[1]);
349
350 59 my $thisline;
351 59 tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
352  
353
354  
355 59 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 59 0 59
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
0059
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
356 {
357
358 59 ▶ Parse::RecDescent::_trace(q{Trying production: [field_path '(' fields ')']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 59 59
359 Parse::RecDescent::_tracefirst($_[1]),
360 q{field_list},
361 $tracelevel)
362 if defined $::RD_TRACE;
363 59 my $thisprod = $thisrule->{"prods"}[0];
364 59 $text = $_[1];
365 59 my $_savetext;
366 59 @item = (q{field_list});
367 59 %item = (__RULE__ => q{field_list});
368 59 my $repcount = 0;
369  
370  
371 59 ▶ Parse::RecDescent::_trace(q{Trying subrule: [field_path]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 59 59
372 Parse::RecDescent::_tracefirst($text),
373 q{field_list},
374 $tracelevel)
375 if defined $::RD_TRACE;
376 10 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
377 59 $expectation->is(q{})->at($text);
378 59 ▶ unless (defined ($_tok = Parse::RecDescent::Parse::FieldPath::Parser::field_path($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = field_path($thisparser, $text, $repeating, $_noactions, sub { \@arg; } ))) 0 59 59
379 {
380
381 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match subrule: [field_path]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
382 Parse::RecDescent::_tracefirst($text),
383 q{field_list},
384 $tracelevel)
385 if defined $::RD_TRACE;
386 0 $expectation->failed();
387 0 last;
388 }
389 59 ▶ Parse::RecDescent::_trace(q{>>Matched subrule: [field_path]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 59 59
390 . $_tok . q{]},
391
392 Parse::RecDescent::_tracefirst($text),
393 q{field_list},
394 $tracelevel)
395 if defined $::RD_TRACE;
396 59 $item{q{field_path}} = $_tok;
397 59 push @item, $_tok;
398
399 }
400  
401 59 ▶ Parse::RecDescent::_trace(q{Trying terminal: ['(']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 59 59
402 Parse::RecDescent::_tracefirst($text),
403 q{field_list},
404 $tracelevel)
405 if defined $::RD_TRACE;
406 59 $lastsep = "";
407 59 $expectation->is(q{'('})->at($text);
408
409  
410 59 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\(/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\(/) 52 7 59
Condition60%3/5
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\(/
!ll&&!rl&&r
0527
($lastsep = $1) && ''
!ll
590
MC/DC50%1/2
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\(/
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A\(/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A\(/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
411 {
412
413 52 $expectation->failed();
414 52 ▶ Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 52 52
415 Parse::RecDescent::_tracefirst($text))
416 if defined $::RD_TRACE;
417 52 last;
418 }
419 7 $current_match = substr($text, $-[0], $+[0] - $-[0]);
420 7 substr($text,0,length($current_match),q{});
421 7 ▶ Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
422 . $current_match . q{])},
423 Parse::RecDescent::_tracefirst($text))
424 if defined $::RD_TRACE;
425 7 push @item, $item{__STRING1__}=$current_match;
426
427  
428 7 ▶ Parse::RecDescent::_trace(q{Trying subrule: [fields]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
429 Parse::RecDescent::_tracefirst($text),
430 q{field_list},
431 $tracelevel)
432 if defined $::RD_TRACE;
433 10 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
434 7 $expectation->is(q{fields})->at($text);
435 7 ▶ unless (defined ($_tok = Parse::RecDescent::Parse::FieldPath::Parser::fields($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = fields($thisparser, $text, $repeating, $_noactions, sub { \@arg; } ))) 0 7 7
436 {
437
438 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match subrule: [fields]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
439 Parse::RecDescent::_tracefirst($text),
440 q{field_list},
441 $tracelevel)
442 if defined $::RD_TRACE;
443 0 $expectation->failed();
444 0 last;
445 }
446 7 ▶ Parse::RecDescent::_trace(q{>>Matched subrule: [fields]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
447 . $_tok . q{]},
448
449 Parse::RecDescent::_tracefirst($text),
450 q{field_list},
451 $tracelevel)
452 if defined $::RD_TRACE;
453 7 $item{q{fields}} = $_tok;
454 7 push @item, $_tok;
455
456 }
457  
458 7 ▶ Parse::RecDescent::_trace(q{Trying terminal: [')']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
459 Parse::RecDescent::_tracefirst($text),
460 q{field_list},
461 $tracelevel)
462 if defined $::RD_TRACE;
463 7 $lastsep = "";
464 7 $expectation->is(q{')'})->at($text);
465
466  
467 7 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\)/) 0 7 7
Condition40%2/5
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\)/
!ll&&!rl&&r
007
($lastsep = $1) && ''
!ll
70
MC/DC0%0/2
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\)/
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A\)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A\)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
468 {
469
470 0 $expectation->failed();
471 0 ▶ Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
472 Parse::RecDescent::_tracefirst($text))
473 if defined $::RD_TRACE;
474 0 last;
475 }
476 7 $current_match = substr($text, $-[0], $+[0] - $-[0]);
477 7 substr($text,0,length($current_match),q{});
478 7 ▶ Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
479 . $current_match . q{])},
480 Parse::RecDescent::_tracefirst($text))
481 if defined $::RD_TRACE;
482 7 push @item, $item{__STRING2__}=$current_match;
483
484  
485 7 ▶ Parse::RecDescent::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
486 Parse::RecDescent::_tracefirst($text),
487 q{field_list},
488 $tracelevel)
489 if defined $::RD_TRACE;
490
491  
492 7 ▶ $_tok = ($_noactions) ? 0 : do {
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 7 7
493 16 ▶ sub deepest {
Subroutine deepest: called CC=2 SCAR=6.9
494 16 my $hashref = shift;
495 16 ▶ return $hashref if scalar(keys %$hashref) == 0;
Branch: 1 branch
BranchTrueFalseTotal
if scalar keys %$hashref == 0 7 9 16
496 9 my $key = (keys %$hashref)[0];
497 9 return deepest($hashref->{$key});
498 }
499 7 my $deepest = deepest($item{field_path});
500 7 $deepest->{$_} = $item{fields}->{$_} for keys %{$item{fields}};
501 7 $return = $item{field_path};
502 };
503 7 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 7 7
504 {
505 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
506 if defined $::RD_TRACE;
507 0 last;
508 }
509 7 ▶ Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
510 . $_tok . q{])},
511 Parse::RecDescent::_tracefirst($text))
512 if defined $::RD_TRACE;
513 7 push @item, $_tok;
514 7 $item{__ACTION1__}=$_tok;
515
516  
517  
518 7 ▶ Parse::RecDescent::_trace(q{>>Matched production: [field_path '(' fields ')']<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
519 Parse::RecDescent::_tracefirst($text),
520 q{field_list},
521 $tracelevel)
522 if defined $::RD_TRACE;
523 7 $_matched = 1;
524 7 last;
525 }
526  
527  
528 59 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 52 7 59
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
7052
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
529 {
530
531  
532 52 $_[1] = $text; # NOT SURE THIS IS NEEDED
533 52 ▶ Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 52 52
534 Parse::RecDescent::_tracefirst($_[1]),
535 q{field_list},
536 $tracelevel)
537 if defined $::RD_TRACE;
538 52 return undef;
539 }
540 7 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 7 7
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
700
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
541 {
542 0 ▶ Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
543 q{field_list},
544 $tracelevel)
545 if defined $::RD_TRACE;
546 0 $return = $score_return;
547 }
548 7 splice @{$thisparser->{errors}}, $err_at;
549 7 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 7 7
550 7 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 7 7
551 {
552 0 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
553 $return . q{])}, "",
554 q{field_list},
555 $tracelevel);
556 0 Parse::RecDescent::_trace(q{(consumed: [} .
557 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
558 Parse::RecDescent::_tracefirst($text),
559 , q{field_list},
560 $tracelevel)
561 }
562 7 $_[1] = $text;
563 7 return $return;
564 }
565  
566 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
567 sub Parse::RecDescent::Parse::FieldPath::Parser::fields
568 49 ▶{
Subroutine fields: called CC=48 SCAR=48.8
569 49 my $thisparser = $_[0];
570 10 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
571 49 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$Parse::RecDescent::Parse::FieldPath::Parser::tracelevel || 0
l!l
490
MC/DC0%0/1
$Parse::RecDescent::Parse::FieldPath::Parser::tracelevel || 0
$Parse::RecDescent::Parse::FieldPath::Parser::tracelevel
Truth table50%1/2
A
A= $Parse::RecDescent::Parse::FieldPath::Parser::tracelevel
Aresult
11
00
572 49 $ERRORS = 0;
573 49 my $thisrule = $thisparser->{"rules"}{"fields"};
574
575 49 ▶ Parse::RecDescent::_trace(q{Trying rule: [fields]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 49 49
576 Parse::RecDescent::_tracefirst($_[1]),
577 q{fields},
578 $tracelevel)
579 if defined $::RD_TRACE;
580  
581
582 49 my $err_at = @{$thisparser->{errors}};
583  
584 49 my $score;
585 my $score_return;
586 49 my $_tok;
587 49 my $return = undef;
588 49 my $_matched=0;
589 49 my $commit=0;
590 49 my @item = ();
591 49 my %item = ();
592 49 ▶ my $repeating = defined($_[2]) && $_[2];
Condition33%1/3
defined $_[2] && $_[2]
!ll&&!rl&&r
0490
MC/DC0%0/2
defined $_[2] && $_[2]
defined $_[2] $_[2]
Truth table33%1/3
A && B
A= defined $_[2]B= $_[2]
ABresult
0X0
100
111
593 49 ▶ my $_noactions = defined($_[3]) && $_[3];
Condition33%1/3
defined $_[3] && $_[3]
!ll&&!rl&&r
0490
MC/DC0%0/2
defined $_[3] && $_[3]
defined $_[3] $_[3]
Truth table33%1/3
A && B
A= defined $_[3]B= $_[3]
ABresult
0X0
100
111
594 49 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 49 0 49
595 49 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 49 0 49
596 49 my $text;
597 49 my $lastsep="";
598 49 my $current_match;
599 49 my $expectation = new Parse::RecDescent::Expectation(q{<leftop: field /,/ field>});
600 49 $expectation->at($_[1]);
601
602 49 my $thisline;
603 49 tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
604  
605
606  
607 49 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 49 0 49
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
0049
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
608 {
609
610 49 ▶ Parse::RecDescent::_trace(q{Trying production: [<leftop: field /,/ field>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 49 49
611 Parse::RecDescent::_tracefirst($_[1]),
612 q{fields},
613 $tracelevel)
614 if defined $::RD_TRACE;
615 49 my $thisprod = $thisrule->{"prods"}[0];
616 49 $text = $_[1];
617 49 my $_savetext;
618 49 @item = (q{fields});
619 49 %item = (__RULE__ => q{fields});
620 49 my $repcount = 0;
621  
622  
623 49 ▶ Parse::RecDescent::_trace(q{Trying operator: [<leftop: field /,/ field>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 49 49
624 Parse::RecDescent::_tracefirst($text),
625 q{fields},
626 $tracelevel)
627 if defined $::RD_TRACE;
628 49 $expectation->is(q{})->at($text);
629  
630 49 $_tok = undef;
631 49 OPLOOP: while (1)
632 {
633 49 $repcount = 0;
634 49 my @item;
635
636 # MATCH LEFTARG
637
638 49 ▶ Parse::RecDescent::_trace(q{Trying subrule: [field]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 49 49
639 Parse::RecDescent::_tracefirst($text),
640 q{fields},
641 $tracelevel)
642 if defined $::RD_TRACE;
643 10 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
644 49 $expectation->is(q{field})->at($text);
645 49 ▶ unless (defined ($_tok = Parse::RecDescent::Parse::FieldPath::Parser::field($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = Parse::RecDescent::Parse::FieldPath::Parser::field($thisparser, $text, $repeating, $_noactions, sub { \@arg; } ))) 0 49 49
646 {
647
648 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match subrule: [field]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
649 Parse::RecDescent::_tracefirst($text),
650 q{fields},
651 $tracelevel)
652 if defined $::RD_TRACE;
653 0 $expectation->failed();
654 0 last;
655 }
656 49 ▶ Parse::RecDescent::_trace(q{>>Matched subrule: [field]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 49 49
657 . $_tok . q{]},
658
659 Parse::RecDescent::_tracefirst($text),
660 q{fields},
661 $tracelevel)
662 if defined $::RD_TRACE;
663 49 $item{q{field}} = $_tok;
664 49 push @item, $_tok;
665
666 }
667  
668  
669 49 $repcount++;
670  
671 49 my $savetext = $text;
672 49 my $backtrack;
673  
674 # MATCH (OP RIGHTARG)(s)
675 49 ▶ while ($repcount < 100000000)
Branch: 1 branch
BranchTrueFalseTotal
if ($repcount < 100000000) 59 0 59
676 {
677 59 $backtrack = 0;
678
679 59 ▶ Parse::RecDescent::_trace(q{Trying terminal: [/,/]}, Parse::RecDescent::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 59 59
680 q{fields},
681 $tracelevel)
682 if defined $::RD_TRACE;
683 59 $lastsep = "";
684 59 $expectation->is(q{/,/})->at($text);
685
686  
687 59 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:,)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:,)/) 49 10 59
Condition60%3/5
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:,)/
!ll&&!rl&&r
04910
($lastsep = $1) && ''
!ll
590
MC/DC50%1/2
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:,)/
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:,)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:,)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
688 {
689
690 49 $expectation->failed();
691 49 ▶ Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 49 49
692 Parse::RecDescent::_tracefirst($text))
693 if defined $::RD_TRACE;
694  
695 49 last;
696 }
697 10 $current_match = substr($text, $-[0], $+[0] - $-[0]);
698 10 substr($text,0,length($current_match),q{});
699 10 ▶ Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
700 . $current_match . q{])},
701 Parse::RecDescent::_tracefirst($text))
702 if defined $::RD_TRACE;
703 10 push @item, $item{__PATTERN1__}=$current_match;
704
705  
706 10 pop @item;
707 0 ▶ if (defined $1) {push @item, $item{'field(s)'}=$1; $backtrack=1;}
Branch: 1 branch
BranchTrueFalseTotal
if (defined $1) 0 10 10
708
709 10 ▶ Parse::RecDescent::_trace(q{Trying subrule: [field]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
710 Parse::RecDescent::_tracefirst($text),
711 q{fields},
712 $tracelevel)
713 if defined $::RD_TRACE;
714 10 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
715 10 $expectation->is(q{field})->at($text);
716 10 ▶ unless (defined ($_tok = Parse::RecDescent::Parse::FieldPath::Parser::field($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = Parse::RecDescent::Parse::FieldPath::Parser::field($thisparser, $text, $repeating, $_noactions, sub { \@arg; } ))) 0 10 10
717 {
718
719 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match subrule: [field]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
720 Parse::RecDescent::_tracefirst($text),
721 q{fields},
722 $tracelevel)
723 if defined $::RD_TRACE;
724 0 $expectation->failed();
725 0 last;
726 }
727 10 ▶ Parse::RecDescent::_trace(q{>>Matched subrule: [field]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
728 . $_tok . q{]},
729
730 Parse::RecDescent::_tracefirst($text),
731 q{fields},
732 $tracelevel)
733 if defined $::RD_TRACE;
734 10 $item{q{field}} = $_tok;
735 10 push @item, $_tok;
736
737 }
738  
739 10 $savetext = $text;
740 10 $repcount++;
741 }
742 49 $text = $savetext;
743 49 ▶ pop @item if $backtrack;
Branch: 1 branch
BranchTrueFalseTotal
if $backtrack 0 49 49
744  
745 0 ▶ unless (@item) { undef $_tok; last }
Branch: 1 branch
BranchTrueFalseTotal
unless (@item) 0 49 49
746 49 $_tok = [ @item ];
747 49 last;
748 }
749  
750 49 ▶ unless ($repcount>=1)
Branch: 1 branch
BranchTrueFalseTotal
unless ($repcount >= 1) 0 49 49
751 {
752 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match operator: [<leftop: field /,/ field>]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
753 Parse::RecDescent::_tracefirst($text),
754 q{fields},
755 $tracelevel)
756 if defined $::RD_TRACE;
757 0 $expectation->failed();
758 0 last;
759 }
760 49 ▶ Parse::RecDescent::_trace(q{>>Matched operator: [<leftop: field /,/ field>]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 49 49
761 0 ▶ . qq{@{$_tok||[]}} . q{]},
Condition0%0/2
$_tok || []
l!l
00
MC/DC0%0/1
$_tok || []
$_tok
Truth table0%0/2
A
A= $_tok
Aresult
11
00
762 Parse::RecDescent::_tracefirst($text),
763 q{fields},
764 $tracelevel)
765 if defined $::RD_TRACE;
766  
767 49 ▶ push @item, $item{'field(s)'}=$_tok||[];
Condition50%1/2
$_tok || []
l!l
490
MC/DC0%0/1
$_tok || []
$_tok
Truth table50%1/2
A
A= $_tok
Aresult
11
00
768  
769  
770 49 ▶ Parse::RecDescent::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 49 49
771 Parse::RecDescent::_tracefirst($text),
772 q{fields},
773 $tracelevel)
774 if defined $::RD_TRACE;
775
776  
777 49 ▶ $_tok = ($_noactions) ? 0 : do {
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 49 49
778 10 ▶ use Hash::Merge qw//;
Subroutine BEGIN: called CC=1 SCAR=0.0
779 10 ▶ use List::Util qw//;
Subroutine BEGIN: called CC=1 SCAR=0.0
780 49 ▶ $return = List::Util::reduce { Hash::Merge::merge($a, $b) } {}, @{$item[1]};
Subroutine __ANON__: called CC=1 SCAR=0.0
781 };
782 49 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 49 49
783 {
784 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
785 if defined $::RD_TRACE;
786 0 last;
787 }
788 49 ▶ Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 49 49
789 . $_tok . q{])},
790 Parse::RecDescent::_tracefirst($text))
791 if defined $::RD_TRACE;
792 49 push @item, $_tok;
793 49 $item{__ACTION1__}=$_tok;
794
795  
796  
797 49 ▶ Parse::RecDescent::_trace(q{>>Matched production: [<leftop: field /,/ field>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 49 49
798 Parse::RecDescent::_tracefirst($text),
799 q{fields},
800 $tracelevel)
801 if defined $::RD_TRACE;
802 49 $_matched = 1;
803 49 last;
804 }
805  
806  
807 49 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 49 49
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
4900
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
808 {
809
810  
811 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
812 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
813 Parse::RecDescent::_tracefirst($_[1]),
814 q{fields},
815 $tracelevel)
816 if defined $::RD_TRACE;
817 0 return undef;
818 }
819 49 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 49 49
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
4900
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
820 {
821 0 ▶ Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
822 q{fields},
823 $tracelevel)
824 if defined $::RD_TRACE;
825 0 $return = $score_return;
826 }
827 49 splice @{$thisparser->{errors}}, $err_at;
828 49 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 49 49
829 49 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 49 49
830 {
831 0 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
832 $return . q{])}, "",
833 q{fields},
834 $tracelevel);
835 0 Parse::RecDescent::_trace(q{(consumed: [} .
836 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
837 Parse::RecDescent::_tracefirst($text),
838 , q{fields},
839 $tracelevel)
840 }
841 49 $_[1] = $text;
842 49 return $return;
843 }
844  
845 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
846 sub Parse::RecDescent::Parse::FieldPath::Parser::parse
847 42 ▶{
Subroutine parse: called CC=34 SCAR=44.9
848 42 my $thisparser = $_[0];
849 10 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
850 42 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$Parse::RecDescent::Parse::FieldPath::Parser::tracelevel || 0
l!l
042
MC/DC0%0/1
$Parse::RecDescent::Parse::FieldPath::Parser::tracelevel || 0
$Parse::RecDescent::Parse::FieldPath::Parser::tracelevel
Truth table50%1/2
A
A= $Parse::RecDescent::Parse::FieldPath::Parser::tracelevel
Aresult
11
00
851 42 $ERRORS = 0;
852 42 my $thisrule = $thisparser->{"rules"}{"parse"};
853
854 42 ▶ Parse::RecDescent::_trace(q{Trying rule: [parse]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 42 42
855 Parse::RecDescent::_tracefirst($_[1]),
856 q{parse},
857 $tracelevel)
858 if defined $::RD_TRACE;
859  
860
861 42 my $err_at = @{$thisparser->{errors}};
862  
863 42 my $score;
864 my $score_return;
865 42 my $_tok;
866 42 my $return = undef;
867 42 my $_matched=0;
868 42 my $commit=0;
869 42 my @item = ();
870 42 my %item = ();
871 42 ▶ my $repeating = defined($_[2]) && $_[2];
Condition33%1/3
defined $_[2] && $_[2]
!ll&&!rl&&r
4200
MC/DC0%0/2
defined $_[2] && $_[2]
defined $_[2] $_[2]
Truth table33%1/3
A && B
A= defined $_[2]B= $_[2]
ABresult
0X0
100
111
872 42 ▶ my $_noactions = defined($_[3]) && $_[3];
Condition33%1/3
defined $_[3] && $_[3]
!ll&&!rl&&r
4200
MC/DC0%0/2
defined $_[3] && $_[3]
defined $_[3] $_[3]
Truth table33%1/3
A && B
A= defined $_[3]B= $_[3]
ABresult
0X0
100
111
873 42 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 42 0 42
874 42 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 42 0 42
875 42 my $text;
876 42 my $lastsep="";
877 42 my $current_match;
878 42 my $expectation = new Parse::RecDescent::Expectation(q{fields});
879 42 $expectation->at($_[1]);
880
881 42 my $thisline;
882 42 tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
883  
884
885  
886 42 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 42 0 42
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
0042
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
887 {
888
889 42 ▶ Parse::RecDescent::_trace(q{Trying production: [fields /^\\Z/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 42 42
890 Parse::RecDescent::_tracefirst($_[1]),
891 q{parse},
892 $tracelevel)
893 if defined $::RD_TRACE;
894 42 my $thisprod = $thisrule->{"prods"}[0];
895 42 $text = $_[1];
896 42 my $_savetext;
897 42 @item = (q{parse});
898 42 %item = (__RULE__ => q{parse});
899 42 my $repcount = 0;
900  
901  
902 42 ▶ Parse::RecDescent::_trace(q{Trying subrule: [fields]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 42 42
903 Parse::RecDescent::_tracefirst($text),
904 q{parse},
905 $tracelevel)
906 if defined $::RD_TRACE;
907 10 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
908 42 $expectation->is(q{})->at($text);
909 42 ▶ unless (defined ($_tok = Parse::RecDescent::Parse::FieldPath::Parser::fields($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = fields($thisparser, $text, $repeating, $_noactions, sub { \@arg; } ))) 0 42 42
910 {
911
912 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match subrule: [fields]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
913 Parse::RecDescent::_tracefirst($text),
914 q{parse},
915 $tracelevel)
916 if defined $::RD_TRACE;
917 0 $expectation->failed();
918 0 last;
919 }
920 42 ▶ Parse::RecDescent::_trace(q{>>Matched subrule: [fields]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 42 42
921 . $_tok . q{]},
922
923 Parse::RecDescent::_tracefirst($text),
924 q{parse},
925 $tracelevel)
926 if defined $::RD_TRACE;
927 42 $item{q{fields}} = $_tok;
928 42 push @item, $_tok;
929
930 }
931  
932 42 ▶ Parse::RecDescent::_trace(q{Trying terminal: [/^\\Z/]}, Parse::RecDescent::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 42 42
933 q{parse},
934 $tracelevel)
935 if defined $::RD_TRACE;
936 42 $lastsep = "";
937 42 $expectation->is(q{/^\\Z/})->at($text);
938
939  
940 42 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^\Z)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:^\Z)/) 0 42 42
Condition40%2/5
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:^\Z)/
!ll&&!rl&&r
0042
($lastsep = $1) && ''
!ll
420
MC/DC0%0/2
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:^\Z)/
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:^\Z)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:^\Z)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
941 {
942
943 0 $expectation->failed();
944 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
945 Parse::RecDescent::_tracefirst($text))
946 if defined $::RD_TRACE;
947  
948 0 last;
949 }
950 42 $current_match = substr($text, $-[0], $+[0] - $-[0]);
951 42 substr($text,0,length($current_match),q{});
952 42 ▶ Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 42 42
953 . $current_match . q{])},
954 Parse::RecDescent::_tracefirst($text))
955 if defined $::RD_TRACE;
956 42 push @item, $item{__PATTERN1__}=$current_match;
957
958  
959 42 ▶ Parse::RecDescent::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 42 42
960 Parse::RecDescent::_tracefirst($text),
961 q{parse},
962 $tracelevel)
963 if defined $::RD_TRACE;
964
965  
966 42 ▶ $_tok = ($_noactions) ? 0 : do {
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 42 42
967 42 $return = $item[1];
968 };
969 42 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 42 42
970 {
971 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
972 if defined $::RD_TRACE;
973 0 last;
974 }
975 42 ▶ Parse::RecDescent::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 42 42
976 . $_tok . q{])},
977 Parse::RecDescent::_tracefirst($text))
978 if defined $::RD_TRACE;
979 42 push @item, $_tok;
980 42 $item{__ACTION1__}=$_tok;
981
982  
983  
984 42 ▶ Parse::RecDescent::_trace(q{>>Matched production: [fields /^\\Z/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 42 42
985 Parse::RecDescent::_tracefirst($text),
986 q{parse},
987 $tracelevel)
988 if defined $::RD_TRACE;
989 42 $_matched = 1;
990 42 last;
991 }
992  
993  
994 42 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 42 42
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
4200
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
995 {
996
997  
998 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
999 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1000 Parse::RecDescent::_tracefirst($_[1]),
1001 q{parse},
1002 $tracelevel)
1003 if defined $::RD_TRACE;
1004 0 return undef;
1005 }
1006 42 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 42 42
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
4200
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
1007 {
1008 0 ▶ Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1009 q{parse},
1010 $tracelevel)
1011 if defined $::RD_TRACE;
1012 0 $return = $score_return;
1013 }
1014 42 splice @{$thisparser->{errors}}, $err_at;
1015 42 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 42 42
1016 42 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 42 42
1017 {
1018 0 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
1019 $return . q{])}, "",
1020 q{parse},
1021 $tracelevel);
1022 0 Parse::RecDescent::_trace(q{(consumed: [} .
1023 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
1024 Parse::RecDescent::_tracefirst($text),
1025 , q{parse},
1026 $tracelevel)
1027 }
1028 42 $_[1] = $text;
1029 42 return $return;
1030 }
1031  
1032 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
1033 sub Parse::RecDescent::Parse::FieldPath::Parser::field_name
1034 145 ▶{
Subroutine field_name: called CC=57 SCAR=56.7
1035 145 my $thisparser = $_[0];
1036 10 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
1037 145 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$Parse::RecDescent::Parse::FieldPath::Parser::tracelevel || 0
l!l
1450
MC/DC0%0/1
$Parse::RecDescent::Parse::FieldPath::Parser::tracelevel || 0
$Parse::RecDescent::Parse::FieldPath::Parser::tracelevel
Truth table50%1/2
A
A= $Parse::RecDescent::Parse::FieldPath::Parser::tracelevel
Aresult
11
00
1038 145 $ERRORS = 0;
1039 145 my $thisrule = $thisparser->{"rules"}{"field_name"};
1040
1041 145 ▶ Parse::RecDescent::_trace(q{Trying rule: [field_name]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 145 145
1042 Parse::RecDescent::_tracefirst($_[1]),
1043 q{field_name},
1044 $tracelevel)
1045 if defined $::RD_TRACE;
1046  
1047
1048 145 my $err_at = @{$thisparser->{errors}};
1049  
1050 145 my $score;
1051 my $score_return;
1052 145 my $_tok;
1053 145 my $return = undef;
1054 145 my $_matched=0;
1055 145 my $commit=0;
1056 145 my @item = ();
1057 145 my %item = ();
1058 145 ▶ my $repeating = defined($_[2]) && $_[2];
Condition33%1/3
defined $_[2] && $_[2]
!ll&&!rl&&r
01450
MC/DC0%0/2
defined $_[2] && $_[2]
defined $_[2] $_[2]
Truth table33%1/3
A && B
A= defined $_[2]B= $_[2]
ABresult
0X0
100
111
1059 145 ▶ my $_noactions = defined($_[3]) && $_[3];
Condition33%1/3
defined $_[3] && $_[3]
!ll&&!rl&&r
01450
MC/DC0%0/2
defined $_[3] && $_[3]
defined $_[3] $_[3]
Truth table33%1/3
A && B
A= defined $_[3]B= $_[3]
ABresult
0X0
100
111
1060 145 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 145 0 145
1061 145 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 145 0 145
1062 145 my $text;
1063 145 my $lastsep="";
1064 145 my $current_match;
1065 145 my $expectation = new Parse::RecDescent::Expectation(q{/\\w+/, or '*', or ''});
1066 145 $expectation->at($_[1]);
1067
1068 145 my $thisline;
1069 145 tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
1070  
1071
1072  
1073 145 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 145 0 145
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00145
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
1074 {
1075
1076 145 ▶ Parse::RecDescent::_trace(q{Trying production: [/\\w+/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 145 145
1077 Parse::RecDescent::_tracefirst($_[1]),
1078 q{field_name},
1079 $tracelevel)
1080 if defined $::RD_TRACE;
1081 145 my $thisprod = $thisrule->{"prods"}[0];
1082 145 $text = $_[1];
1083 145 my $_savetext;
1084 145 @item = (q{field_name});
1085 145 %item = (__RULE__ => q{field_name});
1086 145 my $repcount = 0;
1087  
1088  
1089 145 ▶ Parse::RecDescent::_trace(q{Trying terminal: [/\\w+/]}, Parse::RecDescent::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 145 145
1090 q{field_name},
1091 $tracelevel)
1092 if defined $::RD_TRACE;
1093 145 $lastsep = "";
1094 145 $expectation->is(q{})->at($text);
1095
1096  
1097 145 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\w+)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\w+)/) 22 123 145
Condition60%3/5
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\w+)/
!ll&&!rl&&r
022123
($lastsep = $1) && ''
!ll
1450
MC/DC50%1/2
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\w+)/
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:\w+)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:\w+)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
1098 {
1099
1100 22 $expectation->failed();
1101 22 ▶ Parse::RecDescent::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 22 22
1102 Parse::RecDescent::_tracefirst($text))
1103 if defined $::RD_TRACE;
1104  
1105 22 last;
1106 }
1107 123 $current_match = substr($text, $-[0], $+[0] - $-[0]);
1108 123 substr($text,0,length($current_match),q{});
1109 123 ▶ Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 123 123
1110 . $current_match . q{])},
1111 Parse::RecDescent::_tracefirst($text))
1112 if defined $::RD_TRACE;
1113 123 push @item, $item{__PATTERN1__}=$current_match;
1114
1115  
1116  
1117 123 ▶ Parse::RecDescent::_trace(q{>>Matched production: [/\\w+/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 123 123
1118 Parse::RecDescent::_tracefirst($text),
1119 q{field_name},
1120 $tracelevel)
1121 if defined $::RD_TRACE;
1122 123 $_matched = 1;
1123 123 last;
1124 }
1125  
1126  
1127 145 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 22 123 145
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
123022
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
1128 {
1129
1130 22 ▶ Parse::RecDescent::_trace(q{Trying production: ['*']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 22 22
1131 Parse::RecDescent::_tracefirst($_[1]),
1132 q{field_name},
1133 $tracelevel)
1134 if defined $::RD_TRACE;
1135 22 my $thisprod = $thisrule->{"prods"}[1];
1136 22 $text = $_[1];
1137 22 my $_savetext;
1138 22 @item = (q{field_name});
1139 22 %item = (__RULE__ => q{field_name});
1140 22 my $repcount = 0;
1141  
1142  
1143 22 ▶ Parse::RecDescent::_trace(q{Trying terminal: ['*']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 22 22
1144 Parse::RecDescent::_tracefirst($text),
1145 q{field_name},
1146 $tracelevel)
1147 if defined $::RD_TRACE;
1148 22 $lastsep = "";
1149 22 $expectation->is(q{})->at($text);
1150
1151  
1152 22 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\*/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\*/) 8 14 22
Condition60%3/5
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\*/
!ll&&!rl&&r
0814
($lastsep = $1) && ''
!ll
220
MC/DC50%1/2
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\*/
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A\*/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A\*/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
1153 {
1154
1155 8 $expectation->failed();
1156 8 ▶ Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 8 8
1157 Parse::RecDescent::_tracefirst($text))
1158 if defined $::RD_TRACE;
1159 8 last;
1160 }
1161 14 $current_match = substr($text, $-[0], $+[0] - $-[0]);
1162 14 substr($text,0,length($current_match),q{});
1163 14 ▶ Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 14 14
1164 . $current_match . q{])},
1165 Parse::RecDescent::_tracefirst($text))
1166 if defined $::RD_TRACE;
1167 14 push @item, $item{__STRING1__}=$current_match;
1168
1169  
1170  
1171 14 ▶ Parse::RecDescent::_trace(q{>>Matched production: ['*']<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 14 14
1172 Parse::RecDescent::_tracefirst($text),
1173 q{field_name},
1174 $tracelevel)
1175 if defined $::RD_TRACE;
1176 14 $_matched = 1;
1177 14 last;
1178 }
1179  
1180  
1181 145 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 8 137 145
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
13708
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
1182 {
1183
1184 8 ▶ Parse::RecDescent::_trace(q{Trying production: ['']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 8 8
1185 Parse::RecDescent::_tracefirst($_[1]),
1186 q{field_name},
1187 $tracelevel)
1188 if defined $::RD_TRACE;
1189 8 my $thisprod = $thisrule->{"prods"}[2];
1190 8 $text = $_[1];
1191 8 my $_savetext;
1192 8 @item = (q{field_name});
1193 8 %item = (__RULE__ => q{field_name});
1194 8 my $repcount = 0;
1195  
1196  
1197 8 ▶ Parse::RecDescent::_trace(q{Trying terminal: ['']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 8 8
1198 Parse::RecDescent::_tracefirst($text),
1199 q{field_name},
1200 $tracelevel)
1201 if defined $::RD_TRACE;
1202 8 $lastsep = "";
1203 8 $expectation->is(q{})->at($text);
1204
1205  
1206 8 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A/) 0 8 8
Condition40%2/5
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A/
!ll&&!rl&&r
008
($lastsep = $1) && ''
!ll
80
MC/DC0%0/2
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A/
$text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($Parse::RecDescent::Parse::FieldPath::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
1207 {
1208
1209 0 $expectation->failed();
1210 0 ▶ Parse::RecDescent::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1211 Parse::RecDescent::_tracefirst($text))
1212 if defined $::RD_TRACE;
1213 0 last;
1214 }
1215 8 $current_match = substr($text, $-[0], $+[0] - $-[0]);
1216 8 substr($text,0,length($current_match),q{});
1217 8 ▶ Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 8 8
1218 . $current_match . q{])},
1219 Parse::RecDescent::_tracefirst($text))
1220 if defined $::RD_TRACE;
1221 8 push @item, $item{__STRING1__}=$current_match;
1222
1223  
1224  
1225 8 ▶ Parse::RecDescent::_trace(q{>>Matched production: ['']<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 8 8
1226 Parse::RecDescent::_tracefirst($text),
1227 q{field_name},
1228 $tracelevel)
1229 if defined $::RD_TRACE;
1230 8 $_matched = 1;
1231 8 last;
1232 }
1233  
1234  
1235 145 ▶ while (!$_matched)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched) 0 145 145
1236 {
1237
1238 0 ▶ Parse::RecDescent::_trace(q{Trying production: [<error?:...> <reject>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1239 Parse::RecDescent::_tracefirst($_[1]),
1240 q{field_name},
1241 $tracelevel)
1242 if defined $::RD_TRACE;
1243 0 my $thisprod = $thisrule->{"prods"}[3];
1244
1245 0 my $_savetext;
1246 0 @item = (q{field_name});
1247 0 %item = (__RULE__ => q{field_name});
1248 0 my $repcount = 0;
1249  
1250  
1251
1252  
1253 0 ▶ Parse::RecDescent::_trace(q{Trying directive: [<error?:...>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1254 Parse::RecDescent::_tracefirst($text),
1255 q{field_name},
1256 $tracelevel)
1257 if defined $::RD_TRACE;
1258 0 ▶ $_tok = do { if ($commit) { do {
Branch: 2 branches
BranchTrueFalseTotal
if ($commit) { } 0 0 0
unless ($_noactions) 0 0 0
1259 0 my $rule = $item[0];
1260 0 $rule =~ s/_/ /g;
1261 #WAS: Parse::RecDescent::_error("Invalid $rule: " . $expectation->message() ,$thisline);
1262 0 push @{$thisparser->{errors}}, ["Invalid $rule: " . $expectation->message() ,$thisline];
1263 0 } unless $_noactions; undef } else {0} };
1264 0 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 0 0
1265 {
1266 0 ▶ Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1267 . $_tok . q{])},
1268 Parse::RecDescent::_tracefirst($text))
1269 if defined $::RD_TRACE;
1270 }
1271 else
1272 {
1273 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1274 Parse::RecDescent::_tracefirst($text))
1275 if defined $::RD_TRACE;
1276 }
1277
1278 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
1279 0 push @item, $item{__DIRECTIVE1__}=$_tok;
1280
1281  
1282 0 ▶ Parse::RecDescent::_trace(q{>>Rejecting production<< (found <reject>)},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1283 Parse::RecDescent::_tracefirst($text),
1284 q{field_name},
1285 $tracelevel)
1286 if defined $::RD_TRACE;
1287 0 undef $return;
1288
1289  
1290 0 $_tok = undef;
1291
1292 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
1293  
1294  
1295 0 ▶ Parse::RecDescent::_trace(q{>>Matched production: [<error?:...> <reject>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1296 Parse::RecDescent::_tracefirst($text),
1297 q{field_name},
1298 $tracelevel)
1299 if defined $::RD_TRACE;
1300 0 $_matched = 1;
1301 0 last;
1302 }
1303  
1304  
1305 145 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 145 145
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
14500
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
1306 {
1307
1308  
1309 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
1310 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1311 Parse::RecDescent::_tracefirst($_[1]),
1312 q{field_name},
1313 $tracelevel)
1314 if defined $::RD_TRACE;
1315 0 return undef;
1316 }
1317 145 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 145 145
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
01450
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
1318 {
1319 0 ▶ Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1320 q{field_name},
1321 $tracelevel)
1322 if defined $::RD_TRACE;
1323 0 $return = $score_return;
1324 }
1325 145 splice @{$thisparser->{errors}}, $err_at;
1326 145 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 145 0 145
1327 145 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 145 145
1328 {
1329 0 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
1330 $return . q{])}, "",
1331 q{field_name},
1332 $tracelevel);
1333 0 Parse::RecDescent::_trace(q{(consumed: [} .
1334 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
1335 Parse::RecDescent::_tracefirst($text),
1336 , q{field_name},
1337 $tracelevel)
1338 }
1339 145 $_[1] = $text;
1340 145 return $return;
1341 }
1342  
1343 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args)
1344 sub Parse::RecDescent::Parse::FieldPath::Parser::field
1345 59 ▶{
Subroutine field: called CC=40 SCAR=50.9
1346 59 my $thisparser = $_[0];
1347 10 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
1348 59 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$Parse::RecDescent::Parse::FieldPath::Parser::tracelevel || 0
l!l
590
MC/DC0%0/1
$Parse::RecDescent::Parse::FieldPath::Parser::tracelevel || 0
$Parse::RecDescent::Parse::FieldPath::Parser::tracelevel
Truth table50%1/2
A
A= $Parse::RecDescent::Parse::FieldPath::Parser::tracelevel
Aresult
11
00
1349 59 $ERRORS = 0;
1350 59 my $thisrule = $thisparser->{"rules"}{"field"};
1351
1352 59 ▶ Parse::RecDescent::_trace(q{Trying rule: [field]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 59 59
1353 Parse::RecDescent::_tracefirst($_[1]),
1354 q{field},
1355 $tracelevel)
1356 if defined $::RD_TRACE;
1357  
1358
1359 59 my $err_at = @{$thisparser->{errors}};
1360  
1361 59 my $score;
1362 my $score_return;
1363 59 my $_tok;
1364 59 my $return = undef;
1365 59 my $_matched=0;
1366 59 my $commit=0;
1367 59 my @item = ();
1368 59 my %item = ();
1369 59 ▶ my $repeating = defined($_[2]) && $_[2];
Condition33%1/3
defined $_[2] && $_[2]
!ll&&!rl&&r
0590
MC/DC0%0/2
defined $_[2] && $_[2]
defined $_[2] $_[2]
Truth table33%1/3
A && B
A= defined $_[2]B= $_[2]
ABresult
0X0
100
111
1370 59 ▶ my $_noactions = defined($_[3]) && $_[3];
Condition33%1/3
defined $_[3] && $_[3]
!ll&&!rl&&r
0590
MC/DC0%0/2
defined $_[3] && $_[3]
defined $_[3] $_[3]
Truth table33%1/3
A && B
A= defined $_[3]B= $_[3]
ABresult
0X0
100
111
1371 59 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 59 0 59
1372 59 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 59 0 59
1373 59 my $text;
1374 59 my $lastsep="";
1375 59 my $current_match;
1376 59 my $expectation = new Parse::RecDescent::Expectation(q{field_list, or field_path});
1377 59 $expectation->at($_[1]);
1378
1379 59 my $thisline;
1380 59 tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
1381  
1382
1383  
1384 59 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 59 0 59
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
0059
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
1385 {
1386
1387 59 ▶ Parse::RecDescent::_trace(q{Trying production: [field_list]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 59 59
1388 Parse::RecDescent::_tracefirst($_[1]),
1389 q{field},
1390 $tracelevel)
1391 if defined $::RD_TRACE;
1392 59 my $thisprod = $thisrule->{"prods"}[0];
1393 59 $text = $_[1];
1394 59 my $_savetext;
1395 59 @item = (q{field});
1396 59 %item = (__RULE__ => q{field});
1397 59 my $repcount = 0;
1398  
1399  
1400 59 ▶ Parse::RecDescent::_trace(q{Trying subrule: [field_list]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 59 59
1401 Parse::RecDescent::_tracefirst($text),
1402 q{field},
1403 $tracelevel)
1404 if defined $::RD_TRACE;
1405 10 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
1406 59 $expectation->is(q{})->at($text);
1407 59 ▶ unless (defined ($_tok = Parse::RecDescent::Parse::FieldPath::Parser::field_list($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = field_list($thisparser, $text, $repeating, $_noactions, sub { \@arg; } ))) 52 7 59
1408 {
1409
1410 52 ▶ Parse::RecDescent::_trace(q{<<Didn't match subrule: [field_list]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 52 52
1411 Parse::RecDescent::_tracefirst($text),
1412 q{field},
1413 $tracelevel)
1414 if defined $::RD_TRACE;
1415 52 $expectation->failed();
1416 52 last;
1417 }
1418 7 ▶ Parse::RecDescent::_trace(q{>>Matched subrule: [field_list]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
1419 . $_tok . q{]},
1420
1421 Parse::RecDescent::_tracefirst($text),
1422 q{field},
1423 $tracelevel)
1424 if defined $::RD_TRACE;
1425 7 $item{q{field_list}} = $_tok;
1426 7 push @item, $_tok;
1427
1428 }
1429  
1430  
1431 7 ▶ Parse::RecDescent::_trace(q{>>Matched production: [field_list]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
1432 Parse::RecDescent::_tracefirst($text),
1433 q{field},
1434 $tracelevel)
1435 if defined $::RD_TRACE;
1436 7 $_matched = 1;
1437 7 last;
1438 }
1439  
1440  
1441 59 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 52 7 59
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
7052
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
1442 {
1443
1444 52 ▶ Parse::RecDescent::_trace(q{Trying production: [field_path]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 52 52
1445 Parse::RecDescent::_tracefirst($_[1]),
1446 q{field},
1447 $tracelevel)
1448 if defined $::RD_TRACE;
1449 52 my $thisprod = $thisrule->{"prods"}[1];
1450 52 $text = $_[1];
1451 52 my $_savetext;
1452 52 @item = (q{field});
1453 52 %item = (__RULE__ => q{field});
1454 52 my $repcount = 0;
1455  
1456  
1457 52 ▶ Parse::RecDescent::_trace(q{Trying subrule: [field_path]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 52 52
1458 Parse::RecDescent::_tracefirst($text),
1459 q{field},
1460 $tracelevel)
1461 if defined $::RD_TRACE;
1462 10 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
1463 52 $expectation->is(q{})->at($text);
1464 52 ▶ unless (defined ($_tok = Parse::RecDescent::Parse::FieldPath::Parser::field_path($thisparser,$text,$repeating,$_noactions,sub { \@arg })))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = field_path($thisparser, $text, $repeating, $_noactions, sub { \@arg; } ))) 0 52 52
1465 {
1466
1467 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match subrule: [field_path]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1468 Parse::RecDescent::_tracefirst($text),
1469 q{field},
1470 $tracelevel)
1471 if defined $::RD_TRACE;
1472 0 $expectation->failed();
1473 0 last;
1474 }
1475 52 ▶ Parse::RecDescent::_trace(q{>>Matched subrule: [field_path]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 52 52
1476 . $_tok . q{]},
1477
1478 Parse::RecDescent::_tracefirst($text),
1479 q{field},
1480 $tracelevel)
1481 if defined $::RD_TRACE;
1482 52 $item{q{field_path}} = $_tok;
1483 52 push @item, $_tok;
1484
1485 }
1486  
1487  
1488 52 ▶ Parse::RecDescent::_trace(q{>>Matched production: [field_path]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 52 52
1489 Parse::RecDescent::_tracefirst($text),
1490 q{field},
1491 $tracelevel)
1492 if defined $::RD_TRACE;
1493 52 $_matched = 1;
1494 52 last;
1495 }
1496  
1497  
1498 59 ▶ while (!$_matched)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched) 0 59 59
1499 {
1500
1501 0 ▶ Parse::RecDescent::_trace(q{Trying production: [<error...>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1502 Parse::RecDescent::_tracefirst($_[1]),
1503 q{field},
1504 $tracelevel)
1505 if defined $::RD_TRACE;
1506 0 my $thisprod = $thisrule->{"prods"}[2];
1507
1508 0 my $_savetext;
1509 0 @item = (q{field});
1510 0 %item = (__RULE__ => q{field});
1511 0 my $repcount = 0;
1512  
1513  
1514
1515  
1516 0 ▶ Parse::RecDescent::_trace(q{Trying directive: [<error...>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1517 Parse::RecDescent::_tracefirst($text),
1518 q{field},
1519 $tracelevel)
1520 if defined $::RD_TRACE;
1521 0 ▶ $_tok = do { if (1) { do {
Branch: 1 branch
BranchTrueFalseTotal
unless ($_noactions) 0 0 0
1522 0 my $rule = $item[0];
1523 0 $rule =~ s/_/ /g;
1524 #WAS: Parse::RecDescent::_error("Invalid $rule: " . $expectation->message() ,$thisline);
1525 0 push @{$thisparser->{errors}}, ["Invalid $rule: " . $expectation->message() ,$thisline];
1526 0 } unless $_noactions; undef } else {0} };
1527 0 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 0 0
1528 {
1529 0 ▶ Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1530 . $_tok . q{])},
1531 Parse::RecDescent::_tracefirst($text))
1532 if defined $::RD_TRACE;
1533 }
1534 else
1535 {
1536 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1537 Parse::RecDescent::_tracefirst($text))
1538 if defined $::RD_TRACE;
1539 }
1540
1541 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
1542 0 push @item, $item{__DIRECTIVE1__}=$_tok;
1543
1544  
1545  
1546 0 ▶ Parse::RecDescent::_trace(q{>>Matched production: [<error...>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1547 Parse::RecDescent::_tracefirst($text),
1548 q{field},
1549 $tracelevel)
1550 if defined $::RD_TRACE;
1551 0 $_matched = 1;
1552 0 last;
1553 }
1554  
1555  
1556 59 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 59 59
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
5900
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
1557 {
1558
1559  
1560 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
1561 0 ▶ Parse::RecDescent::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1562 Parse::RecDescent::_tracefirst($_[1]),
1563 q{field},
1564 $tracelevel)
1565 if defined $::RD_TRACE;
1566 0 return undef;
1567 }
1568 59 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 59 59
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
0590
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
1569 {
1570 0 ▶ Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
1571 q{field},
1572 $tracelevel)
1573 if defined $::RD_TRACE;
1574 0 $return = $score_return;
1575 }
1576 59 splice @{$thisparser->{errors}}, $err_at;
1577 59 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 59 0 59
1578 59 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 59 59
1579 {
1580 0 Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} .
1581 $return . q{])}, "",
1582 q{field},
1583 $tracelevel);
1584 0 Parse::RecDescent::_trace(q{(consumed: [} .
1585 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
1586 Parse::RecDescent::_tracefirst($text),
1587 , q{field},
1588 $tracelevel)
1589 }
1590 59 $_[1] = $text;
1591 59 return $return;
1592 }
1593 }
1594 42 ▶package Parse::FieldPath::Parser; sub new { my $self = bless( {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
1595 '_precompiled' => 1,
1596 'localvars' => '',
1597 'startcode' => '',
1598 'namespace' => 'Parse::RecDescent::Parse::FieldPath::Parser',
1599 'rules' => {
1600 'field_path' => bless( {
1601 'impcount' => 0,
1602 'calls' => [
1603 'field_name'
1604 ],
1605 'changed' => 0,
1606 'opcount' => 0,
1607 'prods' => [
1608 bless( {
1609 'number' => '0',
1610 'strcount' => 0,
1611 'dircount' => 1,
1612 'uncommit' => undef,
1613 'error' => undef,
1614 'patcount' => 1,
1615 'actcount' => 1,
1616 'op' => [],
1617 'items' => [
1618 bless( {
1619 'expected' => '<leftop: field_name /\\\\// field_name>',
1620 'min' => 1,
1621 'name' => '\'field_name(s)\'',
1622 'max' => 100000000,
1623 'leftarg' => bless( {
1624 'subrule' => 'field_name',
1625 'matchrule' => 0,
1626 'implicit' => undef,
1627 'argcode' => undef,
1628 'lookahead' => 0,
1629 'line' => 31
1630 }, 'Parse::RecDescent::Subrule' ),
1631 'rightarg' => bless( {
1632 'subrule' => 'field_name',
1633 'matchrule' => 0,
1634 'implicit' => undef,
1635 'argcode' => undef,
1636 'lookahead' => 0,
1637 'line' => 31
1638 }, 'Parse::RecDescent::Subrule' ),
1639 'hashname' => '__DIRECTIVE1__',
1640 'type' => 'leftop',
1641 'op' => bless( {
1642 'pattern' => '\\/',
1643 'hashname' => '__PATTERN1__',
1644 'description' => '/\\\\//',
1645 'lookahead' => 0,
1646 'rdelim' => '/',
1647 'line' => 31,
1648 'mod' => '',
1649 'ldelim' => '/'
1650 }, 'Parse::RecDescent::Token' )
1651 }, 'Parse::RecDescent::Operator' ),
1652 bless( {
1653 'hashname' => '__ACTION1__',
1654 'lookahead' => 0,
1655 'line' => 32,
1656 'code' => '{
1657 use List::Util qw//;
1658  
1659 # Turn qw/a b c/ into { a => { b => { c => {} } } }
1660 my $fields = {};
1661 List::Util::reduce { $a->{$b} = {} if $b } $fields, @{$item{\'field_name(s)\'}};
1662 $return = $fields;
1663 }'
1664 }, 'Parse::RecDescent::Action' )
1665 ],
1666 'line' => undef
1667 }, 'Parse::RecDescent::Production' )
1668 ],
1669 'name' => 'field_path',
1670 'vars' => '',
1671 'line' => 30
1672 }, 'Parse::RecDescent::Rule' ),
1673 'field_list' => bless( {
1674 'impcount' => 0,
1675 'calls' => [
1676 'field_path',
1677 'fields'
1678 ],
1679 'changed' => 0,
1680 'opcount' => 0,
1681 'prods' => [
1682 bless( {
1683 'number' => '0',
1684 'strcount' => 2,
1685 'dircount' => 0,
1686 'uncommit' => undef,
1687 'error' => undef,
1688 'patcount' => 0,
1689 'actcount' => 1,
1690 'items' => [
1691 bless( {
1692 'subrule' => 'field_path',
1693 'matchrule' => 0,
1694 'implicit' => undef,
1695 'argcode' => undef,
1696 'lookahead' => 0,
1697 'line' => 17
1698 }, 'Parse::RecDescent::Subrule' ),
1699 bless( {
1700 'pattern' => '(',
1701 'hashname' => '__STRING1__',
1702 'description' => '\'(\'',
1703 'lookahead' => 0,
1704 'line' => 17
1705 }, 'Parse::RecDescent::Literal' ),
1706 bless( {
1707 'subrule' => 'fields',
1708 'matchrule' => 0,
1709 'implicit' => undef,
1710 'argcode' => undef,
1711 'lookahead' => 0,
1712 'line' => 17
1713 }, 'Parse::RecDescent::Subrule' ),
1714 bless( {
1715 'pattern' => ')',
1716 'hashname' => '__STRING2__',
1717 'description' => '\')\'',
1718 'lookahead' => 0,
1719 'line' => 17
1720 }, 'Parse::RecDescent::Literal' ),
1721 bless( {
1722 'hashname' => '__ACTION1__',
1723 'lookahead' => 0,
1724 'line' => 18,
1725 'code' => '{
1726 sub deepest {
1727 my $hashref = shift;
1728 return $hashref if scalar(keys %$hashref) == 0;
1729 my $key = (keys %$hashref)[0];
1730 return deepest($hashref->{$key});
1731 }
1732 my $deepest = deepest($item{field_path});
1733 $deepest->{$_} = $item{fields}->{$_} for keys %{$item{fields}};
1734 $return = $item{field_path};
1735 }'
1736 }, 'Parse::RecDescent::Action' )
1737 ],
1738 'line' => undef
1739 }, 'Parse::RecDescent::Production' )
1740 ],
1741 'name' => 'field_list',
1742 'vars' => '',
1743 'line' => 17
1744 }, 'Parse::RecDescent::Rule' ),
1745 'fields' => bless( {
1746 'impcount' => 0,
1747 'calls' => [
1748 'field'
1749 ],
1750 'changed' => 0,
1751 'opcount' => 0,
1752 'prods' => [
1753 bless( {
1754 'number' => '0',
1755 'strcount' => 0,
1756 'dircount' => 1,
1757 'uncommit' => undef,
1758 'error' => undef,
1759 'patcount' => 1,
1760 'actcount' => 1,
1761 'op' => [],
1762 'items' => [
1763 bless( {
1764 'expected' => '<leftop: field /,/ field>',
1765 'min' => 1,
1766 'name' => '\'field(s)\'',
1767 'max' => 100000000,
1768 'leftarg' => bless( {
1769 'subrule' => 'field',
1770 'matchrule' => 0,
1771 'implicit' => undef,
1772 'argcode' => undef,
1773 'lookahead' => 0,
1774 'line' => 7
1775 }, 'Parse::RecDescent::Subrule' ),
1776 'rightarg' => bless( {
1777 'subrule' => 'field',
1778 'matchrule' => 0,
1779 'implicit' => undef,
1780 'argcode' => undef,
1781 'lookahead' => 0,
1782 'line' => 7
1783 }, 'Parse::RecDescent::Subrule' ),
1784 'hashname' => '__DIRECTIVE1__',
1785 'type' => 'leftop',
1786 'op' => bless( {
1787 'pattern' => ',',
1788 'hashname' => '__PATTERN1__',
1789 'description' => '/,/',
1790 'lookahead' => 0,
1791 'rdelim' => '/',
1792 'line' => 7,
1793 'mod' => '',
1794 'ldelim' => '/'
1795 }, 'Parse::RecDescent::Token' )
1796 }, 'Parse::RecDescent::Operator' ),
1797 bless( {
1798 'hashname' => '__ACTION1__',
1799 'lookahead' => 0,
1800 'line' => 8,
1801 'code' => '{
1802 use Hash::Merge qw//;
1803 use List::Util qw//;
1804 $return = List::Util::reduce { Hash::Merge::merge($a, $b) } {}, @{$item[1]};
1805 }'
1806 }, 'Parse::RecDescent::Action' )
1807 ],
1808 'line' => undef
1809 }, 'Parse::RecDescent::Production' )
1810 ],
1811 'name' => 'fields',
1812 'vars' => '',
1813 'line' => 7
1814 }, 'Parse::RecDescent::Rule' ),
1815 'parse' => bless( {
1816 'impcount' => 0,
1817 'calls' => [
1818 'fields'
1819 ],
1820 'changed' => 0,
1821 'opcount' => 0,
1822 'prods' => [
1823 bless( {
1824 'number' => '0',
1825 'strcount' => 0,
1826 'dircount' => 0,
1827 'uncommit' => undef,
1828 'error' => undef,
1829 'patcount' => 1,
1830 'actcount' => 1,
1831 'items' => [
1832 bless( {
1833 'subrule' => 'fields',
1834 'matchrule' => 0,
1835 'implicit' => undef,
1836 'argcode' => undef,
1837 'lookahead' => 0,
1838 'line' => 2
1839 }, 'Parse::RecDescent::Subrule' ),
1840 bless( {
1841 'pattern' => '^\\Z',
1842 'hashname' => '__PATTERN1__',
1843 'description' => '/^\\\\Z/',
1844 'lookahead' => 0,
1845 'rdelim' => '/',
1846 'line' => 2,
1847 'mod' => '',
1848 'ldelim' => '/'
1849 }, 'Parse::RecDescent::Token' ),
1850 bless( {
1851 'hashname' => '__ACTION1__',
1852 'lookahead' => 0,
1853 'line' => 3,
1854 'code' => '{
1855 $return = $item[1];
1856 }'
1857 }, 'Parse::RecDescent::Action' )
1858 ],
1859 'line' => undef
1860 }, 'Parse::RecDescent::Production' )
1861 ],
1862 'name' => 'parse',
1863 'vars' => '',
1864 'line' => 1
1865 }, 'Parse::RecDescent::Rule' ),
1866 'field_name' => bless( {
1867 'impcount' => 0,
1868 'calls' => [],
1869 'changed' => 0,
1870 'opcount' => 0,
1871 'prods' => [
1872 bless( {
1873 'number' => '0',
1874 'strcount' => 0,
1875 'dircount' => 0,
1876 'uncommit' => undef,
1877 'error' => undef,
1878 'patcount' => 1,
1879 'actcount' => 0,
1880 'items' => [
1881 bless( {
1882 'pattern' => '\\w+',
1883 'hashname' => '__PATTERN1__',
1884 'description' => '/\\\\w+/',
1885 'lookahead' => 0,
1886 'rdelim' => '/',
1887 'line' => 16,
1888 'mod' => '',
1889 'ldelim' => '/'
1890 }, 'Parse::RecDescent::Token' )
1891 ],
1892 'line' => undef
1893 }, 'Parse::RecDescent::Production' ),
1894 bless( {
1895 'number' => '1',
1896 'strcount' => 1,
1897 'dircount' => 0,
1898 'uncommit' => undef,
1899 'error' => undef,
1900 'patcount' => 0,
1901 'actcount' => 0,
1902 'items' => [
1903 bless( {
1904 'pattern' => '*',
1905 'hashname' => '__STRING1__',
1906 'description' => '\'*\'',
1907 'lookahead' => 0,
1908 'line' => 16
1909 }, 'Parse::RecDescent::Literal' )
1910 ],
1911 'line' => 16
1912 }, 'Parse::RecDescent::Production' ),
1913 bless( {
1914 'number' => '2',
1915 'strcount' => 1,
1916 'dircount' => 0,
1917 'uncommit' => undef,
1918 'error' => undef,
1919 'patcount' => 0,
1920 'actcount' => 0,
1921 'items' => [
1922 bless( {
1923 'pattern' => '',
1924 'hashname' => '__STRING1__',
1925 'description' => '\'\'',
1926 'lookahead' => 0,
1927 'line' => 16
1928 }, 'Parse::RecDescent::Literal' )
1929 ],
1930 'line' => 16
1931 }, 'Parse::RecDescent::Production' ),
1932 bless( {
1933 'number' => '3',
1934 'strcount' => 0,
1935 'dircount' => 1,
1936 'uncommit' => 0,
1937 'error' => 1,
1938 'patcount' => 0,
1939 'actcount' => 0,
1940 'items' => [
1941 bless( {
1942 'msg' => '',
1943 'hashname' => '__DIRECTIVE1__',
1944 'commitonly' => '?',
1945 'lookahead' => 0,
1946 'line' => 16
1947 }, 'Parse::RecDescent::Error' ),
1948 bless( {
1949 'name' => '<reject>',
1950 'lookahead' => 0,
1951 'line' => 0
1952 }, 'Parse::RecDescent::UncondReject' )
1953 ],
1954 'line' => 16
1955 }, 'Parse::RecDescent::Production' )
1956 ],
1957 'name' => 'field_name',
1958 'vars' => '',
1959 'line' => 16
1960 }, 'Parse::RecDescent::Rule' ),
1961 'field' => bless( {
1962 'impcount' => 0,
1963 'calls' => [
1964 'field_list',
1965 'field_path'
1966 ],
1967 'changed' => 0,
1968 'opcount' => 0,
1969 'prods' => [
1970 bless( {
1971 'number' => '0',
1972 'strcount' => 0,
1973 'dircount' => 0,
1974 'uncommit' => undef,
1975 'error' => undef,
1976 'patcount' => 0,
1977 'actcount' => 0,
1978 'items' => [
1979 bless( {
1980 'subrule' => 'field_list',
1981 'matchrule' => 0,
1982 'implicit' => undef,
1983 'argcode' => undef,
1984 'lookahead' => 0,
1985 'line' => 14
1986 }, 'Parse::RecDescent::Subrule' )
1987 ],
1988 'line' => undef
1989 }, 'Parse::RecDescent::Production' ),
1990 bless( {
1991 'number' => '1',
1992 'strcount' => 0,
1993 'dircount' => 0,
1994 'uncommit' => undef,
1995 'error' => undef,
1996 'patcount' => 0,
1997 'actcount' => 0,
1998 'items' => [
1999 bless( {
2000 'subrule' => 'field_path',
2001 'matchrule' => 0,
2002 'implicit' => undef,
2003 'argcode' => undef,
2004 'lookahead' => 0,
2005 'line' => 14
2006 }, 'Parse::RecDescent::Subrule' )
2007 ],
2008 'line' => 14
2009 }, 'Parse::RecDescent::Production' ),
2010 bless( {
2011 'number' => '2',
2012 'strcount' => 0,
2013 'dircount' => 1,
2014 'uncommit' => 0,
2015 'error' => 1,
2016 'patcount' => 0,
2017 'actcount' => 0,
2018 'items' => [
2019 bless( {
2020 'msg' => '',
2021 'hashname' => '__DIRECTIVE1__',
2022 'commitonly' => '',
2023 'lookahead' => 0,
2024 'line' => 14
2025 }, 'Parse::RecDescent::Error' )
2026 ],
2027 'line' => 14
2028 }, 'Parse::RecDescent::Production' )
2029 ],
2030 'name' => 'field',
2031 'vars' => '',
2032 'line' => 14
2033 }, 'Parse::RecDescent::Rule' )
2034 },
2035 '_AUTOTREE' => undef,
2036 '_check' => {
2037 'thisoffset' => '',
2038 'itempos' => '',
2039 'prevoffset' => '',
2040 'prevline' => '',
2041 'prevcolumn' => '',
2042 'thiscolumn' => ''
2043 },
2044 '_AUTOACTION' => undef
2045 }, 'Parse::RecDescent' );
2046 }
↑ Summary lib/Parse/FieldPath.pm »