No Description
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.

as.tab.c 43KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479
  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 0
  41. /* Push parsers. */
  42. #define YYPUSH 0
  43. /* Pull parsers. */
  44. #define YYPULL 1
  45. /* Copy the first part of user declarations. */
  46. #line 67 "as.tab.c" /* yacc.c:339 */
  47. # ifndef YY_NULLPTR
  48. # if defined __cplusplus && 201103L <= __cplusplus
  49. # define YY_NULLPTR nullptr
  50. # else
  51. # define YY_NULLPTR 0
  52. # endif
  53. # endif
  54. /* Enabling verbose error messages. */
  55. #ifdef YYERROR_VERBOSE
  56. # undef YYERROR_VERBOSE
  57. # define YYERROR_VERBOSE 1
  58. #else
  59. # define YYERROR_VERBOSE 0
  60. #endif
  61. /* In a future release of Bison, this section will be replaced
  62. by #include "as.tab.h". */
  63. #ifndef YY_YY_AS_TAB_H_INCLUDED
  64. # define YY_YY_AS_TAB_H_INCLUDED
  65. /* Debug traces. */
  66. #ifndef YYDEBUG
  67. # define YYDEBUG 0
  68. #endif
  69. #if YYDEBUG
  70. extern int yydebug;
  71. #endif
  72. /* Token type. */
  73. #ifndef YYTOKENTYPE
  74. # define YYTOKENTYPE
  75. enum yytokentype
  76. {
  77. tNB = 258,
  78. tADD = 259,
  79. tSUB = 260,
  80. tOB = 261,
  81. tCB = 262,
  82. tPV = 263,
  83. tERROR = 264,
  84. tMAIN = 265
  85. };
  86. #endif
  87. /* Value type. */
  88. #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
  89. union YYSTYPE
  90. {
  91. #line 1 "as.y" /* yacc.c:355 */
  92. int nombre;
  93. #line 122 "as.tab.c" /* yacc.c:355 */
  94. };
  95. typedef union YYSTYPE YYSTYPE;
  96. # define YYSTYPE_IS_TRIVIAL 1
  97. # define YYSTYPE_IS_DECLARED 1
  98. #endif
  99. extern YYSTYPE yylval;
  100. int yyparse (void);
  101. #endif /* !YY_YY_AS_TAB_H_INCLUDED */
  102. /* Copy the second part of user declarations. */
  103. #line 139 "as.tab.c" /* yacc.c:358 */
  104. #ifdef short
  105. # undef short
  106. #endif
  107. #ifdef YYTYPE_UINT8
  108. typedef YYTYPE_UINT8 yytype_uint8;
  109. #else
  110. typedef unsigned char yytype_uint8;
  111. #endif
  112. #ifdef YYTYPE_INT8
  113. typedef YYTYPE_INT8 yytype_int8;
  114. #else
  115. typedef signed char yytype_int8;
  116. #endif
  117. #ifdef YYTYPE_UINT16
  118. typedef YYTYPE_UINT16 yytype_uint16;
  119. #else
  120. typedef unsigned short int yytype_uint16;
  121. #endif
  122. #ifdef YYTYPE_INT16
  123. typedef YYTYPE_INT16 yytype_int16;
  124. #else
  125. typedef short int yytype_int16;
  126. #endif
  127. #ifndef YYSIZE_T
  128. # ifdef __SIZE_TYPE__
  129. # define YYSIZE_T __SIZE_TYPE__
  130. # elif defined size_t
  131. # define YYSIZE_T size_t
  132. # elif ! defined YYSIZE_T
  133. # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  134. # define YYSIZE_T size_t
  135. # else
  136. # define YYSIZE_T unsigned int
  137. # endif
  138. #endif
  139. #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
  140. #ifndef YY_
  141. # if defined YYENABLE_NLS && YYENABLE_NLS
  142. # if ENABLE_NLS
  143. # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
  144. # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
  145. # endif
  146. # endif
  147. # ifndef YY_
  148. # define YY_(Msgid) Msgid
  149. # endif
  150. #endif
  151. #ifndef YY_ATTRIBUTE
  152. # if (defined __GNUC__ \
  153. && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
  154. || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
  155. # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
  156. # else
  157. # define YY_ATTRIBUTE(Spec) /* empty */
  158. # endif
  159. #endif
  160. #ifndef YY_ATTRIBUTE_PURE
  161. # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
  162. #endif
  163. #ifndef YY_ATTRIBUTE_UNUSED
  164. # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
  165. #endif
  166. #if !defined _Noreturn \
  167. && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
  168. # if defined _MSC_VER && 1200 <= _MSC_VER
  169. # define _Noreturn __declspec (noreturn)
  170. # else
  171. # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
  172. # endif
  173. #endif
  174. /* Suppress unused-variable warnings by "using" E. */
  175. #if ! defined lint || defined __GNUC__
  176. # define YYUSE(E) ((void) (E))
  177. #else
  178. # define YYUSE(E) /* empty */
  179. #endif
  180. #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
  181. /* Suppress an incorrect diagnostic about yylval being uninitialized. */
  182. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
  183. _Pragma ("GCC diagnostic push") \
  184. _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
  185. _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
  186. # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
  187. _Pragma ("GCC diagnostic pop")
  188. #else
  189. # define YY_INITIAL_VALUE(Value) Value
  190. #endif
  191. #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  192. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  193. # define YY_IGNORE_MAYBE_UNINITIALIZED_END
  194. #endif
  195. #ifndef YY_INITIAL_VALUE
  196. # define YY_INITIAL_VALUE(Value) /* Nothing. */
  197. #endif
  198. #if ! defined yyoverflow || YYERROR_VERBOSE
  199. /* The parser invokes alloca or malloc; define the necessary symbols. */
  200. # ifdef YYSTACK_USE_ALLOCA
  201. # if YYSTACK_USE_ALLOCA
  202. # ifdef __GNUC__
  203. # define YYSTACK_ALLOC __builtin_alloca
  204. # elif defined __BUILTIN_VA_ARG_INCR
  205. # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
  206. # elif defined _AIX
  207. # define YYSTACK_ALLOC __alloca
  208. # elif defined _MSC_VER
  209. # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
  210. # define alloca _alloca
  211. # else
  212. # define YYSTACK_ALLOC alloca
  213. # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
  214. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  215. /* Use EXIT_SUCCESS as a witness for stdlib.h. */
  216. # ifndef EXIT_SUCCESS
  217. # define EXIT_SUCCESS 0
  218. # endif
  219. # endif
  220. # endif
  221. # endif
  222. # endif
  223. # ifdef YYSTACK_ALLOC
  224. /* Pacify GCC's 'empty if-body' warning. */
  225. # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
  226. # ifndef YYSTACK_ALLOC_MAXIMUM
  227. /* The OS might guarantee only one guard page at the bottom of the stack,
  228. and a page size can be as small as 4096 bytes. So we cannot safely
  229. invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
  230. to allow for a few compiler-allocated temporary stack slots. */
  231. # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
  232. # endif
  233. # else
  234. # define YYSTACK_ALLOC YYMALLOC
  235. # define YYSTACK_FREE YYFREE
  236. # ifndef YYSTACK_ALLOC_MAXIMUM
  237. # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
  238. # endif
  239. # if (defined __cplusplus && ! defined EXIT_SUCCESS \
  240. && ! ((defined YYMALLOC || defined malloc) \
  241. && (defined YYFREE || defined free)))
  242. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  243. # ifndef EXIT_SUCCESS
  244. # define EXIT_SUCCESS 0
  245. # endif
  246. # endif
  247. # ifndef YYMALLOC
  248. # define YYMALLOC malloc
  249. # if ! defined malloc && ! defined EXIT_SUCCESS
  250. void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
  251. # endif
  252. # endif
  253. # ifndef YYFREE
  254. # define YYFREE free
  255. # if ! defined free && ! defined EXIT_SUCCESS
  256. void free (void *); /* INFRINGES ON USER NAME SPACE */
  257. # endif
  258. # endif
  259. # endif
  260. #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
  261. #if (! defined yyoverflow \
  262. && (! defined __cplusplus \
  263. || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
  264. /* A type that is properly aligned for any stack member. */
  265. union yyalloc
  266. {
  267. yytype_int16 yyss_alloc;
  268. YYSTYPE yyvs_alloc;
  269. };
  270. /* The size of the maximum gap between one aligned stack and the next. */
  271. # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
  272. /* The size of an array large to enough to hold all stacks, each with
  273. N elements. */
  274. # define YYSTACK_BYTES(N) \
  275. ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
  276. + YYSTACK_GAP_MAXIMUM)
  277. # define YYCOPY_NEEDED 1
  278. /* Relocate STACK from its old location to the new one. The
  279. local variables YYSIZE and YYSTACKSIZE give the old and new number of
  280. elements in the stack, and YYPTR gives the new location of the
  281. stack. Advance YYPTR to a properly aligned location for the next
  282. stack. */
  283. # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
  284. do \
  285. { \
  286. YYSIZE_T yynewbytes; \
  287. YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
  288. Stack = &yyptr->Stack_alloc; \
  289. yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
  290. yyptr += yynewbytes / sizeof (*yyptr); \
  291. } \
  292. while (0)
  293. #endif
  294. #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
  295. /* Copy COUNT objects from SRC to DST. The source and destination do
  296. not overlap. */
  297. # ifndef YYCOPY
  298. # if defined __GNUC__ && 1 < __GNUC__
  299. # define YYCOPY(Dst, Src, Count) \
  300. __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
  301. # else
  302. # define YYCOPY(Dst, Src, Count) \
  303. do \
  304. { \
  305. YYSIZE_T yyi; \
  306. for (yyi = 0; yyi < (Count); yyi++) \
  307. (Dst)[yyi] = (Src)[yyi]; \
  308. } \
  309. while (0)
  310. # endif
  311. # endif
  312. #endif /* !YYCOPY_NEEDED */
  313. /* YYFINAL -- State number of the termination state. */
  314. #define YYFINAL 6
  315. /* YYLAST -- Last index in YYTABLE. */
  316. #define YYLAST 15
  317. /* YYNTOKENS -- Number of terminals. */
  318. #define YYNTOKENS 11
  319. /* YYNNTS -- Number of nonterminals. */
  320. #define YYNNTS 4
  321. /* YYNRULES -- Number of rules. */
  322. #define YYNRULES 8
  323. /* YYNSTATES -- Number of states. */
  324. #define YYNSTATES 15
  325. /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
  326. by yylex, with out-of-bounds checking. */
  327. #define YYUNDEFTOK 2
  328. #define YYMAXUTOK 265
  329. #define YYTRANSLATE(YYX) \
  330. ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
  331. /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
  332. as returned by yylex, without out-of-bounds checking. */
  333. static const yytype_uint8 yytranslate[] =
  334. {
  335. 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  336. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  337. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  338. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  339. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  340. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  341. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  342. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  343. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  344. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  345. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  346. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  347. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  348. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  349. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  350. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  351. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  352. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  353. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  354. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  355. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  356. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  357. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  358. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  359. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  360. 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
  361. 5, 6, 7, 8, 9, 10
  362. };
  363. #if YYDEBUG
  364. /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
  365. static const yytype_uint8 yyrline[] =
  366. {
  367. 0, 30, 30, 29, 32, 35, 36, 37, 38
  368. };
  369. #endif
  370. #if YYDEBUG || YYERROR_VERBOSE || 0
  371. /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
  372. First, the terminals, then, starting at YYNTOKENS, nonterminals. */
  373. static const char *const yytname[] =
  374. {
  375. "$end", "error", "$undefined", "tNB", "tADD", "tSUB", "tOB", "tCB",
  376. "tPV", "tERROR", "tMAIN", "$accept", "S", "$@1", "E", YY_NULLPTR
  377. };
  378. #endif
  379. # ifdef YYPRINT
  380. /* YYTOKNUM[NUM] -- (External) token number corresponding to the
  381. (internal) symbol number NUM (which must be that of a token). */
  382. static const yytype_uint16 yytoknum[] =
  383. {
  384. 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
  385. 265
  386. };
  387. # endif
  388. #define YYPACT_NINF -4
  389. #define yypact_value_is_default(Yystate) \
  390. (!!((Yystate) == (-4)))
  391. #define YYTABLE_NINF -1
  392. #define yytable_value_is_error(Yytable_value) \
  393. 0
  394. /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  395. STATE-NUM. */
  396. static const yytype_int8 yypact[] =
  397. {
  398. 7, -4, 7, 1, -1, 4, -4, 7, 7, -4,
  399. -4, -3, -4, 7, -4
  400. };
  401. /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
  402. Performed when YYTABLE does not specify something else to do. Zero
  403. means the default is an error. */
  404. static const yytype_uint8 yydefact[] =
  405. {
  406. 4, 8, 0, 0, 0, 0, 1, 0, 0, 2,
  407. 7, 5, 6, 4, 3
  408. };
  409. /* YYPGOTO[NTERM-NUM]. */
  410. static const yytype_int8 yypgoto[] =
  411. {
  412. -4, 2, -4, -2
  413. };
  414. /* YYDEFGOTO[NTERM-NUM]. */
  415. static const yytype_int8 yydefgoto[] =
  416. {
  417. -1, 3, 13, 4
  418. };
  419. /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
  420. positive, shift that token. If negative, reduce the rule whose
  421. number is the opposite. If YYTABLE_NINF, syntax error. */
  422. static const yytype_uint8 yytable[] =
  423. {
  424. 5, 6, 8, 7, 8, 11, 12, 9, 7, 8,
  425. 1, 10, 0, 2, 0, 14
  426. };
  427. static const yytype_int8 yycheck[] =
  428. {
  429. 2, 0, 5, 4, 5, 7, 8, 8, 4, 5,
  430. 3, 7, -1, 6, -1, 13
  431. };
  432. /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  433. symbol of state STATE-NUM. */
  434. static const yytype_uint8 yystos[] =
  435. {
  436. 0, 3, 6, 12, 14, 14, 0, 4, 5, 8,
  437. 7, 14, 14, 13, 12
  438. };
  439. /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
  440. static const yytype_uint8 yyr1[] =
  441. {
  442. 0, 11, 13, 12, 12, 14, 14, 14, 14
  443. };
  444. /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
  445. static const yytype_uint8 yyr2[] =
  446. {
  447. 0, 2, 0, 4, 0, 3, 3, 3, 1
  448. };
  449. #define yyerrok (yyerrstatus = 0)
  450. #define yyclearin (yychar = YYEMPTY)
  451. #define YYEMPTY (-2)
  452. #define YYEOF 0
  453. #define YYACCEPT goto yyacceptlab
  454. #define YYABORT goto yyabortlab
  455. #define YYERROR goto yyerrorlab
  456. #define YYRECOVERING() (!!yyerrstatus)
  457. #define YYBACKUP(Token, Value) \
  458. do \
  459. if (yychar == YYEMPTY) \
  460. { \
  461. yychar = (Token); \
  462. yylval = (Value); \
  463. YYPOPSTACK (yylen); \
  464. yystate = *yyssp; \
  465. goto yybackup; \
  466. } \
  467. else \
  468. { \
  469. yyerror (YY_("syntax error: cannot back up")); \
  470. YYERROR; \
  471. } \
  472. while (0)
  473. /* Error token number */
  474. #define YYTERROR 1
  475. #define YYERRCODE 256
  476. /* Enable debugging if requested. */
  477. #if YYDEBUG
  478. # ifndef YYFPRINTF
  479. # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
  480. # define YYFPRINTF fprintf
  481. # endif
  482. # define YYDPRINTF(Args) \
  483. do { \
  484. if (yydebug) \
  485. YYFPRINTF Args; \
  486. } while (0)
  487. /* This macro is provided for backward compatibility. */
  488. #ifndef YY_LOCATION_PRINT
  489. # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
  490. #endif
  491. # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
  492. do { \
  493. if (yydebug) \
  494. { \
  495. YYFPRINTF (stderr, "%s ", Title); \
  496. yy_symbol_print (stderr, \
  497. Type, Value); \
  498. YYFPRINTF (stderr, "\n"); \
  499. } \
  500. } while (0)
  501. /*----------------------------------------.
  502. | Print this symbol's value on YYOUTPUT. |
  503. `----------------------------------------*/
  504. static void
  505. yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
  506. {
  507. FILE *yyo = yyoutput;
  508. YYUSE (yyo);
  509. if (!yyvaluep)
  510. return;
  511. # ifdef YYPRINT
  512. if (yytype < YYNTOKENS)
  513. YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
  514. # endif
  515. YYUSE (yytype);
  516. }
  517. /*--------------------------------.
  518. | Print this symbol on YYOUTPUT. |
  519. `--------------------------------*/
  520. static void
  521. yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
  522. {
  523. YYFPRINTF (yyoutput, "%s %s (",
  524. yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
  525. yy_symbol_value_print (yyoutput, yytype, yyvaluep);
  526. YYFPRINTF (yyoutput, ")");
  527. }
  528. /*------------------------------------------------------------------.
  529. | yy_stack_print -- Print the state stack from its BOTTOM up to its |
  530. | TOP (included). |
  531. `------------------------------------------------------------------*/
  532. static void
  533. yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
  534. {
  535. YYFPRINTF (stderr, "Stack now");
  536. for (; yybottom <= yytop; yybottom++)
  537. {
  538. int yybot = *yybottom;
  539. YYFPRINTF (stderr, " %d", yybot);
  540. }
  541. YYFPRINTF (stderr, "\n");
  542. }
  543. # define YY_STACK_PRINT(Bottom, Top) \
  544. do { \
  545. if (yydebug) \
  546. yy_stack_print ((Bottom), (Top)); \
  547. } while (0)
  548. /*------------------------------------------------.
  549. | Report that the YYRULE is going to be reduced. |
  550. `------------------------------------------------*/
  551. static void
  552. yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule)
  553. {
  554. unsigned long int yylno = yyrline[yyrule];
  555. int yynrhs = yyr2[yyrule];
  556. int yyi;
  557. YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
  558. yyrule - 1, yylno);
  559. /* The symbols being reduced. */
  560. for (yyi = 0; yyi < yynrhs; yyi++)
  561. {
  562. YYFPRINTF (stderr, " $%d = ", yyi + 1);
  563. yy_symbol_print (stderr,
  564. yystos[yyssp[yyi + 1 - yynrhs]],
  565. &(yyvsp[(yyi + 1) - (yynrhs)])
  566. );
  567. YYFPRINTF (stderr, "\n");
  568. }
  569. }
  570. # define YY_REDUCE_PRINT(Rule) \
  571. do { \
  572. if (yydebug) \
  573. yy_reduce_print (yyssp, yyvsp, Rule); \
  574. } while (0)
  575. /* Nonzero means print parse trace. It is left uninitialized so that
  576. multiple parsers can coexist. */
  577. int yydebug;
  578. #else /* !YYDEBUG */
  579. # define YYDPRINTF(Args)
  580. # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
  581. # define YY_STACK_PRINT(Bottom, Top)
  582. # define YY_REDUCE_PRINT(Rule)
  583. #endif /* !YYDEBUG */
  584. /* YYINITDEPTH -- initial size of the parser's stacks. */
  585. #ifndef YYINITDEPTH
  586. # define YYINITDEPTH 200
  587. #endif
  588. /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
  589. if the built-in stack extension method is used).
  590. Do not make this value too large; the results are undefined if
  591. YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
  592. evaluated with infinite-precision integer arithmetic. */
  593. #ifndef YYMAXDEPTH
  594. # define YYMAXDEPTH 10000
  595. #endif
  596. #if YYERROR_VERBOSE
  597. # ifndef yystrlen
  598. # if defined __GLIBC__ && defined _STRING_H
  599. # define yystrlen strlen
  600. # else
  601. /* Return the length of YYSTR. */
  602. static YYSIZE_T
  603. yystrlen (const char *yystr)
  604. {
  605. YYSIZE_T yylen;
  606. for (yylen = 0; yystr[yylen]; yylen++)
  607. continue;
  608. return yylen;
  609. }
  610. # endif
  611. # endif
  612. # ifndef yystpcpy
  613. # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
  614. # define yystpcpy stpcpy
  615. # else
  616. /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
  617. YYDEST. */
  618. static char *
  619. yystpcpy (char *yydest, const char *yysrc)
  620. {
  621. char *yyd = yydest;
  622. const char *yys = yysrc;
  623. while ((*yyd++ = *yys++) != '\0')
  624. continue;
  625. return yyd - 1;
  626. }
  627. # endif
  628. # endif
  629. # ifndef yytnamerr
  630. /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
  631. quotes and backslashes, so that it's suitable for yyerror. The
  632. heuristic is that double-quoting is unnecessary unless the string
  633. contains an apostrophe, a comma, or backslash (other than
  634. backslash-backslash). YYSTR is taken from yytname. If YYRES is
  635. null, do not copy; instead, return the length of what the result
  636. would have been. */
  637. static YYSIZE_T
  638. yytnamerr (char *yyres, const char *yystr)
  639. {
  640. if (*yystr == '"')
  641. {
  642. YYSIZE_T yyn = 0;
  643. char const *yyp = yystr;
  644. for (;;)
  645. switch (*++yyp)
  646. {
  647. case '\'':
  648. case ',':
  649. goto do_not_strip_quotes;
  650. case '\\':
  651. if (*++yyp != '\\')
  652. goto do_not_strip_quotes;
  653. /* Fall through. */
  654. default:
  655. if (yyres)
  656. yyres[yyn] = *yyp;
  657. yyn++;
  658. break;
  659. case '"':
  660. if (yyres)
  661. yyres[yyn] = '\0';
  662. return yyn;
  663. }
  664. do_not_strip_quotes: ;
  665. }
  666. if (! yyres)
  667. return yystrlen (yystr);
  668. return yystpcpy (yyres, yystr) - yyres;
  669. }
  670. # endif
  671. /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
  672. about the unexpected token YYTOKEN for the state stack whose top is
  673. YYSSP.
  674. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
  675. not large enough to hold the message. In that case, also set
  676. *YYMSG_ALLOC to the required number of bytes. Return 2 if the
  677. required number of bytes is too large to store. */
  678. static int
  679. yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
  680. yytype_int16 *yyssp, int yytoken)
  681. {
  682. YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
  683. YYSIZE_T yysize = yysize0;
  684. enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
  685. /* Internationalized format string. */
  686. const char *yyformat = YY_NULLPTR;
  687. /* Arguments of yyformat. */
  688. char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
  689. /* Number of reported tokens (one for the "unexpected", one per
  690. "expected"). */
  691. int yycount = 0;
  692. /* There are many possibilities here to consider:
  693. - If this state is a consistent state with a default action, then
  694. the only way this function was invoked is if the default action
  695. is an error action. In that case, don't check for expected
  696. tokens because there are none.
  697. - The only way there can be no lookahead present (in yychar) is if
  698. this state is a consistent state with a default action. Thus,
  699. detecting the absence of a lookahead is sufficient to determine
  700. that there is no unexpected or expected token to report. In that
  701. case, just report a simple "syntax error".
  702. - Don't assume there isn't a lookahead just because this state is a
  703. consistent state with a default action. There might have been a
  704. previous inconsistent state, consistent state with a non-default
  705. action, or user semantic action that manipulated yychar.
  706. - Of course, the expected token list depends on states to have
  707. correct lookahead information, and it depends on the parser not
  708. to perform extra reductions after fetching a lookahead from the
  709. scanner and before detecting a syntax error. Thus, state merging
  710. (from LALR or IELR) and default reductions corrupt the expected
  711. token list. However, the list is correct for canonical LR with
  712. one exception: it will still contain any token that will not be
  713. accepted due to an error action in a later state.
  714. */
  715. if (yytoken != YYEMPTY)
  716. {
  717. int yyn = yypact[*yyssp];
  718. yyarg[yycount++] = yytname[yytoken];
  719. if (!yypact_value_is_default (yyn))
  720. {
  721. /* Start YYX at -YYN if negative to avoid negative indexes in
  722. YYCHECK. In other words, skip the first -YYN actions for
  723. this state because they are default actions. */
  724. int yyxbegin = yyn < 0 ? -yyn : 0;
  725. /* Stay within bounds of both yycheck and yytname. */
  726. int yychecklim = YYLAST - yyn + 1;
  727. int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
  728. int yyx;
  729. for (yyx = yyxbegin; yyx < yyxend; ++yyx)
  730. if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
  731. && !yytable_value_is_error (yytable[yyx + yyn]))
  732. {
  733. if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
  734. {
  735. yycount = 1;
  736. yysize = yysize0;
  737. break;
  738. }
  739. yyarg[yycount++] = yytname[yyx];
  740. {
  741. YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
  742. if (! (yysize <= yysize1
  743. && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
  744. return 2;
  745. yysize = yysize1;
  746. }
  747. }
  748. }
  749. }
  750. switch (yycount)
  751. {
  752. # define YYCASE_(N, S) \
  753. case N: \
  754. yyformat = S; \
  755. break
  756. YYCASE_(0, YY_("syntax error"));
  757. YYCASE_(1, YY_("syntax error, unexpected %s"));
  758. YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
  759. YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
  760. YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
  761. YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
  762. # undef YYCASE_
  763. }
  764. {
  765. YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
  766. if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
  767. return 2;
  768. yysize = yysize1;
  769. }
  770. if (*yymsg_alloc < yysize)
  771. {
  772. *yymsg_alloc = 2 * yysize;
  773. if (! (yysize <= *yymsg_alloc
  774. && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
  775. *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
  776. return 1;
  777. }
  778. /* Avoid sprintf, as that infringes on the user's name space.
  779. Don't have undefined behavior even if the translation
  780. produced a string with the wrong number of "%s"s. */
  781. {
  782. char *yyp = *yymsg;
  783. int yyi = 0;
  784. while ((*yyp = *yyformat) != '\0')
  785. if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
  786. {
  787. yyp += yytnamerr (yyp, yyarg[yyi++]);
  788. yyformat += 2;
  789. }
  790. else
  791. {
  792. yyp++;
  793. yyformat++;
  794. }
  795. }
  796. return 0;
  797. }
  798. #endif /* YYERROR_VERBOSE */
  799. /*-----------------------------------------------.
  800. | Release the memory associated to this symbol. |
  801. `-----------------------------------------------*/
  802. static void
  803. yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
  804. {
  805. YYUSE (yyvaluep);
  806. if (!yymsg)
  807. yymsg = "Deleting";
  808. YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
  809. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  810. YYUSE (yytype);
  811. YY_IGNORE_MAYBE_UNINITIALIZED_END
  812. }
  813. /* The lookahead symbol. */
  814. int yychar;
  815. /* The semantic value of the lookahead symbol. */
  816. YYSTYPE yylval;
  817. /* Number of syntax errors so far. */
  818. int yynerrs;
  819. /*----------.
  820. | yyparse. |
  821. `----------*/
  822. int
  823. yyparse (void)
  824. {
  825. int yystate;
  826. /* Number of tokens to shift before error messages enabled. */
  827. int yyerrstatus;
  828. /* The stacks and their tools:
  829. 'yyss': related to states.
  830. 'yyvs': related to semantic values.
  831. Refer to the stacks through separate pointers, to allow yyoverflow
  832. to reallocate them elsewhere. */
  833. /* The state stack. */
  834. yytype_int16 yyssa[YYINITDEPTH];
  835. yytype_int16 *yyss;
  836. yytype_int16 *yyssp;
  837. /* The semantic value stack. */
  838. YYSTYPE yyvsa[YYINITDEPTH];
  839. YYSTYPE *yyvs;
  840. YYSTYPE *yyvsp;
  841. YYSIZE_T yystacksize;
  842. int yyn;
  843. int yyresult;
  844. /* Lookahead token as an internal (translated) token number. */
  845. int yytoken = 0;
  846. /* The variables used to return semantic value and location from the
  847. action routines. */
  848. YYSTYPE yyval;
  849. #if YYERROR_VERBOSE
  850. /* Buffer for error messages, and its allocated size. */
  851. char yymsgbuf[128];
  852. char *yymsg = yymsgbuf;
  853. YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
  854. #endif
  855. #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
  856. /* The number of symbols on the RHS of the reduced rule.
  857. Keep to zero when no symbol should be popped. */
  858. int yylen = 0;
  859. yyssp = yyss = yyssa;
  860. yyvsp = yyvs = yyvsa;
  861. yystacksize = YYINITDEPTH;
  862. YYDPRINTF ((stderr, "Starting parse\n"));
  863. yystate = 0;
  864. yyerrstatus = 0;
  865. yynerrs = 0;
  866. yychar = YYEMPTY; /* Cause a token to be read. */
  867. goto yysetstate;
  868. /*------------------------------------------------------------.
  869. | yynewstate -- Push a new state, which is found in yystate. |
  870. `------------------------------------------------------------*/
  871. yynewstate:
  872. /* In all cases, when you get here, the value and location stacks
  873. have just been pushed. So pushing a state here evens the stacks. */
  874. yyssp++;
  875. yysetstate:
  876. *yyssp = yystate;
  877. if (yyss + yystacksize - 1 <= yyssp)
  878. {
  879. /* Get the current used size of the three stacks, in elements. */
  880. YYSIZE_T yysize = yyssp - yyss + 1;
  881. #ifdef yyoverflow
  882. {
  883. /* Give user a chance to reallocate the stack. Use copies of
  884. these so that the &'s don't force the real ones into
  885. memory. */
  886. YYSTYPE *yyvs1 = yyvs;
  887. yytype_int16 *yyss1 = yyss;
  888. /* Each stack pointer address is followed by the size of the
  889. data in use in that stack, in bytes. This used to be a
  890. conditional around just the two extra args, but that might
  891. be undefined if yyoverflow is a macro. */
  892. yyoverflow (YY_("memory exhausted"),
  893. &yyss1, yysize * sizeof (*yyssp),
  894. &yyvs1, yysize * sizeof (*yyvsp),
  895. &yystacksize);
  896. yyss = yyss1;
  897. yyvs = yyvs1;
  898. }
  899. #else /* no yyoverflow */
  900. # ifndef YYSTACK_RELOCATE
  901. goto yyexhaustedlab;
  902. # else
  903. /* Extend the stack our own way. */
  904. if (YYMAXDEPTH <= yystacksize)
  905. goto yyexhaustedlab;
  906. yystacksize *= 2;
  907. if (YYMAXDEPTH < yystacksize)
  908. yystacksize = YYMAXDEPTH;
  909. {
  910. yytype_int16 *yyss1 = yyss;
  911. union yyalloc *yyptr =
  912. (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
  913. if (! yyptr)
  914. goto yyexhaustedlab;
  915. YYSTACK_RELOCATE (yyss_alloc, yyss);
  916. YYSTACK_RELOCATE (yyvs_alloc, yyvs);
  917. # undef YYSTACK_RELOCATE
  918. if (yyss1 != yyssa)
  919. YYSTACK_FREE (yyss1);
  920. }
  921. # endif
  922. #endif /* no yyoverflow */
  923. yyssp = yyss + yysize - 1;
  924. yyvsp = yyvs + yysize - 1;
  925. YYDPRINTF ((stderr, "Stack size increased to %lu\n",
  926. (unsigned long int) yystacksize));
  927. if (yyss + yystacksize - 1 <= yyssp)
  928. YYABORT;
  929. }
  930. YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  931. if (yystate == YYFINAL)
  932. YYACCEPT;
  933. goto yybackup;
  934. /*-----------.
  935. | yybackup. |
  936. `-----------*/
  937. yybackup:
  938. /* Do appropriate processing given the current state. Read a
  939. lookahead token if we need one and don't already have one. */
  940. /* First try to decide what to do without reference to lookahead token. */
  941. yyn = yypact[yystate];
  942. if (yypact_value_is_default (yyn))
  943. goto yydefault;
  944. /* Not known => get a lookahead token if don't already have one. */
  945. /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
  946. if (yychar == YYEMPTY)
  947. {
  948. YYDPRINTF ((stderr, "Reading a token: "));
  949. yychar = yylex ();
  950. }
  951. if (yychar <= YYEOF)
  952. {
  953. yychar = yytoken = YYEOF;
  954. YYDPRINTF ((stderr, "Now at end of input.\n"));
  955. }
  956. else
  957. {
  958. yytoken = YYTRANSLATE (yychar);
  959. YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
  960. }
  961. /* If the proper action on seeing token YYTOKEN is to reduce or to
  962. detect an error, take that action. */
  963. yyn += yytoken;
  964. if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
  965. goto yydefault;
  966. yyn = yytable[yyn];
  967. if (yyn <= 0)
  968. {
  969. if (yytable_value_is_error (yyn))
  970. goto yyerrlab;
  971. yyn = -yyn;
  972. goto yyreduce;
  973. }
  974. /* Count tokens shifted since error; after three, turn off error
  975. status. */
  976. if (yyerrstatus)
  977. yyerrstatus--;
  978. /* Shift the lookahead token. */
  979. YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
  980. /* Discard the shifted token. */
  981. yychar = YYEMPTY;
  982. yystate = yyn;
  983. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  984. *++yyvsp = yylval;
  985. YY_IGNORE_MAYBE_UNINITIALIZED_END
  986. goto yynewstate;
  987. /*-----------------------------------------------------------.
  988. | yydefault -- do the default action for the current state. |
  989. `-----------------------------------------------------------*/
  990. yydefault:
  991. yyn = yydefact[yystate];
  992. if (yyn == 0)
  993. goto yyerrlab;
  994. goto yyreduce;
  995. /*-----------------------------.
  996. | yyreduce -- Do a reduction. |
  997. `-----------------------------*/
  998. yyreduce:
  999. /* yyn is the number of a rule to reduce with. */
  1000. yylen = yyr2[yyn];
  1001. /* If YYLEN is nonzero, implement the default value of the action:
  1002. '$$ = $1'.
  1003. Otherwise, the following line sets YYVAL to garbage.
  1004. This behavior is undocumented and Bison
  1005. users should not rely upon it. Assigning to YYVAL
  1006. unconditionally makes the parser a bit smaller, and it avoids a
  1007. GCC warning that YYVAL may be used uninitialized. */
  1008. yyval = yyvsp[1-yylen];
  1009. YY_REDUCE_PRINT (yyn);
  1010. switch (yyn)
  1011. {
  1012. case 2:
  1013. #line 30 "as.y" /* yacc.c:1646 */
  1014. { printf("RES: %d\n", (yyvsp[-1].nombre)); }
  1015. #line 1211 "as.tab.c" /* yacc.c:1646 */
  1016. break;
  1017. case 4:
  1018. #line 32 "as.y" /* yacc.c:1646 */
  1019. { printf("END\n"); }
  1020. #line 1217 "as.tab.c" /* yacc.c:1646 */
  1021. break;
  1022. case 5:
  1023. #line 35 "as.y" /* yacc.c:1646 */
  1024. { (yyval.nombre) = (yyvsp[-2].nombre) + (yyvsp[0].nombre); }
  1025. #line 1223 "as.tab.c" /* yacc.c:1646 */
  1026. break;
  1027. case 6:
  1028. #line 36 "as.y" /* yacc.c:1646 */
  1029. { (yyval.nombre) = (yyvsp[-2].nombre) - (yyvsp[0].nombre); }
  1030. #line 1229 "as.tab.c" /* yacc.c:1646 */
  1031. break;
  1032. case 7:
  1033. #line 37 "as.y" /* yacc.c:1646 */
  1034. { (yyval.nombre) = (yyvsp[-1].nombre); }
  1035. #line 1235 "as.tab.c" /* yacc.c:1646 */
  1036. break;
  1037. case 8:
  1038. #line 38 "as.y" /* yacc.c:1646 */
  1039. { (yyval.nombre) = (yyvsp[0].nombre); }
  1040. #line 1241 "as.tab.c" /* yacc.c:1646 */
  1041. break;
  1042. #line 1245 "as.tab.c" /* yacc.c:1646 */
  1043. default: break;
  1044. }
  1045. /* User semantic actions sometimes alter yychar, and that requires
  1046. that yytoken be updated with the new translation. We take the
  1047. approach of translating immediately before every use of yytoken.
  1048. One alternative is translating here after every semantic action,
  1049. but that translation would be missed if the semantic action invokes
  1050. YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
  1051. if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
  1052. incorrect destructor might then be invoked immediately. In the
  1053. case of YYERROR or YYBACKUP, subsequent parser actions might lead
  1054. to an incorrect destructor call or verbose syntax error message
  1055. before the lookahead is translated. */
  1056. YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
  1057. YYPOPSTACK (yylen);
  1058. yylen = 0;
  1059. YY_STACK_PRINT (yyss, yyssp);
  1060. *++yyvsp = yyval;
  1061. /* Now 'shift' the result of the reduction. Determine what state
  1062. that goes to, based on the state we popped back to and the rule
  1063. number reduced by. */
  1064. yyn = yyr1[yyn];
  1065. yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  1066. if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
  1067. yystate = yytable[yystate];
  1068. else
  1069. yystate = yydefgoto[yyn - YYNTOKENS];
  1070. goto yynewstate;
  1071. /*--------------------------------------.
  1072. | yyerrlab -- here on detecting error. |
  1073. `--------------------------------------*/
  1074. yyerrlab:
  1075. /* Make sure we have latest lookahead translation. See comments at
  1076. user semantic actions for why this is necessary. */
  1077. yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
  1078. /* If not already recovering from an error, report this error. */
  1079. if (!yyerrstatus)
  1080. {
  1081. ++yynerrs;
  1082. #if ! YYERROR_VERBOSE
  1083. yyerror (YY_("syntax error"));
  1084. #else
  1085. # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
  1086. yyssp, yytoken)
  1087. {
  1088. char const *yymsgp = YY_("syntax error");
  1089. int yysyntax_error_status;
  1090. yysyntax_error_status = YYSYNTAX_ERROR;
  1091. if (yysyntax_error_status == 0)
  1092. yymsgp = yymsg;
  1093. else if (yysyntax_error_status == 1)
  1094. {
  1095. if (yymsg != yymsgbuf)
  1096. YYSTACK_FREE (yymsg);
  1097. yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
  1098. if (!yymsg)
  1099. {
  1100. yymsg = yymsgbuf;
  1101. yymsg_alloc = sizeof yymsgbuf;
  1102. yysyntax_error_status = 2;
  1103. }
  1104. else
  1105. {
  1106. yysyntax_error_status = YYSYNTAX_ERROR;
  1107. yymsgp = yymsg;
  1108. }
  1109. }
  1110. yyerror (yymsgp);
  1111. if (yysyntax_error_status == 2)
  1112. goto yyexhaustedlab;
  1113. }
  1114. # undef YYSYNTAX_ERROR
  1115. #endif
  1116. }
  1117. if (yyerrstatus == 3)
  1118. {
  1119. /* If just tried and failed to reuse lookahead token after an
  1120. error, discard it. */
  1121. if (yychar <= YYEOF)
  1122. {
  1123. /* Return failure if at end of input. */
  1124. if (yychar == YYEOF)
  1125. YYABORT;
  1126. }
  1127. else
  1128. {
  1129. yydestruct ("Error: discarding",
  1130. yytoken, &yylval);
  1131. yychar = YYEMPTY;
  1132. }
  1133. }
  1134. /* Else will try to reuse lookahead token after shifting the error
  1135. token. */
  1136. goto yyerrlab1;
  1137. /*---------------------------------------------------.
  1138. | yyerrorlab -- error raised explicitly by YYERROR. |
  1139. `---------------------------------------------------*/
  1140. yyerrorlab:
  1141. /* Pacify compilers like GCC when the user code never invokes
  1142. YYERROR and the label yyerrorlab therefore never appears in user
  1143. code. */
  1144. if (/*CONSTCOND*/ 0)
  1145. goto yyerrorlab;
  1146. /* Do not reclaim the symbols of the rule whose action triggered
  1147. this YYERROR. */
  1148. YYPOPSTACK (yylen);
  1149. yylen = 0;
  1150. YY_STACK_PRINT (yyss, yyssp);
  1151. yystate = *yyssp;
  1152. goto yyerrlab1;
  1153. /*-------------------------------------------------------------.
  1154. | yyerrlab1 -- common code for both syntax error and YYERROR. |
  1155. `-------------------------------------------------------------*/
  1156. yyerrlab1:
  1157. yyerrstatus = 3; /* Each real token shifted decrements this. */
  1158. for (;;)
  1159. {
  1160. yyn = yypact[yystate];
  1161. if (!yypact_value_is_default (yyn))
  1162. {
  1163. yyn += YYTERROR;
  1164. if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
  1165. {
  1166. yyn = yytable[yyn];
  1167. if (0 < yyn)
  1168. break;
  1169. }
  1170. }
  1171. /* Pop the current state because it cannot handle the error token. */
  1172. if (yyssp == yyss)
  1173. YYABORT;
  1174. yydestruct ("Error: popping",
  1175. yystos[yystate], yyvsp);
  1176. YYPOPSTACK (1);
  1177. yystate = *yyssp;
  1178. YY_STACK_PRINT (yyss, yyssp);
  1179. }
  1180. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1181. *++yyvsp = yylval;
  1182. YY_IGNORE_MAYBE_UNINITIALIZED_END
  1183. /* Shift the error token. */
  1184. YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
  1185. yystate = yyn;
  1186. goto yynewstate;
  1187. /*-------------------------------------.
  1188. | yyacceptlab -- YYACCEPT comes here. |
  1189. `-------------------------------------*/
  1190. yyacceptlab:
  1191. yyresult = 0;
  1192. goto yyreturn;
  1193. /*-----------------------------------.
  1194. | yyabortlab -- YYABORT comes here. |
  1195. `-----------------------------------*/
  1196. yyabortlab:
  1197. yyresult = 1;
  1198. goto yyreturn;
  1199. #if !defined yyoverflow || YYERROR_VERBOSE
  1200. /*-------------------------------------------------.
  1201. | yyexhaustedlab -- memory exhaustion comes here. |
  1202. `-------------------------------------------------*/
  1203. yyexhaustedlab:
  1204. yyerror (YY_("memory exhausted"));
  1205. yyresult = 2;
  1206. /* Fall through. */
  1207. #endif
  1208. yyreturn:
  1209. if (yychar != YYEMPTY)
  1210. {
  1211. /* Make sure we have latest lookahead translation. See comments at
  1212. user semantic actions for why this is necessary. */
  1213. yytoken = YYTRANSLATE (yychar);
  1214. yydestruct ("Cleanup: discarding lookahead",
  1215. yytoken, &yylval);
  1216. }
  1217. /* Do not reclaim the symbols of the rule whose action triggered
  1218. this YYABORT or YYACCEPT. */
  1219. YYPOPSTACK (yylen);
  1220. YY_STACK_PRINT (yyss, yyssp);
  1221. while (yyssp != yyss)
  1222. {
  1223. yydestruct ("Cleanup: popping",
  1224. yystos[*yyssp], yyvsp);
  1225. YYPOPSTACK (1);
  1226. }
  1227. #ifndef yyoverflow
  1228. if (yyss != yyssa)
  1229. YYSTACK_FREE (yyss);
  1230. #endif
  1231. #if YYERROR_VERBOSE
  1232. if (yymsg != yymsgbuf)
  1233. YYSTACK_FREE (yymsg);
  1234. #endif
  1235. return yyresult;
  1236. }
  1237. #line 41 "as.y" /* yacc.c:1906 */
  1238. int yywrap(void){return 1;}
  1239. void main(void) {
  1240. yyparse();
  1241. }