Lines Matching defs:tokp
75 scan(tok_kind expect, token *tokp)
77 get_token(tokp);
78 if (tokp->kind != expect) {
87 scan2(tok_kind expect1, tok_kind expect2, token *tokp)
89 get_token(tokp);
90 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) {
112 scan_num(token *tokp)
114 get_token(tokp);
115 switch (tokp->kind) {
127 peek(token *tokp)
129 get_token(tokp);
130 unget_token(tokp);
137 peekscan(tok_kind expect, token *tokp)
139 peek(tokp);
140 if (tokp->kind == expect) {
141 get_token(tokp);
151 get_token(token *tokp)
159 *tokp = lasttok;
167 tokp->kind = TOK_EOF;
215 tokp->kind = TOK_COLON;
219 tokp->kind = TOK_SEMICOLON;
223 tokp->kind = TOK_COMMA;
227 tokp->kind = TOK_EQUAL;
231 tokp->kind = TOK_STAR;
235 tokp->kind = TOK_LBRACKET;
239 tokp->kind = TOK_RBRACKET;
243 tokp->kind = TOK_LBRACE;
247 tokp->kind = TOK_RBRACE;
251 tokp->kind = TOK_LPAREN;
255 tokp->kind = TOK_RPAREN;
259 tokp->kind = TOK_LANGLE;
263 tokp->kind = TOK_RANGLE;
268 tokp->kind = TOK_STRCONST;
269 findstrconst(&where, &tokp->str);
272 tokp->kind = TOK_CHARCONST;
273 findchrconst(&where, &tokp->str);
287 tokp->kind = TOK_IDENT;
288 findconst(&where, &tokp->str);
305 findkind(&where, tokp);
311 unget_token(token *tokp)
313 lasttok = *tokp;
417 findkind(char **mark, token *tokp)
428 tokp->kind = s->kind;
429 tokp->str = s->str;
435 tokp->kind = TOK_IDENT;
439 tokp->str = tmp;