symtab.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Definitions for symtab.c and callers, part of bison,
  2. Copyright (C) 1984, 1989, 1992 Free Software Foundation, Inc.
  3. Modified (1992) from bison-1.19 by
  4. Wilfred J. Hansen (wjh+@cmu.edu)
  5. Andrew Consortium, Carnegie Mellon University
  6. This file is part of Bison, the GNU Compiler Compiler.
  7. Bison is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2, or (at your option)
  10. any later version.
  11. Bison is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU General Public License for more details.
  15. You should have received a copy of the GNU General Public License
  16. along with Bison; see the file COPYING. If not, write to
  17. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
  18. #define TABSIZE 1009
  19. /* symbol classes */
  20. #define SUNKNOWN 0
  21. #define STOKEN 1 /* terminal symbol */
  22. #define SNTERM 2 /* non-terminal */
  23. #define STHONG -9991 /* for first symbol generated for a %thong */
  24. typedef
  25. struct bucket
  26. {
  27. struct bucket *link;
  28. struct bucket *next;
  29. char *tag;
  30. char *type_name;
  31. short value;
  32. short prec;
  33. short assoc;
  34. short user_token_number;
  35. /* special value STHONG in the identifier
  36. half of the identifier-symbol pair for a %thong */
  37. struct bucket *thong_buddy;
  38. /* points to the other in the identifier-symbol
  39. pair for a %thong */
  40. char class;
  41. }
  42. bucket;
  43. extern bucket **symtab;
  44. extern bucket *firstsymbol;
  45. extern bucket *getsym();