Lines Matching refs:token

33 /* Define a structure to hold a (keyword, token) pair */
36 u_short token; /* Associated Token */
37 follby followedby; /* nonzero indicates the next token(s)
265 char followedby; /* Forces next token(s) to T_String */
275 * array with one entry per token, and shrinking the char value to
285 char * symb[1024]; /* map token ID to symbolic name */
359 u_short token;
371 * token number for its terminal state, so the token identifier
378 token = ntp_keywords[i].token;
379 if (1 > token || token >= COUNTOF(sst)) {
385 token);
388 sst[token].finishes_token = token;
443 "entry %d finishes token %d\n",
460 * using the spelling of the keyword as its T_* token
513 * This function takes a suffix of a keyword, the token to be returned on
520 u_short token,
586 sst[my_state].finishes_token = (u_short)token;
589 if (sst[token].finishes_token != (u_short)token) {
592 token, symbname(token));
595 /* relocate so token id is sst[] index */
596 if (my_state != token) {
597 sst[token] = sst[my_state];
602 my_state = token;
612 token,
620 /* Define a function that takes a list of (keyword, token) values and
638 ntp_keywords[i].token,
656 /* sort ntp_keywords in token ID order */
660 lowest_id = ntp_keywords[0].token;
661 highest_id = ntp_keywords[COUNTOF(ntp_keywords) - 1].token;
671 while (id < ntp_keywords[i].token) {
698 if (p1->token == p2->token)
701 if (p1->token < p2->token)
722 * populate_symb() - populate symb[] lookup array with symbolic token
733 int token;
742 if (2 == sscanf(line, "#define %s %d", name, &token)
743 && 'T' == name[0] && '_' == name[1] && token >= 0
744 && token < COUNTOF(symb)) {
746 symb[token] = estrdup(name);
761 u_short token
766 if (token < COUNTOF(symb) && symb[token] != NULL) {
767 name = symb[token];
770 snprintf(name, LIB_BUFLENGTH, "%d", token);