parse-gram.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. /* A Bison parser, made by GNU Bison 3.2.90.23-0bbcb-dirty. */
  2. /* Bison interface for Yacc-like parsers in C
  3. Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
  4. Inc.
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  15. /* As a special exception, you may create a larger work that contains
  16. part or all of the Bison parser skeleton and distribute that work
  17. under terms of your choice, so long as that work isn't itself a
  18. parser generator using the skeleton or a modified version thereof
  19. as a parser skeleton. Alternatively, if you modify or redistribute
  20. the parser skeleton itself, you may (at your option) remove this
  21. special exception, which will cause the skeleton and the resulting
  22. Bison output files to be licensed under the GNU General Public
  23. License without this special exception.
  24. This special exception was added by the Free Software Foundation in
  25. version 2.2 of Bison. */
  26. /* Undocumented macros, especially those whose name start with YY_,
  27. are private implementation details. Do not rely on them. */
  28. #ifndef YY_GRAM_SRC_PARSE_GRAM_H_INCLUDED
  29. # define YY_GRAM_SRC_PARSE_GRAM_H_INCLUDED
  30. /* Debug traces. */
  31. #ifndef GRAM_DEBUG
  32. # if defined YYDEBUG
  33. #if YYDEBUG
  34. # define GRAM_DEBUG 1
  35. # else
  36. # define GRAM_DEBUG 0
  37. # endif
  38. # else /* ! defined YYDEBUG */
  39. # define GRAM_DEBUG 1
  40. # endif /* ! defined YYDEBUG */
  41. #endif /* ! defined GRAM_DEBUG */
  42. #if GRAM_DEBUG
  43. extern int gram_debug;
  44. #endif
  45. /* "%code requires" blocks. */
  46. #line 21 "src/parse-gram.y" /* yacc.c:1921 */
  47. #include "symlist.h"
  48. #include "symtab.h"
  49. #line 239 "src/parse-gram.y" /* yacc.c:1921 */
  50. typedef enum
  51. {
  52. param_none = 0,
  53. param_lex = 1 << 0,
  54. param_parse = 1 << 1,
  55. param_both = param_lex | param_parse
  56. } param_type;
  57. #line 682 "src/parse-gram.y" /* yacc.c:1921 */
  58. #include "muscle-tab.h"
  59. typedef struct
  60. {
  61. char const *chars;
  62. muscle_kind kind;
  63. } value_type;
  64. #line 78 "src/parse-gram.h" /* yacc.c:1921 */
  65. /* Token type. */
  66. #ifndef GRAM_TOKENTYPE
  67. # define GRAM_TOKENTYPE
  68. enum gram_tokentype
  69. {
  70. GRAM_EOF = 0,
  71. STRING = 258,
  72. PERCENT_TOKEN = 259,
  73. PERCENT_NTERM = 260,
  74. PERCENT_TYPE = 261,
  75. PERCENT_DESTRUCTOR = 262,
  76. PERCENT_PRINTER = 263,
  77. PERCENT_LEFT = 264,
  78. PERCENT_RIGHT = 265,
  79. PERCENT_NONASSOC = 266,
  80. PERCENT_PRECEDENCE = 267,
  81. PERCENT_PREC = 268,
  82. PERCENT_DPREC = 269,
  83. PERCENT_MERGE = 270,
  84. PERCENT_CODE = 271,
  85. PERCENT_DEFAULT_PREC = 272,
  86. PERCENT_DEFINE = 273,
  87. PERCENT_DEFINES = 274,
  88. PERCENT_ERROR_VERBOSE = 275,
  89. PERCENT_EXPECT = 276,
  90. PERCENT_EXPECT_RR = 277,
  91. PERCENT_FLAG = 278,
  92. PERCENT_FILE_PREFIX = 279,
  93. PERCENT_GLR_PARSER = 280,
  94. PERCENT_INITIAL_ACTION = 281,
  95. PERCENT_LANGUAGE = 282,
  96. PERCENT_NAME_PREFIX = 283,
  97. PERCENT_NO_DEFAULT_PREC = 284,
  98. PERCENT_NO_LINES = 285,
  99. PERCENT_NONDETERMINISTIC_PARSER = 286,
  100. PERCENT_OUTPUT = 287,
  101. PERCENT_REQUIRE = 288,
  102. PERCENT_SKELETON = 289,
  103. PERCENT_START = 290,
  104. PERCENT_TOKEN_TABLE = 291,
  105. PERCENT_VERBOSE = 292,
  106. PERCENT_YACC = 293,
  107. BRACED_CODE = 294,
  108. BRACED_PREDICATE = 295,
  109. BRACKETED_ID = 296,
  110. CHAR = 297,
  111. EPILOGUE = 298,
  112. EQUAL = 299,
  113. ID = 300,
  114. ID_COLON = 301,
  115. PERCENT_PERCENT = 302,
  116. PIPE = 303,
  117. PROLOGUE = 304,
  118. SEMICOLON = 305,
  119. TAG = 306,
  120. TAG_ANY = 307,
  121. TAG_NONE = 308,
  122. INT = 309,
  123. PERCENT_PARAM = 310,
  124. PERCENT_UNION = 311,
  125. PERCENT_EMPTY = 312
  126. };
  127. #endif
  128. /* Value type. */
  129. #if ! defined GRAM_STYPE && ! defined GRAM_STYPE_IS_DECLARED
  130. union GRAM_STYPE
  131. {
  132. /* precedence_declarator */
  133. assoc precedence_declarator;
  134. /* "string" */
  135. char* STRING;
  136. /* "{...}" */
  137. char* BRACED_CODE;
  138. /* "%?{...}" */
  139. char* BRACED_PREDICATE;
  140. /* "epilogue" */
  141. char* EPILOGUE;
  142. /* "%{...%}" */
  143. char* PROLOGUE;
  144. /* code_props_type */
  145. code_props_type code_props_type;
  146. /* "integer" */
  147. int INT;
  148. /* int.opt */
  149. int yytype_79;
  150. /* named_ref.opt */
  151. named_ref* yytype_91;
  152. /* "%param" */
  153. param_type PERCENT_PARAM;
  154. /* token_decl */
  155. symbol* token_decl;
  156. /* token_decl_for_prec */
  157. symbol* token_decl_for_prec;
  158. /* id */
  159. symbol* id;
  160. /* id_colon */
  161. symbol* id_colon;
  162. /* symbol */
  163. symbol* symbol;
  164. /* string_as_id */
  165. symbol* string_as_id;
  166. /* string_as_id.opt */
  167. symbol* yytype_98;
  168. /* generic_symlist */
  169. symbol_list* generic_symlist;
  170. /* generic_symlist_item */
  171. symbol_list* generic_symlist_item;
  172. /* nterm_decls */
  173. symbol_list* nterm_decls;
  174. /* token_decls */
  175. symbol_list* token_decls;
  176. /* token_decl.1 */
  177. symbol_list* yytype_77;
  178. /* token_decls_for_prec */
  179. symbol_list* token_decls_for_prec;
  180. /* token_decl_for_prec.1 */
  181. symbol_list* yytype_81;
  182. /* symbol_decls */
  183. symbol_list* symbol_decls;
  184. /* symbol_decl.1 */
  185. symbol_list* yytype_84;
  186. /* "%error-verbose" */
  187. uniqstr PERCENT_ERROR_VERBOSE;
  188. /* "%<flag>" */
  189. uniqstr PERCENT_FLAG;
  190. /* "%file-prefix" */
  191. uniqstr PERCENT_FILE_PREFIX;
  192. /* "%name-prefix" */
  193. uniqstr PERCENT_NAME_PREFIX;
  194. /* "%yacc" */
  195. uniqstr PERCENT_YACC;
  196. /* "[identifier]" */
  197. uniqstr BRACKETED_ID;
  198. /* "identifier" */
  199. uniqstr ID;
  200. /* "identifier:" */
  201. uniqstr ID_COLON;
  202. /* "<tag>" */
  203. uniqstr TAG;
  204. /* tag.opt */
  205. uniqstr yytype_71;
  206. /* tag */
  207. uniqstr tag;
  208. /* variable */
  209. uniqstr variable;
  210. /* "char" */
  211. unsigned char CHAR;
  212. /* value */
  213. value_type value;
  214. #line 232 "src/parse-gram.h" /* yacc.c:1921 */
  215. };
  216. typedef union GRAM_STYPE GRAM_STYPE;
  217. # define GRAM_STYPE_IS_TRIVIAL 1
  218. # define GRAM_STYPE_IS_DECLARED 1
  219. #endif
  220. /* Location type. */
  221. #if ! defined GRAM_LTYPE && ! defined GRAM_LTYPE_IS_DECLARED
  222. typedef struct GRAM_LTYPE GRAM_LTYPE;
  223. struct GRAM_LTYPE
  224. {
  225. int first_line;
  226. int first_column;
  227. int last_line;
  228. int last_column;
  229. };
  230. # define GRAM_LTYPE_IS_DECLARED 1
  231. # define GRAM_LTYPE_IS_TRIVIAL 1
  232. #endif
  233. int gram_parse (void);
  234. #endif /* !YY_GRAM_SRC_PARSE_GRAM_H_INCLUDED */