line |
true |
false |
branch |
325
|
967 |
0 |
if (slr->t_ref_count <= 0) |
346
|
0 |
0 |
if (op_id >= (int)Dim(op_name_by_id_object)) return "unknown"; |
355
|
9614 |
0 |
while (hi >= lo) |
360
|
2475 |
7139 |
if (!cmp) |
362
|
3214 |
3925 |
if (cmp < 0) |
388
|
0 |
1249 |
if (slr->t_event_count >= slr->t_event_capacity) |
391
|
0 |
0 |
Renew (slr->t_events, slr->t_event_capacity, union marpa_slr_event_s); |
403
|
0 |
30835 |
if (slr->t_lexeme_count >= slr->t_lexeme_capacity) |
406
|
0 |
0 |
Renew (slr->t_lexemes, slr->t_lexeme_capacity, union marpa_slr_event_s); |
611
|
8 |
0 |
if (event_code >= 0 && event_code < MARPA_ERROR_COUNT) { |
|
127 |
0 |
if (event_code >= 0 && event_code < MARPA_ERROR_COUNT) { |
621
|
12 |
0 |
if (step_type >= 0 && step_type < MARPA_STEP_COUNT) { |
|
49 |
0 |
if (step_type >= 0 && step_type < MARPA_STEP_COUNT) { |
|
8106 |
0 |
if (step_type >= 0 && step_type < MARPA_STEP_COUNT) { |
|
0 |
0 |
if (step_type >= 0 && step_type < MARPA_STEP_COUNT) { |
|
0 |
0 |
if (step_type >= 0 && step_type < MARPA_STEP_COUNT) { |
|
0 |
0 |
if (step_type >= 0 && step_type < MARPA_STEP_COUNT) { |
|
0 |
0 |
if (step_type >= 0 && step_type < MARPA_STEP_COUNT) { |
|
0 |
0 |
if (step_type >= 0 && step_type < MARPA_STEP_COUNT) { |
|
0 |
0 |
if (step_type >= 0 && step_type < MARPA_STEP_COUNT) { |
|
25175 |
0 |
if (step_type >= 0 && step_type < MARPA_STEP_COUNT) { |
|
14 |
0 |
if (step_type >= 0 && step_type < MARPA_STEP_COUNT) { |
|
0 |
0 |
if (step_type >= 0 && step_type < MARPA_STEP_COUNT) { |
649
|
0 |
0 |
output_string = form ("(development) %s", |
653
|
0 |
0 |
output_string = form ("Internal error (%s)", |
657
|
25 |
0 |
if (error_code >= 0 && error_code < MARPA_ERROR_COUNT) { |
661
|
0 |
25 |
if (!suggested_description) |
663
|
0 |
0 |
if (error_string) |
672
|
0 |
25 |
if (error_string) |
681
|
1 |
24 |
if (buffer) Safefree(buffer); |
693
|
0 |
0 |
if (buffer) Safefree(buffer); |
752
|
1308 |
0 |
SET_G_WRAPPER_FROM_G_SV(g_wrapper, g_sv); |
756
|
0 |
1308 |
if (highest_symbol_id < 0) |
758
|
0 |
0 |
if (!g_wrapper->throw) |
767
|
0 |
1308 |
Newx (r_wrapper->terminals_buffer, highest_symbol_id + 1, Marpa_Symbol_ID); |
798
|
27287 |
944 |
if (!r0) |
814
|
0 |
28231 |
if (r0) |
819
|
0 |
28231 |
if (!r0) |
821
|
0 |
0 |
if (!lexer_wrapper->throw) |
825
|
19 |
28212 |
if (too_many_earley_items >= 0) |
833
|
28231 |
0 |
if (count < 0) |
838
|
555328 |
28231 |
for (i = 0; i < count; i++) |
843
|
543958 |
11370 |
if (assertion >= 0 && marpa_r_zwa_default_set (r0, assertion, 1) < 0) |
|
0 |
543958 |
if (assertion >= 0 && marpa_r_zwa_default_set (r0, assertion, 1) < 0) |
850
|
0 |
555328 |
if (trace_lexers >= 1 || trace_terminals > 2) |
864
|
28231 |
0 |
if (gp_result == -1) |
866
|
0 |
28231 |
if (gp_result < 0) |
868
|
0 |
0 |
if (lexer_wrapper->throw) |
889
|
8794 |
8794 |
for (event_ix = 0; event_ix < event_count; event_ix++) |
918
|
0 |
0 |
if (result_string) |
961
|
28231 |
4441 |
if (!r) |
964
|
0 |
28231 |
if (!r) |
969
|
32672 |
0 |
input = (U8 *) SvPV (slr->input, len); |
978
|
111846 |
335 |
if (slr->perl_pos >= slr->end_pos) |
981
|
9402 |
102444 |
if (input_is_utf8) |
985
|
0 |
9402 |
utf8_to_uvchr_buf (input + OFFSET_IN_INPUT (slr), |
|
9318 |
84 |
utf8_to_uvchr_buf (input + OFFSET_IN_INPUT (slr), |
|
9318 |
84 |
utf8_to_uvchr_buf (input + OFFSET_IN_INPUT (slr), |
993
|
0 |
9402 |
if (codepoint == 0 && codepoint_length != 1) |
|
0 |
0 |
if (codepoint == 0 && codepoint_length != 1) |
1000
|
101331 |
1113 |
codepoint = (UV) input[OFFSET_IN_INPUT (slr)]; |
1004
|
111519 |
327 |
if (codepoint < Dim (slr->slg->per_codepoint_array)) |
1007
|
4353 |
107166 |
if (!ops) |
1019
|
88 |
239 |
if (!p_ops_sv) |
1024
|
239 |
0 |
ops = (IV *) SvPV (*p_ops_sv, dummy); |
1027
|
0 |
107405 |
if (trace_lexers >= 1) |
1037
|
716102 |
79509 |
for (op_ix = 2; op_ix < op_count; op_ix++) |
1050
|
0 |
608697 |
if (op_ix >= op_count) |
1058
|
0 |
608697 |
if (op_ix + 2 >= op_count) |
1076
|
0 |
511777 |
if (trace_lexers >= 1) |
1086
|
0 |
96920 |
if (trace_lexers >= 1) |
1117
|
19100 |
88303 |
if (tokens_accepted < 1) |
1123
|
8794 |
79509 |
if (result > 0) |
1127
|
0 |
8794 |
if (marpa_r_is_exhausted (r)) |
1133
|
0 |
79509 |
if (result == -2) |
1137
|
0 |
0 |
if (error == MARPA_ERR_PARSE_EXHAUSTED) |
1142
|
0 |
79509 |
if (result < 0) |
1158
|
79509 |
0 |
if (trace_lexers) |
1176
|
0 |
1903 |
if (start_pos_arg < 0) { |
1181
|
1903 |
0 |
if (new_perl_pos < 0 || new_perl_pos > slr->pos_db_logical_size) |
|
0 |
1903 |
if (new_perl_pos < 0 || new_perl_pos > slr->pos_db_logical_size) |
1186
|
1708 |
195 |
if (length_arg < 0) { |
1191
|
1903 |
0 |
if (new_end_pos < 0 || new_end_pos > slr->pos_db_logical_size) |
|
0 |
1903 |
if (new_end_pos < 0 || new_end_pos > slr->pos_db_logical_size) |
1209
|
22044 |
0 |
char *input = SvPV (slr->input, dummy); |
1211
|
20306 |
1738 |
int start_offset = POS_TO_OFFSET (slr, start_pos); |
1213
|
22044 |
0 |
POS_TO_OFFSET (slr, |
1216
|
1525 |
20519 |
if (SvUTF8(slr->input)) { |
1233
|
0 |
216 |
start_pos_arg < 0 ? input_length + start_pos_arg : start_pos_arg; |
1234
|
0 |
216 |
if (start_pos < 0 || start_pos > input_length) |
1240
|
0 |
216 |
length_arg < 0 ? input_length + length_arg + 1 : start_pos + length_arg; |
1241
|
0 |
216 |
if (end_pos < 0 || end_pos > input_length) |
1256
|
3800 |
0 |
if (v_wrapper->mode == MARPA_XS_V_MODE_IS_RAW) |
1303
|
0 |
68244 |
if (!p_ops_sv) |
1308
|
68244 |
0 |
ops = (IV *) SvPV (*p_ops_sv, dummy); |
1315
|
0 |
44767 |
if (!p_ops_sv) |
1320
|
44767 |
0 |
ops = (IV *) SvPV (*p_ops_sv, dummy); |
1327
|
0 |
8859 |
if (!p_ops_sv) |
1333
|
8859 |
0 |
ops = (IV *) SvPV (*p_ops_sv, dummy); |
1346
|
0 |
330619 |
if (v_wrapper->trace_values >= 3) |
1351
|
0 |
0 |
if (!result_string) |
1378
|
33 |
0 |
if (p_constant_sv) |
1382
|
0 |
33 |
if (!stored_sv) |
1392
|
0 |
33 |
if (v_wrapper->trace_values && step_type == MARPA_STEP_TOKEN) |
|
0 |
0 |
if (v_wrapper->trace_values && step_type == MARPA_STEP_TOKEN) |
1397
|
0 |
0 |
if (!result_string) |
1401
|
0 |
0 |
if (p_constant_sv) { |
1420
|
0 |
2361 |
if (step_type != MARPA_STEP_RULE) |
1425
|
2353 |
8 |
if (stack_offset == 0) |
1436
|
8 |
0 |
if (op_code == MARPA_OP_RESULT_IS_RHS_N) |
1438
|
8 |
0 |
if (stack_offset > 0) |
1450
|
0 |
0 |
if (stack_offset >= 0) |
1464
|
8 |
0 |
if (fetch_ix > marpa_v_arg_n (v) || fetch_ix < result_ix) |
|
0 |
8 |
if (fetch_ix > marpa_v_arg_n (v) || fetch_ix < result_ix) |
1471
|
0 |
8 |
if (!p_sv) |
1477
|
0 |
8 |
if (!stored_av) |
1493
|
8 |
40632 |
if (!values_av) |
1498
|
39215 |
1425 |
if (blessing) |
1502
|
39215 |
0 |
if (p_blessing_sv && SvPOK (*p_blessing_sv)) |
|
39215 |
0 |
if (p_blessing_sv && SvPOK (*p_blessing_sv)) |
1505
|
39215 |
0 |
char *classname = SvPV (*p_blessing_sv, blessing_length); |
1514
|
0 |
40640 |
if (!stored_av) |
1528
|
749 |
13387 |
if (!values_av) |
1540
|
8529 |
0 |
if (slr && token_ix == TOKEN_VALUE_IS_LITERAL) |
1555
|
0 |
0 |
if (p_token_value_sv) |
1571
|
3254 |
2334 |
int increment = op_code == MARPA_OP_PUSH_SEQUENCE ? 2 : 1; |
1573
|
5588 |
12079 |
for (stack_ix = result_ix; stack_ix <= arg_n; |
1577
|
121 |
11958 |
if (!p_sv) |
1599
|
0 |
2 |
if (!values_av) |
1612
|
521 |
373 |
if (!values_av) |
1617
|
894 |
0 |
if (p_constant_sv) |
1635
|
23797 |
51345 |
if (!values_av) |
1639
|
1699 |
73443 |
if (step_type != MARPA_STEP_RULE) |
1645
|
706 |
72737 |
if (!p_sv) |
1663
|
38914 |
192 |
if (!values_av) |
1667
|
0 |
39106 |
if (!slr) |
1697
|
0 |
39106 |
if (!values_av) |
1701
|
0 |
39106 |
if (!slr) |
1747
|
568 |
4 |
if (!values_av) |
1751
|
0 |
572 |
if (!slr) |
1780
|
0 |
576 |
if (!values_av) |
1784
|
0 |
576 |
if (!slr) |
1846
|
0 |
23841 |
if (!values_av) |
1859
|
23841 |
1334 |
sv_2mortal (newSViv |
1864
|
23917 |
1258 |
if (values_av) |
1869
|
0 |
23917 |
if (blessing) |
1873
|
0 |
0 |
if (p_blessing_sv && SvPOK (*p_blessing_sv)) |
|
0 |
0 |
if (p_blessing_sv && SvPOK (*p_blessing_sv)) |
1877
|
0 |
0 |
SvPV (*p_blessing_sv, blessing_length); |
1894
|
0 |
36238 |
if (step_type != MARPA_STEP_TOKEN) |
1899
|
13299 |
22939 |
if (slr && token_ix == TOKEN_VALUE_IS_LITERAL) |
1911
|
0 |
13299 |
if (!stored_sv) |
1920
|
12824 |
10115 |
if (p_token_value_sv) |
1924
|
0 |
12824 |
if (!stored_sv) |
1935
|
14 |
12810 |
if (v_wrapper->trace_values) |
1941
|
0 |
14 |
if (!step_type_string) |
1946
|
14 |
0 |
event_data[3] = *p_token_value_sv ? newSVsv (*p_token_value_sv) : &PL_sv_undef; |
1958
|
0 |
0 |
if (!step_type_string) |
2004
|
0 |
677 |
if (!r0) |
2012
|
669 |
8 |
while (earley_set > 0) |
2017
|
669 |
0 |
if (return_value < 0) |
2030
|
0 |
686 |
if (rule_id <= -2) |
2035
|
684 |
2 |
if (rule_id == -1) |
2037
|
681 |
3 |
if (origin != 0) |
2039
|
681 |
0 |
if (dot_position != -1) |
2042
|
669 |
12 |
if (g1_lexeme == -1) |
2048
|
667 |
2 |
if (g1_lexeme <= -2) |
2051
|
0 |
667 |
if (slr->trace_terminals) |
2068
|
371 |
296 |
if (slr->l0_rule_r_properties[rule_id]. |
2094
|
0 |
2 |
if (slr->trace_terminals) |
2109
|
2 |
0 |
if (lexemes_found) |
2143
|
590 |
387 |
for (event_ix = 0; event_ix < event_count; event_ix++) |
2211
|
355 |
1502 |
for (event_ix = 0; event_ix < event_count; event_ix++) |
2279
|
0 |
8 |
if (!result_string) |
2321
|
0 |
27554 |
if (!r0) |
2331
|
27533 |
27 |
for (earley_set = marpa_r_latest_earley_set (r0); earley_set > 0; |
2339
|
27533 |
0 |
if (return_value < 0) |
2346
|
108678 |
27533 |
while (!end_of_earley_items) |
2358
|
0 |
108678 |
if (rule_id <= -2) |
2363
|
81145 |
27533 |
if (rule_id == -1) |
2368
|
76914 |
4231 |
if (origin != 0) |
2370
|
74721 |
2193 |
if (dot_position != -1) |
2374
|
30835 |
43886 |
if (g1_lexeme == -1) |
2378
|
12492 |
18343 |
if (g1_lexeme <= -2) |
2396
|
373 |
17970 |
if (!is_expected) |
2400
|
0 |
373 |
if (symbol_g_properties->latm) |
2426
|
15037 |
2933 |
if (!is_priority_set || this_lexeme_priority > high_lexeme_priority) |
2453
|
6 |
27527 |
if (discarded || rejected || is_priority_set) |
2459
|
12518 |
15036 |
if (is_priority_set) |
2462
|
29 |
12489 |
} else if (discarded) { |
2477
|
30835 |
27554 |
for (i = 0; i < slr->gift->t_lexeme_count; i++) |
2484
|
14 |
17956 |
if (lexeme_stack_event->t_lexeme_acceptable.t_priority < |
2491
|
0 |
14 |
if (slr->trace_terminals) |
2499
|
369 |
4 |
if (slr->trace_terminals || !is_priority_set) |
|
3 |
366 |
if (slr->trace_terminals || !is_priority_set) |
2505
|
13 |
12479 |
if (slr->trace_terminals) |
2509
|
12489 |
3 |
if (pass1_result == discard) |
2516
|
114 |
12375 |
if (!l0_rule_r_properties->t_event_on_discard_active) |
2537
|
12489 |
15065 |
if (pass1_result == discard) { |
2542
|
15036 |
29 |
if (pass1_result != accept) { |
2557
|
18342 |
15036 |
for (i = 0; i < slr->gift->t_lexeme_count; i++) |
2561
|
17956 |
386 |
if (event_type == MARPA_SLRTR_LEXEME_ACCEPTABLE) |
2567
|
192 |
17764 |
if (symbol_r_properties->t_pause_before_active) |
2575
|
0 |
192 |
if (slr->trace_terminals > 2) |
2596
|
14844 |
192 |
if (g1_lexeme >= 0) |
2606
|
18150 |
14844 |
for (i = 0; i < slr->gift->t_lexeme_count; i++) |
2610
|
17764 |
386 |
if (event_type == MARPA_SLRTR_LEXEME_ACCEPTABLE) |
2617
|
0 |
17764 |
if (slr->trace_terminals > 2) |
2636
|
0 |
0 |
if (slr->trace_terminals) |
2649
|
16 |
17748 |
if (slr->trace_terminals) |
2658
|
196 |
17568 |
if (symbol_r_properties->t_pause_after_active) |
2665
|
0 |
196 |
if (slr->trace_terminals > 2) |
2700
|
0 |
14844 |
if (return_value < 0) |
2706
|
387 |
14457 |
if (return_value > 0) |
2729
|
27 |
111554 |
if (earley_set <= 0) |
2742
|
0 |
111581 |
if (result < 0) |
2758
|
187 |
98054 |
if (start_earley_set >= latest_earley_set) |
2766
|
38919 |
59135 |
if (length == 0) |
2768
|
10052 |
88002 |
if (length > 1) |
2783
|
21828 |
0 |
if (length > 0) |
2809
|
0 |
0 |
if (old_level || new_level) |
2820
|
17500 |
175 |
for (error_code = 0; error_code < MARPA_ERROR_COUNT; error_code++) |
2823
|
3 |
17497 |
XPUSHs (sv_2mortal (newSVpv (error_name, 0))); |
2837
|
2475 |
0 |
if (op_id >= 0) |
2861
|
0 |
1 |
if (result < 0) { XSRETURN_UNDEF; } |
2862
|
0 |
1 |
XPUSHs (sv_2mortal (newSViv (version[0]))); |
2863
|
0 |
1 |
XPUSHs (sv_2mortal (newSViv (version[1]))); |
2864
|
0 |
1 |
XPUSHs (sv_2mortal (newSViv (version[2]))); |
2896
|
0 |
1 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
|
0 |
0 |
throw = throw_sv && SvTRUE (throw_sv); |
2906
|
772 |
0 |
if (!SvROK (arg) || SvTYPE (SvRV (arg)) != SVt_PVHV) |
|
0 |
772 |
if (!SvROK (arg) || SvTYPE (SvRV (arg)) != SVt_PVHV) |
2910
|
772 |
772 |
while ((arg_value = hv_iternextsv (named_args, &key, &retlen))) |
2912
|
772 |
0 |
if ((*key == 'i') && strnEQ (key, "if", (unsigned) retlen)) |
|
0 |
772 |
if ((*key == 'i') && strnEQ (key, "if", (unsigned) retlen)) |
|
0 |
0 |
if ((*key == 'i') && strnEQ (key, "if", (unsigned) retlen)) |
|
0 |
0 |
if ((*key == 'i') && strnEQ (key, "if", (unsigned) retlen)) |
|
0 |
0 |
if ((*key == 'i') && strnEQ (key, "if", (unsigned) retlen)) |
|
772 |
0 |
if ((*key == 'i') && strnEQ (key, "if", (unsigned) retlen)) |
2914
|
772 |
0 |
interface = SvIV (arg_value); |
2915
|
0 |
772 |
if (interface != 1) |
2923
|
0 |
772 |
if (interface != 1) |
2948
|
773 |
0 |
if (error_code != MARPA_ERR_NONE |
2949
|
773 |
0 |
|| version[0] != EXPECTED_LIBMARPA_MAJOR |
2950
|
773 |
0 |
|| version[1] != EXPECTED_LIBMARPA_MINOR |
2951
|
0 |
773 |
|| version[2] != EXPECTED_LIBMARPA_MICRO) |
2962
|
773 |
0 |
if (g) |
2974
|
0 |
773 |
XPUSHs (sv); |
2981
|
0 |
773 |
if (error_code != MARPA_ERR_NONE) |
2984
|
0 |
0 |
if (error_code >= 0 && error_code < MARPA_ERROR_COUNT) |
2988
|
0 |
0 |
if (throw) |
2990
|
0 |
0 |
if (GIMME != G_ARRAY) |
|
0 |
0 |
if (GIMME != G_ARRAY) |
2994
|
0 |
0 |
XPUSHs (&PL_sv_undef); |
2995
|
0 |
0 |
XPUSHs (sv_2mortal (newSViv (error_code))); |
3005
|
24 |
749 |
if (g_wrapper->message_buffer) |
3023
|
0 |
127 |
if (result < 0) |
3025
|
0 |
0 |
if (!g_wrapper->throw) |
3032
|
0 |
127 |
if (!result_string) |
3039
|
0 |
127 |
XPUSHs (sv_2mortal (newSVpv (result_string, 0))); |
3040
|
0 |
127 |
XPUSHs (sv_2mortal (newSViv (marpa_g_event_value (&event)))); |
3060
|
44668 |
396 |
if (length <= 0) { |
3064
|
0 |
44668 |
Newx(rhs, length, Marpa_Symbol_ID); |
3065
|
91158 |
44668 |
for (i = 0; i < length; i++) { |
3067
|
0 |
91158 |
if (elem == NULL) { |
3071
|
91158 |
0 |
rhs[i] = (Marpa_Symbol_ID)SvIV(*elem); |
3077
|
6 |
45058 |
if (new_rule_id < 0 && g_wrapper->throw ) { |
|
0 |
6 |
if (new_rule_id < 0 && g_wrapper->throw ) { |
3080
|
0 |
45064 |
XPUSHs( sv_2mortal( newSViv(new_rule_id) ) ); |
3101
|
4379 |
0 |
if (args) |
3107
|
8213 |
4379 |
while ((arg_value = hv_iternextsv (args, &key, &retlen))) |
3109
|
0 |
8213 |
if ((*key == 'k') && strnEQ (key, "keep", (unsigned) retlen)) |
|
0 |
0 |
if ((*key == 'k') && strnEQ (key, "keep", (unsigned) retlen)) |
|
0 |
0 |
if ((*key == 'k') && strnEQ (key, "keep", (unsigned) retlen)) |
|
0 |
0 |
if ((*key == 'k') && strnEQ (key, "keep", (unsigned) retlen)) |
3111
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
3115
|
4379 |
3834 |
if ((*key == 'm') && strnEQ (key, "min", (unsigned) retlen)) |
|
0 |
4379 |
if ((*key == 'm') && strnEQ (key, "min", (unsigned) retlen)) |
|
0 |
0 |
if ((*key == 'm') && strnEQ (key, "min", (unsigned) retlen)) |
|
0 |
0 |
if ((*key == 'm') && strnEQ (key, "min", (unsigned) retlen)) |
|
0 |
0 |
if ((*key == 'm') && strnEQ (key, "min", (unsigned) retlen)) |
|
0 |
0 |
if ((*key == 'm') && strnEQ (key, "min", (unsigned) retlen)) |
|
4379 |
0 |
if ((*key == 'm') && strnEQ (key, "min", (unsigned) retlen)) |
3117
|
4379 |
0 |
IV raw_min = SvIV (arg_value); |
3118
|
0 |
4379 |
if (raw_min < 0) |
3123
|
0 |
0 |
if (g_wrapper->throw) |
3132
|
0 |
4379 |
if (raw_min > INT_MAX) |
3139
|
0 |
0 |
if (g_wrapper->throw) |
3151
|
1917 |
1917 |
if ((*key == 'p') && strnEQ (key, "proper", (unsigned) retlen)) |
|
0 |
1917 |
if ((*key == 'p') && strnEQ (key, "proper", (unsigned) retlen)) |
|
0 |
0 |
if ((*key == 'p') && strnEQ (key, "proper", (unsigned) retlen)) |
|
1917 |
0 |
if ((*key == 'p') && strnEQ (key, "proper", (unsigned) retlen)) |
3153
|
1917 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
1917 |
if (SvTRUE (arg_value)) |
|
0 |
1917 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
247 |
1670 |
if (SvTRUE (arg_value)) |
|
247 |
0 |
if (SvTRUE (arg_value)) |
|
247 |
0 |
if (SvTRUE (arg_value)) |
|
247 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
247 |
if (SvTRUE (arg_value)) |
|
1670 |
0 |
if (SvTRUE (arg_value)) |
|
1670 |
0 |
if (SvTRUE (arg_value)) |
|
1664 |
6 |
if (SvTRUE (arg_value)) |
|
0 |
1664 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
253 |
1664 |
if (SvTRUE (arg_value)) |
3157
|
1917 |
0 |
if ((*key == 's') && strnEQ (key, "separator", (unsigned) retlen)) |
|
0 |
1917 |
if ((*key == 's') && strnEQ (key, "separator", (unsigned) retlen)) |
|
0 |
0 |
if ((*key == 's') && strnEQ (key, "separator", (unsigned) retlen)) |
|
1917 |
0 |
if ((*key == 's') && strnEQ (key, "separator", (unsigned) retlen)) |
3159
|
1917 |
0 |
separator = (Marpa_Symbol_ID) SvIV (arg_value); |
3167
|
0 |
0 |
if (g_wrapper->throw) |
3179
|
0 |
4379 |
if (new_rule_id < 0 && g_wrapper->throw) |
|
0 |
0 |
if (new_rule_id < 0 && g_wrapper->throw) |
3181
|
0 |
0 |
switch (marpa_g_error (g, NULL)) |
3190
|
0 |
4379 |
XPUSHs (sv_2mortal (newSViv (new_rule_id))); |
3200
|
0 |
34464 |
if (gp_result == -2 && g_wrapper->throw) |
|
0 |
0 |
if (gp_result == -2 && g_wrapper->throw) |
3203
|
0 |
0 |
if (libmarpa_error_code != MARPA_ERR_NONE) |
3219
|
0 |
0 |
if (gp_result == -2 && g_wrapper->throw) |
|
0 |
0 |
if (gp_result == -2 && g_wrapper->throw) |
3222
|
0 |
0 |
if (libmarpa_error_code != MARPA_ERR_NONE) |
3237
|
0 |
0 |
if (gp_result == -2 && g_wrapper->throw) |
|
0 |
0 |
if (gp_result == -2 && g_wrapper->throw) |
3240
|
0 |
0 |
if (libmarpa_error_code != MARPA_ERR_NONE) |
3258
|
0 |
34458 |
if (gp_result == -2 && g_wrapper->throw) |
|
0 |
0 |
if (gp_result == -2 && g_wrapper->throw) |
3261
|
0 |
0 |
if (libmarpa_error_code != MARPA_ERR_NONE) |
3276
|
0 |
0 |
if (gp_result == -2 && g_wrapper->throw) |
|
0 |
0 |
if (gp_result == -2 && g_wrapper->throw) |
3279
|
0 |
0 |
if (libmarpa_error_code != MARPA_ERR_NONE) |
3297
|
0 |
0 |
if (gp_result == -2 && g_wrapper->throw) |
|
0 |
0 |
if (gp_result == -2 && g_wrapper->throw) |
3300
|
0 |
0 |
if (libmarpa_error_code != MARPA_ERR_NONE) |
3313
|
0 |
72844 |
if (boolean < 0 || boolean > 1) |
3319
|
0 |
72844 |
XPUSHs (sv_2mortal (newSViv (boolean))); |
3335
|
23 |
2 |
if (g_wrapper->libmarpa_error_code != MARPA_ERR_NONE) |
3337
|
0 |
25 |
if (g_wrapper->message_is_marpa_thin_error) |
3346
|
25 |
0 |
if (GIMME == G_ARRAY) |
|
25 |
0 |
if (GIMME == G_ARRAY) |
3348
|
0 |
25 |
XPUSHs (error_code_sv); |
3350
|
0 |
25 |
XPUSHs (sv_2mortal (newSVpv (error_message, 0))); |
3367
|
0 |
1308 |
if (!sv_isa (g_sv, "Marpa::R2::Thin::G")) |
3372
|
1308 |
0 |
SET_G_WRAPPER_FROM_G_SV (g_wrapper, g_sv); |
3375
|
0 |
1308 |
if (!r) |
3377
|
0 |
0 |
if (!g_wrapper->throw) |
3389
|
0 |
1308 |
XPUSHs (sv_to_return); |
3407
|
0 |
1195 |
if (boolean < 0 || boolean > 1) |
3413
|
0 |
1195 |
XPUSHs (sv_2mortal (newSViv (boolean))); |
3423
|
0 |
1308 |
if ( gp_result == -1 ) { XSRETURN_UNDEF; } |
3424
|
0 |
1308 |
if ( gp_result < 0 && r_wrapper->base->throw ) { |
|
0 |
0 |
if ( gp_result < 0 && r_wrapper->base->throw ) { |
3429
|
0 |
1308 |
XPUSHs (sv_2mortal (newSViv (gp_result))); |
3443
|
1216 |
14850 |
if (result == MARPA_ERR_NONE || r_wrapper->ruby_slippers || !base->throw) |
|
931 |
285 |
if (result == MARPA_ERR_NONE || r_wrapper->ruby_slippers || !base->throw) |
|
931 |
0 |
if (result == MARPA_ERR_NONE || r_wrapper->ruby_slippers || !base->throw) |
3459
|
0 |
2251 |
if (count < 0) |
3462
|
0 |
0 |
if (!base->throw) { XSRETURN_UNDEF; } |
3466
|
2251 |
0 |
EXTEND (SP, count); |
|
0 |
2251 |
EXTEND (SP, count); |
3467
|
52433 |
2251 |
for (i = 0; i < count; i++) |
3482
|
360 |
21347 |
if (rule_id == -1) |
3486
|
0 |
21347 |
if (rule_id < 0 && r_wrapper->base->throw) |
|
0 |
0 |
if (rule_id < 0 && r_wrapper->base->throw) |
3491
|
0 |
21347 |
XPUSHs (sv_2mortal (newSViv (rule_id))); |
3492
|
0 |
21347 |
XPUSHs (sv_2mortal (newSViv (position))); |
3493
|
0 |
21347 |
XPUSHs (sv_2mortal (newSViv (origin))); |
3511
|
20 |
1294 |
if (!b) |
3513
|
20 |
0 |
if (!r_wrapper->base->throw) { XSRETURN_UNDEF; } |
3526
|
0 |
1294 |
XPUSHs (sv); |
3554
|
0 |
1294 |
if (!o) |
3556
|
0 |
0 |
if (!b_wrapper->base->throw) { XSRETURN_UNDEF; } |
3569
|
0 |
1294 |
XPUSHs (sv); |
3597
|
0 |
1244 |
if (!t) |
3599
|
0 |
0 |
if (!o_wrapper->base->throw) { XSRETURN_UNDEF; } |
3612
|
0 |
1244 |
XPUSHs (sv); |
3640
|
0 |
3922 |
if (!v) |
3642
|
0 |
0 |
if (!t_wrapper->base->throw) |
3674
|
0 |
3922 |
XPUSHs (sv); |
3689
|
1519 |
2403 |
if (v_wrapper->slr) { |
3692
|
3800 |
122 |
if (v_wrapper->stack) |
3728
|
0 |
12920 |
if (token_ix <= TOKEN_VALUE_IS_LITERAL) |
3735
|
0 |
12920 |
if (!av_store (v_wrapper->token_values, (I32)token_ix, token_value)) |
3747
|
0 |
1519 |
if (v_wrapper->slr) |
3768
|
0 |
114 |
XPUSHs (sv_2mortal (event)); |
3782
|
122 |
8106 |
if (v_wrapper->mode == MARPA_XS_V_MODE_IS_INITIAL) { |
3785
|
0 |
8228 |
if (v_wrapper->mode != MARPA_XS_V_MODE_IS_RAW) { |
3786
|
0 |
0 |
if (v_wrapper->stack) { |
3791
|
122 |
8106 |
if (step_type == MARPA_STEP_INACTIVE) |
3795
|
0 |
8106 |
if (step_type < 0) |
3798
|
0 |
0 |
if (v_wrapper->base->throw) |
3802
|
0 |
0 |
XPUSHs (sv_2mortal |
3807
|
0 |
8106 |
if (!result_string) |
3812
|
0 |
0 |
if (v_wrapper->base->throw) |
3816
|
0 |
0 |
XPUSHs (sv_2mortal (newSVpv (error_message, 0))); |
3819
|
0 |
8106 |
XPUSHs (sv_2mortal (newSVpv (result_string, 0))); |
3820
|
2660 |
5446 |
if (step_type == MARPA_STEP_TOKEN) |
3823
|
0 |
2660 |
XPUSHs (sv_2mortal (newSViv (token_id))); |
3824
|
0 |
2660 |
XPUSHs (sv_2mortal (newSViv (marpa_v_token_value (v)))); |
3825
|
0 |
2660 |
XPUSHs (sv_2mortal (newSViv (marpa_v_result (v)))); |
3827
|
638 |
7468 |
if (step_type == MARPA_STEP_NULLING_SYMBOL) |
3830
|
0 |
638 |
XPUSHs (sv_2mortal (newSViv (token_id))); |
3831
|
0 |
638 |
XPUSHs (sv_2mortal (newSViv (marpa_v_result (v)))); |
3833
|
4808 |
3298 |
if (step_type == MARPA_STEP_RULE) |
3836
|
0 |
4808 |
XPUSHs (sv_2mortal (newSViv (rule_id))); |
3837
|
0 |
4808 |
XPUSHs (sv_2mortal (newSViv (marpa_v_arg_0 (v)))); |
3838
|
0 |
4808 |
XPUSHs (sv_2mortal (newSViv (marpa_v_arg_n (v)))); |
3848
|
0 |
3800 |
if (v_wrapper->mode != MARPA_XS_V_MODE_IS_INITIAL) |
3850
|
0 |
0 |
if (v_wrapper->stack) |
3855
|
0 |
3800 |
if (v_create_stack (v_wrapper) == -1) |
3870
|
47551 |
3800 |
for (ix = 0; ix <= highest_rule_id; ix++) |
3873
|
0 |
47551 |
if (!p_sv) |
3891
|
53856 |
3800 |
for (ix = 0; ix <= highest_symbol_id; ix++) |
3894
|
0 |
53856 |
if (!p_sv) |
3912
|
53856 |
3800 |
for (ix = 0; ix <= highest_symbol_id; ix++) |
3915
|
0 |
53856 |
if (!p_sv) |
3942
|
0 |
47551 |
if (!rule_semantics) |
3951
|
47551 |
0 |
ops = (IV *) SvPV (ops_sv, dummy); |
3952
|
243686 |
47551 |
for (op_ix = 0; op_ix < op_count; op_ix++) |
3954
|
0 |
243686 |
ops[op_ix] = SvUV (ST (op_ix+2)); |
3957
|
0 |
47551 |
if (!av_store (rule_semantics, (I32) rule_id, ops_sv)) { |
3976
|
0 |
53856 |
if (!token_semantics) |
3985
|
53856 |
0 |
ops = (IV *) SvPV (ops_sv, dummy); |
3986
|
74023 |
53856 |
for (op_ix = 0; op_ix < op_count; op_ix++) |
3988
|
74023 |
0 |
ops[op_ix] = SvIV (ST (op_ix+2)); |
3991
|
0 |
53856 |
if (!av_store (token_semantics, (I32) token_id, ops_sv)) { |
4010
|
0 |
7359 |
if (!nulling_semantics) |
4019
|
7359 |
0 |
ops = (IV *) SvPV (ops_sv, dummy); |
4020
|
14347 |
7359 |
for (op_ix = 0; op_ix < op_count; op_ix++) |
4022
|
14347 |
0 |
ops[op_ix] = SvIV (ST (op_ix+2)); |
4025
|
0 |
7359 |
if (!av_store (nulling_semantics, (I32) symbol_id, ops_sv)) { |
4038
|
0 |
28896 |
if (!constants) |
4043
|
0 |
28896 |
if (SvTAINTED(sv)) { |
|
0 |
0 |
if (SvTAINTED(sv)) { |
4059
|
0 |
0 |
IV length = stack ? av_len(stack) : -1; |
4071
|
0 |
3790 |
if (!stack) { XSRETURN_UNDEF; } |
4073
|
1730 |
2060 |
if (!p_sv) { XSRETURN_UNDEF; } |
4074
|
0 |
2060 |
XPUSHs (sv_mortalcopy(*p_sv)); |
4085
|
0 |
0 |
if (!stack) { XSRETURN_UNDEF; } |
4087
|
0 |
0 |
if (!p_sv) { XSRETURN_UNDEF; } |
4088
|
0 |
0 |
XPUSHs (sv_mortalcopy(*p_sv)); |
4100
|
0 |
25165 |
if (!stack) |
4109
|
0 |
25165 |
if (!p_stored_sv) |
4123
|
0 |
29044 |
if (v_wrapper->mode != MARPA_XS_V_MODE_IS_STACK) |
4125
|
0 |
0 |
if (v_wrapper->stack) |
4148
|
25175 |
96695 |
if (stack_offset < 0) |
4152
|
74267 |
25175 |
for (ix = 0; ix < stack_offset; ix++) |
4154
|
0 |
74267 |
XPUSHs (stack_results[ix]); |
4166
|
0 |
49 |
if (!step_type_string) |
4170
|
0 |
49 |
XPUSHs (sv_2mortal (newSVpv (step_type_string, 0))); |
4176
|
96665 |
30 |
if (v_wrapper->trace_values) |
4192
|
0 |
12 |
if (!result_string) |
4197
|
0 |
0 |
if (v_wrapper->base->throw) |
4202
|
0 |
12 |
XPUSHs (sv_2mortal (newSVpv (result_string, 0))); |
4212
|
4725 |
1660 |
if (status == MARPA_STEP_RULE) |
4214
|
0 |
4725 |
XPUSHs (sv_2mortal (newSViv (marpa_v_rule_start_es_id (v)))); |
4215
|
0 |
4725 |
XPUSHs (sv_2mortal (newSViv (marpa_v_es_id (v)))); |
4218
|
0 |
1660 |
if (status == MARPA_STEP_NULLING_SYMBOL) |
4220
|
0 |
0 |
XPUSHs (sv_2mortal (newSViv (marpa_v_token_start_es_id (v)))); |
4221
|
0 |
0 |
XPUSHs (sv_2mortal (newSViv (marpa_v_es_id (v)))); |
4224
|
1660 |
0 |
if (status == MARPA_STEP_TOKEN) |
4226
|
0 |
1660 |
XPUSHs (sv_2mortal (newSViv (marpa_v_token_start_es_id (v)))); |
4227
|
0 |
1660 |
XPUSHs (sv_2mortal (newSViv (marpa_v_es_id (v)))); |
4243
|
0 |
3202 |
if (result < 0) |
4248
|
339 |
2863 |
if (result) |
4261
|
0 |
3629 |
if (result < 0) |
4265
|
90 |
3539 |
if (result) |
4279
|
0 |
3963 |
if (source_xsy < -1) |
4283
|
0 |
3963 |
if (source_xsy < 0) |
4287
|
0 |
3963 |
XPUSHs (sv_2mortal (newSViv (source_xsy))); |
4299
|
0 |
3539 |
if (rule_id < -1) |
4304
|
2213 |
1326 |
if (rule_id < 0) |
4308
|
0 |
1326 |
XPUSHs (sv_2mortal (newSViv (rule_id))); |
4320
|
2213 |
1293 |
if (offset == -1) |
4324
|
0 |
1293 |
if (offset < 0) |
4329
|
0 |
1293 |
XPUSHs (sv_2mortal (newSViv (offset))); |
4341
|
0 |
0 |
if (result == -1) |
4345
|
0 |
0 |
if (result < 0) |
4350
|
0 |
0 |
XPUSHs( sv_2mortal( newSViv(result) ) ); |
4362
|
0 |
0 |
if (result <= -2) |
4367
|
0 |
0 |
XPUSHs (sv_2mortal (newSViv (result))); |
4378
|
0 |
135 |
if (result < 0) |
4383
|
117 |
18 |
if (result) |
4396
|
0 |
32 |
if (result < 0) |
4401
|
2 |
30 |
if (result) |
4414
|
0 |
32 |
if (result < 0) |
4419
|
0 |
32 |
if (result) |
4433
|
0 |
2 |
if (result <= -2) |
4438
|
0 |
2 |
if (result == -1) |
4442
|
0 |
2 |
XPUSHs (sv_2mortal (newSViv (result))); |
4454
|
0 |
661 |
if (result <= -2) |
4459
|
0 |
661 |
if (result == -1) |
4463
|
0 |
661 |
XPUSHs (sv_2mortal (newSViv (result))); |
4475
|
0 |
0 |
if (result <= -2) |
4480
|
0 |
0 |
if (result == -1) |
4484
|
0 |
0 |
XPUSHs (sv_2mortal (newSViv (result))); |
4495
|
0 |
14 |
if (result <= -2) |
4499
|
0 |
14 |
if (result < 0) |
4503
|
0 |
14 |
XPUSHs (sv_2mortal (newSViv (result))); |
4514
|
0 |
3 |
if (result < -1) |
4518
|
0 |
3 |
if (result < 0) |
4522
|
0 |
3 |
XPUSHs (sv_2mortal (newSViv (result))); |
4533
|
0 |
3 |
if (result < -1) |
4537
|
0 |
3 |
if (result < 0) |
4541
|
0 |
3 |
XPUSHs (sv_2mortal (newSViv (result))); |
4553
|
0 |
2996 |
if (result < 0) { XSRETURN_UNDEF; } |
4554
|
0 |
2996 |
XPUSHs (sv_2mortal (newSViv (result))); |
4567
|
0 |
2990 |
if (result <= -2) { XSRETURN_UNDEF; } |
4568
|
0 |
2990 |
XPUSHs (sv_2mortal (newSViv (result))); |
4581
|
0 |
598 |
if (result <= -2) { XSRETURN_UNDEF; } |
4582
|
0 |
598 |
XPUSHs (sv_2mortal (newSViv (result))); |
4595
|
0 |
7 |
if (result < 0) |
4610
|
0 |
0 |
if (boolean < 0) |
4614
|
0 |
0 |
if (boolean) |
4627
|
0 |
179 |
if (earley_set_size < 0) { |
4630
|
0 |
179 |
XPUSHs (sv_2mortal (newSViv (earley_set_size))); |
4641
|
8 |
83 |
if (result == -1) { XSRETURN_UNDEF; } |
4642
|
0 |
83 |
if (result < 0) { croak("problem with r->_marpa_r_earley_set_trace: %s", xs_g_error(r_wrapper->base)); } |
4643
|
0 |
83 |
XPUSHs( sv_2mortal( newSViv(result) ) ); |
4654
|
73 |
697 |
if (result == -1) { XSRETURN_UNDEF; } |
4655
|
0 |
697 |
if (result < 0) { croak("problem with r->_marpa_r_earley_item_trace: %s", xs_g_error(r_wrapper->base)); } |
4656
|
0 |
697 |
XPUSHs( sv_2mortal( newSViv(result) ) ); |
4666
|
0 |
1034 |
if (origin_earleme < 0) |
4671
|
0 |
1034 |
XPUSHs (sv_2mortal (newSViv (origin_earleme))); |
4680
|
0 |
697 |
if (token_id <= -2) { croak("Trace first token link problem: %s", xs_g_error(r_wrapper->base)); } |
4681
|
596 |
101 |
if (token_id == -1) { XSRETURN_UNDEF; } |
4682
|
0 |
101 |
XPUSHs( sv_2mortal( newSViv(token_id) ) ); |
4691
|
0 |
101 |
if (token_id <= -2) { croak("Trace next token link problem: %s", xs_g_error(r_wrapper->base)); } |
4692
|
101 |
0 |
if (token_id == -1) { XSRETURN_UNDEF; } |
4693
|
0 |
0 |
XPUSHs( sv_2mortal( newSViv(token_id) ) ); |
4702
|
0 |
697 |
if (AHFA_state_id <= -2) { croak("Trace first completion link problem: %s", xs_g_error(r_wrapper->base)); } |
4703
|
487 |
210 |
if (AHFA_state_id == -1) { XSRETURN_UNDEF; } |
4704
|
0 |
210 |
XPUSHs( sv_2mortal( newSViv(AHFA_state_id) ) ); |
4713
|
0 |
236 |
if (AHFA_state_id <= -2) { croak("Trace next completion link problem: %s", xs_g_error(r_wrapper->base)); } |
4714
|
210 |
26 |
if (AHFA_state_id == -1) { XSRETURN_UNDEF; } |
4715
|
0 |
26 |
XPUSHs( sv_2mortal( newSViv(AHFA_state_id) ) ); |
4724
|
0 |
697 |
if (AHFA_state_id <= -2) { croak("Trace first completion link problem: %s", xs_g_error(r_wrapper->base)); } |
4725
|
670 |
27 |
if (AHFA_state_id == -1) { XSRETURN_UNDEF; } |
4726
|
0 |
27 |
XPUSHs( sv_2mortal( newSViv(AHFA_state_id) ) ); |
4735
|
0 |
27 |
if (AHFA_state_id <= -2) { croak("Trace next completion link problem: %s", xs_g_error(r_wrapper->base)); } |
4736
|
27 |
0 |
if (AHFA_state_id == -1) { XSRETURN_UNDEF; } |
4737
|
0 |
0 |
XPUSHs( sv_2mortal( newSViv(AHFA_state_id) ) ); |
4746
|
0 |
674 |
if (state_id <= -2) { croak("Problem finding trace source predecessor state: %s", xs_g_error(r_wrapper->base)); } |
4747
|
0 |
674 |
if (state_id == -1) { XSRETURN_UNDEF; } |
4748
|
0 |
674 |
XPUSHs( sv_2mortal( newSViv(state_id) ) ); |
4757
|
0 |
54 |
if (symbol_id <= -2) { croak("Problem finding trace source leo transition symbol: %s", xs_g_error(r_wrapper->base)); } |
4758
|
0 |
54 |
if (symbol_id == -1) { XSRETURN_UNDEF; } |
4759
|
0 |
54 |
XPUSHs( sv_2mortal( newSViv(symbol_id) ) ); |
4769
|
0 |
101 |
if (symbol_id == -1) { XSRETURN_UNDEF; } |
4770
|
0 |
101 |
if (symbol_id < 0) { croak("Problem with r->source_token(): %s", xs_g_error(r_wrapper->base)); } |
4771
|
0 |
101 |
XPUSHs( sv_2mortal( newSViv(symbol_id) ) ); |
4772
|
0 |
101 |
XPUSHs( sv_2mortal( newSViv(value) ) ); |
4781
|
0 |
728 |
if (middle <= -2) { croak("Problem with r->source_middle(): %s", xs_g_error(r_wrapper->base)); } |
4782
|
0 |
728 |
if (middle == -1) { XSRETURN_UNDEF; } |
4783
|
0 |
728 |
XPUSHs( sv_2mortal( newSViv(middle) ) ); |
4792
|
0 |
83 |
if (postdot_symbol_id <= -2) { croak("Trace first postdot item problem: %s", xs_g_error(r_wrapper->base)); } |
4793
|
1 |
82 |
if (postdot_symbol_id == -1) { XSRETURN_UNDEF; } |
4794
|
0 |
82 |
XPUSHs( sv_2mortal( newSViv(postdot_symbol_id) ) ); |
4803
|
0 |
708 |
if (postdot_symbol_id <= -2) { croak("Trace next postdot item problem: %s", xs_g_error(r_wrapper->base)); } |
4804
|
82 |
626 |
if (postdot_symbol_id == -1) { XSRETURN_UNDEF; } |
4805
|
0 |
626 |
XPUSHs( sv_2mortal( newSViv(postdot_symbol_id) ) ); |
4816
|
0 |
0 |
if (postdot_symbol_id == -1) |
4820
|
0 |
0 |
if (postdot_symbol_id <= 0) |
4824
|
0 |
0 |
XPUSHs (sv_2mortal (newSViv (postdot_symbol_id))); |
4834
|
482 |
188 |
if (leo_base_state == -1) { XSRETURN_UNDEF; } |
4835
|
0 |
188 |
if (leo_base_state < 0) { |
4838
|
0 |
188 |
XPUSHs (sv_2mortal (newSViv (leo_base_state))); |
4848
|
32 |
6 |
if (leo_top_ahm == -1) { XSRETURN_UNDEF; } |
4849
|
0 |
6 |
if (leo_top_ahm < 0) { |
4852
|
0 |
6 |
XPUSHs (sv_2mortal (newSViv (leo_top_ahm))); |
4862
|
0 |
194 |
if (leo_base_origin == -1) { XSRETURN_UNDEF; } |
4863
|
0 |
194 |
if (leo_base_origin < 0) { |
4866
|
0 |
194 |
XPUSHs (sv_2mortal (newSViv (leo_base_origin))); |
4876
|
0 |
194 |
if (trace_earley_set < 0) { |
4879
|
0 |
194 |
XPUSHs (sv_2mortal (newSViv (trace_earley_set))); |
4889
|
0 |
194 |
if (postdot_item_symbol < 0) { |
4892
|
0 |
194 |
XPUSHs (sv_2mortal (newSViv (postdot_item_symbol))); |
4902
|
3 |
185 |
if (leo_predecessor_symbol == -1) { XSRETURN_UNDEF; } |
4903
|
0 |
185 |
if (leo_predecessor_symbol < 0) { |
4906
|
0 |
185 |
XPUSHs (sv_2mortal (newSViv (leo_predecessor_symbol))); |
4922
|
0 |
0 |
if (result == -1) |
4926
|
0 |
0 |
if (result < 0) |
4931
|
0 |
0 |
XPUSHs (sv_2mortal (newSViv (result))); |
4932
|
0 |
0 |
XPUSHs (sv_2mortal (newSViv (value))); |
4948
|
40 |
113 |
if (result == -1) { XSRETURN_UNDEF; } |
4949
|
0 |
113 |
if (result < 0) { |
4952
|
0 |
113 |
XPUSHs( sv_2mortal( newSViv(result) ) ); |
4963
|
0 |
0 |
if (count < 0) { croak("Invalid or node ID %d", or_node_id); } |
4964
|
0 |
0 |
XPUSHs( sv_2mortal( newSViv(count) ) ); |
4975
|
49 |
1710 |
if (count == -1) { |
4976
|
49 |
0 |
if (GIMME != G_ARRAY) { XSRETURN_NO; } |
|
0 |
49 |
if (GIMME != G_ARRAY) { XSRETURN_NO; } |
4979
|
0 |
1759 |
if (count < 0) { croak("Invalid or node ID %d", or_node_id); } |
4982
|
1759 |
0 |
EXTEND(SP, count); |
|
0 |
1759 |
EXTEND(SP, count); |
4983
|
2065 |
1759 |
for (ix = 0; ix < count; ix++) { |
5002
|
0 |
0 |
if (result == -1) |
5006
|
0 |
0 |
if (result < 0) |
5010
|
0 |
0 |
XPUSHs (sv_2mortal (newSViv (result))); |
5023
|
4 |
104 |
if (result == -1) |
5027
|
0 |
104 |
if (result < 0) |
5031
|
0 |
104 |
XPUSHs (sv_2mortal (newSViv (result))); |
5044
|
0 |
104 |
if (result == -1) |
5048
|
0 |
104 |
if (result < 0) |
5052
|
0 |
104 |
XPUSHs (sv_2mortal (newSViv (result))); |
5065
|
4 |
36 |
if (result == -1) |
5069
|
0 |
36 |
if (result < 0) |
5073
|
0 |
36 |
XPUSHs (sv_2mortal (newSViv (result))); |
5086
|
0 |
40 |
if (result == -1) |
5090
|
0 |
40 |
if (result < 0) |
5094
|
0 |
40 |
XPUSHs (sv_2mortal (newSViv (result))); |
5107
|
0 |
40 |
if (result == -1) |
5111
|
0 |
40 |
if (result < 0) |
5115
|
0 |
40 |
XPUSHs (sv_2mortal (newSViv (result))); |
5129
|
0 |
16 |
if (result == -1) |
5133
|
0 |
16 |
if (result < 0) |
5137
|
0 |
16 |
XPUSHs (sv_2mortal (newSViv (result))); |
5150
|
0 |
40 |
if (result == -1) |
5154
|
0 |
40 |
if (result < 0) |
5159
|
0 |
40 |
XPUSHs (sv_2mortal (newSViv (result))); |
5173
|
0 |
3800 |
if (status == -1) |
5177
|
0 |
3800 |
if (status < 0) |
5181
|
0 |
3800 |
XPUSHs (sv_2mortal (newSViv (status))); |
5192
|
0 |
64 |
if (status == -1) |
5196
|
0 |
64 |
if (status < 0) |
5200
|
0 |
64 |
XPUSHs (sv_2mortal (newSViv (status))); |
5216
|
0 |
266 |
if (!sv_isa (l0_sv, "Marpa::R2::Thin::G")) |
5220
|
0 |
266 |
if (!sv_isa (g1_sv, "Marpa::R2::Thin::G")) |
5229
|
266 |
0 |
# These do not need references, because parent objects |
5236
|
266 |
0 |
SvREFCNT_inc (l0_sv); |
5241
|
34048 |
266 |
|
5251
|
0 |
266 |
{ |
5253
|
14334 |
266 |
int g1_symbol_count = |
5263
|
0 |
266 |
|
5264
|
14334 |
266 |
{ |
5278
|
0 |
266 |
|
5279
|
22372 |
266 |
{ |
5288
|
0 |
266 |
} |
5307
|
34048 |
266 |
for (i = 0; i < Dim(slg->per_codepoint_array); i++) { |
5323
|
0 |
0 |
XPUSHs (sv_2mortal (SvREFCNT_inc_NN (slg->g1_sv))); |
5341
|
0 |
22362 |
if (slg->precomputed) |
5347
|
0 |
22362 |
if (lexer_rule > highest_lexer_rule_id) |
5354
|
0 |
22362 |
if (g1_lexeme > highest_g1_symbol_id) |
5361
|
0 |
22362 |
if (assertion_id > highest_assertion_id) |
5371
|
0 |
22362 |
if (lexer_rule < -2) |
5378
|
0 |
22362 |
if (g1_lexeme < -2) |
5385
|
0 |
22362 |
if (assertion_id < -2) |
5392
|
22362 |
0 |
if (lexer_rule >= 0) { |
5396
|
8666 |
13696 |
if (g1_lexeme >= 0) { |
5413
|
0 |
8666 |
if (slg->precomputed) |
5419
|
0 |
8666 |
if (g1_lexeme > highest_g1_symbol_id) |
5429
|
0 |
8666 |
if (g1_lexeme < 0) { |
5448
|
0 |
0 |
if (g1_lexeme > highest_g1_symbol_id) |
5457
|
0 |
0 |
if (g1_lexeme < 0) { |
5475
|
0 |
54 |
if (slg->precomputed) |
5481
|
0 |
54 |
if (g1_lexeme > highest_g1_symbol_id) |
5491
|
0 |
54 |
if (g1_lexeme < 0) { |
5530
|
0 |
54 |
if (slg->precomputed) |
5536
|
0 |
54 |
if (g1_lexeme > highest_g1_symbol_id) |
5543
|
0 |
54 |
if (g1_lexeme < 0) |
5550
|
0 |
54 |
if (activate != 0 && activate != 1) |
5557
|
10 |
44 |
if (g_properties->t_pause_before) |
5561
|
44 |
0 |
else if (g_properties->t_pause_after) |
5583
|
0 |
60 |
if (slg->precomputed) |
5589
|
0 |
60 |
if (l0_rule_id > highest_l0_rule_id) |
5599
|
0 |
60 |
if (l0_rule_id < 0) { |
5606
|
60 |
0 |
switch (boolean) { |
5630
|
0 |
41 |
if (slg->precomputed) |
5636
|
0 |
41 |
if (l0_rule_id > highest_l0_rule_id) |
5643
|
0 |
41 |
if (l0_rule_id < 0) |
5650
|
0 |
41 |
if (activate != 0 && activate != 1) |
5657
|
41 |
0 |
if (g_properties->t_event_on_discard) |
5679
|
0 |
8666 |
if (slg->precomputed) |
5685
|
0 |
8666 |
if (g1_lexeme > highest_g1_symbol_id) |
5695
|
0 |
8666 |
if (g1_lexeme < 0) { |
5702
|
8666 |
0 |
switch (latm) { |
5724
|
262 |
0 |
if (!slg->precomputed) |
5749
|
0 |
967 |
if (!sv_isa (slg_sv, "Marpa::R2::Thin::SLG")) |
5754
|
0 |
967 |
if (!sv_isa (r1_sv, "Marpa::R2::Thin::R")) |
5770
|
967 |
0 |
SvREFCNT_inc (r1_sv); |
5771
|
967 |
0 |
|
5772
|
0 |
967 |
# These do not need references, because parent objects |
5779
|
967 |
0 |
("Problem in u->new(): Attempted to create SLIF recce from unprecomputed SLIF grammar"); |
5796
|
0 |
967 |
{ |
5798
|
39230 |
967 |
const Marpa_Symbol_ID g1_symbol_count = |
5815
|
0 |
967 |
{ |
5817
|
61761 |
967 |
const Marpa_Rule_ID l0_rule_count = |
5846
|
0 |
967 |
slr->gift = marpa__slr_new(); |
5859
|
944 |
23 |
if (r0) |
5871
|
967 |
0 |
if (slr->token_values) |
5895
|
0 |
0 |
if (new_level) |
5940
|
0 |
0 |
XPUSHs (sv_2mortal (SvREFCNT_inc_NN ( slr->r1_wrapper->base_sv))); |
5971
|
0 |
216 |
XPUSHs (sv_2mortal (literal_sv)); |
5989
|
0 |
0 |
if (start_earley_set < 0 || start_earley_set > latest_earley_set) |
5995
|
0 |
0 |
if (length < 0) |
5999
|
0 |
0 |
if (start_earley_set + length > latest_earley_set) |
6008
|
0 |
0 |
XPUSHs (sv_2mortal (newSViv ((IV) literal_start))); |
6009
|
0 |
0 |
XPUSHs (sv_2mortal (newSViv ((IV) literal_length))); |
6020
|
0 |
6375 |
if (slr->is_external_scanning) |
6040
|
29084 |
4441 |
if (slr->lexer_start_pos >= 0) |
6042
|
853 |
28231 |
if (slr->lexer_start_pos >= slr->end_pos) |
6050
|
0 |
28231 |
if (trace_lexers >= 1) |
6059
|
32672 |
0 |
lexer_read_result = slr->lexer_read_result = u_read (slr); |
|
4441 |
28231 |
lexer_read_result = slr->lexer_read_result = u_read (slr); |
|
0 |
4441 |
lexer_read_result = slr->lexer_read_result = u_read (slr); |
|
0 |
0 |
lexer_read_result = slr->lexer_read_result = u_read (slr); |
6067
|
0 |
0 |
if (lexer_read_result < 0) |
6083
|
677 |
27554 |
if (marpa_r_is_exhausted (slr->r1)) |
6086
|
10 |
667 |
if (discard_result < 0) |
6094
|
29 |
27525 |
if (result_string) |
6103
|
1042 |
27150 |
if (event_count) |
6109
|
27150 |
0 |
if (slr->trace_terminals || slr->trace_lexers) |
|
27150 |
0 |
if (slr->trace_terminals || slr->trace_lexers) |
6125
|
0 |
0 |
XPUSHs (sv_2mortal (newSViv ((IV) slr->lexer_read_result))); |
6133
|
0 |
0 |
XPUSHs (sv_2mortal (newSViv ((IV) slr->r1_earleme_complete_result))); |
6142
|
0 |
242 |
if (pause_lexeme < 0) |
6146
|
0 |
242 |
XPUSHs (sv_2mortal (newSViv ((IV) slr->start_of_pause_lexeme))); |
6147
|
0 |
242 |
XPUSHs (sv_2mortal |
6158
|
1 |
66 |
if (pause_lexeme < 0) |
6162
|
0 |
66 |
XPUSHs (sv_2mortal (newSViv ((IV) pause_lexeme))); |
6174
|
1251 |
6690 |
for (i = 0; i < slr->gift->t_event_count; i++) |
6192
|
0 |
0 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6204
|
0 |
0 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6216
|
0 |
0 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6232
|
0 |
13 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6244
|
0 |
0 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6256
|
0 |
485 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6265
|
0 |
240 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6274
|
0 |
41 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6283
|
0 |
59 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6293
|
0 |
0 |
if (!result_string) |
6300
|
0 |
0 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6312
|
0 |
9 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6324
|
0 |
0 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6339
|
0 |
0 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6351
|
0 |
0 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6360
|
0 |
192 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6372
|
0 |
0 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6384
|
0 |
0 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6396
|
0 |
16 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6408
|
0 |
0 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6417
|
0 |
196 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6429
|
0 |
0 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6437
|
0 |
0 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6446
|
0 |
0 |
XPUSHs (sv_2mortal (newRV_noinc ((SV *) event_av))); |
6453
|
66 |
6690 |
for (i = 0; i <= queue_length; i++) |
6456
|
0 |
66 |
XPUSHs (sv_2mortal (event)); |
6469
|
0 |
3475 |
XPUSHs (sv_2mortal (newSViv ((IV) start_position))); |
6470
|
0 |
3475 |
XPUSHs (sv_2mortal (newSViv ((IV) length))); |
6479
|
0 |
2 |
XPUSHs (sv_2mortal (newSViv ((IV) slr->start_of_lexeme))); |
6480
|
0 |
2 |
XPUSHs (sv_2mortal (newSViv ((IV) length))); |
6497
|
0 |
438 |
if (pos < 0) |
6501
|
0 |
438 |
if (pos > logical_size) |
6503
|
0 |
0 |
if (logical_size < 0) { |
6512
|
1 |
437 |
if (pos == logical_size) { at_eof = 1; pos--; } |
6514
|
367 |
71 |
if (linecol >= 0) |
6523
|
1 |
437 |
if (at_eof) { column++; } |
6524
|
0 |
438 |
XPUSHs (sv_2mortal (newSViv ((IV) line))); |
6525
|
0 |
438 |
XPUSHs (sv_2mortal (newSViv ((IV) column))); |
6551
|
159 |
0 |
if (IS_PERL_UNDEF (token_value)) |
6557
|
0 |
159 |
if (SvTAINTED(token_value)) { |
|
0 |
0 |
if (SvTAINTED(token_value)) { |
6572
|
194 |
0 |
if (result >= MARPA_ERR_NONE) { |
6594
|
0 |
194 |
start_pos = start_pos < 0 ? input_length + start_pos : start_pos; |
6595
|
0 |
194 |
if (start_pos < 0 || start_pos > input_length) |
6606
|
0 |
194 |
0 ? input_length + lexeme_length + 1 : start_pos + lexeme_length; |
6607
|
0 |
194 |
if (end_pos < 0 || end_pos > input_length) |
6620
|
194 |
0 |
if (result >= 0) |
6628
|
0 |
0 |
if (result == -2) |
6631
|
0 |
0 |
if (error == MARPA_ERR_PARSE_EXHAUSTED) |
6638
|
0 |
0 |
if (slr->throw) |
6656
|
0 |
390 |
if (l0_rule_id > highest_l0_rule_id) |
6663
|
0 |
390 |
if (l0_rule_id < 0) |
6687
|
0 |
390 |
XPUSHs (sv_2mortal (newSViv (reactivate))); |
6700
|
0 |
29 |
if (g1_lexeme_id > highest_g1_symbol_id) |
6707
|
0 |
29 |
if (g1_lexeme_id < 0) |
6733
|
0 |
29 |
XPUSHs (sv_2mortal (newSViv (reactivate))); |
6741
|
0 |
7 |
if (slr->problem_pos < 0) { |
6753
|
0 |
0 |
if (!r0) |
6769
|
0 |
0 |
if (!recce) |
6775
|
0 |
0 |
if ( gp_result == -1 ) { XSRETURN_UNDEF; } |
6776
|
0 |
0 |
if ( gp_result < 0 && lexer_wrapper->throw ) { |
|
0 |
0 |
if ( gp_result < 0 && lexer_wrapper->throw ) { |
6780
|
0 |
0 |
XPUSHs (sv_2mortal (newSViv (gp_result))); |
6791
|
0 |
0 |
if (!recce) |
6797
|
0 |
0 |
if ( gp_result == -1 ) { XSRETURN_UNDEF; } |
6798
|
0 |
0 |
if ( gp_result < 0 && lexer_wrapper->throw ) { |
|
0 |
0 |
if ( gp_result < 0 && lexer_wrapper->throw ) { |
6802
|
0 |
0 |
XPUSHs (sv_2mortal (newSViv (gp_result))); |
6815
|
0 |
0 |
if (!recce) |
6821
|
0 |
0 |
if (rule_id == -1) |
6825
|
0 |
0 |
if (rule_id < 0 && lexer_wrapper->throw) |
|
0 |
0 |
if (rule_id < 0 && lexer_wrapper->throw) |
6830
|
0 |
0 |
XPUSHs (sv_2mortal (newSViv (rule_id))); |
6831
|
0 |
0 |
XPUSHs (sv_2mortal (newSViv (position))); |
6832
|
0 |
0 |
XPUSHs (sv_2mortal (newSViv (origin))); |
6857
|
40 |
927 |
if (SvTAINTED (string)) |
|
1 |
39 |
if (SvTAINTED (string)) |
6867
|
966 |
0 |
SvSetSV (slr->input, string); |
6868
|
966 |
0 |
start_of_string = (U8 *) SvPV_force_nomg (slr->input, pv_length); |
6878
|
89470 |
966 |
for (p = start_of_string; p < end_of_string;) |
6882
|
7033 |
82437 |
if (input_is_utf8) |
6884
|
0 |
7033 |
codepoint = utf8_to_uvchr_buf (p, end_of_string, &codepoint_length); |
6890
|
0 |
7033 |
if (codepoint == 0 && codepoint_length != 1) |
|
0 |
0 |
if (codepoint == 0 && codepoint_length != 1) |
6901
|
24 |
89446 |
if (slr->pos_db_logical_size >= slr->pos_db_physical_size) |
6904
|
0 |
24 |
Renew (slr->pos_db, slr->pos_db_physical_size, Pos_Entry); |
6910
|
8 |
89462 |
if (codepoint == 0x0a && previous_codepoint == 0x0d) |
6919
|
1 |
7 |
if (previous_linecol < 0) |
6929
|
85640 |
3822 |
this_column > 1 ? 1-this_column : this_line; |
6930
|
3068 |
86394 |
switch (codepoint) |
6990
|
4353 |
88 |
if (use_array) |
6993
|
0 |
4353 |
Renew (ops, op_count, IV); |
7001
|
88 |
0 |
ops = (IV *) SvPV (ops_sv, dummy); |
7005
|
92661 |
4441 |
for (op_ix = 2; op_ix < op_count; op_ix++) |
7010
|
0 |
92661 |
ops[op_ix] = SvUV (ST (op_ix)); |
7012
|
88 |
4353 |
if (ops_sv) |
7028
|
0 |
0 |
if (g1_lexeme > highest_g1_symbol_id) |
7037
|
0 |
0 |
if (g1_lexeme < 0) { |
7043
|
0 |
0 |
if ( ! slg->symbol_g_properties[g1_lexeme].is_lexeme ) { |
7062
|
0 |
12 |
if (g1_lexeme > highest_g1_symbol_id) |
7071
|
0 |
12 |
if (g1_lexeme < 0) { |
7077
|
0 |
12 |
if ( ! slg->symbol_g_properties[g1_lexeme].is_lexeme ) { |