| line |
true |
false |
branch |
|
37
|
0 |
0 |
unless defined $rank_ref |
|
38
|
0 |
0 |
if $rank_ref == -1 |
|
54
|
1009 |
29315 |
unless defined $closure_name |
|
56
|
0 |
29315 |
if ($closure_name eq "") |
|
57
|
0 |
0 |
if defined $p_error |
|
62
|
16 |
29299 |
if $closure_name eq "::undef" |
|
63
|
24841 |
4458 |
if (substr($closure_name, 0, 2) eq "::" or substr($closure_name, 0, 1) eq "[") |
|
69
|
2994 |
1464 |
if (my $closure = $closures->{$closure_name}) |
|
70
|
0 |
2994 |
if ($trace_actions) |
|
71
|
0 |
0 |
unless print {$Marpa::R2::Internal::TRACE_FH;} qq[Resolved "$closure_name" to explicit closure\n] |
|
80
|
800 |
664 |
if ($closure_name =~ /([:][:])|[']/msx) |
|
84
|
664 |
800 |
unless ($fully_qualified_name) |
|
87
|
0 |
664 |
unless (defined $resolve_package) |
|
109
|
1300 |
164 |
if (defined $closure) |
|
119
|
35 |
129 |
if (defined $closure and defined ${$closure;}) |
|
135
|
1335 |
129 |
if (defined $closure) |
|
136
|
0 |
1335 |
if ($trace_actions) |
|
137
|
0 |
0 |
unless print {$Marpa::R2::Internal::TRACE_FH;} qq[Successful resolution of action "$closure_name" as $type ], "to ", $fully_qualified_name, "\n" |
|
145
|
129 |
0 |
if ($trace_actions or defined $p_error) |
|
148
|
0 |
516 |
if (defined *{$fully_qualified_name;}{$slot}) |
|
152
|
0 |
0 |
if ($trace_actions) |
|
153
|
0 |
0 |
unless print {$Marpa::R2::Internal::TRACE_FH;} $error |
|
157
|
0 |
0 |
if defined $p_error |
|
166
|
129 |
0 |
if defined $p_error |
|
167
|
0 |
129 |
if ($trace_actions) |
|
168
|
0 |
0 |
unless print {$Marpa::R2::Internal::TRACE_FH;} $error |
|
183
|
37540 |
3959 |
unless defined $semantics |
|
194
|
8871 |
22493 |
unless defined $blessing |
|
195
|
8871 |
22493 |
if $blessing eq "::undef" |
|
199
|
0 |
22493 |
unless (defined $bless_package) |
|
215
|
37789 |
3710 |
unless defined $blessing |
|
216
|
0 |
3710 |
if $blessing eq "::undef" |
|
217
|
0 |
3710 |
if ($blessing =~ /\A [:][:] /msx) |
|
224
|
0 |
3710 |
if ($blessing =~ / [:][:] /msx) |
|
229
|
0 |
3710 |
unless (defined $bless_package) |
|
251
|
2 |
2 |
if (scalar @_ == 1 and ref $_[0]) |
|
265
|
0 |
2 |
unless defined $valuator |
|
286
|
10 |
50 |
if ($arg eq "fatal_error") |
|
287
|
10 |
40 |
if ($arg eq "grammar") |
|
288
|
10 |
30 |
if ($arg eq "where") |
|
289
|
10 |
20 |
if ($arg eq "long_where") |
|
290
|
10 |
10 |
if ($arg eq "warnings") |
|
291
|
10 |
0 |
if ($arg eq "eval_ok") |
|
301
|
6 |
4 |
unless $fatal_error_ref_type |
|
302
|
4 |
0 |
if ($fatal_error_ref_type eq $CONTEXT_EXCEPTION_CLASS) |
|
304
|
2 |
2 |
if defined $exception_object |
|
306
|
2 |
0 |
if defined $exception_message |
|
332
|
0 |
6 |
if ($false_eval) |
|
336
|
4 |
2 |
if ($fatal_error) |
|
339
|
2 |
4 |
if ($warnings_count) |
|
344
|
0 |
6 |
unless (scalar @problems) |
|
360
|
4 |
2 |
if ($fatal_error) |
|
383
|
0 |
0 |
if ($op_name eq "bless") |
|
388
|
0 |
0 |
if ($op_name eq "push_constant") |
|
393
|
0 |
0 |
if ($op_name eq "push_one") |
|
398
|
0 |
0 |
if ($op_name eq "result_is_rhs_n") |
|
403
|
0 |
0 |
if ($op_name eq "result_is_n_of_sequence") |
|
408
|
0 |
0 |
if ($op_name eq "result_is_constant") |
|
413
|
0 |
0 |
if ($op_name eq "alternative") |
|
428
|
0 |
1410 |
if $recce->[26] |
|
430
|
222 |
1188 |
if $ordering |
|
441
|
20 |
1168 |
unless ($bocage) |
|
451
|
95 |
1073 |
if ($ranking_method eq "high_rule_only") |
|
455
|
8 |
1065 |
if ($ranking_method eq "rule") |
|
471
|
2408 |
28957 |
unless defined $action_name |
|
475
|
1 |
28956 |
unless ($resolution) |
|
491
|
1 |
0 |
if $Marpa::R2::Context::slr |
|
511
|
80 |
746 |
if (not defined $package_source and defined $per_parse_arg and my $arg_blessing = &Scalar::Util::blessed($per_parse_arg)) |
|
523
|
237 |
931 |
if ($package_source eq "legacy") |
|
532
|
237 |
931 |
$package_source eq 'legacy' ? : |
|
536
|
979 |
189 |
unless defined $constructor_package |
|
542
|
61 |
128 |
if ($resolution) |
|
547
|
128 |
0 |
if $package_source ne "legacy" |
|
560
|
0 |
1168 |
unless $default_action_resolution |
|
568
|
10 |
1158 |
if ($default_empty_action) |
|
572
|
0 |
10 |
unless $default_empty_action_resolution |
|
584
|
13 |
2395 |
if (not defined $rule_resolution and $default_empty_action and $grammar_c->rule_length($rule_id) == 0) |
|
593
|
0 |
31364 |
unless ($rule_resolution) |
|
599
|
0 |
0 |
if defined $action |
|
603
|
0 |
0 |
if defined $recce_error |
|
614
|
22493 |
8871 |
if ($blessing ne "::undef") |
|
615
|
0 |
22493 |
if $semantics eq "::!default" |
|
617
|
94 |
22399 |
if $semantics eq "::array" |
|
619
|
22399 |
0 |
if substr($semantics, 0, 1) eq "[" |
|
634
|
0 |
1167 |
if ($trace_actions >= 2) |
|
638
|
0 |
0 |
unless say {$trace_file_handle;} "Rule ", $grammar->brief_rule($rule_id), qq[ resolves to "$resolution_name"] |
|
650
|
0 |
41499 |
unless (defined $semantics) |
|
663
|
0 |
41499 |
unless (defined $blessing) |
|
715
|
22974 |
8022 |
if ("[" eq substr($semantics, 0, 1) and "]" eq substr($semantics, -1, 1)) |
|
730
|
8022 |
0 |
if $allowed_semantics->{$semantics} |
|
732
|
0 |
0 |
if $semantics =~ / \A rhs \d+ \z /msx |
|
748
|
8623 |
22373 |
if $blessing eq "::undef" |
|
749
|
0 |
22373 |
if ($closure) |
|
751
|
0 |
0 |
if ($ref_type eq "SCALAR") |
|
768
|
94 |
22279 |
if $semantics eq "::array" |
|
769
|
22279 |
0 |
if substr($semantics, 0, 1) eq "[" |
|
790
|
2122 |
28874 |
if $grammar_c->rule_is_nullable($rule_id) |
|
801
|
29536 |
2112 |
unless defined $rule_ids |
|
805
|
0 |
2112 |
if $rule_count <= 0 |
|
808
|
2102 |
10 |
if ($rule_count == 1) |
|
812
|
0 |
2102 |
if ($trace_actions) |
|
814
|
0 |
0 |
unless say {$trace_file_handle;} qq[Nulled symbol "$lhs_name" ], qq[ resolved to "$resolution_name" from rule ], $grammar->brief_rule($resolution_rule) |
|
828
|
9 |
1 |
if (scalar @empty_rules) |
|
832
|
0 |
9 |
if ($trace_actions) |
|
834
|
0 |
0 |
unless say {$trace_file_handle;} qq[Nulled symbol "$lhs_name" ], qq[ resolved to "$resolution_name" from rule ], $grammar->brief_rule($resolution_rule) |
|
857
|
0 |
1 |
if ($first_closure_name ne $other_closure_name or $first_semantics ne $other_semantics or $first_blessing ne $other_blessing) |
|
879
|
0 |
1 |
if ($trace_actions) |
|
881
|
0 |
0 |
unless say {$trace_file_handle;} qq[Nulled symbol "$lhs_name" ], qq[ resolved to "$resolution_name" from rule ], $grammar->brief_rule($resolution_rule) |
|
909
|
0 |
41075 |
unless ($semantics) |
|
913
|
3933 |
37142 |
if (substr($semantics, 0, 1) eq "[") |
|
920
|
0 |
37142 |
unless ($allowed_semantics->{$semantics}) |
|
931
|
0 |
41075 |
unless ($blessing) |
|
935
|
37389 |
3686 |
if $blessing eq "::undef" |
|
937
|
3686 |
0 |
if $blessing =~ /\A [[:alpha:]] [:\w]* \z /msx |
|
979
|
29536 |
2112 |
unless defined $semantic_rule |
|
989
|
1721 |
29275 |
if $semantics eq "::!default" |
|
990
|
5032 |
25964 |
if $semantics eq "::array" |
|
991
|
28 |
30968 |
if $semantics eq "::whatever" |
|
992
|
1222 |
29774 |
if $semantics eq "::first" |
|
1002
|
37142 |
3933 |
if $semantics eq "::!default" |
|
1003
|
0 |
41075 |
if $semantics eq "::array" |
|
1020
|
30996 |
41075 |
if (defined $rule_id) |
|
1033
|
4569 |
67502 |
if (defined $closure and ref $closure eq "CODE") |
|
1039
|
27370 |
40132 |
if (substr($semantics, 0, 1) eq "[") |
|
1049
|
1768 |
70303 |
if ($semantics eq "::undef") |
|
1055
|
41075 |
29228 |
unless defined $rule_id |
|
1057
|
24624 |
4604 |
unless defined $thingy_ref |
|
1059
|
0 |
4604 |
if ($ref_type eq "") |
|
1069
|
4569 |
35 |
if ($ref_type eq "CODE") |
|
1072
|
497 |
4072 |
if defined $nulling_symbol_id and defined $rule_id |
|
1077
|
30 |
5 |
if ($ref_type eq "SCALAR") |
|
1079
|
0 |
30 |
unless (defined $thingy) |
|
1091
|
5 |
0 |
if ($ref_type eq "REF") |
|
1106
|
37142 |
33126 |
if (defined $lexeme_id and $semantics eq "::value") |
|
1112
|
3933 |
29193 |
unless defined $rule_id |
|
1115
|
1222 |
27971 |
if ($semantics =~ /\A [:][:] rhs (\d+) \z/msx) |
|
1119
|
27971 |
1222 |
unless defined $singleton |
|
1122
|
0 |
1222 |
if ($is_discard_sequence_rule) |
|
1127
|
0 |
1222 |
if ($is_sequence_rule) |
|
1134
|
0 |
1222 |
unless (scalar @elements) |
|
1145
|
0 |
1222 |
unless (defined $singleton_element) |
|
1158
|
0 |
31904 |
unless (defined $array_fate) |
|
1166
|
26059 |
5845 |
if ($blessing ne "::undef") |
|
1170
|
0 |
31904 |
if substr($semantics, 0, 1) ne "[" |
|
1180
|
562 |
85397 |
if ($result_descriptor eq "g1start") |
|
1184
|
562 |
84835 |
if ($result_descriptor eq "g1len") |
|
1188
|
4 |
84831 |
if ($result_descriptor eq "g1length") |
|
1192
|
26108 |
58723 |
if ($result_descriptor eq "start") |
|
1196
|
26108 |
32615 |
if ($result_descriptor eq "length") |
|
1201
|
9 |
32606 |
if ($result_descriptor eq "lhs") |
|
1202
|
5 |
4 |
if (defined $rule_id) |
|
1207
|
4 |
0 |
if (defined $lexeme_id) |
|
1215
|
705 |
31901 |
if ($result_descriptor eq "name") |
|
1216
|
654 |
51 |
if (defined $rule_id) |
|
1221
|
51 |
0 |
if (defined $lexeme_id) |
|
1226
|
0 |
0 |
if (defined $nulling_symbol_id) |
|
1235
|
5 |
31896 |
if ($result_descriptor eq "symbol") |
|
1236
|
3 |
2 |
if (defined $rule_id) |
|
1242
|
2 |
0 |
if (defined $lexeme_id) |
|
1247
|
0 |
0 |
if (defined $nulling_symbol_id) |
|
1256
|
5 |
31891 |
if ($result_descriptor eq "rule") |
|
1257
|
3 |
2 |
if (defined $rule_id) |
|
1264
|
31891 |
0 |
if ($result_descriptor eq "values" or $result_descriptor eq "value") |
|
1267
|
3933 |
27958 |
if (defined $lexeme_id) |
|
1271
|
1447 |
26511 |
if ($is_sequence_rule) |
|
1272
|
513 |
934 |
$is_discard_sequence_rule ? : |
|
1280
|
25700 |
811 |
if ($rule_length > 0) |
|
1282
|
35250 |
14788 |
$mask->[$_] ? : |
|
1296
|
30996 |
41075 |
if (defined $rule_id) |
|
1300
|
2112 |
69959 |
if (defined $nulling_symbol_id) |
|
1305
|
41075 |
30996 |
if (defined $lexeme_id) |
|
1312
|
237 |
881 |
unless $Marpa::R2::Context::slr |
|
1322
|
555 |
326 |
unless $grammar_c->symbol_is_nullable($start_symbol_id) |
|
1327
|
326 |
522 |
if ($start_symbol_id == $lhs) |
|
1335
|
326 |
378 |
if ($nulling_symbol_id == $start_rhs_symbol_id) |
|
1373
|
5732 |
2350 |
if (scalar @_ != 1) |
|
1374
|
0 |
5732 |
if ref $slr ne "Marpa::R2::Scanless::R" |
|
1380
|
0 |
8082 |
if ($recce->[5] ne "tree") |
|
1391
|
0 |
8082 |
if $furthest_earleme > $last_completed_earleme |
|
1399
|
6944 |
1138 |
if ($tree) { } |
|
1407
|
4830 |
2114 |
if $package_source eq "semantics_package" |
|
1408
|
2114 |
0 |
if ($package_source eq "legacy") |
|
1409
|
0 |
2114 |
if (defined $per_parse_arg) |
|
1420
|
0 |
0 |
unless (defined $per_parse_arg) |
|
1434
|
0 |
0 |
unless (defined $arg_blessing) |
|
1450
|
0 |
0 |
if ($arg_blessing ne $required_blessing) |
|
1464
|
0 |
6944 |
unless ($tree) |
|
1472
|
0 |
6944 |
if ($max_parses and $parse_count > $max_parses) |
|
1482
|
20 |
1118 |
unless $order |
|
1488
|
0 |
8062 |
if ($recce->[17]) |
|
1489
|
0 |
0 |
unless print {$trace_file_handle;} "AND_NODES: ", $recce->show_and_nodes |
|
1493
|
0 |
8062 |
if ($recce->[20]) |
|
1494
|
0 |
0 |
unless print {$trace_file_handle;} "OR_NODES: ", $recce->show_or_nodes |
|
1498
|
0 |
8062 |
if ($recce->[18]) |
|
1499
|
0 |
0 |
unless print {$trace_file_handle;} "BOCAGE: ", $recce->show_bocage |
|
1503
|
109 |
7953 |
unless defined $tree->next |
|
1508
|
5682 |
2271 |
if defined $slr |
|
1512
|
1118 |
6835 |
unless ($recce->[32]) |
|
1519
|
48 |
7904 |
if defined $per_parse_arg |
|
1525
|
7897 |
7 |
unless defined $per_parse_constructor |
|
1528
|
4 |
3 |
if ($recce->[31] eq 'legacy') { } |
|
1554
|
0 |
7 |
if (not $eval_ok or @warnings) |
|
1569
|
5681 |
2271 |
if ($slr) { } |
|
1580
|
4654 |
2271 |
if defined $token_value |
|
1585
|
3 |
7949 |
$trace_values ? : |
|
1601
|
189766 |
0 |
if $trace_values <= 2 |
|
1602
|
0 |
0 |
if ($type eq "nulling") |
|
1603
|
0 |
0 |
unless say {$trace_file_handle;} "Registering semantics for nulling symbol: ", $grammar->symbol_name($id), "\n", " Semantics are ", show_semantics(@raw_ops) |
|
1611
|
0 |
0 |
unless say {$trace_file_handle;} "Registering semantics for ${type}: ", $grammar->symbol_name($id), "\n", " Semantics are ", show_semantics(@raw_ops) |
|
1619
|
28116 |
491380 |
if (ref $raw_op) |
|
1625
|
94226 |
95540 |
if ($type eq "token") |
|
1629
|
7291 |
88249 |
if ($type eq "nulling") |
|
1633
|
88249 |
0 |
if ($type eq "rule") |
|
1646
|
100 |
130174 |
if ($trace_values) |
|
1649
|
100 |
14 |
unless defined $event |
|
1651
|
14 |
0 |
if ($event_type eq "MARPA_STEP_TOKEN") |
|
1659
|
0 |
0 |
unless say {$trace_file_handle;} join(" ", "value event:", map({$_ // "undef";} $event_type, @event_data)) |
|
1663
|
0 |
100 |
if ($trace_values >= 9) |
|
1665
|
0 |
0 |
unless printf {$trace_file_handle;} "Stack position %3d:\n", $i |
|
1668
|
0 |
0 |
unless print {$trace_file_handle;} " ", "Data::Dumper"->new([\$value->absolute($i)])->Terse(1)->Dump |
|
1678
|
7942 |
122332 |
unless defined $value_type |
|
1679
|
30 |
122302 |
if $value_type eq "trace" |
|
1681
|
1324 |
120978 |
if ($value_type eq "MARPA_STEP_NULLING_SYMBOL") |
|
1703
|
0 |
1324 |
if (not $eval_ok or @warnings) |
|
1718
|
0 |
1324 |
if $trace_values |
|
1723
|
120929 |
49 |
if ($value_type eq "MARPA_STEP_RULE") |
|
1727
|
0 |
120929 |
unless defined $closure |
|
1730
|
120929 |
0 |
if (ref $closure eq 'CODE') { } |
|
1739
|
0 |
120929 |
if (&Scalar::Util::blessed($values)) |
|
1753
|
10 |
120919 |
if (not $eval_ok or @warnings) |
|
1772
|
18 |
120901 |
if ($trace_values) |
|
1773
|
0 |
18 |
unless say {$trace_file_handle;} trace_stack_1($grammar, $recce, $value, $values, $rule_id) |
|
1777
|
0 |
18 |
unless print {$trace_file_handle;} "Calculated and pushed value: ", "Data::Dumper"->new([$result])->Terse(1)->Dump |
|
1787
|
49 |
0 |
if ($value_type eq "MARPA_STEP_TRACE") |
|
1789
|
2 |
47 |
if (my $trace_output = trace_op($grammar, $recce, $value)) |
|
1790
|
0 |
2 |
unless print {$trace_file_handle;} $trace_output |
|
1837
|
1 |
20 |
unless defined $irl_id |
|
1852
|
7 |
16 |
if (defined $symbol) |
|
1856
|
16 |
7 |
if (defined $cause_id) |
|
1865
|
10 |
13 |
if (defined $predecessor_id) |
|
1908
|
45 |
38 |
if (defined $cause_id) { } |
|
1932
|
2 |
44 |
unless defined $parent |
|
1951
|
26 |
18 |
if (defined $cause) { } |
|
1959
|
0 |
44 |
if ($verbose) |
|
1960
|
0 |
0 |
defined $parent ? : |
|
1961
|
0 |
0 |
defined $predecessor ? : |
|
1962
|
0 |
0 |
defined $cause ? : |
|
1992
|
2 |
41 |
unless defined $origin |
|
2008
|
0 |
57 |
unless $Marpa::R2::Internal::Value::a->[0] <=> $Marpa::R2::Internal::Value::b->[0] or $Marpa::R2::Internal::Value::a->[1] <=> $Marpa::R2::Internal::Value::b->[1] or $Marpa::R2::Internal::Value::a->[2] <=> $Marpa::R2::Internal::Value::b->[2] |
|
2037
|
0 |
0 |
unless defined $origin |
|
2060
|
0 |
0 |
unless defined $parent |
|
2079
|
0 |
0 |
if (defined $cause) { } |
|
2099
|
4 |
40 |
unless defined $or_node_id |
|
2104
|
24 |
16 |
if ($tree->_marpa_t_nook_is_cause($nook_id)) |
|
2108
|
12 |
4 |
if ($tree->_marpa_t_nook_is_predecessor($nook_id)) |
|
2119
|
40 |
0 |
$tree->_marpa_t_nook_predecessor_is_ready($nook_id) ? : |
|
2124
|
40 |
0 |
$tree->_marpa_t_nook_cause_is_ready($nook_id) ? : |
|
2133
|
40 |
49 |
unless defined $and_node_id |
|
2135
|
40 |
9 |
if (defined $this_choice and $this_choice == $choice_ix) |
|
2152
|
4 |
40 |
unless defined $nook_text |
|
2165
|
0 |
14 |
unless (defined $nook_ix) |
|
2166
|
0 |
0 |
unless print {$Marpa::R2::Internal::TRACE_FH;} "Nulling valuator\n" |
|
2175
|
14 |
0 |
if (defined $token_id) |
|
2179
|
14 |
0 |
$token_name ? : |
|
|
0 |
14 |
unless print {$Marpa::R2::Internal::TRACE_FH;} "Pushed value from ", Marpa::R2::Recognizer::and_node_tag($recce, $and_node_id), ": ", $token_name ? "$token_name = " : "", "Data::Dumper"->new([\$token_value])->Terse(1)->Dump |
|
2220
|
17 |
32 |
unless $trace_values >= 2 |
|
2236
|
12 |
20 |
if $bocage->_marpa_b_or_node_position($or_node_id) != $grammar_c->_marpa_g_irl_length($trace_irl_id) |
|
2240
|
18 |
2 |
unless $virtual_rhs or $virtual_lhs |
|
2242
|
0 |
2 |
if ($virtual_rhs and not $virtual_lhs) |
|
2244
|
0 |
0 |
unless $trace_output .= join("", "Head of Virtual Rule: ", Marpa::R2::Recognizer::and_node_tag($recce, $and_node_id), ", rule: ", $grammar->brief_irl($trace_irl_id), "\n", "Incrementing virtual rule by ", $grammar_c->_marpa_g_real_symbol_count($trace_irl_id), " symbols", "\n") |
|
2258
|
0 |
2 |
if ($virtual_lhs and $virtual_rhs) |
|
2272
|
2 |
0 |
if (not $virtual_rhs and $virtual_lhs) |