/[bison]/bison/src/lex.c
ViewVC logotype

Diff of /bison/src/lex.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.41 by pascal, Fri Oct 19 11:03:50 2001 UTC revision 1.42 by akim, Thu Nov 1 18:05:22 2001 UTC
# Line 36  const char *token_buffer = NULL; Line 36  const char *token_buffer = NULL;
36  bucket *symval;  bucket *symval;
37  int numval;  int numval;
38    
39  /* these two describe a token to be reread */  /* A token to be reread, see unlex and lex. */
40  static token_t unlexed = tok_undef;  static token_t unlexed = tok_undef;
 /* by the next call to lex */  
41  static bucket *unlexed_symval = NULL;  static bucket *unlexed_symval = NULL;
42    static const char *unlexed_token_buffer = NULL;
43    
44  void  void
45  lex_init (void)  lex_init (void)
# Line 325  void Line 324  void
324  unlex (token_t token)  unlex (token_t token)
325  {  {
326    unlexed = token;    unlexed = token;
327      unlexed_token_buffer = token_buffer;
328    unlexed_symval = symval;    unlexed_symval = symval;
329  }  }
330    
# Line 369  lex (void) Line 369  lex (void)
369      {      {
370        token_t res = unlexed;        token_t res = unlexed;
371        symval = unlexed_symval;        symval = unlexed_symval;
372          token_buffer = unlexed_token_buffer;
373        unlexed = tok_undef;        unlexed = tok_undef;
374        return res;        return res;
375      }      }

Legend:
Removed from v.1.41  
changed lines
  Added in v.1.42

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26