LLlex.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. /* $Id$ */
  6. /* D E F I N I T I O N S F O R T H E L E X I C A L A N A L Y Z E R */
  7. /* A token from the input stream is represented by an integer,
  8. called a "symbol", but it may have other information associated
  9. to it.
  10. */
  11. /* the structure of a token: */
  12. struct token {
  13. int tok_symb; /* the token itself */
  14. union {
  15. char *tok_str;
  16. struct {
  17. int tok_unsigned;
  18. arith tok_val; /* for INTEGER */
  19. } tok_int;
  20. } tok_data;
  21. };
  22. #include "file_info.h"
  23. #define tk_symb tok_symb
  24. #define tk_str tok_data.tok_str
  25. #define tk_val tok_data.tok_int.tok_val
  26. #define tk_unsigned tok_data.tok_int.tok_unsigned
  27. extern struct token dot;
  28. extern int ReplaceMacros; /* "LLlex.c" */
  29. extern int AccDefined; /* "LLlex.c" */
  30. extern int Unstacked; /* "LLlex.c" */
  31. extern int UnknownIdIsZero; /* "LLlex.c" */
  32. extern int AccFileSpecifier; /* "LLlex.c" */
  33. extern int NoUnstack; /* buffer.c */
  34. extern int err_occurred; /* "error.c" */
  35. #define DOT dot.tk_symb
  36. #define EOF (-1)