Lines Matching refs:tokp
77 scan(tok_kind expect, token *tokp)
79 get_token(tokp);
80 if (tokp->kind != expect) {
88 scan2(tok_kind expect1, tok_kind expect2, token *tokp)
90 get_token(tokp);
91 if (tokp->kind != expect1 && tokp->kind != expect2) {
99 scan3(tok_kind expect1, tok_kind expect2, tok_kind expect3, token *tokp)
101 get_token(tokp);
102 if (tokp->kind != expect1 && tokp->kind != expect2
103 && tokp->kind != expect3) {
111 scan_num(token *tokp)
113 get_token(tokp);
114 switch (tokp->kind) {
125 peek(token *tokp)
127 get_token(tokp);
128 unget_token(tokp);
134 peekscan(tok_kind expect, token *tokp)
136 peek(tokp);
137 if (tokp->kind == expect) {
138 get_token(tokp);
147 get_token(token *tokp)
153 *tokp = lasttok;
161 tokp->kind = TOK_EOF;
208 tokp->kind = TOK_COLON;
212 tokp->kind = TOK_SEMICOLON;
216 tokp->kind = TOK_COMMA;
220 tokp->kind = TOK_EQUAL;
224 tokp->kind = TOK_STAR;
228 tokp->kind = TOK_LBRACKET;
232 tokp->kind = TOK_RBRACKET;
236 tokp->kind = TOK_LBRACE;
240 tokp->kind = TOK_RBRACE;
244 tokp->kind = TOK_LPAREN;
248 tokp->kind = TOK_RPAREN;
252 tokp->kind = TOK_LANGLE;
256 tokp->kind = TOK_RANGLE;
261 tokp->kind = TOK_STRCONST;
262 findstrconst(&where, &tokp->str);
265 tokp->kind = TOK_CHARCONST;
266 findchrconst(&where, &tokp->str);
280 tokp->kind = TOK_IDENT;
281 findconst(&where, &tokp->str);
292 findkind(&where, tokp);
298 unget_token(token *tokp)
300 lasttok = *tokp;
407 findkind(char **mark, token *tokp)
420 tokp->kind = s->kind;
421 tokp->str = s->str;
427 tokp->kind = TOK_IDENT;
433 tokp->str = tmp;