Lines Matching refs:sst

285 big_scan_state	sst[MAXSTATES];	/* scanner FSM state entries */
381 if (1 > token || token >= COUNTOF(sst)) {
383 "keyword-gen sst[%u] too small "
385 (int)COUNTOF(sst),
390 sst[token].finishes_token = token;
399 (int)COUNTOF(sst) - 1);
403 printf("const scan_state sst[%d] = {\n"
412 if (sst[i].followedby & ~0x3) {
415 "sst[%d].followedby %d too big\n",
416 i, sst[i].followedby);
420 if (sst_highwater <= sst[i].match_next_s
421 || sst[i].match_next_s & ~0x7ff) {
424 "sst[%d].match_next_s %d too big\n",
425 i, sst[i].match_next_s);
429 if (sst_highwater <= sst[i].other_next_s
430 || sst[i].other_next_s & ~0x7ff) {
433 "sst[%d].other_next_s %d too big\n",
434 i, sst[i].other_next_s);
438 if (sst[i].finishes_token) {
441 i, symbname(sst[i].finishes_token));
442 if (i != sst[i].finishes_token) {
446 i, sst[i].finishes_token);
470 if (sst[state].other_next_s == this_state) {
473 } else if (sst[state].match_next_s == this_state) {
475 rprefix[prefix_len] = sst[state].ch;
498 sst[i].ch,
499 sst[i].followedby,
500 sst[i].match_next_s,
501 sst[i].other_next_s,
539 while (curr_char_s && (text[0] < sst[curr_char_s].ch)) {
541 curr_char_s = sst[curr_char_s].other_next_s;
549 if (curr_char_s && (text[0] == sst[curr_char_s].ch)) {
561 while (my_state < COUNTOF(sst)
562 && sst[my_state].finishes_token);
563 if (my_state >= COUNTOF(sst)) {
566 "sst[%d] is too small, modify\n"
568 (int)COUNTOF(sst));
572 sst[my_state].ch = text[0];
573 sst[my_state].other_next_s = curr_char_s;
574 sst[my_state].followedby = FOLLBY_NON_ACCEPTING;
577 sst[prev_char_s].other_next_s = my_state;
588 sst[my_state].finishes_token = (u_short)token;
589 sst[my_state].followedby = (char)followedby;
591 if (sst[token].finishes_token != (u_short)token) {
593 "fatal, sst[%d] not reserved for %s.\n",
597 /* relocate so token id is sst[] index */
599 sst[token] = sst[my_state];
600 ZERO(sst[my_state]);
603 while (sst[sst_highwater].finishes_token);
606 sst[prev_char_s].other_next_s = my_state;
611 sst[my_state].match_next_s =
616 sst[my_state].match_next_s);