Lines Matching refs:token
30 /* Define a structure to hold a (keyword, token) pair */
33 u_short token; /* Associated Token */
34 follby followedby; /* nonzero indicates the next token(s)
267 char followedby; /* Forces next token(s) to T_String */
277 * array with one entry per token, and shrinking the char value to
287 char * symb[1024]; /* map token ID to symbolic name */
361 u_short token;
373 * token number for its terminal state, so the token identifier
380 token = ntp_keywords[i].token;
381 if (1 > token || token >= COUNTOF(sst)) {
387 token);
390 sst[token].finishes_token = token;
445 "entry %d finishes token %d\n",
462 * using the spelling of the keyword as its T_* token
515 * This function takes a suffix of a keyword, the token to be returned on
522 u_short token,
588 sst[my_state].finishes_token = (u_short)token;
591 if (sst[token].finishes_token != (u_short)token) {
594 token, symbname(token));
597 /* relocate so token id is sst[] index */
598 if (my_state != token) {
599 sst[token] = sst[my_state];
604 my_state = token;
614 token,
622 /* Define a function that takes a list of (keyword, token) values and
640 ntp_keywords[i].token,
658 /* sort ntp_keywords in token ID order */
662 lowest_id = ntp_keywords[0].token;
663 highest_id = ntp_keywords[COUNTOF(ntp_keywords) - 1].token;
673 while (id < ntp_keywords[i].token) {
700 if (p1->token == p2->token)
703 if (p1->token < p2->token)
724 * populate_symb() - populate symb[] lookup array with symbolic token
735 int token;
744 if (2 == sscanf(line, "#define %s %d", name, &token)
745 && 'T' == name[0] && '_' == name[1] && token >= 0
746 && token < COUNTOF(symb)) {
748 symb[token] = estrdup(name);
763 u_short token
768 if (token < COUNTOF(symb) && symb[token] != NULL) {
769 name = symb[token];
772 snprintf(name, LIB_BUFLENGTH, "%d", token);