36 |
bucket *symval; |
bucket *symval; |
37 |
int numval; |
int numval; |
38 |
|
|
39 |
static int unlexed; /* these two describe a token to be reread */ |
/* these two describe a token to be reread */ |
40 |
static bucket *unlexed_symval; /* by the next call to lex */ |
static token_t unlexed = tok_undef; |
41 |
|
/* by the next call to lex */ |
42 |
|
static bucket *unlexed_symval = NULL; |
43 |
|
|
44 |
|
|
45 |
void |
void |
46 |
init_lex (void) |
init_lex (void) |
47 |
{ |
{ |
48 |
obstack_init (&token_obstack); |
obstack_init (&token_obstack); |
49 |
unlexed = -1; |
unlexed = tok_undef; |
50 |
} |
} |
51 |
|
|
52 |
|
|
358 |
/* Just to make sure. */ |
/* Just to make sure. */ |
359 |
token_buffer = NULL; |
token_buffer = NULL; |
360 |
|
|
361 |
if (unlexed >= 0) |
if (unlexed != tok_undef) |
362 |
{ |
{ |
363 |
|
token_t res = unlexed; |
364 |
symval = unlexed_symval; |
symval = unlexed_symval; |
365 |
c = unlexed; |
unlexed = tok_undef; |
366 |
unlexed = -1; |
return res; |
|
return c; |
|
367 |
} |
} |
368 |
|
|
369 |
c = skip_white_space (); |
c = skip_white_space (); |
518 |
{ |
{ |
519 |
const char *name; |
const char *name; |
520 |
void *set_flag; |
void *set_flag; |
521 |
int retval; |
token_t retval; |
522 |
}; |
}; |
523 |
|
|
524 |
struct percent_table_struct percent_table[] = |
struct percent_table_struct percent_table[] = |
568 |
/* Parse a token which starts with %. |
/* Parse a token which starts with %. |
569 |
Assumes the % has already been read and discarded. */ |
Assumes the % has already been read and discarded. */ |
570 |
|
|
571 |
int |
token_t |
572 |
parse_percent_token (void) |
parse_percent_token (void) |
573 |
{ |
{ |
|
int c; |
|
574 |
struct percent_table_struct *tx; |
struct percent_table_struct *tx; |
575 |
|
|
576 |
c = getc (finput); |
int c = getc (finput); |
577 |
|
|
578 |
switch (c) |
switch (c) |
579 |
{ |
{ |
636 |
case tok_obsolete: |
case tok_obsolete: |
637 |
fatal (_("`%s' is no longer supported"), token_buffer); |
fatal (_("`%s' is no longer supported"), token_buffer); |
638 |
break; |
break; |
639 |
|
|
640 |
|
default: |
641 |
|
/* Other cases do not apply here. */ |
642 |
|
break; |
643 |
} |
} |
644 |
|
|
645 |
return tx->retval; |
return tx->retval; |