line |
true |
false |
branch |
325
|
975 |
0 |
if (slr->t_ref_count <= 0) |
346
|
0 |
0 |
if (op_id >= (int)Dim(op_name_by_id_object)) return "unknown"; |
355
|
9857 |
0 |
while (hi >= lo) |
360
|
2538 |
7319 |
if (!cmp) |
362
|
3298 |
4021 |
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 |
31371 |
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) { |
|
128463 |
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
|
1316 |
0 |
SET_G_WRAPPER_FROM_G_SV(g_wrapper, g_sv); |
756
|
0 |
1316 |
if (highest_symbol_id < 0) |
758
|
0 |
0 |
if (!g_wrapper->throw) |
767
|
0 |
1316 |
Newx (r_wrapper->terminals_buffer, highest_symbol_id + 1, Marpa_Symbol_ID); |
798
|
27772 |
952 |
if (!r0) |
814
|
0 |
28724 |
if (r0) |
819
|
0 |
28724 |
if (!r0) |
821
|
0 |
0 |
if (!lexer_wrapper->throw) |
825
|
19 |
28705 |
if (too_many_earley_items >= 0) |
833
|
28724 |
0 |
if (count < 0) |
838
|
568188 |
28724 |
for (i = 0; i < count; i++) |
843
|
556786 |
11402 |
if (assertion >= 0 && marpa_r_zwa_default_set (r0, assertion, 1) < 0) |
|
0 |
556786 |
if (assertion >= 0 && marpa_r_zwa_default_set (r0, assertion, 1) < 0) |
850
|
0 |
568188 |
if (trace_lexers >= 1 || trace_terminals > 2) |
864
|
28724 |
0 |
if (gp_result == -1) |
866
|
0 |
28724 |
if (gp_result < 0) |
868
|
0 |
0 |
if (lexer_wrapper->throw) |
889
|
8901 |
8901 |
for (event_ix = 0; event_ix < event_count; event_ix++) |
918
|
0 |
0 |
if (result_string) |
961
|
28724 |
4530 |
if (!r) |
964
|
0 |
28724 |
if (!r) |
969
|
33254 |
0 |
input = (U8 *) SvPV (slr->input, len); |
978
|
113472 |
339 |
if (slr->perl_pos >= slr->end_pos) |
981
|
9402 |
104070 |
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
|
102942 |
1128 |
codepoint = (UV) input[OFFSET_IN_INPUT (slr)]; |
1004
|
113145 |
327 |
if (codepoint < Dim (slr->slg->per_codepoint_array)) |
1007
|
4442 |
108703 |
if (!ops) |
1019
|
88 |
239 |
if (!p_ops_sv) |
1024
|
239 |
0 |
ops = (IV *) SvPV (*p_ops_sv, dummy); |
1027
|
0 |
108942 |
if (trace_lexers >= 1) |
1037
|
726386 |
80557 |
for (op_ix = 2; op_ix < op_count; op_ix++) |
1050
|
0 |
617444 |
if (op_ix >= op_count) |
1058
|
0 |
617444 |
if (op_ix + 2 >= op_count) |
1076
|
0 |
519213 |
if (trace_lexers >= 1) |
1086
|
0 |
98231 |
if (trace_lexers >= 1) |
1117
|
19482 |
89458 |
if (tokens_accepted < 1) |
1123
|
8901 |
80557 |
if (result > 0) |
1127
|
0 |
8901 |
if (marpa_r_is_exhausted (r)) |
1133
|
0 |
80557 |
if (result == -2) |
1137
|
0 |
0 |
if (error == MARPA_ERR_PARSE_EXHAUSTED) |
1142
|
0 |
80557 |
if (result < 0) |
1158
|
80557 |
0 |
if (trace_lexers) |
1176
|
0 |
1911 |
if (start_pos_arg < 0) { |
1181
|
1911 |
0 |
if (new_perl_pos < 0 || new_perl_pos > slr->pos_db_logical_size) |
|
0 |
1911 |
if (new_perl_pos < 0 || new_perl_pos > slr->pos_db_logical_size) |
1186
|
1716 |
195 |
if (length_arg < 0) { |
1191
|
1911 |
0 |
if (new_end_pos < 0 || new_end_pos > slr->pos_db_logical_size) |
|
0 |
1911 |
if (new_end_pos < 0 || new_end_pos > slr->pos_db_logical_size) |
1209
|
59429 |
0 |
char *input = SvPV (slr->input, dummy); |
1211
|
53523 |
5906 |
int start_offset = POS_TO_OFFSET (slr, start_pos); |
1213
|
59429 |
0 |
POS_TO_OFFSET (slr, |
1216
|
1525 |
57904 |
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
|
7972 |
0 |
if (v_wrapper->mode == MARPA_XS_V_MODE_IS_RAW) |
1303
|
0 |
176408 |
if (!p_ops_sv) |
1308
|
176408 |
0 |
ops = (IV *) SvPV (*p_ops_sv, dummy); |
1315
|
0 |
82152 |
if (!p_ops_sv) |
1320
|
82152 |
0 |
ops = (IV *) SvPV (*p_ops_sv, dummy); |
1327
|
0 |
8875 |
if (!p_ops_sv) |
1333
|
8875 |
0 |
ops = (IV *) SvPV (*p_ops_sv, dummy); |
1346
|
0 |
578982 |
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 |
6533 |
if (step_type != MARPA_STEP_RULE) |
1425
|
6525 |
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 |
41517 |
if (!values_av) |
1498
|
40100 |
1425 |
if (blessing) |
1502
|
40100 |
0 |
if (p_blessing_sv && SvPOK (*p_blessing_sv)) |
|
40100 |
0 |
if (p_blessing_sv && SvPOK (*p_blessing_sv)) |
1505
|
40100 |
0 |
char *classname = SvPV (*p_blessing_sv, blessing_length); |
1514
|
0 |
41525 |
if (!stored_av) |
1528
|
749 |
13702 |
if (!values_av) |
1540
|
8694 |
0 |
if (slr && token_ix == TOKEN_VALUE_IS_LITERAL) |
1555
|
0 |
0 |
if (p_token_value_sv) |
1571
|
3328 |
2410 |
int increment = op_code == MARPA_OP_PUSH_SEQUENCE ? 2 : 1; |
1573
|
5738 |
12288 |
for (stack_ix = result_ix; stack_ix <= arg_n; |
1577
|
121 |
12167 |
if (!p_sv) |
1599
|
0 |
2 |
if (!values_av) |
1612
|
521 |
373 |
if (!values_av) |
1617
|
894 |
0 |
if (p_constant_sv) |
1635
|
89965 |
85005 |
if (!values_av) |
1639
|
1715 |
173255 |
if (step_type != MARPA_STEP_RULE) |
1645
|
706 |
172549 |
if (!p_sv) |
1663
|
39799 |
192 |
if (!values_av) |
1667
|
0 |
39991 |
if (!slr) |
1697
|
0 |
39991 |
if (!values_av) |
1701
|
0 |
39991 |
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
|
37120 |
90009 |
if (!values_av) |
1859
|
127129 |
1334 |
sv_2mortal (newSViv |
1864
|
127205 |
1258 |
if (values_av) |
1869
|
0 |
127205 |
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 |
73458 |
if (step_type != MARPA_STEP_TOKEN) |
1899
|
50519 |
22939 |
if (slr && token_ix == TOKEN_VALUE_IS_LITERAL) |
1911
|
0 |
50519 |
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
|
592 |
389 |
for (event_ix = 0; event_ix < event_count; event_ix++) |
2211
|
355 |
1510 |
for (event_ix = 0; event_ix < event_count; event_ix++) |
2279
|
0 |
8 |
if (!result_string) |
2321
|
0 |
28047 |
if (!r0) |
2331
|
28026 |
27 |
for (earley_set = marpa_r_latest_earley_set (r0); earley_set > 0; |
2339
|
28026 |
0 |
if (return_value < 0) |
2346
|
110548 |
28026 |
while (!end_of_earley_items) |
2358
|
0 |
110548 |
if (rule_id <= -2) |
2363
|
82522 |
28026 |
if (rule_id == -1) |
2368
|
78237 |
4285 |
if (origin != 0) |
2370
|
76038 |
2199 |
if (dot_position != -1) |
2374
|
31371 |
44667 |
if (g1_lexeme == -1) |
2378
|
12725 |
18646 |
if (g1_lexeme <= -2) |
2396
|
373 |
18273 |
if (!is_expected) |
2400
|
0 |
373 |
if (symbol_g_properties->latm) |
2426
|
15297 |
2976 |
if (!is_priority_set || this_lexeme_priority > high_lexeme_priority) |
2453
|
6 |
28020 |
if (discarded || rejected || is_priority_set) |
2459
|
12751 |
15296 |
if (is_priority_set) |
2462
|
29 |
12722 |
} else if (discarded) { |
2477
|
31371 |
28047 |
for (i = 0; i < slr->gift->t_lexeme_count; i++) |
2484
|
14 |
18259 |
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 |
12712 |
if (slr->trace_terminals) |
2509
|
12722 |
3 |
if (pass1_result == discard) |
2516
|
114 |
12608 |
if (!l0_rule_r_properties->t_event_on_discard_active) |
2537
|
12722 |
15325 |
if (pass1_result == discard) { |
2542
|
15296 |
29 |
if (pass1_result != accept) { |
2557
|
18645 |
15296 |
for (i = 0; i < slr->gift->t_lexeme_count; i++) |
2561
|
18259 |
386 |
if (event_type == MARPA_SLRTR_LEXEME_ACCEPTABLE) |
2567
|
192 |
18067 |
if (symbol_r_properties->t_pause_before_active) |
2575
|
0 |
192 |
if (slr->trace_terminals > 2) |
2596
|
15104 |
192 |
if (g1_lexeme >= 0) |
2606
|
18453 |
15104 |
for (i = 0; i < slr->gift->t_lexeme_count; i++) |
2610
|
18067 |
386 |
if (event_type == MARPA_SLRTR_LEXEME_ACCEPTABLE) |
2617
|
0 |
18067 |
if (slr->trace_terminals > 2) |
2636
|
0 |
0 |
if (slr->trace_terminals) |
2649
|
16 |
18051 |
if (slr->trace_terminals) |
2658
|
196 |
17871 |
if (symbol_r_properties->t_pause_after_active) |
2665
|
0 |
196 |
if (slr->trace_terminals > 2) |
2700
|
0 |
15104 |
if (return_value < 0) |
2706
|
389 |
14715 |
if (return_value > 0) |
2729
|
27 |
151011 |
if (earley_set <= 0) |
2742
|
0 |
151038 |
if (result < 0) |
2758
|
189 |
137191 |
if (start_earley_set >= latest_earley_set) |
2766
|
39802 |
97389 |
if (length == 0) |
2768
|
10372 |
126819 |
if (length > 1) |
2783
|
59213 |
0 |
if (length > 0) |
2809
|
0 |
0 |
if (old_level || new_level) |
2820
|
17800 |
178 |
for (error_code = 0; error_code < MARPA_ERROR_COUNT; error_code++) |
2823
|
3 |
17797 |
XPUSHs (sv_2mortal (newSVpv (error_name, 0))); |
2837
|
2538 |
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
|
786 |
0 |
if (!SvROK (arg) || SvTYPE (SvRV (arg)) != SVt_PVHV) |
|
0 |
786 |
if (!SvROK (arg) || SvTYPE (SvRV (arg)) != SVt_PVHV) |
2910
|
786 |
786 |
while ((arg_value = hv_iternextsv (named_args, &key, &retlen))) |
2912
|
786 |
0 |
if ((*key == 'i') && strnEQ (key, "if", (unsigned) retlen)) |
|
0 |
786 |
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)) |
|
786 |
0 |
if ((*key == 'i') && strnEQ (key, "if", (unsigned) retlen)) |
2914
|
786 |
0 |
interface = SvIV (arg_value); |
2915
|
0 |
786 |
if (interface != 1) |
2923
|
0 |
786 |
if (interface != 1) |
2948
|
787 |
0 |
if (error_code != MARPA_ERR_NONE |
2949
|
787 |
0 |
|| version[0] != EXPECTED_LIBMARPA_MAJOR |
2950
|
787 |
0 |
|| version[1] != EXPECTED_LIBMARPA_MINOR |
2951
|
0 |
787 |
|| version[2] != EXPECTED_LIBMARPA_MICRO) |
2962
|
787 |
0 |
if (g) |
2974
|
0 |
787 |
XPUSHs (sv); |
2981
|
0 |
787 |
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 |
763 |
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
|
45742 |
399 |
if (length <= 0) { |
3064
|
0 |
45742 |
Newx(rhs, length, Marpa_Symbol_ID); |
3065
|
93560 |
45742 |
for (i = 0; i < length; i++) { |
3067
|
0 |
93560 |
if (elem == NULL) { |
3071
|
93560 |
0 |
rhs[i] = (Marpa_Symbol_ID)SvIV(*elem); |
3077
|
6 |
46135 |
if (new_rule_id < 0 && g_wrapper->throw ) { |
|
0 |
6 |
if (new_rule_id < 0 && g_wrapper->throw ) { |
3080
|
0 |
46141 |
XPUSHs( sv_2mortal( newSViv(new_rule_id) ) ); |
3101
|
4439 |
0 |
if (args) |
3107
|
8393 |
4439 |
while ((arg_value = hv_iternextsv (args, &key, &retlen))) |
3109
|
0 |
8393 |
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
|
4439 |
3954 |
if ((*key == 'm') && strnEQ (key, "min", (unsigned) retlen)) |
|
0 |
4439 |
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)) |
|
4439 |
0 |
if ((*key == 'm') && strnEQ (key, "min", (unsigned) retlen)) |
3117
|
4439 |
0 |
IV raw_min = SvIV (arg_value); |
3118
|
0 |
4439 |
if (raw_min < 0) |
3123
|
0 |
0 |
if (g_wrapper->throw) |
3132
|
0 |
4439 |
if (raw_min > INT_MAX) |
3139
|
0 |
0 |
if (g_wrapper->throw) |
3151
|
1977 |
1977 |
if ((*key == 'p') && strnEQ (key, "proper", (unsigned) retlen)) |
|
0 |
1977 |
if ((*key == 'p') && strnEQ (key, "proper", (unsigned) retlen)) |
|
0 |
0 |
if ((*key == 'p') && strnEQ (key, "proper", (unsigned) retlen)) |
|
1977 |
0 |
if ((*key == 'p') && strnEQ (key, "proper", (unsigned) retlen)) |
3153
|
1977 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
1977 |
if (SvTRUE (arg_value)) |
|
0 |
1977 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
256 |
1721 |
if (SvTRUE (arg_value)) |
|
256 |
0 |
if (SvTRUE (arg_value)) |
|
256 |
0 |
if (SvTRUE (arg_value)) |
|
256 |
0 |
if (SvTRUE (arg_value)) |
|
0 |
256 |
if (SvTRUE (arg_value)) |
|
1721 |
0 |
if (SvTRUE (arg_value)) |
|
1721 |
0 |
if (SvTRUE (arg_value)) |
|
1715 |
6 |
if (SvTRUE (arg_value)) |
|
0 |
1715 |
if (SvTRUE (arg_value)) |
|
0 |
0 |
if (SvTRUE (arg_value)) |
|
262 |
1715 |
if (SvTRUE (arg_value)) |
3157
|
1977 |
0 |
if ((*key == 's') && strnEQ (key, "separator", (unsigned) retlen)) |
|
0 |
1977 |
if ((*key == 's') && strnEQ (key, "separator", (unsigned) retlen)) |
|
0 |
0 |
if ((*key == 's') && strnEQ (key, "separator", (unsigned) retlen)) |
|
1977 |
0 |
if ((*key == 's') && strnEQ (key, "separator", (unsigned) retlen)) |
3159
|
1977 |
0 |
separator = (Marpa_Symbol_ID) SvIV (arg_value); |
3167
|
0 |
0 |
if (g_wrapper->throw) |
3179
|
0 |
4439 |
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 |
4439 |
XPUSHs (sv_2mortal (newSViv (new_rule_id))); |
3200
|
0 |
35601 |
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 |
35595 |
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 |
75162 |
if (boolean < 0 || boolean > 1) |
3319
|
0 |
75162 |
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 |
1316 |
if (!sv_isa (g_sv, "Marpa::R2::Thin::G")) |
3372
|
1316 |
0 |
SET_G_WRAPPER_FROM_G_SV (g_wrapper, g_sv); |
3375
|
0 |
1316 |
if (!r) |
3377
|
0 |
0 |
if (!g_wrapper->throw) |
3389
|
0 |
1316 |
XPUSHs (sv_to_return); |
3407
|
0 |
1203 |
if (boolean < 0 || boolean > 1) |
3413
|
0 |
1203 |
XPUSHs (sv_2mortal (newSViv (boolean))); |
3423
|
0 |
1316 |
if ( gp_result == -1 ) { XSRETURN_UNDEF; } |
3424
|
0 |
1316 |
if ( gp_result < 0 && r_wrapper->base->throw ) { |
|
0 |
0 |
if ( gp_result < 0 && r_wrapper->base->throw ) { |
3429
|
0 |
1316 |
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 |
1302 |
if (!b) |
3513
|
20 |
0 |
if (!r_wrapper->base->throw) { XSRETURN_UNDEF; } |
3526
|
0 |
1302 |
XPUSHs (sv); |
3554
|
0 |
1302 |
if (!o) |
3556
|
0 |
0 |
if (!b_wrapper->base->throw) { XSRETURN_UNDEF; } |
3569
|
0 |
1302 |
XPUSHs (sv); |
3597
|
0 |
1252 |
if (!t) |
3599
|
0 |
0 |
if (!o_wrapper->base->throw) { XSRETURN_UNDEF; } |
3612
|
0 |
1252 |
XPUSHs (sv); |
3640
|
0 |
8094 |
if (!v) |
3642
|
0 |
0 |
if (!t_wrapper->base->throw) |
3674
|
0 |
8094 |
XPUSHs (sv); |
3689
|
5691 |
2403 |
if (v_wrapper->slr) { |
3692
|
7972 |
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 |
5691 |
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 |
7972 |
if (v_wrapper->mode != MARPA_XS_V_MODE_IS_INITIAL) |
3850
|
0 |
0 |
if (v_wrapper->stack) |
3855
|
0 |
7972 |
if (v_create_stack (v_wrapper) == -1) |
3870
|
89679 |
7972 |
for (ix = 0; ix <= highest_rule_id; ix++) |
3873
|
0 |
89679 |
if (!p_sv) |
3891
|
96156 |
7972 |
for (ix = 0; ix <= highest_symbol_id; ix++) |
3894
|
0 |
96156 |
if (!p_sv) |
3912
|
96156 |
7972 |
for (ix = 0; ix <= highest_symbol_id; ix++) |
3915
|
0 |
96156 |
if (!p_sv) |
3942
|
0 |
89679 |
if (!rule_semantics) |
3951
|
89679 |
0 |
ops = (IV *) SvPV (ops_sv, dummy); |
3952
|
400674 |
89679 |
for (op_ix = 0; op_ix < op_count; op_ix++) |
3954
|
0 |
400674 |
ops[op_ix] = SvUV (ST (op_ix+2)); |
3957
|
0 |
89679 |
if (!av_store (rule_semantics, (I32) rule_id, ops_sv)) { |
3976
|
0 |
96156 |
if (!token_semantics) |
3985
|
96156 |
0 |
ops = (IV *) SvPV (ops_sv, dummy); |
3986
|
116683 |
96156 |
for (op_ix = 0; op_ix < op_count; op_ix++) |
3988
|
116683 |
0 |
ops[op_ix] = SvIV (ST (op_ix+2)); |
3991
|
0 |
96156 |
if (!av_store (token_semantics, (I32) token_id, ops_sv)) { |
4010
|
0 |
7371 |
if (!nulling_semantics) |
4019
|
7371 |
0 |
ops = (IV *) SvPV (ops_sv, dummy); |
4020
|
14419 |
7371 |
for (op_ix = 0; op_ix < op_count; op_ix++) |
4022
|
14419 |
0 |
ops[op_ix] = SvIV (ST (op_ix+2)); |
4025
|
0 |
7371 |
if (!av_store (nulling_semantics, (I32) symbol_id, ops_sv)) { |
4038
|
0 |
29416 |
if (!constants) |
4043
|
0 |
29416 |
if (SvTAINTED(sv)) { |
|
0 |
0 |
if (SvTAINTED(sv)) { |
4059
|
0 |
0 |
IV length = stack ? av_len(stack) : -1; |
4071
|
0 |
7962 |
if (!stack) { XSRETURN_UNDEF; } |
4073
|
1730 |
6232 |
if (!p_sv) { XSRETURN_UNDEF; } |
4074
|
0 |
6232 |
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 |
128453 |
if (!stack) |
4109
|
0 |
128453 |
if (!p_stored_sv) |
4123
|
0 |
136504 |
if (v_wrapper->mode != MARPA_XS_V_MODE_IS_STACK) |
4125
|
0 |
0 |
if (v_wrapper->stack) |
4148
|
128463 |
138972 |
if (stack_offset < 0) |
4152
|
384131 |
128463 |
for (ix = 0; ix < stack_offset; ix++) |
4154
|
0 |
384131 |
XPUSHs (stack_results[ix]); |
4166
|
0 |
49 |
if (!step_type_string) |
4170
|
0 |
49 |
XPUSHs (sv_2mortal (newSVpv (step_type_string, 0))); |
4176
|
138942 |
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 |
7972 |
if (status == -1) |
5177
|
0 |
7972 |
if (status < 0) |
5181
|
0 |
7972 |
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 |
273 |
if (!sv_isa (l0_sv, "Marpa::R2::Thin::G")) |
5220
|
0 |
273 |
if (!sv_isa (g1_sv, "Marpa::R2::Thin::G")) |
5229
|
273 |
0 |
# These do not need references, because parent objects |
5236
|
273 |
0 |
SvREFCNT_inc (l0_sv); |
5241
|
34944 |
273 |
|
5251
|
0 |
273 |
{ |
5253
|
14847 |
273 |
int g1_symbol_count = |
5263
|
0 |
273 |
|
5264
|
14847 |
273 |
{ |
5278
|
0 |
273 |
|
5279
|
23137 |
273 |
{ |
5288
|
0 |
273 |
} |
5307
|
34944 |
273 |
for (i = 0; i < Dim(slg->per_codepoint_array); i++) { |
5323
|
0 |
0 |
XPUSHs (sv_2mortal (SvREFCNT_inc_NN (slg->g1_sv))); |
5341
|
0 |
23127 |
if (slg->precomputed) |
5347
|
0 |
23127 |
if (lexer_rule > highest_lexer_rule_id) |
5354
|
0 |
23127 |
if (g1_lexeme > highest_g1_symbol_id) |
5361
|
0 |
23127 |
if (assertion_id > highest_assertion_id) |
5371
|
0 |
23127 |
if (lexer_rule < -2) |
5378
|
0 |
23127 |
if (g1_lexeme < -2) |
5385
|
0 |
23127 |
if (assertion_id < -2) |
5392
|
23127 |
0 |
if (lexer_rule >= 0) { |
5396
|
8969 |
14158 |
if (g1_lexeme >= 0) { |
5413
|
0 |
8969 |
if (slg->precomputed) |
5419
|
0 |
8969 |
if (g1_lexeme > highest_g1_symbol_id) |
5429
|
0 |
8969 |
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 |
8969 |
if (slg->precomputed) |
5685
|
0 |
8969 |
if (g1_lexeme > highest_g1_symbol_id) |
5695
|
0 |
8969 |
if (g1_lexeme < 0) { |
5702
|
8969 |
0 |
switch (latm) { |
5724
|
269 |
0 |
if (!slg->precomputed) |
5749
|
0 |
975 |
if (!sv_isa (slg_sv, "Marpa::R2::Thin::SLG")) |
5754
|
0 |
975 |
if (!sv_isa (r1_sv, "Marpa::R2::Thin::R")) |
5770
|
975 |
0 |
SvREFCNT_inc (r1_sv); |
5771
|
975 |
0 |
|
5772
|
0 |
975 |
# These do not need references, because parent objects |
5779
|
975 |
0 |
("Problem in u->new(): Attempted to create SLIF recce from unprecomputed SLIF grammar"); |
5796
|
0 |
975 |
{ |
5798
|
39902 |
975 |
const Marpa_Symbol_ID g1_symbol_count = |
5815
|
0 |
975 |
{ |
5817
|
62777 |
975 |
const Marpa_Rule_ID l0_rule_count = |
5846
|
0 |
975 |
slr->gift = marpa__slr_new(); |
5859
|
952 |
23 |
if (r0) |
5871
|
975 |
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 |
6472 |
if (slr->is_external_scanning) |
6040
|
29585 |
4530 |
if (slr->lexer_start_pos >= 0) |
6042
|
861 |
28724 |
if (slr->lexer_start_pos >= slr->end_pos) |
6050
|
0 |
28724 |
if (trace_lexers >= 1) |
6059
|
33254 |
0 |
lexer_read_result = slr->lexer_read_result = u_read (slr); |
|
4530 |
28724 |
lexer_read_result = slr->lexer_read_result = u_read (slr); |
|
0 |
4530 |
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 |
28047 |
if (marpa_r_is_exhausted (slr->r1)) |
6086
|
10 |
667 |
if (discard_result < 0) |
6094
|
29 |
28018 |
if (result_string) |
6103
|
1042 |
27643 |
if (event_count) |
6109
|
27643 |
0 |
if (slr->trace_terminals || slr->trace_lexers) |
|
27643 |
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 |
6787 |
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 |
6787 |
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 |
935 |
if (SvTAINTED (string)) |
|
1 |
39 |
if (SvTAINTED (string)) |
6867
|
974 |
0 |
SvSetSV (slr->input, string); |
6868
|
974 |
0 |
start_of_string = (U8 *) SvPV_force_nomg (slr->input, pv_length); |
6878
|
90625 |
974 |
for (p = start_of_string; p < end_of_string;) |
6882
|
7033 |
83592 |
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 |
90601 |
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 |
90617 |
if (codepoint == 0x0a && previous_codepoint == 0x0d) |
6919
|
1 |
7 |
if (previous_linecol < 0) |
6929
|
86741 |
3876 |
this_column > 1 ? 1-this_column : this_line; |
6930
|
3118 |
87499 |
switch (codepoint) |
6990
|
4442 |
88 |
if (use_array) |
6993
|
0 |
4442 |
Renew (ops, op_count, IV); |
7001
|
88 |
0 |
ops = (IV *) SvPV (ops_sv, dummy); |
7005
|
95050 |
4530 |
for (op_ix = 2; op_ix < op_count; op_ix++) |
7010
|
0 |
95050 |
ops[op_ix] = SvUV (ST (op_ix)); |
7012
|
88 |
4442 |
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 ) { |