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.

2833 lines
100 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. };
  142. #endif
  143. /* Value type. */
  144. #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
  145. typedef int YYSTYPE;
  146. # define YYSTYPE_IS_TRIVIAL 1
  147. # define YYSTYPE_IS_DECLARED 1
  148. #endif
  149. /* Location type. */
  150. #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
  151. typedef struct YYLTYPE YYLTYPE;
  152. struct YYLTYPE
  153. {
  154. int first_line;
  155. int first_column;
  156. int last_line;
  157. int last_column;
  158. };
  159. # define YYLTYPE_IS_DECLARED 1
  160. # define YYLTYPE_IS_TRIVIAL 1
  161. #endif
  162. int yyparse (stmt_node **program);
  163. #endif /* !YY_YY_PARSER_TAB_H_INCLUDED */
  164. /* Copy the second part of user declarations. */
  165. #line 202 "parser.tab.c" /* yacc.c:358 */
  166. #ifdef short
  167. # undef short
  168. #endif
  169. #ifdef YYTYPE_UINT8
  170. typedef YYTYPE_UINT8 yytype_uint8;
  171. #else
  172. typedef unsigned char yytype_uint8;
  173. #endif
  174. #ifdef YYTYPE_INT8
  175. typedef YYTYPE_INT8 yytype_int8;
  176. #else
  177. typedef signed char yytype_int8;
  178. #endif
  179. #ifdef YYTYPE_UINT16
  180. typedef YYTYPE_UINT16 yytype_uint16;
  181. #else
  182. typedef unsigned short int yytype_uint16;
  183. #endif
  184. #ifdef YYTYPE_INT16
  185. typedef YYTYPE_INT16 yytype_int16;
  186. #else
  187. typedef short int yytype_int16;
  188. #endif
  189. #ifndef YYSIZE_T
  190. # ifdef __SIZE_TYPE__
  191. # define YYSIZE_T __SIZE_TYPE__
  192. # elif defined size_t
  193. # define YYSIZE_T size_t
  194. # elif ! defined YYSIZE_T
  195. # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  196. # define YYSIZE_T size_t
  197. # else
  198. # define YYSIZE_T unsigned int
  199. # endif
  200. #endif
  201. #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
  202. #ifndef YY_
  203. # if defined YYENABLE_NLS && YYENABLE_NLS
  204. # if ENABLE_NLS
  205. # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
  206. # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
  207. # endif
  208. # endif
  209. # ifndef YY_
  210. # define YY_(Msgid) Msgid
  211. # endif
  212. #endif
  213. #ifndef YY_ATTRIBUTE
  214. # if (defined __GNUC__ \
  215. && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
  216. || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
  217. # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
  218. # else
  219. # define YY_ATTRIBUTE(Spec) /* empty */
  220. # endif
  221. #endif
  222. #ifndef YY_ATTRIBUTE_PURE
  223. # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
  224. #endif
  225. #ifndef YY_ATTRIBUTE_UNUSED
  226. # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
  227. #endif
  228. #if !defined _Noreturn \
  229. && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
  230. # if defined _MSC_VER && 1200 <= _MSC_VER
  231. # define _Noreturn __declspec (noreturn)
  232. # else
  233. # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
  234. # endif
  235. #endif
  236. /* Suppress unused-variable warnings by "using" E. */
  237. #if ! defined lint || defined __GNUC__
  238. # define YYUSE(E) ((void) (E))
  239. #else
  240. # define YYUSE(E) /* empty */
  241. #endif
  242. #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
  243. /* Suppress an incorrect diagnostic about yylval being uninitialized. */
  244. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
  245. _Pragma ("GCC diagnostic push") \
  246. _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
  247. _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
  248. # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
  249. _Pragma ("GCC diagnostic pop")
  250. #else
  251. # define YY_INITIAL_VALUE(Value) Value
  252. #endif
  253. #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  254. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  255. # define YY_IGNORE_MAYBE_UNINITIALIZED_END
  256. #endif
  257. #ifndef YY_INITIAL_VALUE
  258. # define YY_INITIAL_VALUE(Value) /* Nothing. */
  259. #endif
  260. #if ! defined yyoverflow || YYERROR_VERBOSE
  261. /* The parser invokes alloca or malloc; define the necessary symbols. */
  262. # ifdef YYSTACK_USE_ALLOCA
  263. # if YYSTACK_USE_ALLOCA
  264. # ifdef __GNUC__
  265. # define YYSTACK_ALLOC __builtin_alloca
  266. # elif defined __BUILTIN_VA_ARG_INCR
  267. # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
  268. # elif defined _AIX
  269. # define YYSTACK_ALLOC __alloca
  270. # elif defined _MSC_VER
  271. # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
  272. # define alloca _alloca
  273. # else
  274. # define YYSTACK_ALLOC alloca
  275. # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
  276. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  277. /* Use EXIT_SUCCESS as a witness for stdlib.h. */
  278. # ifndef EXIT_SUCCESS
  279. # define EXIT_SUCCESS 0
  280. # endif
  281. # endif
  282. # endif
  283. # endif
  284. # endif
  285. # ifdef YYSTACK_ALLOC
  286. /* Pacify GCC's 'empty if-body' warning. */
  287. # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
  288. # ifndef YYSTACK_ALLOC_MAXIMUM
  289. /* The OS might guarantee only one guard page at the bottom of the stack,
  290. and a page size can be as small as 4096 bytes. So we cannot safely
  291. invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
  292. to allow for a few compiler-allocated temporary stack slots. */
  293. # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
  294. # endif
  295. # else
  296. # define YYSTACK_ALLOC YYMALLOC
  297. # define YYSTACK_FREE YYFREE
  298. # ifndef YYSTACK_ALLOC_MAXIMUM
  299. # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
  300. # endif
  301. # if (defined __cplusplus && ! defined EXIT_SUCCESS \
  302. && ! ((defined YYMALLOC || defined malloc) \
  303. && (defined YYFREE || defined free)))
  304. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  305. # ifndef EXIT_SUCCESS
  306. # define EXIT_SUCCESS 0
  307. # endif
  308. # endif
  309. # ifndef YYMALLOC
  310. # define YYMALLOC malloc
  311. # if ! defined malloc && ! defined EXIT_SUCCESS
  312. void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
  313. # endif
  314. # endif
  315. # ifndef YYFREE
  316. # define YYFREE free
  317. # if ! defined free && ! defined EXIT_SUCCESS
  318. void free (void *); /* INFRINGES ON USER NAME SPACE */
  319. # endif
  320. # endif
  321. # endif
  322. #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
  323. #if (! defined yyoverflow \
  324. && (! defined __cplusplus \
  325. || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
  326. && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
  327. /* A type that is properly aligned for any stack member. */
  328. union yyalloc
  329. {
  330. yytype_int16 yyss_alloc;
  331. YYSTYPE yyvs_alloc;
  332. YYLTYPE yyls_alloc;
  333. };
  334. /* The size of the maximum gap between one aligned stack and the next. */
  335. # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
  336. /* The size of an array large to enough to hold all stacks, each with
  337. N elements. */
  338. # define YYSTACK_BYTES(N) \
  339. ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
  340. + 2 * YYSTACK_GAP_MAXIMUM)
  341. # define YYCOPY_NEEDED 1
  342. /* Relocate STACK from its old location to the new one. The
  343. local variables YYSIZE and YYSTACKSIZE give the old and new number of
  344. elements in the stack, and YYPTR gives the new location of the
  345. stack. Advance YYPTR to a properly aligned location for the next
  346. stack. */
  347. # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
  348. do \
  349. { \
  350. YYSIZE_T yynewbytes; \
  351. YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
  352. Stack = &yyptr->Stack_alloc; \
  353. yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
  354. yyptr += yynewbytes / sizeof (*yyptr); \
  355. } \
  356. while (0)
  357. #endif
  358. #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
  359. /* Copy COUNT objects from SRC to DST. The source and destination do
  360. not overlap. */
  361. # ifndef YYCOPY
  362. # if defined __GNUC__ && 1 < __GNUC__
  363. # define YYCOPY(Dst, Src, Count) \
  364. __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
  365. # else
  366. # define YYCOPY(Dst, Src, Count) \
  367. do \
  368. { \
  369. YYSIZE_T yyi; \
  370. for (yyi = 0; yyi < (Count); yyi++) \
  371. (Dst)[yyi] = (Src)[yyi]; \
  372. } \
  373. while (0)
  374. # endif
  375. # endif
  376. #endif /* !YYCOPY_NEEDED */
  377. /* YYFINAL -- State number of the termination state. */
  378. #define YYFINAL 3
  379. /* YYLAST -- Last index in YYTABLE. */
  380. #define YYLAST 880
  381. /* YYNTOKENS -- Number of terminals. */
  382. #define YYNTOKENS 62
  383. /* YYNNTS -- Number of nonterminals. */
  384. #define YYNNTS 28
  385. /* YYNRULES -- Number of rules. */
  386. #define YYNRULES 106
  387. /* YYNSTATES -- Number of states. */
  388. #define YYNSTATES 197
  389. /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
  390. by yylex, with out-of-bounds checking. */
  391. #define YYUNDEFTOK 2
  392. #define YYMAXUTOK 316
  393. #define YYTRANSLATE(YYX) \
  394. ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
  395. /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
  396. as returned by yylex, without out-of-bounds checking. */
  397. static const yytype_uint8 yytranslate[] =
  398. {
  399. 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  400. 2, 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, 1, 2, 3, 4,
  425. 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
  426. 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
  427. 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
  428. 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
  429. 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
  430. 55, 56, 57, 58, 59, 60, 61
  431. };
  432. #if YYDEBUG
  433. /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
  434. static const yytype_uint16 yyrline[] =
  435. {
  436. 0, 33, 33, 37, 48, 58, 59, 60, 61, 62,
  437. 63, 64, 65, 69, 73, 81, 89, 96, 104, 108,
  438. 109, 116, 123, 130, 137, 144, 151, 158, 165, 178,
  439. 191, 204, 217, 230, 243, 256, 269, 282, 286, 287,
  440. 288, 292, 293, 297, 298, 299, 300, 301, 302, 303,
  441. 307, 308, 309, 313, 314, 315, 316, 320, 321, 325,
  442. 326, 327, 328, 329, 330, 334, 335, 339, 340, 344,
  443. 345, 362, 366, 374, 382, 393, 397, 398, 409, 413,
  444. 414, 428, 429, 433, 434, 435, 436, 437, 438, 442,
  445. 443, 444, 448, 452, 453, 458, 459, 471, 472, 477,
  446. 478, 490, 491, 496, 497, 509, 514
  447. };
  448. #endif
  449. #if YYDEBUG || YYERROR_VERBOSE || 0
  450. /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
  451. First, the terminals, then, starting at YYNTOKENS, nonterminals. */
  452. static const char *const yytname[] =
  453. {
  454. "$end", "error", "$undefined", "IF", "THEN", "ELSE", "WHILE", "FOR",
  455. "IN", "DO", "FUNC", "LAMBDA", "RETURN", "BREAK", "CONTINUE", "END",
  456. "NONE", "IDENT", "INT", "FLOAT", "STRING", "PLUS", "MINUS", "STAR",
  457. "SLASH", "PERCENT", "DSTAR", "BAND", "BOR", "BXOR", "BNOT", "LAND",
  458. "LOR", "LNOT", "ASSIGN", "ASSIGNPLUS", "ASSIGNMINUS", "ASSIGNSTAR",
  459. "ASSIGNSLASH", "ASSIGNDSTAR", "ASSIGNBAND", "ASSIGNBOR", "ASSIGNBXOR",
  460. "EQUAL", "NEQUAL", "LESS", "GREATER", "LESSEQ", "GREATEREQ", "RSHIFT",
  461. "LSHIFT", "LBRACE", "RBRACE", "LPAREN", "RPAREN", "LBRACKET", "RBRACKET",
  462. "DOT", "COLON", "SEMICOLON", "COMMA", "POUND", "$accept", "program",
  463. "stmt_list", "stmt", "expr", "control_expr", "assign_expr", "logic_expr",
  464. "ulogic_expr", "rel_expr", "term_expr", "factor_expr", "power_expr",
  465. "binary_expr", "ubinary_expr", "ulen_expr", "call_expr", "funcdecl_expr",
  466. "index_expr", "ex_index_expr", "ref_expr", "lit_expr", "gen_expr",
  467. "paren_expr", "expr_list", "ident_list", "assoc_list", "assoc_item", YY_NULLPTR
  468. };
  469. #endif
  470. # ifdef YYPRINT
  471. /* YYTOKNUM[NUM] -- (External) token number corresponding to the
  472. (internal) symbol number NUM (which must be that of a token). */
  473. static const yytype_uint16 yytoknum[] =
  474. {
  475. 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
  476. 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
  477. 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
  478. 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
  479. 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
  480. 305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
  481. 315, 316
  482. };
  483. # endif
  484. #define YYPACT_NINF -104
  485. #define yypact_value_is_default(Yystate) \
  486. (!!((Yystate) == (-104)))
  487. #define YYTABLE_NINF -81
  488. #define yytable_value_is_error(Yytable_value) \
  489. 0
  490. /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  491. STATE-NUM. */
  492. static const yytype_int16 yypact[] =
  493. {
  494. -104, 18, 450, -104, 671, 671, 20, -4, -18, 671,
  495. 671, 671, -104, -13, -104, -104, -104, 55, 671, 671,
  496. 13, 671, 671, 671, 17, -43, -104, -104, 1, -104,
  497. -104, -5, 21, 51, 127, -104, -104, -22, -104, -104,
  498. 186, -104, -104, -104, -104, 7, 6, 81, 32, 79,
  499. 79, -43, -43, -43, 671, 671, 671, 671, 671, 671,
  500. 671, 671, 671, -104, -43, 712, 84, 58, 671, 31,
  501. -104, 52, -43, 503, 749, -104, 671, 93, 671, 671,
  502. 671, 671, 671, 671, 671, 671, 671, 671, 671, 671,
  503. 671, 671, 671, 671, 671, 671, 671, 671, 94, 671,
  504. 671, 671, 671, 671, 671, 671, 671, 671, -104, -104,
  505. 671, 79, -104, 30, 33, -43, -43, -43, -43, -43,
  506. -43, -43, -43, -43, 671, 90, -104, -104, -104, -104,
  507. -104, -104, -43, 174, 239, -104, -104, 21, 21, 87,
  508. 87, 87, 87, 87, 87, 51, 51, 51, 823, 786,
  509. 786, 786, 786, 786, 559, 60, -43, -43, -43, -43,
  510. -43, -43, -43, -43, -43, 118, 185, 25, 34, -104,
  511. -104, -104, 671, -43, 83, 292, -104, 671, -104, -104,
  512. -104, -104, -104, 238, 57, 671, 615, 291, 344, 397,
  513. -104, -104, -43, -104, -104, -104, -104
  514. };
  515. /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
  516. Performed when YYTABLE does not specify something else to do. Zero
  517. means the default is an error. */
  518. static const yytype_uint8 yydefact[] =
  519. {
  520. 4, 0, 2, 1, 0, 0, 0, 0, 0, 7,
  521. 8, 10, 87, 81, 83, 85, 86, 0, 0, 0,
  522. 101, 0, 93, 0, 3, 5, 13, 18, 37, 40,
  523. 42, 49, 52, 56, 58, 64, 66, 68, 71, 75,
  524. 0, 78, 82, 88, 91, 0, 0, 0, 0, 97,
  525. 97, 6, 9, 11, 0, 0, 0, 0, 0, 0,
  526. 0, 0, 0, 84, 0, 65, 41, 0, 0, 0,
  527. 102, 0, 94, 0, 67, 12, 0, 0, 0, 0,
  528. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  529. 0, 0, 0, 0, 0, 0, 0, 93, 0, 0,
  530. 0, 0, 0, 0, 0, 0, 0, 0, 4, 4,
  531. 0, 97, 98, 0, 0, 19, 20, 21, 22, 23,
  532. 24, 25, 26, 27, 0, 0, 90, 103, 104, 92,
  533. 89, 95, 96, 0, 77, 38, 39, 50, 51, 43,
  534. 44, 45, 46, 47, 48, 53, 54, 55, 57, 59,
  535. 60, 61, 63, 62, 0, 0, 28, 29, 30, 31,
  536. 32, 33, 34, 35, 36, 0, 0, 0, 0, 100,
  537. 4, 99, 0, 106, 0, 76, 69, 93, 4, 14,
  538. 16, 4, 4, 0, 0, 0, 0, 0, 0, 0,
  539. 73, 74, 105, 70, 15, 17, 72
  540. };
  541. /* YYPGOTO[NTERM-NUM]. */
  542. static const yytype_int8 yypgoto[] =
  543. {
  544. -104, -104, -103, -104, -2, -104, -104, -104, -9, 75,
  545. -104, 46, 77, 116, 102, 120, -104, -104, -104, -104,
  546. -104, -104, -104, -104, -96, -46, -104, 80
  547. };
  548. /* YYDEFGOTO[NTERM-NUM]. */
  549. static const yytype_int8 yydefgoto[] =
  550. {
  551. -1, 1, 2, 24, 64, 26, 27, 28, 29, 30,
  552. 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
  553. 41, 42, 43, 44, 73, 113, 69, 70
  554. };
  555. /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
  556. positive, shift that token. If negative, reduce the rule whose
  557. number is the opposite. If YYTABLE_NINF, syntax error. */
  558. static const yytype_int16 yytable[] =
  559. {
  560. 25, 154, 45, 46, 114, 165, 166, 51, 52, 53,
  561. 66, 108, 76, 48, 77, 109, 80, 81, 3, 71,
  562. 72, 54, 55, 56, 57, 58, 59, 60, 61, 62,
  563. 67, 97, 78, 79, 181, 50, 98, 47, 82, 83,
  564. 84, 85, 86, 87, 88, 89, 90, 169, 67, 49,
  565. 169, 169, 115, 116, 117, 118, 119, 120, 121, 122,
  566. 123, 76, 76, 77, 77, 168, 125, 183, 68, 135,
  567. 136, 132, 191, 63, 133, 187, 75, 91, 188, 189,
  568. 76, 186, 77, 126, 170, 111, 68, 172, 182, 110,
  569. 171, 127, 124, 171, 171, 72, 112, 156, 157, 158,
  570. 159, 160, 161, 162, 163, 164, 129, 76, 167, 77,
  571. 134, 155, 76, 177, 77, -40, -40, 185, -42, -42,
  572. 65, 4, 173, 178, 5, 6, 137, 138, 7, 8,
  573. 9, 10, 11, 179, 12, 13, 14, 15, 16, -40,
  574. 17, -40, -42, 74, -42, 76, 174, 77, 18, 128,
  575. 0, 19, 132, 0, 92, 93, 94, 139, 140, 141,
  576. 142, 143, 144, 25, 25, 145, 146, 147, 148, 20,
  577. 184, 21, 0, 22, 0, 72, 95, 96, 0, 23,
  578. 0, 25, 0, 192, 132, 25, 25, 25, 4, 0,
  579. 0, 5, 6, 0, 0, 7, 8, 9, 10, 11,
  580. 180, 12, 13, 14, 15, 16, 0, 17, 149, 150,
  581. 151, 152, 153, 0, 0, 18, 0, 0, 19, 0,
  582. 99, 100, 101, 102, 103, 104, 105, 106, 107, 76,
  583. 175, 77, 0, 0, 0, 0, 20, 0, 21, 0,
  584. 22, 4, 0, 0, 5, 6, 23, 0, 7, 8,
  585. 9, 10, 11, 190, 12, 13, 14, 15, 16, 0,
  586. 17, 0, 0, 0, 0, 0, 0, 0, 18, 0,
  587. 0, 19, 0, -80, -80, -80, -80, -80, -80, -80,
  588. -80, -80, 0, 0, 0, 0, 0, 0, 0, 20,
  589. 0, 21, 0, 22, 4, 0, 0, 5, 6, 23,
  590. 0, 7, 8, 9, 10, 11, 194, 12, 13, 14,
  591. 15, 16, 0, 17, 0, 0, 0, 0, 0, 0,
  592. 0, 18, 0, 0, 19, 0, -79, -79, -79, -79,
  593. -79, -79, -79, -79, -79, 0, 0, 0, 0, 0,
  594. 0, 0, 20, 0, 21, 0, 22, 4, 0, 0,
  595. 5, 6, 23, 0, 7, 8, 9, 10, 11, 195,
  596. 12, 13, 14, 15, 16, 0, 17, 0, 0, 0,
  597. 0, 0, 0, 0, 18, 0, 0, 19, 0, 0,
  598. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  599. 0, 0, 0, 0, 0, 20, 0, 21, 0, 22,
  600. 4, 0, 0, 5, 6, 23, 0, 7, 8, 9,
  601. 10, 11, 196, 12, 13, 14, 15, 16, 0, 17,
  602. 0, 0, 0, 0, 0, 0, 0, 18, 0, 0,
  603. 19, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  604. 0, 0, 0, 0, 0, 0, 0, 0, 20, 0,
  605. 21, 0, 22, 4, 0, 0, 5, 6, 23, 0,
  606. 7, 8, 9, 10, 11, 0, 12, 13, 14, 15,
  607. 16, 0, 17, 0, 0, 0, 0, 0, 0, 0,
  608. 18, 0, 0, 19, 0, 0, 0, 0, 0, 0,
  609. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  610. 0, 20, 0, 21, 0, 22, 4, 0, 0, 5,
  611. 6, 23, 0, 7, 8, 0, 0, 0, 0, 12,
  612. 13, 14, 15, 16, 0, 17, 0, 0, 0, 0,
  613. 0, 0, 0, 18, 0, 0, 19, 0, 0, 0,
  614. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  615. 0, 0, 0, 0, 20, 0, 21, 0, 22, 130,
  616. 0, 0, 4, 131, 23, 5, 6, 0, 0, 7,
  617. 8, 0, 0, 0, 0, 12, 13, 14, 15, 16,
  618. 0, 17, 0, 0, 0, 0, 0, 0, 0, 18,
  619. 0, 0, 19, 0, 0, 0, 0, 0, 0, 0,
  620. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  621. 20, 0, 21, 176, 22, 0, 0, 0, 4, 131,
  622. 23, 5, 6, 0, 0, 7, 8, 0, 0, 0,
  623. 0, 12, 13, 14, 15, 16, 0, 17, 0, 0,
  624. 0, 0, 0, 0, 0, 18, 0, 0, 19, 0,
  625. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  626. 0, 0, 0, 0, 0, 0, 20, 0, 21, 193,
  627. 22, 0, 0, 0, 4, 131, 23, 5, 6, 0,
  628. 0, 7, 8, 0, 0, 0, 0, 12, 13, 14,
  629. 15, 16, 0, 17, 0, 0, 0, 0, 0, 0,
  630. 0, 18, 0, 0, 19, 0, 0, 0, 0, 0,
  631. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  632. 0, 0, 20, 0, 21, 0, 22, 0, 0, 0,
  633. 0, 0, 23, -64, -64, -64, -64, -64, -64, -64,
  634. -64, -64, 0, -64, -64, 0, 0, 0, 0, 0,
  635. 0, 0, 0, 0, 0, -64, -64, -64, -64, -64,
  636. -64, -64, -64, 0, 0, 0, 0, -64, 0, -64,
  637. -66, -66, -66, -66, -66, -66, -66, -66, -66, 0,
  638. -66, -66, 0, 0, 0, 0, 0, 0, 0, 0,
  639. 0, 0, -66, -66, -66, -66, -66, -66, -66, -66,
  640. 0, 0, 0, 0, -66, 0, -66, -58, -58, -58,
  641. -58, -58, -58, 92, 93, 94, 0, -58, -58, 0,
  642. 0, 0, 0, 0, 0, 0, 0, 0, 0, -58,
  643. -58, -58, -58, -58, -58, 95, 96, 0, 0, 0,
  644. 0, -58, 0, -58, -56, -56, -56, -56, -56, 91,
  645. 0, 0, 0, 0, -56, -56, 0, 0, 0, 0,
  646. 0, 0, 0, 0, 0, 0, -56, -56, -56, -56,
  647. -56, -56, 0, 0, 0, 0, 0, 0, -56, 0,
  648. -56
  649. };
  650. static const yytype_int16 yycheck[] =
  651. {
  652. 2, 97, 4, 5, 50, 108, 109, 9, 10, 11,
  653. 19, 4, 55, 17, 57, 9, 21, 22, 0, 21,
  654. 22, 34, 35, 36, 37, 38, 39, 40, 41, 42,
  655. 17, 53, 31, 32, 9, 53, 58, 17, 43, 44,
  656. 45, 46, 47, 48, 23, 24, 25, 17, 17, 53,
  657. 17, 17, 54, 55, 56, 57, 58, 59, 60, 61,
  658. 62, 55, 55, 57, 57, 111, 68, 170, 55, 78,
  659. 79, 73, 15, 18, 76, 178, 59, 26, 181, 182,
  660. 55, 177, 57, 52, 54, 53, 55, 54, 54, 8,
  661. 60, 60, 34, 60, 60, 97, 17, 99, 100, 101,
  662. 102, 103, 104, 105, 106, 107, 54, 55, 110, 57,
  663. 17, 17, 55, 53, 57, 31, 32, 34, 31, 32,
  664. 18, 3, 124, 5, 6, 7, 80, 81, 10, 11,
  665. 12, 13, 14, 15, 16, 17, 18, 19, 20, 55,
  666. 22, 57, 55, 23, 57, 55, 56, 57, 30, 69,
  667. -1, 33, 154, -1, 27, 28, 29, 82, 83, 84,
  668. 85, 86, 87, 165, 166, 88, 89, 90, 91, 51,
  669. 172, 53, -1, 55, -1, 177, 49, 50, -1, 61,
  670. -1, 183, -1, 185, 186, 187, 188, 189, 3, -1,
  671. -1, 6, 7, -1, -1, 10, 11, 12, 13, 14,
  672. 15, 16, 17, 18, 19, 20, -1, 22, 92, 93,
  673. 94, 95, 96, -1, -1, 30, -1, -1, 33, -1,
  674. 34, 35, 36, 37, 38, 39, 40, 41, 42, 55,
  675. 56, 57, -1, -1, -1, -1, 51, -1, 53, -1,
  676. 55, 3, -1, -1, 6, 7, 61, -1, 10, 11,
  677. 12, 13, 14, 15, 16, 17, 18, 19, 20, -1,
  678. 22, -1, -1, -1, -1, -1, -1, -1, 30, -1,
  679. -1, 33, -1, 34, 35, 36, 37, 38, 39, 40,
  680. 41, 42, -1, -1, -1, -1, -1, -1, -1, 51,
  681. -1, 53, -1, 55, 3, -1, -1, 6, 7, 61,
  682. -1, 10, 11, 12, 13, 14, 15, 16, 17, 18,
  683. 19, 20, -1, 22, -1, -1, -1, -1, -1, -1,
  684. -1, 30, -1, -1, 33, -1, 34, 35, 36, 37,
  685. 38, 39, 40, 41, 42, -1, -1, -1, -1, -1,
  686. -1, -1, 51, -1, 53, -1, 55, 3, -1, -1,
  687. 6, 7, 61, -1, 10, 11, 12, 13, 14, 15,
  688. 16, 17, 18, 19, 20, -1, 22, -1, -1, -1,
  689. -1, -1, -1, -1, 30, -1, -1, 33, -1, -1,
  690. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  691. -1, -1, -1, -1, -1, 51, -1, 53, -1, 55,
  692. 3, -1, -1, 6, 7, 61, -1, 10, 11, 12,
  693. 13, 14, 15, 16, 17, 18, 19, 20, -1, 22,
  694. -1, -1, -1, -1, -1, -1, -1, 30, -1, -1,
  695. 33, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  696. -1, -1, -1, -1, -1, -1, -1, -1, 51, -1,
  697. 53, -1, 55, 3, -1, -1, 6, 7, 61, -1,
  698. 10, 11, 12, 13, 14, -1, 16, 17, 18, 19,
  699. 20, -1, 22, -1, -1, -1, -1, -1, -1, -1,
  700. 30, -1, -1, 33, -1, -1, -1, -1, -1, -1,
  701. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  702. -1, 51, -1, 53, -1, 55, 3, -1, -1, 6,
  703. 7, 61, -1, 10, 11, -1, -1, -1, -1, 16,
  704. 17, 18, 19, 20, -1, 22, -1, -1, -1, -1,
  705. -1, -1, -1, 30, -1, -1, 33, -1, -1, -1,
  706. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  707. -1, -1, -1, -1, 51, -1, 53, -1, 55, 56,
  708. -1, -1, 3, 60, 61, 6, 7, -1, -1, 10,
  709. 11, -1, -1, -1, -1, 16, 17, 18, 19, 20,
  710. -1, 22, -1, -1, -1, -1, -1, -1, -1, 30,
  711. -1, -1, 33, -1, -1, -1, -1, -1, -1, -1,
  712. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  713. 51, -1, 53, 54, 55, -1, -1, -1, 3, 60,
  714. 61, 6, 7, -1, -1, 10, 11, -1, -1, -1,
  715. -1, 16, 17, 18, 19, 20, -1, 22, -1, -1,
  716. -1, -1, -1, -1, -1, 30, -1, -1, 33, -1,
  717. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  718. -1, -1, -1, -1, -1, -1, 51, -1, 53, 54,
  719. 55, -1, -1, -1, 3, 60, 61, 6, 7, -1,
  720. -1, 10, 11, -1, -1, -1, -1, 16, 17, 18,
  721. 19, 20, -1, 22, -1, -1, -1, -1, -1, -1,
  722. -1, 30, -1, -1, 33, -1, -1, -1, -1, -1,
  723. -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
  724. -1, -1, 51, -1, 53, -1, 55, -1, -1, -1,
  725. -1, -1, 61, 21, 22, 23, 24, 25, 26, 27,
  726. 28, 29, -1, 31, 32, -1, -1, -1, -1, -1,
  727. -1, -1, -1, -1, -1, 43, 44, 45, 46, 47,
  728. 48, 49, 50, -1, -1, -1, -1, 55, -1, 57,
  729. 21, 22, 23, 24, 25, 26, 27, 28, 29, -1,
  730. 31, 32, -1, -1, -1, -1, -1, -1, -1, -1,
  731. -1, -1, 43, 44, 45, 46, 47, 48, 49, 50,
  732. -1, -1, -1, -1, 55, -1, 57, 21, 22, 23,
  733. 24, 25, 26, 27, 28, 29, -1, 31, 32, -1,
  734. -1, -1, -1, -1, -1, -1, -1, -1, -1, 43,
  735. 44, 45, 46, 47, 48, 49, 50, -1, -1, -1,
  736. -1, 55, -1, 57, 21, 22, 23, 24, 25, 26,
  737. -1, -1, -1, -1, 31, 32, -1, -1, -1, -1,
  738. -1, -1, -1, -1, -1, -1, 43, 44, 45, 46,
  739. 47, 48, -1, -1, -1, -1, -1, -1, 55, -1,
  740. 57
  741. };
  742. /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  743. symbol of state STATE-NUM. */
  744. static const yytype_uint8 yystos[] =
  745. {
  746. 0, 63, 64, 0, 3, 6, 7, 10, 11, 12,
  747. 13, 14, 16, 17, 18, 19, 20, 22, 30, 33,
  748. 51, 53, 55, 61, 65, 66, 67, 68, 69, 70,
  749. 71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
  750. 81, 82, 83, 84, 85, 66, 66, 17, 17, 53,
  751. 53, 66, 66, 66, 34, 35, 36, 37, 38, 39,
  752. 40, 41, 42, 18, 66, 76, 70, 17, 55, 88,
  753. 89, 66, 66, 86, 77, 59, 55, 57, 31, 32,
  754. 21, 22, 43, 44, 45, 46, 47, 48, 23, 24,
  755. 25, 26, 27, 28, 29, 49, 50, 53, 58, 34,
  756. 35, 36, 37, 38, 39, 40, 41, 42, 4, 9,
  757. 8, 53, 17, 87, 87, 66, 66, 66, 66, 66,
  758. 66, 66, 66, 66, 34, 66, 52, 60, 89, 54,
  759. 56, 60, 66, 66, 17, 70, 70, 73, 73, 71,
  760. 71, 71, 71, 71, 71, 74, 74, 74, 74, 75,
  761. 75, 75, 75, 75, 86, 17, 66, 66, 66, 66,
  762. 66, 66, 66, 66, 66, 64, 64, 66, 87, 17,
  763. 54, 60, 54, 66, 56, 56, 54, 53, 5, 15,
  764. 15, 9, 54, 64, 66, 34, 86, 64, 64, 64,
  765. 15, 15, 66, 54, 15, 15, 15
  766. };
  767. /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
  768. static const yytype_uint8 yyr1[] =
  769. {
  770. 0, 62, 63, 64, 64, 65, 65, 65, 65, 65,
  771. 65, 65, 65, 66, 67, 67, 67, 67, 67, 68,
  772. 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,
  773. 68, 68, 68, 68, 68, 68, 68, 68, 69, 69,
  774. 69, 70, 70, 71, 71, 71, 71, 71, 71, 71,
  775. 72, 72, 72, 73, 73, 73, 73, 74, 74, 75,
  776. 75, 75, 75, 75, 75, 76, 76, 77, 77, 78,
  777. 78, 78, 79, 79, 79, 79, 80, 80, 80, 81,
  778. 81, 82, 82, 83, 83, 83, 83, 83, 83, 84,
  779. 84, 84, 85, 86, 86, 86, 86, 87, 87, 87,
  780. 87, 88, 88, 88, 88, 89, 89
  781. };
  782. /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
  783. static const yytype_uint8 yyr2[] =
  784. {
  785. 0, 2, 1, 2, 0, 1, 2, 1, 1, 2,
  786. 1, 2, 2, 1, 5, 7, 5, 7, 1, 3,
  787. 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  788. 3, 3, 3, 3, 3, 3, 3, 1, 3, 3,
  789. 1, 2, 1, 3, 3, 3, 3, 3, 3, 1,
  790. 3, 3, 1, 3, 3, 3, 1, 3, 1, 3,
  791. 3, 3, 3, 3, 1, 2, 1, 2, 1, 4,
  792. 6, 1, 7, 6, 6, 1, 4, 3, 1, 4,
  793. 3, 1, 1, 1, 2, 1, 1, 1, 1, 3,
  794. 3, 1, 3, 0, 1, 2, 2, 0, 1, 2,
  795. 2, 0, 1, 2, 2, 5, 3
  796. };
  797. #define yyerrok (yyerrstatus = 0)
  798. #define yyclearin (yychar = YYEMPTY)
  799. #define YYEMPTY (-2)
  800. #define YYEOF 0
  801. #define YYACCEPT goto yyacceptlab
  802. #define YYABORT goto yyabortlab
  803. #define YYERROR goto yyerrorlab
  804. #define YYRECOVERING() (!!yyerrstatus)
  805. #define YYBACKUP(Token, Value) \
  806. do \
  807. if (yychar == YYEMPTY) \
  808. { \
  809. yychar = (Token); \
  810. yylval = (Value); \
  811. YYPOPSTACK (yylen); \
  812. yystate = *yyssp; \
  813. goto yybackup; \
  814. } \
  815. else \
  816. { \
  817. yyerror (&yylloc, program, YY_("syntax error: cannot back up")); \
  818. YYERROR; \
  819. } \
  820. while (0)
  821. /* Error token number */
  822. #define YYTERROR 1
  823. #define YYERRCODE 256
  824. /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
  825. If N is 0, then set CURRENT to the empty location which ends
  826. the previous symbol: RHS[0] (always defined). */
  827. #ifndef YYLLOC_DEFAULT
  828. # define YYLLOC_DEFAULT(Current, Rhs, N) \
  829. do \
  830. if (N) \
  831. { \
  832. (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
  833. (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
  834. (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
  835. (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
  836. } \
  837. else \
  838. { \
  839. (Current).first_line = (Current).last_line = \
  840. YYRHSLOC (Rhs, 0).last_line; \
  841. (Current).first_column = (Current).last_column = \
  842. YYRHSLOC (Rhs, 0).last_column; \
  843. } \
  844. while (0)
  845. #endif
  846. #define YYRHSLOC(Rhs, K) ((Rhs)[K])
  847. /* Enable debugging if requested. */
  848. #if YYDEBUG
  849. # ifndef YYFPRINTF
  850. # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
  851. # define YYFPRINTF fprintf
  852. # endif
  853. # define YYDPRINTF(Args) \
  854. do { \
  855. if (yydebug) \
  856. YYFPRINTF Args; \
  857. } while (0)
  858. /* YY_LOCATION_PRINT -- Print the location on the stream.
  859. This macro was not mandated originally: define only if we know
  860. we won't break user code: when these are the locations we know. */
  861. #ifndef YY_LOCATION_PRINT
  862. # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  863. /* Print *YYLOCP on YYO. Private, do not rely on its existence. */
  864. YY_ATTRIBUTE_UNUSED
  865. static unsigned
  866. yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
  867. {
  868. unsigned res = 0;
  869. int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
  870. if (0 <= yylocp->first_line)
  871. {
  872. res += YYFPRINTF (yyo, "%d", yylocp->first_line);
  873. if (0 <= yylocp->first_column)
  874. res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
  875. }
  876. if (0 <= yylocp->last_line)
  877. {
  878. if (yylocp->first_line < yylocp->last_line)
  879. {
  880. res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
  881. if (0 <= end_col)
  882. res += YYFPRINTF (yyo, ".%d", end_col);
  883. }
  884. else if (0 <= end_col && yylocp->first_column < end_col)
  885. res += YYFPRINTF (yyo, "-%d", end_col);
  886. }
  887. return res;
  888. }
  889. # define YY_LOCATION_PRINT(File, Loc) \
  890. yy_location_print_ (File, &(Loc))
  891. # else
  892. # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
  893. # endif
  894. #endif
  895. # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
  896. do { \
  897. if (yydebug) \
  898. { \
  899. YYFPRINTF (stderr, "%s ", Title); \
  900. yy_symbol_print (stderr, \
  901. Type, Value, Location, program); \
  902. YYFPRINTF (stderr, "\n"); \
  903. } \
  904. } while (0)
  905. /*----------------------------------------.
  906. | Print this symbol's value on YYOUTPUT. |
  907. `----------------------------------------*/
  908. static void
  909. yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, stmt_node **program)
  910. {
  911. FILE *yyo = yyoutput;
  912. YYUSE (yyo);
  913. YYUSE (yylocationp);
  914. YYUSE (program);
  915. if (!yyvaluep)
  916. return;
  917. # ifdef YYPRINT
  918. if (yytype < YYNTOKENS)
  919. YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
  920. # endif
  921. YYUSE (yytype);
  922. }
  923. /*--------------------------------.
  924. | Print this symbol on YYOUTPUT. |
  925. `--------------------------------*/
  926. static void
  927. yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, stmt_node **program)
  928. {
  929. YYFPRINTF (yyoutput, "%s %s (",
  930. yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
  931. YY_LOCATION_PRINT (yyoutput, *yylocationp);
  932. YYFPRINTF (yyoutput, ": ");
  933. yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, program);
  934. YYFPRINTF (yyoutput, ")");
  935. }
  936. /*------------------------------------------------------------------.
  937. | yy_stack_print -- Print the state stack from its BOTTOM up to its |
  938. | TOP (included). |
  939. `------------------------------------------------------------------*/
  940. static void
  941. yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
  942. {
  943. YYFPRINTF (stderr, "Stack now");
  944. for (; yybottom <= yytop; yybottom++)
  945. {
  946. int yybot = *yybottom;
  947. YYFPRINTF (stderr, " %d", yybot);
  948. }
  949. YYFPRINTF (stderr, "\n");
  950. }
  951. # define YY_STACK_PRINT(Bottom, Top) \
  952. do { \
  953. if (yydebug) \
  954. yy_stack_print ((Bottom), (Top)); \
  955. } while (0)
  956. /*------------------------------------------------.
  957. | Report that the YYRULE is going to be reduced. |
  958. `------------------------------------------------*/
  959. static void
  960. yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, stmt_node **program)