Lines Matching +full:k +full:- +full:to +full:- +full:j

63 	for (p = list; p; p = p->next)  in puts_param_types()
65 size_t len_type = strlen(p->type); in puts_param_types()
66 fprintf(fp, "%s%s%s%s%s", p->type, in puts_param_types()
67 (((len_type != 0) && (p->type[len_type - 1] == '*')) in puts_param_types()
70 p->name, p->type2, in puts_param_types()
71 ((more || p->next) ? ", " : "")); in puts_param_types()
86 for (p = list; p; p = p->next) in puts_param_names()
88 fprintf(fp, "%s%s", p->name, in puts_param_names()
89 ((more || p->next) ? ", " : "")); in puts_param_names()
127 fprintf(fp, "#define %-10s %s%s\n", name, symbol_prefix, name + 2); in define_prefixed()
233 int need = 34 - (int)(strlen(symbol_prefix) + strlen(name)); in start_int_table()
291 putl_code(fp, "#define YYRHSLOC(rhs, k) ((rhs)[k])\n"); in output_ltype()
298 /* generate the type used to index the various parser tables */ in output_YYINT_typedef()
308 int j; in output_rule_data() local
314 j = 10; in output_rule_data()
317 if (j >= 10) in output_rule_data()
320 j = 1; in output_rule_data()
323 ++j; in output_rule_data()
331 j = 10; in output_rule_data()
334 if (j >= 10) in output_rule_data()
337 j = 1; in output_rule_data()
340 j++; in output_rule_data()
342 output_int(rrhs[i + 1] - rrhs[i] - 1); in output_rule_data()
350 int i, j; in output_yydefred() local
352 start_int_table("defred", (defred[0] ? defred[0] - 2 : 0)); in output_yydefred()
354 j = 10; in output_yydefred()
357 if (j < 10) in output_yydefred()
358 ++j; in output_yydefred()
362 j = 1; in output_yydefred()
365 output_int((defred[i] ? defred[i] - 2 : 0)); in output_yydefred()
377 int i, j; in output_accessing_symbols() local
392 /* yystos[] may be unused, depending on compile-time defines */ in output_accessing_symbols()
395 j = 10; in output_accessing_symbols()
398 if (j < 10) in output_accessing_symbols()
399 ++j; in output_accessing_symbols()
403 j = 1; in output_accessing_symbols()
419 int i, j; in find_conflict_base() local
423 for (j = 0; j + cbase < nconflicts; j++) in find_conflict_base()
425 if (conflicts[i + j] != conflicts[cbase + j]) in find_conflict_base()
428 if (j + cbase >= nconflicts) in find_conflict_base()
438 int i, j; in token_actions() local
442 Value_t csym = -1; in token_actions()
454 for (j = 0; j < PER_STATE * ntokens; ++j) in token_actions()
455 actionrow[j] = 0; in token_actions()
463 csym = -1; in token_actions()
467 for (p = parser[i]; p; p = p->next) in token_actions()
472 if (csym != -1 && csym != p->symbol) in token_actions()
475 conflicts[nconflicts++] = -1; in token_actions()
476 j = find_conflict_base(cbase); in token_actions()
477 actionrow[csym + 2 * ntokens] = (Value_t)(j + 1); in token_actions()
478 if (j == cbase) in token_actions()
484 if (conflicts[cbase] == -1) in token_actions()
488 csym = -1; in token_actions()
492 if (p->suppressed == 0) in token_actions()
494 if (p->action_code == SHIFT) in token_actions()
497 actionrow[p->symbol] = p->number; in token_actions()
499 else if (p->action_code == REDUCE && p->number != defred[i]) in token_actions()
502 actionrow[p->symbol + ntokens] = p->number; in token_actions()
506 else if (backtrack && p->suppressed == 1) in token_actions()
508 csym = p->symbol; in token_actions()
509 if (p->action_code == SHIFT) in token_actions()
511 conflicts[nconflicts++] = p->number; in token_actions()
513 else if (p->action_code == REDUCE && p->number != defred[i]) in token_actions()
518 cbase--; in token_actions()
520 conflicts[nconflicts++] = -1; in token_actions()
522 conflicts[nconflicts++] = (Value_t)(p->number - 2); in token_actions()
528 if (backtrack && csym != -1) in token_actions()
531 conflicts[nconflicts++] = -1; in token_actions()
532 j = find_conflict_base(cbase); in token_actions()
533 actionrow[csym + 2 * ntokens] = (Value_t)(j + 1); in token_actions()
534 if (j == cbase) in token_actions()
540 if (conflicts[cbase] == -1) in token_actions()
565 for (j = 0; j < ntokens; ++j) in token_actions()
567 if (actionrow[j]) in token_actions()
569 if (min > symbol_value[j]) in token_actions()
570 min = symbol_value[j]; in token_actions()
571 if (max < symbol_value[j]) in token_actions()
572 max = symbol_value[j]; in token_actions()
573 *r++ = symbol_value[j]; in token_actions()
574 *s++ = actionrow[j]; in token_actions()
577 width[i] = (Value_t)(max - min + 1); in token_actions()
585 for (j = 0; j < ntokens; ++j) in token_actions()
587 if (actionrow[ntokens + j]) in token_actions()
589 if (min > symbol_value[j]) in token_actions()
590 min = symbol_value[j]; in token_actions()
591 if (max < symbol_value[j]) in token_actions()
592 max = symbol_value[j]; in token_actions()
593 *r++ = symbol_value[j]; in token_actions()
594 *s++ = (Value_t)(actionrow[ntokens + j] - 2); in token_actions()
597 width[nstates + i] = (Value_t)(max - min + 1); in token_actions()
606 for (j = 0; j < ntokens; ++j) in token_actions()
608 if (actionrow[2 * ntokens + j]) in token_actions()
610 if (min > symbol_value[j]) in token_actions()
611 min = symbol_value[j]; in token_actions()
612 if (max < symbol_value[j]) in token_actions()
613 max = symbol_value[j]; in token_actions()
614 *r++ = symbol_value[j]; in token_actions()
615 *s++ = (Value_t)(actionrow[2 * ntokens + j] - 1); in token_actions()
618 width[2 * nstates + i] = (Value_t)(max - min + 1); in token_actions()
700 width[symno] = (Value_t)(sp1[-1] - sp[0] + 1); in save_column()
706 int i, j, k; in goto_actions() local
710 k = default_goto(start_symbol + 1); in goto_actions()
711 start_int_table("dgoto", k); in goto_actions()
712 save_column(start_symbol + 1, k); in goto_actions()
714 j = 10; in goto_actions()
717 if (j >= 10) in goto_actions()
720 j = 1; in goto_actions()
723 ++j; in goto_actions()
725 k = default_goto(i); in goto_actions()
726 output_int(k); in goto_actions()
727 save_column(i, k); in goto_actions()
738 int j; in sort_actions() local
739 int k; in sort_actions() local
752 j = nentries - 1; in sort_actions()
754 while (j >= 0 && (width[order[j]] < w)) in sort_actions()
755 j--; in sort_actions()
757 while (j >= 0 && (width[order[j]] == w) && (tally[order[j]] < t)) in sort_actions()
758 j--; in sort_actions()
760 for (k = nentries - 1; k > j; k--) in sort_actions()
761 order[k + 1] = order[k]; in sort_actions()
763 order[j + 1] = i; in sort_actions()
778 /* unlikely. Therefore, to save time, no attempt is made to see if a */
786 /* Not really any point in checking for matching conflicts -- it is */
787 /* extremely unlikely to occur, and conflicts are (hopefully) rare. */
794 int k; in matching_vector() local
801 return (-1); in matching_vector()
806 for (prev = vector - 1; prev >= 0; prev--) in matching_vector()
808 int j = order[prev]; in matching_vector() local
810 if (width[j] != w || tally[j] != t) in matching_vector()
812 return (-1); in matching_vector()
818 for (k = 0; match && k < t; k++) in matching_vector()
820 if (tos[j][k] != tos[i][k] || froms[j][k] != froms[i][k]) in matching_vector()
825 return (j); in matching_vector()
829 return (-1); in matching_vector()
835 int i, j, k, l; in pack_vector() local
840 Value_t *to; in pack_vector() local
848 to = tos[i]; in pack_vector()
850 j = lowzero - from[0]; in pack_vector()
851 for (k = 1; k < t; ++k) in pack_vector()
852 if (lowzero - from[k] > j) in pack_vector()
853 j = lowzero - from[k]; in pack_vector()
854 for (;; ++j) in pack_vector()
856 if (j == 0) in pack_vector()
859 for (k = 0; ok && k < t; k++) in pack_vector()
861 loc = (Value_t)(j + from[k]); in pack_vector()
862 if (loc >= maxtable - 1) in pack_vector()
864 if (loc >= MAXTABLE - 1) in pack_vector()
883 check[l] = -1; in pack_vector()
888 if (check[loc] != -1) in pack_vector()
891 for (k = 0; ok && k < vector; k++) in pack_vector()
893 if (pos[k] == j) in pack_vector()
898 for (k = 0; k < t; k++) in pack_vector()
900 loc = (Value_t)(j + from[k]); in pack_vector()
901 table[loc] = to[k]; in pack_vector()
902 check[loc] = from[k]; in pack_vector()
907 while (check[lowzero] != -1) in pack_vector()
910 return (j); in pack_vector()
932 check[i] = -1; in pack_table()
965 int i, j; in output_base() local
969 j = 10; in output_base()
972 if (j >= 10) in output_base()
975 j = 1; in output_base()
978 ++j; in output_base()
987 j = 10; in output_base()
990 if (j >= 10) in output_base()
993 j = 1; in output_base()
996 ++j; in output_base()
1007 j = 10; in output_base()
1010 if (j >= 10) in output_base()
1013 j = 1; in output_base()
1016 ++j; in output_base()
1027 j = 10; in output_base()
1028 for (i = PER_STATE * nstates + 1; i < nvectors - 1; i++) in output_base()
1030 if (j >= 10) in output_base()
1033 j = 1; in output_base()
1036 ++j; in output_base()
1049 int j; in output_table() local
1062 j = 10; in output_table()
1065 if (j >= 10) in output_table()
1068 j = 1; in output_table()
1071 ++j; in output_table()
1084 int j; in output_check() local
1088 j = 10; in output_check()
1091 if (j >= 10) in output_check()
1094 j = 1; in output_check()
1097 ++j; in output_check()
1111 int j; in output_ctable() local
1118 start_int_table("ctable", conflicts ? conflicts[0] : -1); in output_ctable()
1120 j = 10; in output_ctable()
1123 if (j >= 10) in output_ctable()
1126 j = 1; in output_ctable()
1129 ++j; in output_ctable()
1131 output_int((conflicts != 0 && i < nconflicts) ? conflicts[i] : -1); in output_ctable()
1341 int i, j, k, max, maxtok; in output_debug() local
1360 /* symbol_value[$accept] = -1 */ in output_debug()
1362 /* remaining non-terminals start at 1 */ in output_debug()
1381 /* Note that it is not necessary to initialize the element */ in output_debug()
1386 for (i = nsyms - 1; i >= 0; --i) in output_debug()
1388 symnam[max + 1] = "illegal-symbol"; in output_debug()
1392 for (i = ntokens - 1; i >= 2; --i) in output_debug()
1394 symnam[0] = "end-of-file"; in output_debug()
1395 symnam[max + 1] = "illegal-symbol"; in output_debug()
1402 * If the grammar declares "%token-table", define symbol "yytname" so in output_debug()
1419 j = 80; in output_debug()
1426 k = 7; in output_debug()
1429 ++k; in output_debug()
1432 k += 2; in output_debug()
1434 ++k; in output_debug()
1437 j += k; in output_debug()
1438 if (j > 80) in output_debug()
1441 j = k; in output_debug()
1464 j += 7; in output_debug()
1465 if (j > 80) in output_debug()
1468 j = 7; in output_debug()
1474 k = 5; in output_debug()
1477 ++k; in output_debug()
1480 k += 2; in output_debug()
1482 ++k; in output_debug()
1485 j += k; in output_debug()
1486 if (j > 80) in output_debug()
1489 j = k; in output_debug()
1511 k = (int)strlen(s) + 3; in output_debug()
1512 j += k; in output_debug()
1513 if (j > 80) in output_debug()
1516 j = k; in output_debug()
1529 j += 2; in output_debug()
1530 if (j > 80) in output_debug()
1533 j = 2; in output_debug()
1547 for (j = rrhs[i]; ritem[j] > 0; ++j) in output_debug()
1549 s = symbol_name[ritem[j]]; in output_debug()
1693 state = -1; in output_semantic_actions()
1702 * When writing the action file, we did not know the line-numbers in in output_semantic_actions()
1703 * the code-file, but wrote empty #line directives. Detect those and in output_semantic_actions()
1714 state = -1; in output_semantic_actions()
1724 state = -1; in output_semantic_actions()
1765 putl_code(fp, "/* Parameters sent to lex. */\n"); in output_lex_decl()
1888 putl_code(fp, "/* Parameters sent to yyerror. */\n"); in output_error_decl()
2011 next = cp->next; in free_itemsets()
2024 next = sp->next; in free_shifts()
2037 next = rp->next; in free_reductions()
2050 /* prefix non-blank lines that don't start with in output_externs()
2051 C pre-processor directives with 'extern ' */ in output_externs()