Lines Matching refs:token

31 /* Define a structure to hold a (keyword, token) pair */
34 u_short token; /* Associated Token */
35 follby followedby; /* nonzero indicates the next token(s)
251 char followedby; /* Forces next token(s) to T_String */
261 * array with one entry per token, and shrinking the char value to
271 char * symb[1024]; /* map token ID to symbolic name */
345 u_short token;
357 * token number for its terminal state, so the token identifier
364 token = ntp_keywords[i].token;
365 if (1 > token || token >= COUNTOF(sst)) {
371 token);
374 sst[token].finishes_token = token;
429 "entry %d finishes token %d\n",
446 * using the spelling of the keyword as its T_* token
499 * This function takes a suffix of a keyword, the token to be returned on
506 u_short token,
572 sst[my_state].finishes_token = (u_short)token;
575 if (sst[token].finishes_token != (u_short)token) {
578 token, symbname(token));
581 /* relocate so token id is sst[] index */
582 if (my_state != token) {
583 sst[token] = sst[my_state];
588 my_state = token;
598 token,
606 /* Define a function that takes a list of (keyword, token) values and
624 ntp_keywords[i].token,
642 /* sort ntp_keywords in token ID order */
646 lowest_id = ntp_keywords[0].token;
647 highest_id = ntp_keywords[COUNTOF(ntp_keywords) - 1].token;
657 while (id < ntp_keywords[i].token) {
684 if (p1->token == p2->token)
687 if (p1->token < p2->token)
708 * populate_symb() - populate symb[] lookup array with symbolic token
719 int token;
728 if (2 == sscanf(line, "#define %s %d", name, &token)
729 && 'T' == name[0] && '_' == name[1] && token >= 0
730 && token < COUNTOF(symb)) {
732 symb[token] = estrdup(name);
747 u_short token
752 if (token < COUNTOF(symb) && symb[token] != NULL) {
753 name = symb[token];
756 snprintf(name, LIB_BUFLENGTH, "%d", token);