Lines Matching refs:token

37 static struct token *get_toplvl_escape (struct linereader *lr);
38 static struct token *get_symname (struct linereader *lr);
39 static struct token *get_ident (struct linereader *lr);
40 static struct token *get_string (struct linereader *lr,
191 struct token *
206 lr->token.tok = tok_eof; in lr_token()
207 return &lr->token; in lr_token()
212 lr->token.tok = tok_eol; in lr_token()
213 return &lr->token; in lr_token()
233 lr->token.tok = tok_eol; in lr_token()
234 return &lr->token; in lr_token()
249 lr->token.tok = tok_ellipsis4_2; in lr_token()
250 return &lr->token; in lr_token()
257 lr->token.tok = tok_ellipsis4; in lr_token()
258 return &lr->token; in lr_token()
264 lr->token.tok = tok_ellipsis3; in lr_token()
265 return &lr->token; in lr_token()
272 lr->token.tok = tok_ellipsis2_2; in lr_token()
273 return &lr->token; in lr_token()
278 lr->token.tok = tok_ellipsis2; in lr_token()
279 return &lr->token; in lr_token()
289 lr->token.tok = tok_number; in lr_token()
290 lr->token.val.num = ch - '0'; in lr_token()
294 lr->token.val.num *= 10; in lr_token()
295 lr->token.val.num += ch - '0'; in lr_token()
301 return &lr->token; in lr_token()
304 lr->token.tok = tok_semicolon; in lr_token()
305 return &lr->token; in lr_token()
308 lr->token.tok = tok_comma; in lr_token()
309 return &lr->token; in lr_token()
312 lr->token.tok = tok_open_brace; in lr_token()
313 return &lr->token; in lr_token()
316 lr->token.tok = tok_close_brace; in lr_token()
317 return &lr->token; in lr_token()
326 lr->token.tok = tok_minus1; in lr_token()
327 return &lr->token; in lr_token()
337 lr->token.tok = tok_error; in lr_token()
338 return &lr->token; in lr_token()
340 lr->token.tok = tok_ucs4; in lr_token()
341 lr->token.val.ucs4 = wch; in lr_token()
342 return &lr->token; in lr_token()
350 static struct token *
356 unsigned char *bytes = lr->token.val.charcode.bytes; in get_toplvl_escape()
382 lr->token.val.str.startmb = &lr->buf[start_idx]; in get_toplvl_escape()
386 lr->token.val.str.lenmb = lr->idx - start_idx; in get_toplvl_escape()
388 lr->token.tok = tok_error; in get_toplvl_escape()
389 return &lr->token; in get_toplvl_escape()
420 && nbytes < (int) sizeof (lr->token.val.charcode.bytes)); in get_toplvl_escape()
427 lr->token.tok = tok_charcode; in get_toplvl_escape()
428 lr->token.val.charcode.nbytes = nbytes; in get_toplvl_escape()
430 return &lr->token; in get_toplvl_escape()
454 lr->token.val.str.startmb = xrealloc (lrb->buf, lrb->act + 1); in lr_buffer_to_token()
455 lr->token.val.str.startmb[lrb->act] = '\0'; in lr_buffer_to_token()
456 lr->token.val.str.lenmb = lrb->act; in lr_buffer_to_token()
501 static struct token *
543 lr->token.tok = tok_ucs4; in get_symname()
544 lr->token.val.ucs4 = strtoul (lrb.buf + 1, NULL, 16); in get_symname()
546 return &lr->token; in get_symname()
555 lr->token.tok = kw->token; in get_symname()
560 lr->token.tok = tok_bsymbol; in get_symname()
562 --lr->token.val.str.lenmb; /* Hide the training '>'. */ in get_symname()
565 return &lr->token; in get_symname()
569 static struct token *
601 lr->token.tok = kw->token; in get_ident()
606 lr->token.tok = tok_ident; in get_ident()
610 return &lr->token; in get_ident()
772 static struct token *
784 lr->token.tok = tok_string; in get_string()
987 lr->token.val.str.startmb = NULL; in get_string()
988 lr->token.val.str.lenmb = 0; in get_string()
989 lr->token.val.str.startwc = NULL; in get_string()
990 lr->token.val.str.lenwc = 0; in get_string()
992 return &lr->token; in get_string()
1000 lr->token.val.str.startwc = xrealloc (buf2, in get_string()
1002 lr->token.val.str.lenwc = buf2act; in get_string()
1008 return &lr->token; in get_string()