Lines Matching defs: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)
255 char followedby; /* Forces next token(s) to T_String */
265 * array with one entry per token, and shrinking the char value to
275 char * symb[1024]; /* map token ID to symbolic name */
349 u_short token;
361 * token number for its terminal state, so the token identifier
368 token = ntp_keywords[i].token;
369 if (1 > token || token >= COUNTOF(sst)) {
375 token);
378 sst[token].finishes_token = token;
433 "entry %d finishes token %d\n",
450 * using the spelling of the keyword as its T_* token
503 * This function takes a suffix of a keyword, the token to be returned on
510 u_short token,
576 sst[my_state].finishes_token = (u_short)token;
579 if (sst[token].finishes_token != (u_short)token) {
582 token, symbname(token));
585 /* relocate so token id is sst[] index */
586 if (my_state != token) {
587 sst[token] = sst[my_state];
592 my_state = token;
602 token,
610 /* Define a function that takes a list of (keyword, token) values and
628 ntp_keywords[i].token,
646 /* sort ntp_keywords in token ID order */
650 lowest_id = ntp_keywords[0].token;
651 highest_id = ntp_keywords[COUNTOF(ntp_keywords) - 1].token;
661 while (id < ntp_keywords[i].token) {
688 if (p1->token == p2->token)
691 if (p1->token < p2->token)
712 * populate_symb() - populate symb[] lookup array with symbolic token
723 int token;
732 if (2 == sscanf(line, "#define %s %d", name, &token)
733 && 'T' == name[0] && '_' == name[1] && token >= 0
734 && token < COUNTOF(symb)) {
736 symb[token] = estrdup(name);
751 u_short token
756 if (token < COUNTOF(symb) && symb[token] != NULL) {
757 name = symb[token];
760 snprintf(name, LIB_BUFLENGTH, "%d", token);