The Sol Programming Language!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2855 lines
101 KiB

  1. /* A Bison parser, made by GNU Bison 3.0.4. */
  2. /* Bison implementation for Yacc-like parsers in C
  3. Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  14. /* As a special exception, you may create a larger work that contains
  15. part or all of the Bison parser skeleton and distribute that work
  16. under terms of your choice, so long as that work isn't itself a
  17. parser generator using the skeleton or a modified version thereof
  18. as a parser skeleton. Alternatively, if you modify or redistribute
  19. the parser skeleton itself, you may (at your option) remove this
  20. special exception, which will cause the skeleton and the resulting
  21. Bison output files to be licensed under the GNU General Public
  22. License without this special exception.
  23. This special exception was added by the Free Software Foundation in
  24. version 2.2 of Bison. */
  25. /* C LALR(1) parser skeleton written by Richard Stallman, by
  26. simplifying the original so-called "semantic" parser. */
  27. /* All symbols defined below should begin with yy or YY, to avoid
  28. infringing on user name space. This should be done even for local
  29. variables, as they might otherwise be expanded by user macros.
  30. There are some unavoidable exceptions within include files to
  31. define necessary library symbols; they are noted "INFRINGES ON
  32. USER NAME SPACE" below. */
  33. /* Identify Bison output. */
  34. #define YYBISON 1
  35. /* Bison version. */
  36. #define YYBISON_VERSION "3.0.4"
  37. /* Skeleton name. */
  38. #define YYSKELETON_NAME "yacc.c"
  39. /* Pure parsers. */
  40. #define YYPURE 2
  41. /* Push parsers. */
  42. #define YYPUSH 0
  43. /* Pull parsers. */
  44. #define YYPULL 1
  45. /* Copy the first part of user declarations. */
  46. #line 1 "parser.y" /* yacc.c:339 */
  47. #include "sol.h"
  48. #include "ast.h"
  49. #include <string.h>
  50. #define YYSTYPE void *
  51. #line 76 "parser.tab.c" /* yacc.c:339 */
  52. # ifndef YY_NULLPTR
  53. # if defined __cplusplus && 201103L <= __cplusplus
  54. # define YY_NULLPTR nullptr
  55. # else
  56. # define YY_NULLPTR 0
  57. # endif
  58. # endif
  59. /* Enabling verbose error messages. */
  60. #ifdef YYERROR_VERBOSE
  61. # undef YYERROR_VERBOSE
  62. # define YYERROR_VERBOSE 1
  63. #else
  64. # define YYERROR_VERBOSE 0
  65. #endif
  66. /* In a future release of Bison, this section will be replaced
  67. by #include "parser.tab.h". */
  68. #ifndef YY_YY_PARSER_TAB_H_INCLUDED
  69. # define YY_YY_PARSER_TAB_H_INCLUDED
  70. /* Debug traces. */
  71. #ifndef YYDEBUG
  72. # define YYDEBUG 1
  73. #endif
  74. #if YYDEBUG
  75. extern int yydebug;
  76. #endif
  77. /* Token type. */
  78. #ifndef YYTOKENTYPE
  79. # define YYTOKENTYPE
  80. enum yytokentype
  81. {
  82. IF = 258,
  83. THEN = 259,
  84. ELSE = 260,
  85. WHILE = 261,
  86. FOR = 262,
  87. IN = 263,
  88. DO = 264,
  89. FUNC = 265,
  90. LAMBDA = 266,
  91. RETURN = 267,
  92. BREAK = 268,
  93. CONTINUE = 269,
  94. END = 270,
  95. NONE = 271,
  96. IDENT = 272,
  97. INT = 273,
  98. FLOAT = 274,
  99. STRING = 275,
  100. PLUS = 276,
  101. MINUS = 277,
  102. STAR = 278,
  103. SLASH = 279,
  104. PERCENT = 280,
  105. DSTAR = 281,
  106. BAND = 282,
  107. BOR = 283,
  108. BXOR = 284,
  109. BNOT = 285,
  110. LAND = 286,
  111. LOR = 287,
  112. LNOT = 288,
  113. ASSIGN = 289,
  114. ASSIGNPLUS = 290,
  115. ASSIGNMINUS = 291,
  116. ASSIGNSTAR = 292,
  117. ASSIGNSLASH = 293,
  118. ASSIGNDSTAR = 294,
  119. ASSIGNBAND = 295,
  120. ASSIGNBOR = 296,
  121. ASSIGNBXOR = 297,
  122. EQUAL = 298,
  123. NEQUAL = 299,
  124. LESS = 300,
  125. GREATER = 301,
  126. LESSEQ = 302,
  127. GREATEREQ = 303,
  128. RSHIFT = 304,
  129. LSHIFT = 305,
  130. LBRACE = 306,
  131. RBRACE = 307,
  132. LPAREN = 308,
  133. RPAREN = 309,
  134. LBRACKET = 310,
  135. RBRACKET = 311,
  136. DOT = 312,
  137. COLON = 313,
  138. SEMICOLON = 314,
  139. COMMA = 315,
  140. POUND = 316,
  141. TBANG = 317
  142. };
  143. #endif
  144. /* Value type. */
  145. #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
  146. typedef int YYSTYPE;
  147. # define YYSTYPE_IS_TRIVIAL 1
  148. # define YYSTYPE_IS_DECLARED 1
  149. #endif
  150. /* Location type. */
  151. #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
  152. typedef struct YYLTYPE YYLTYPE;
  153. struct YYLTYPE
  154. {
  155. int first_line;
  156. int first_column;
  157. int last_line;
  158. int last_column;
  159. };
  160. # define YYLTYPE_IS_DECLARED 1
  161. # define YYLTYPE_IS_TRIVIAL 1
  162. #endif
  163. int yyparse (stmt_node **program);
  164. #endif /* !YY_YY_PARSER_TAB_H_INCLUDED */
  165. /* Copy the second part of user declarations. */
  166. #line 203 "parser.tab.c" /* yacc.c:358 */
  167. #ifdef short
  168. # undef short
  169. #endif
  170. #ifdef YYTYPE_UINT8
  171. typedef YYTYPE_UINT8 yytype_uint8;
  172. #else
  173. typedef unsigned char yytype_uint8;
  174. #endif
  175. #ifdef YYTYPE_INT8
  176. typedef YYTYPE_INT8 yytype_int8;
  177. #else
  178. typedef signed char yytype_int8;
  179. #endif
  180. #ifdef YYTYPE_UINT16
  181. typedef YYTYPE_UINT16 yytype_uint16;
  182. #else
  183. typedef unsigned short int yytype_uint16;
  184. #endif
  185. #ifdef YYTYPE_INT16
  186. typedef YYTYPE_INT16 yytype_int16;
  187. #else
  188. typedef short int yytype_int16;
  189. #endif
  190. #ifndef YYSIZE_T
  191. # ifdef __SIZE_TYPE__
  192. # define YYSIZE_T __SIZE_TYPE__
  193. # elif defined size_t
  194. # define YYSIZE_T size_t
  195. # elif ! defined YYSIZE_T
  196. # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  197. # define YYSIZE_T size_t
  198. # else
  199. # define YYSIZE_T unsigned int
  200. # endif
  201. #endif
  202. #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
  203. #ifndef YY_
  204. # if defined YYENABLE_NLS && YYENABLE_NLS
  205. # if ENABLE_NLS
  206. # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
  207. # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
  208. # endif
  209. # endif
  210. # ifndef YY_
  211. # define YY_(Msgid) Msgid
  212. # endif
  213. #endif
  214. #ifndef YY_ATTRIBUTE
  215. # if (defined __GNUC__ \
  216. && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
  217. || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
  218. # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
  219. # else
  220. # define YY_ATTRIBUTE(Spec) /* empty */
  221. # endif
  222. #endif
  223. #ifndef YY_ATTRIBUTE_PURE
  224. # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
  225. #endif
  226. #ifndef YY_ATTRIBUTE_UNUSED
  227. # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
  228. #endif
  229. #if !defined _Noreturn \
  230. && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
  231. # if defined _MSC_VER && 1200 <= _MSC_VER
  232. # define _Noreturn __declspec (noreturn)
  233. # else
  234. # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
  235. # endif
  236. #endif
  237. /* Suppress unused-variable warnings by "using" E. */
  238. #if ! defined lint || defined __GNUC__
  239. # define YYUSE(E) ((void) (E))
  240. #else
  241. # define YYUSE(E) /* empty */
  242. #endif
  243. #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
  244. /* Suppress an incorrect diagnostic about yylval being uninitialized. */
  245. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
  246. _Pragma ("GCC diagnostic push") \
  247. _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
  248. _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
  249. # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
  250. _Pragma ("GCC diagnostic pop")
  251. #else
  252. # define YY_INITIAL_VALUE(Value) Value
  253. #endif
  254. #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  255. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  256. # define YY_IGNORE_MAYBE_UNINITIALIZED_END
  257. #endif
  258. #ifndef YY_INITIAL_VALUE
  259. # define YY_INITIAL_VALUE(Value) /* Nothing. */
  260. #endif
  261. #if ! defined yyoverflow || YYERROR_VERBOSE
  262. /* The parser invokes alloca or malloc; define the necessary symbols. */
  263. # ifdef YYSTACK_USE_ALLOCA
  264. # if YYSTACK_USE_ALLOCA
  265. # ifdef __GNUC__
  266. # define YYSTACK_ALLOC __builtin_alloca
  267. # elif defined __BUILTIN_VA_ARG_INCR
  268. # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
  269. # elif defined _AIX
  270. # define YYSTACK_ALLOC __alloca
  271. # elif defined _MSC_VER
  272. # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
  273. # define alloca _alloca
  274. # else
  275. # define YYSTACK_ALLOC alloca
  276. # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
  277. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  278. /* Use EXIT_SUCCESS as a witness for stdlib.h. */
  279. # ifndef EXIT_SUCCESS
  280. # define EXIT_SUCCESS 0
  281. # endif
  282. # endif
  283. # endif
  284. # endif
  285. # endif
  286. # ifdef YYSTACK_ALLOC
  287. /* Pacify GCC's 'empty if-body' warning. */
  288. # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
  289. # ifndef YYSTACK_ALLOC_MAXIMUM
  290. /* The OS might guarantee only one guard page at the bottom of the stack,
  291. and a page size can be as small as 4096 bytes. So we cannot safely
  292. invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
  293. to allow for a few compiler-allocated temporary stack slots. */
  294. # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
  295. # endif
  296. # else
  297. # define YYSTACK_ALLOC YYMALLOC
  298. # define YYSTACK_FREE YYFREE
  299. # ifndef YYSTACK_ALLOC_MAXIMUM
  300. # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
  301. # endif
  302. # if (defined __cplusplus && ! defined EXIT_SUCCESS \
  303. && ! ((defined YYMALLOC || defined malloc) \
  304. && (defined YYFREE || defined free)))
  305. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  306. # ifndef EXIT_SUCCESS
  307. # define EXIT_SUCCESS 0
  308. # endif
  309. # endif
  310. # ifndef YYMALLOC
  311. # define YYMALLOC malloc
  312. # if ! defined malloc && ! defined EXIT_SUCCESS
  313. void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
  314. # endif
  315. # endif
  316. # ifndef YYFREE
  317. # define YYFREE free
  318. # if ! defined free && ! defined EXIT_SUCCESS
  319. void free (void *); /* INFRINGES ON USER NAME SPACE */
  320. # endif
  321. # endif
  322. # endif
  323. #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
  324. #if (! defined yyoverflow \
  325. && (! defined __cplusplus \
  326. || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
  327. && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
  328. /* A type that is properly aligned for any stack member. */
  329. union yyalloc
  330. {
  331. yytype_int16 yyss_alloc;
  332. YYSTYPE yyvs_alloc;
  333. YYLTYPE yyls_alloc;
  334. };
  335. /* The size of the maximum gap between one aligned stack and the next. */
  336. # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
  337. /* The size of an array large to enough to hold all stacks, each with
  338. N elements. */
  339. # define YYSTACK_BYTES(N) \
  340. ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
  341. + 2 * YYSTACK_GAP_MAXIMUM)
  342. # define YYCOPY_NEEDED 1
  343. /* Relocate STACK from its old location to the new one. The
  344. local variables YYSIZE and YYSTACKSIZE give the old and new number of
  345. elements in the stack, and YYPTR gives the new location of the
  346. stack. Advance YYPTR to a properly aligned location for the next
  347. stack. */
  348. # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
  349. do \
  350. { \
  351. YYSIZE_T yynewbytes; \
  352. YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
  353. Stack = &yyptr->Stack_alloc; \
  354. yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
  355. yyptr += yynewbytes / sizeof (*yyptr); \
  356. } \
  357. while (0)
  358. #endif
  359. #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
  360. /* Copy COUNT objects from SRC to DST. The source and destination do
  361. not overlap. */
  362. # ifndef YYCOPY
  363. # if defined __GNUC__ && 1 < __GNUC__
  364. # define YYCOPY(Dst, Src, Count) \
  365. __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
  366. # else
  367. # define YYCOPY(Dst, Src, Count) \
  368. do \
  369. { \
  370. YYSIZE_T yyi; \
  371. for (yyi = 0; yyi < (Count); yyi++) \
  372. (Dst)[yyi] = (Src)[yyi]; \
  373. } \
  374. while (0)
  375. # endif
  376. # endif
  377. #endif /* !YYCOPY_NEEDED */
  378. /* YYFINAL -- State number of the termination state. */
  379. #define YYFINAL 3
  380. /* YYLAST -- Last index in YYTABLE. */
  381. #define YYLAST 926
  382. /* YYNTOKENS -- Number of terminals. */
  383. #define YYNTOKENS 63
  384. /* YYNNTS -- Number of nonterminals. */
  385. #define YYNNTS 29
  386. /* YYNRULES -- Number of rules. */
  387. #define YYNRULES 108
  388. /* YYNSTATES -- Number of states. */
  389. #define YYNSTATES 200
  390. /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
  391. by yylex, with out-of-bounds checking. */
  392. #define YYUNDEFTOK 2
  393. #define YYMAXUTOK 317
  394. #define YYTRANSLATE(YYX) \
  395. ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
  396. /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
  397. as returned by yylex, without out-of-bounds checking. */
  398. static const yytype_uint8 yytranslate[] =
  399. {
  400. 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  401. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  402. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  403. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  404. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  405. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  406. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  407. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  408. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  409. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  410. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  411. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  412. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  413. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  414. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  415. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  416. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  417. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  418. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  419. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  420. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  421. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  422. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  423. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  424. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  425. 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
  426. 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  427. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  428. 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
  429. 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
  430. 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
  431. 55, 56, 57, 58, 59, 60, 61, 62
  432. };
  433. #if YYDEBUG
  434. /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
  435. static const yytype_uint16 yyrline[] =
  436. {
  437. 0, 34, 34, 38, 49, 59, 60, 61, 62, 63,
  438. 64, 65, 66, 70, 74, 82, 90, 97, 105, 109,
  439. 110, 117, 124, 131, 138, 145, 152, 159, 166, 179,
  440. 192, 205, 218, 231, 244, 257, 270, 283, 287, 288,
  441. 289, 293, 294, 298, 299, 300, 301, 302, 303, 304,
  442. 308, 309, 310, 314, 315, 316, 317, 321, 322, 326,
  443. 327, 332, 333, 334, 335, 336, 337, 341, 342, 346,
  444. 347, 351, 352, 369, 373, 381, 389, 400, 404, 405,
  445. 416, 420, 421, 435, 436, 440, 441, 442, 443, 444,
  446. 445, 449, 450, 451, 455, 459, 460, 465, 466, 478,
  447. 479, 484, 485, 497, 498, 503, 504, 516, 521
  448. };
  449. #endif
  450. #if YYDEBUG || YYERROR_VERBOSE || 0
  451. /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
  452. First, the terminals, then, starting at YYNTOKENS, nonterminals. */
  453. static const char *const yytname[] =
  454. {
  455. "$end", "error", "$undefined", "IF", "THEN", "ELSE", "WHILE", "FOR",
  456. "IN", "DO", "FUNC", "LAMBDA", "RETURN", "BREAK", "CONTINUE", "END",
  457. "NONE", "IDENT", "INT", "FLOAT", "STRING", "PLUS", "MINUS", "STAR",
  458. "SLASH", "PERCENT", "DSTAR", "BAND", "BOR", "BXOR", "BNOT", "LAND",
  459. "LOR", "LNOT", "ASSIGN", "ASSIGNPLUS", "ASSIGNMINUS", "ASSIGNSTAR",
  460. "ASSIGNSLASH", "ASSIGNDSTAR", "ASSIGNBAND", "ASSIGNBOR", "ASSIGNBXOR",
  461. "EQUAL", "NEQUAL", "LESS", "GREATER", "LESSEQ", "GREATEREQ", "RSHIFT",
  462. "LSHIFT", "LBRACE", "RBRACE", "LPAREN", "RPAREN", "LBRACKET", "RBRACKET",
  463. "DOT", "COLON", "SEMICOLON", "COMMA", "POUND", "TBANG", "$accept",
  464. "program", "stmt_list", "stmt", "expr", "control_expr", "assign_expr",
  465. "logic_expr", "ulogic_expr", "rel_expr", "term_expr", "factor_expr",
  466. "power_expr", "tbang_expr", "binary_expr", "ubinary_expr", "ulen_expr",
  467. "call_expr", "funcdecl_expr", "index_expr", "ex_index_expr", "ref_expr",
  468. "lit_expr", "gen_expr", "paren_expr", "expr_list", "ident_list",
  469. "assoc_list", "assoc_item", YY_NULLPTR
  470. };
  471. #endif
  472. # ifdef YYPRINT
  473. /* YYTOKNUM[NUM] -- (External) token number corresponding to the
  474. (internal) symbol number NUM (which must be that of a token). */
  475. static const yytype_uint16 yytoknum[] =
  476. {
  477. 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
  478. 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
  479. 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
  480. 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
  481. 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
  482. 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
  483. 315, 316, 317
  484. };
  485. # endif
  486. #define YYPACT_NINF -106
  487. #define yypact_value_is_default(Yystate) \
  488. (!!((Yystate) == (-106)))
  489. #define YYTABLE_NINF -83
  490. #define yytable_value_is_error(Yytable_value) \
  491. 0
  492. /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  493. STATE-NUM. */
  494. static const yytype_int16 yypact[] =
  495. {
  496. -106, 16, 453, -106, 674, 674, 15, 20, -14, 674,
  497. 674, 674, -106, -11, -106, -106, -106, 28, 674, 674,
  498. -5, 674, 674, 674, 27, 41, -106, -106, 46, -106,
  499. -106, 190, 98, -106, 48, 120, -106, -106, -40, -106,
  500. -106, 78, -106, -106, -106, -106, 7, 8, 82, 40,
  501. 91, 91, 41, 41, 41, 674, 674, 674, 674, 674,
  502. 674, 674, 674, 674, -106, 41, 715, -17, 94, 674,
  503. 32, -106, -21, 41, 506, 757, -106, 674, 115, 674,
  504. 674, 674, 674, 674, 674, 674, 674, 674, 674, 674,
  505. 674, 674, 674, 674, 674, 674, 674, 674, 674, 674,
  506. 116, 674, 674, 674, 674, 674, 674, 674, 674, 674,
  507. -106, -106, 674, 91, -106, 31, 34, 41, 41, 41,
  508. 41, 41, 41, 41, 41, 41, 674, 95, -106, -106,
  509. -106, -106, -106, -106, 41, 158, 189, -106, -106, 98,
  510. 98, -10, -10, -10, -10, -10, -10, -106, -106, -106,
  511. 869, 799, 799, 799, 799, 799, 841, 562, 92, 41,
  512. 41, 41, 41, 41, 41, 41, 41, 41, 124, 188,
  513. 26, 35, -106, -106, -106, 674, 41, 119, 242, -106,
  514. 674, -106, -106, -106, -106, -106, 241, 54, 674, 618,
  515. 294, 347, 400, -106, -106, 41, -106, -106, -106, -106
  516. };
  517. /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
  518. Performed when YYTABLE does not specify something else to do. Zero
  519. means the default is an error. */
  520. static const yytype_uint8 yydefact[] =
  521. {
  522. 4, 0, 2, 1, 0, 0, 0, 0, 0, 7,
  523. 8, 10, 89, 83, 85, 87, 88, 0, 0, 0,
  524. 103, 0, 95, 0, 3, 5, 13, 18, 37, 40,
  525. 42, 49, 52, 56, 58, 60, 66, 68, 70, 73,
  526. 77, 0, 80, 84, 90, 93, 0, 0, 0, 0,
  527. 99, 99, 6, 9, 11, 0, 0, 0, 0, 0,
  528. 0, 0, 0, 0, 86, 0, 67, 41, 0, 0,
  529. 0, 104, 0, 96, 0, 69, 12, 0, 0, 0,
  530. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  531. 0, 0, 0, 0, 0, 0, 0, 0, 0, 95,
  532. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  533. 4, 4, 0, 99, 100, 0, 0, 19, 20, 21,
  534. 22, 23, 24, 25, 26, 27, 0, 0, 92, 105,
  535. 106, 94, 91, 97, 98, 0, 79, 38, 39, 50,
  536. 51, 43, 44, 45, 46, 47, 48, 53, 54, 55,
  537. 57, 61, 62, 63, 65, 64, 59, 0, 0, 28,
  538. 29, 30, 31, 32, 33, 34, 35, 36, 0, 0,
  539. 0, 0, 102, 4, 101, 0, 108, 0, 78, 71,
  540. 95, 4, 14, 16, 4, 4, 0, 0, 0, 0,
  541. 0, 0, 0, 75, 76, 107, 72, 15, 17, 74
  542. };
  543. /* YYPGOTO[NTERM-NUM]. */
  544. static const yytype_int16 yypgoto[] =
  545. {
  546. -106, -106, -105, -106, -2, -106, -106, -106, -9, 75,
  547. -106, 44, -48, 58, 171, 146, 142, -106, -106, -106,
  548. -106, -106, -106, -106, -106, -98, -47, -106, 101
  549. };
  550. /* YYDEFGOTO[NTERM-NUM]. */
  551. static const yytype_int8 yydefgoto[] =
  552. {
  553. -1, 1, 2, 24, 65, 26, 27, 28, 29, 30,
  554. 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
  555. 41, 42, 43, 44, 45, 74, 115, 70, 71
  556. };
  557. /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
  558. positive, shift that token. If negative, reduce the rule whose
  559. number is the opposite. If YYTABLE_NINF, syntax error. */
  560. static const yytype_int16 yytable[] =
  561. {
  562. 25, 157, 46, 47, 116, 168, 169, 52, 53, 54,
  563. 67, 110, 68, 99, -40, -40, 3, 111, 100, 72,
  564. 73, -42, -42, 55, 56, 57, 58, 59, 60, 61,
  565. 62, 63, 48, 131, 77, 184, 78, 49, -40, 51,
  566. -40, 147, 148, 149, 150, -42, 64, -42, 172, 68,
  567. 69, 172, 172, 117, 118, 119, 120, 121, 122, 123,
  568. 124, 125, 77, 77, 78, 78, 171, 127, 186, 194,
  569. 137, 138, 134, 50, 92, 135, 190, 79, 80, 191,
  570. 192, 77, 189, 78, 128, 173, 76, 69, 175, 185,
  571. 112, 174, 129, 113, 174, 174, 77, 73, 78, 159,
  572. 160, 161, 162, 163, 164, 165, 166, 167, 114, 77,
  573. 170, 78, 101, 102, 103, 104, 105, 106, 107, 108,
  574. 109, 89, 90, 91, 176, 139, 140, 4, 126, 181,
  575. 5, 6, 136, 158, 7, 8, 9, 10, 11, 182,
  576. 12, 13, 14, 15, 16, 180, 17, 93, 94, 95,
  577. 77, 177, 78, 188, 18, 134, 156, 19, 141, 142,
  578. 143, 144, 145, 146, 66, 75, 25, 25, 0, 96,
  579. 97, 130, 0, 187, 0, 20, 0, 21, 73, 22,
  580. 0, 0, 98, 0, 25, 23, 195, 134, 25, 25,
  581. 25, 4, 0, 0, 5, 6, 0, 0, 7, 8,
  582. 9, 10, 11, 183, 12, 13, 14, 15, 16, 0,
  583. 17, 81, 82, 77, 178, 78, 0, 0, 18, 0,
  584. 0, 19, 0, -82, -82, -82, -82, -82, -82, -82,
  585. -82, -82, 0, 83, 84, 85, 86, 87, 88, 20,
  586. 0, 21, 0, 22, 4, 0, 0, 5, 6, 23,
  587. 0, 7, 8, 9, 10, 11, 193, 12, 13, 14,
  588. 15, 16, 0, 17, 151, 152, 153, 154, 155, 0,
  589. 0, 18, 0, 0, 19, 0, -81, -81, -81, -81,
  590. -81, -81, -81, -81, -81, 0, 0, 0, 0, 0,
  591. 0, 0, 20, 0, 21, 0, 22, 4, 0, 0,
  592. 5, 6, 23, 0, 7, 8, 9, 10, 11, 197,
  593. 12, 13, 14, 15, 16, 0, 17, 0, 0, 0,
  594. 0, 0, 0, 0, 18, 0, 0, 19, 0, 0,
  595. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  596. 0, 0, 0, 0, 0, 20, 0, 21, 0, 22,
  597. 4, 0, 0, 5, 6, 23, 0, 7, 8, 9,
  598. 10, 11, 198, 12, 13, 14, 15, 16, 0, 17,
  599. 0, 0, 0, 0, 0, 0, 0, 18, 0, 0,
  600. 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  601. 0, 0, 0, 0, 0, 0, 0, 0, 20, 0,
  602. 21, 0, 22, 4, 0, 0, 5, 6, 23, 0,
  603. 7, 8, 9, 10, 11, 199, 12, 13, 14, 15,
  604. 16, 0, 17, 0, 0, 0, 0, 0, 0, 0,
  605. 18, 0, 0, 19, 0, 0, 0, 0, 0, 0,
  606. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  607. 0, 20, 0, 21, 0, 22, 4, 0, 0, 5,
  608. 6, 23, 0, 7, 8, 9, 10, 11, 0, 12,
  609. 13, 14, 15, 16, 0, 17, 0, 0, 0, 0,
  610. 0, 0, 0, 18, 0, 0, 19, 0, 0, 0,
  611. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  612. 0, 0, 0, 0, 20, 0, 21, 0, 22, 4,
  613. 0, 0, 5, 6, 23, 0, 7, 8, 0, 0,
  614. 0, 0, 12, 13, 14, 15, 16, 0, 17, 0,
  615. 0, 0, 0, 0, 0, 0, 18, 0, 0, 19,
  616. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  617. 0, 0, 0, 0, 0, 0, 0, 20, 0, 21,
  618. 0, 22, 132, 0, 0, 4, 133, 23, 5, 6,
  619. 0, 0, 7, 8, 0, 0, 0, 0, 12, 13,
  620. 14, 15, 16, 0, 17, 0, 0, 0, 0, 0,
  621. 0, 0, 18, 0, 0, 19, 0, 0, 0, 0,
  622. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  623. 0, 0, 0, 20, 0, 21, 179, 22, 0, 0,
  624. 0, 4, 133, 23, 5, 6, 0, 0, 7, 8,
  625. 0, 0, 0, 0, 12, 13, 14, 15, 16, 0,
  626. 17, 0, 0, 0, 0, 0, 0, 0, 18, 0,
  627. 0, 19, 0, 0, 0, 0, 0, 0, 0, 0,
  628. 0, 0, 0, 0, 0, 0, 0, 0, 0, 20,
  629. 0, 21, 196, 22, 0, 0, 0, 4, 133, 23,
  630. 5, 6, 0, 0, 7, 8, 0, 0, 0, 0,
  631. 12, 13, 14, 15, 16, 0, 17, 0, 0, 0,
  632. 0, 0, 0, 0, 18, 0, 0, 19, 0, 0,
  633. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  634. 0, 0, 0, 0, 0, 20, 0, 21, 0, 22,
  635. 0, 0, 0, 0, 0, 23, -66, -66, -66, -66,
  636. -66, -66, -66, -66, -66, 0, -66, -66, 0, 0,
  637. 0, 0, 0, 0, 0, 0, 0, 0, -66, -66,
  638. -66, -66, -66, -66, -66, -66, 0, 0, 0, 0,
  639. -66, 0, -66, 0, 0, 0, 0, -66, -68, -68,
  640. -68, -68, -68, -68, -68, -68, -68, 0, -68, -68,
  641. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  642. -68, -68, -68, -68, -68, -68, -68, -68, 0, 0,
  643. 0, 0, -68, 0, -68, 0, 0, 0, 0, -68,
  644. -60, -60, -60, -60, -60, -60, 93, 94, 95, 0,
  645. -60, -60, 0, 0, 0, 0, 0, 0, 0, 0,
  646. 0, 0, -60, -60, -60, -60, -60, -60, 96, 97,
  647. 0, 0, 0, 0, -60, 0, -60, 0, 0, 0,
  648. 0, 98, -58, -58, -58, -58, -58, 92, 0, 0,
  649. 0, 0, -58, -58, 0, 0, 0, 0, 0, 0,
  650. 0, 0, 0, 0, -58, -58, -58, -58, -58, -58,
  651. -56, -56, -56, -56, -56, 0, -58, 0, -58, 0,
  652. -56, -56, 0, 0, 0, 0, 0, 0, 0, 0,
  653. 0, 0, -56, -56, -56, -56, -56, -56, 0, 0,
  654. 0, 0, 0, 0, -56, 0, -56
  655. };
  656. static const yytype_int16 yycheck[] =
  657. {
  658. 2, 99, 4, 5, 51, 110, 111, 9, 10, 11,
  659. 19, 4, 17, 53, 31, 32, 0, 9, 58, 21,
  660. 22, 31, 32, 34, 35, 36, 37, 38, 39, 40,
  661. 41, 42, 17, 54, 55, 9, 57, 17, 55, 53,
  662. 57, 89, 90, 91, 92, 55, 18, 57, 17, 17,
  663. 55, 17, 17, 55, 56, 57, 58, 59, 60, 61,
  664. 62, 63, 55, 55, 57, 57, 113, 69, 173, 15,
  665. 79, 80, 74, 53, 26, 77, 181, 31, 32, 184,
  666. 185, 55, 180, 57, 52, 54, 59, 55, 54, 54,
  667. 8, 60, 60, 53, 60, 60, 55, 99, 57, 101,
  668. 102, 103, 104, 105, 106, 107, 108, 109, 17, 55,
  669. 112, 57, 34, 35, 36, 37, 38, 39, 40, 41,
  670. 42, 23, 24, 25, 126, 81, 82, 3, 34, 5,
  671. 6, 7, 17, 17, 10, 11, 12, 13, 14, 15,
  672. 16, 17, 18, 19, 20, 53, 22, 27, 28, 29,
  673. 55, 56, 57, 34, 30, 157, 98, 33, 83, 84,
  674. 85, 86, 87, 88, 18, 23, 168, 169, -1, 49,
  675. 50, 70, -1, 175, -1, 51, -1, 53, 180, 55,
  676. -1, -1, 62, -1, 186, 61, 188, 189, 190, 191,
  677. 192, 3, -1, -1, 6, 7, -1, -1, 10, 11,
  678. 12, 13, 14, 15, 16, 17, 18, 19, 20, -1,
  679. 22, 21, 22, 55, 56, 57, -1, -1, 30, -1,
  680. -1, 33, -1, 34, 35, 36, 37, 38, 39, 40,
  681. 41, 42, -1, 43, 44, 45, 46, 47, 48, 51,
  682. -1, 53, -1, 55, 3, -1, -1, 6, 7, 61,
  683. -1, 10, 11, 12, 13, 14, 15, 16, 17, 18,
  684. 19, 20, -1, 22, 93, 94, 95, 96, 97, -1,
  685. -1, 30, -1, -1, 33, -1, 34, 35, 36, 37,
  686. 38, 39, 40, 41, 42, -1, -1, -1, -1, -1,
  687. -1, -1, 51, -1, 53, -1, 55, 3, -1, -1,
  688. 6, 7, 61, -1, 10, 11, 12, 13, 14, 15,
  689. 16, 17, 18, 19, 20, -1, 22, -1, -1, -1,
  690. -1, -1, -1, -1, 30, -1, -1, 33, -1, -1,
  691. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  692. -1, -1, -1, -1, -1, 51, -1, 53, -1, 55,
  693. 3, -1, -1, 6, 7, 61, -1, 10, 11, 12,
  694. 13, 14, 15, 16, 17, 18, 19, 20, -1, 22,
  695. -1, -1, -1, -1, -1, -1, -1, 30, -1, -1,
  696. 33, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  697. -1, -1, -1, -1, -1, -1, -1, -1, 51, -1,
  698. 53, -1, 55, 3, -1, -1, 6, 7, 61, -1,
  699. 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
  700. 20, -1, 22, -1, -1, -1, -1, -1, -1, -1,
  701. 30, -1, -1, 33, -1, -1, -1, -1, -1, -1,
  702. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  703. -1, 51, -1, 53, -1, 55, 3, -1, -1, 6,
  704. 7, 61, -1, 10, 11, 12, 13, 14, -1, 16,
  705. 17, 18, 19, 20, -1, 22, -1, -1, -1, -1,
  706. -1, -1, -1, 30, -1, -1, 33, -1, -1, -1,
  707. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  708. -1, -1, -1, -1, 51, -1, 53, -1, 55, 3,
  709. -1, -1, 6, 7, 61, -1, 10, 11, -1, -1,
  710. -1, -1, 16, 17, 18, 19, 20, -1, 22, -1,
  711. -1, -1, -1, -1, -1, -1, 30, -1, -1, 33,
  712. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  713. -1, -1, -1, -1, -1, -1, -1, 51, -1, 53,
  714. -1, 55, 56, -1, -1, 3, 60, 61, 6, 7,
  715. -1, -1, 10, 11, -1, -1, -1, -1, 16, 17,
  716. 18, 19, 20, -1, 22, -1, -1, -1, -1, -1,
  717. -1, -1, 30, -1, -1, 33, -1, -1, -1, -1,
  718. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  719. -1, -1, -1, 51, -1, 53, 54, 55, -1, -1,
  720. -1, 3, 60, 61, 6, 7, -1, -1, 10, 11,
  721. -1, -1, -1, -1, 16, 17, 18, 19, 20, -1,
  722. 22, -1, -1, -1, -1, -1, -1, -1, 30, -1,
  723. -1, 33, -1, -1, -1, -1, -1, -1, -1, -1,
  724. -1, -1, -1, -1, -1, -1, -1, -1, -1, 51,
  725. -1, 53, 54, 55, -1, -1, -1, 3, 60, 61,
  726. 6, 7, -1, -1, 10, 11, -1, -1, -1, -1,
  727. 16, 17, 18, 19, 20, -1, 22, -1, -1, -1,
  728. -1, -1, -1, -1, 30, -1, -1, 33, -1, -1,
  729. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  730. -1, -1, -1, -1, -1, 51, -1, 53, -1, 55,
  731. -1, -1, -1, -1, -1, 61, 21, 22, 23, 24,
  732. 25, 26, 27, 28, 29, -1, 31, 32, -1, -1,
  733. -1, -1, -1, -1, -1, -1, -1, -1, 43, 44,
  734. 45, 46, 47, 48, 49, 50, -1, -1, -1, -1,
  735. 55, -1, 57, -1, -1, -1, -1, 62, 21, 22,
  736. 23, 24, 25, 26, 27, 28, 29, -1, 31, 32,
  737. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  738. 43, 44, 45, 46, 47, 48, 49, 50, -1, -1,
  739. -1, -1, 55, -1, 57, -1, -1, -1, -1, 62,
  740. 21, 22, 23, 24, 25, 26, 27, 28, 29, -1,
  741. 31, 32, -1, -1, -1, -1, -1, -1, -1, -1,
  742. -1, -1, 43, 44, 45, 46, 47, 48, 49, 50,
  743. -1, -1, -1, -1, 55, -1, 57, -1, -1, -1,
  744. -1, 62, 21, 22, 23, 24, 25, 26, -1, -1,
  745. -1, -1, 31, 32, -1, -1, -1, -1, -1, -1,
  746. -1, -1, -1, -1, 43, 44, 45, 46, 47, 48,
  747. 21, 22, 23, 24, 25, -1, 55, -1, 57, -1,
  748. 31, 32, -1, -1, -1, -1, -1, -1, -1, -1,
  749. -1, -1, 43, 44, 45, 46, 47, 48, -1, -1,
  750. -1, -1, -1, -1, 55, -1, 57
  751. };
  752. /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  753. symbol of state STATE-NUM. */
  754. static const yytype_uint8 yystos[] =
  755. {
  756. 0, 64, 65, 0, 3, 6, 7, 10, 11, 12,
  757. 13, 14, 16, 17, 18, 19, 20, 22, 30, 33,
  758. 51, 53, 55, 61, 66, 67, 68, 69, 70, 71,
  759. 72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
  760. 82, 83, 84, 85, 86, 87, 67, 67, 17, 17,
  761. 53, 53, 67, 67, 67, 34, 35, 36, 37, 38,
  762. 39, 40, 41, 42, 18, 67, 78, 71, 17, 55,
  763. 90, 91, 67, 67, 88, 79, 59, 55, 57, 31,
  764. 32, 21, 22, 43, 44, 45, 46, 47, 48, 23,
  765. 24, 25, 26, 27, 28, 29, 49, 50, 62, 53,