pktloc_syntax.c 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777
  1. /* A Bison parser, made by GNU Bison 3.5.1. */
  2. /* Bison implementation for Yacc-like parsers in C
  3. Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
  4. Inc.
  5. This program is free software: you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation, either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  15. /* As a special exception, you may create a larger work that contains
  16. part or all of the Bison parser skeleton and distribute that work
  17. under terms of your choice, so long as that work isn't itself a
  18. parser generator using the skeleton or a modified version thereof
  19. as a parser skeleton. Alternatively, if you modify or redistribute
  20. the parser skeleton itself, you may (at your option) remove this
  21. special exception, which will cause the skeleton and the resulting
  22. Bison output files to be licensed under the GNU General Public
  23. License without this special exception.
  24. This special exception was added by the Free Software Foundation in
  25. version 2.2 of Bison. */
  26. /* C LALR(1) parser skeleton written by Richard Stallman, by
  27. simplifying the original so-called "semantic" parser. */
  28. /* All symbols defined below should begin with yy or YY, to avoid
  29. infringing on user name space. This should be done even for local
  30. variables, as they might otherwise be expanded by user macros.
  31. There are some unavoidable exceptions within include files to
  32. define necessary library symbols; they are noted "INFRINGES ON
  33. USER NAME SPACE" below. */
  34. /* Undocumented macros, especially those whose name start with YY_,
  35. are private implementation details. Do not rely on them. */
  36. /* Identify Bison output. */
  37. #define YYBISON 1
  38. /* Bison version. */
  39. #define YYBISON_VERSION "3.5.1"
  40. /* Skeleton name. */
  41. #define YYSKELETON_NAME "yacc.c"
  42. /* Pure parsers. */
  43. #define YYPURE 1
  44. /* Push parsers. */
  45. #define YYPUSH 0
  46. /* Pull parsers. */
  47. #define YYPULL 1
  48. /* Substitute the variable and function names. */
  49. #define yyparse pktloc_parse
  50. #define yylex pktloc_lex
  51. #define yyerror pktloc_error
  52. #define yydebug pktloc_debug
  53. #define yynerrs pktloc_nerrs
  54. /* First part of user prologue. */
  55. #line 1 "route/pktloc_syntax.y"
  56. #include <netlink-private/netlink.h>
  57. #include <netlink-private/tc.h>
  58. #include <netlink/netlink.h>
  59. #include <netlink/utils.h>
  60. #include <netlink/route/pktloc.h>
  61. #line 83 "route/pktloc_syntax.c"
  62. # ifndef YY_CAST
  63. # ifdef __cplusplus
  64. # define YY_CAST(Type, Val) static_cast<Type> (Val)
  65. # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
  66. # else
  67. # define YY_CAST(Type, Val) ((Type) (Val))
  68. # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
  69. # endif
  70. # endif
  71. # ifndef YY_NULLPTR
  72. # if defined __cplusplus
  73. # if 201103L <= __cplusplus
  74. # define YY_NULLPTR nullptr
  75. # else
  76. # define YY_NULLPTR 0
  77. # endif
  78. # else
  79. # define YY_NULLPTR ((void*)0)
  80. # endif
  81. # endif
  82. /* Enabling verbose error messages. */
  83. #ifdef YYERROR_VERBOSE
  84. # undef YYERROR_VERBOSE
  85. # define YYERROR_VERBOSE 1
  86. #else
  87. # define YYERROR_VERBOSE 1
  88. #endif
  89. /* Use api.header.include to #include this header
  90. instead of duplicating it here. */
  91. #ifndef YY_PKTLOC_ROUTE_PKTLOC_SYNTAX_H_INCLUDED
  92. # define YY_PKTLOC_ROUTE_PKTLOC_SYNTAX_H_INCLUDED
  93. /* Debug traces. */
  94. #ifndef YYDEBUG
  95. # define YYDEBUG 0
  96. #endif
  97. #if YYDEBUG
  98. extern int pktloc_debug;
  99. #endif
  100. /* Token type. */
  101. #ifndef YYTOKENTYPE
  102. # define YYTOKENTYPE
  103. enum yytokentype
  104. {
  105. ERROR = 258,
  106. NUMBER = 259,
  107. LAYER = 260,
  108. ALIGN = 261,
  109. NAME = 262
  110. };
  111. #endif
  112. /* Tokens. */
  113. #define ERROR 258
  114. #define NUMBER 259
  115. #define LAYER 260
  116. #define ALIGN 261
  117. #define NAME 262
  118. /* Value type. */
  119. #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
  120. union YYSTYPE
  121. {
  122. #line 18 "route/pktloc_syntax.y"
  123. struct rtnl_pktloc *l;
  124. uint32_t i;
  125. char *s;
  126. #line 155 "route/pktloc_syntax.c"
  127. };
  128. typedef union YYSTYPE YYSTYPE;
  129. # define YYSTYPE_IS_TRIVIAL 1
  130. # define YYSTYPE_IS_DECLARED 1
  131. #endif
  132. /* Location type. */
  133. #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
  134. typedef struct YYLTYPE YYLTYPE;
  135. struct YYLTYPE
  136. {
  137. int first_line;
  138. int first_column;
  139. int last_line;
  140. int last_column;
  141. };
  142. # define YYLTYPE_IS_DECLARED 1
  143. # define YYLTYPE_IS_TRIVIAL 1
  144. #endif
  145. int pktloc_parse (void *scanner);
  146. #endif /* !YY_PKTLOC_ROUTE_PKTLOC_SYNTAX_H_INCLUDED */
  147. /* Second part of user prologue. */
  148. #line 24 "route/pktloc_syntax.y"
  149. extern int pktloc_lex(YYSTYPE *, YYLTYPE *, void *);
  150. static void yyerror(YYLTYPE *locp, void *scanner, const char *msg)
  151. {
  152. NL_DBG(1, "Error while parsing packet location file: %s\n", msg);
  153. }
  154. #line 193 "route/pktloc_syntax.c"
  155. #ifdef short
  156. # undef short
  157. #endif
  158. /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
  159. <limits.h> and (if available) <stdint.h> are included
  160. so that the code can choose integer types of a good width. */
  161. #ifndef __PTRDIFF_MAX__
  162. # include <limits.h> /* INFRINGES ON USER NAME SPACE */
  163. # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
  164. # include <stdint.h> /* INFRINGES ON USER NAME SPACE */
  165. # define YY_STDINT_H
  166. # endif
  167. #endif
  168. /* Narrow types that promote to a signed type and that can represent a
  169. signed or unsigned integer of at least N bits. In tables they can
  170. save space and decrease cache pressure. Promoting to a signed type
  171. helps avoid bugs in integer arithmetic. */
  172. #ifdef __INT_LEAST8_MAX__
  173. typedef __INT_LEAST8_TYPE__ yytype_int8;
  174. #elif defined YY_STDINT_H
  175. typedef int_least8_t yytype_int8;
  176. #else
  177. typedef signed char yytype_int8;
  178. #endif
  179. #ifdef __INT_LEAST16_MAX__
  180. typedef __INT_LEAST16_TYPE__ yytype_int16;
  181. #elif defined YY_STDINT_H
  182. typedef int_least16_t yytype_int16;
  183. #else
  184. typedef short yytype_int16;
  185. #endif
  186. #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
  187. typedef __UINT_LEAST8_TYPE__ yytype_uint8;
  188. #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
  189. && UINT_LEAST8_MAX <= INT_MAX)
  190. typedef uint_least8_t yytype_uint8;
  191. #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
  192. typedef unsigned char yytype_uint8;
  193. #else
  194. typedef short yytype_uint8;
  195. #endif
  196. #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
  197. typedef __UINT_LEAST16_TYPE__ yytype_uint16;
  198. #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
  199. && UINT_LEAST16_MAX <= INT_MAX)
  200. typedef uint_least16_t yytype_uint16;
  201. #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
  202. typedef unsigned short yytype_uint16;
  203. #else
  204. typedef int yytype_uint16;
  205. #endif
  206. #ifndef YYPTRDIFF_T
  207. # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
  208. # define YYPTRDIFF_T __PTRDIFF_TYPE__
  209. # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
  210. # elif defined PTRDIFF_MAX
  211. # ifndef ptrdiff_t
  212. # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  213. # endif
  214. # define YYPTRDIFF_T ptrdiff_t
  215. # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
  216. # else
  217. # define YYPTRDIFF_T long
  218. # define YYPTRDIFF_MAXIMUM LONG_MAX
  219. # endif
  220. #endif
  221. #ifndef YYSIZE_T
  222. # ifdef __SIZE_TYPE__
  223. # define YYSIZE_T __SIZE_TYPE__
  224. # elif defined size_t
  225. # define YYSIZE_T size_t
  226. # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
  227. # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
  228. # define YYSIZE_T size_t
  229. # else
  230. # define YYSIZE_T unsigned
  231. # endif
  232. #endif
  233. #define YYSIZE_MAXIMUM \
  234. YY_CAST (YYPTRDIFF_T, \
  235. (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
  236. ? YYPTRDIFF_MAXIMUM \
  237. : YY_CAST (YYSIZE_T, -1)))
  238. #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
  239. /* Stored state numbers (used for stacks). */
  240. typedef yytype_int8 yy_state_t;
  241. /* State numbers in computations. */
  242. typedef int yy_state_fast_t;
  243. #ifndef YY_
  244. # if defined YYENABLE_NLS && YYENABLE_NLS
  245. # if ENABLE_NLS
  246. # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
  247. # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
  248. # endif
  249. # endif
  250. # ifndef YY_
  251. # define YY_(Msgid) Msgid
  252. # endif
  253. #endif
  254. #ifndef YY_ATTRIBUTE_PURE
  255. # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
  256. # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
  257. # else
  258. # define YY_ATTRIBUTE_PURE
  259. # endif
  260. #endif
  261. #ifndef YY_ATTRIBUTE_UNUSED
  262. # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
  263. # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
  264. # else
  265. # define YY_ATTRIBUTE_UNUSED
  266. # endif
  267. #endif
  268. /* Suppress unused-variable warnings by "using" E. */
  269. #if ! defined lint || defined __GNUC__
  270. # define YYUSE(E) ((void) (E))
  271. #else
  272. # define YYUSE(E) /* empty */
  273. #endif
  274. #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
  275. /* Suppress an incorrect diagnostic about yylval being uninitialized. */
  276. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
  277. _Pragma ("GCC diagnostic push") \
  278. _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
  279. _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
  280. # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
  281. _Pragma ("GCC diagnostic pop")
  282. #else
  283. # define YY_INITIAL_VALUE(Value) Value
  284. #endif
  285. #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  286. # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  287. # define YY_IGNORE_MAYBE_UNINITIALIZED_END
  288. #endif
  289. #ifndef YY_INITIAL_VALUE
  290. # define YY_INITIAL_VALUE(Value) /* Nothing. */
  291. #endif
  292. #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
  293. # define YY_IGNORE_USELESS_CAST_BEGIN \
  294. _Pragma ("GCC diagnostic push") \
  295. _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
  296. # define YY_IGNORE_USELESS_CAST_END \
  297. _Pragma ("GCC diagnostic pop")
  298. #endif
  299. #ifndef YY_IGNORE_USELESS_CAST_BEGIN
  300. # define YY_IGNORE_USELESS_CAST_BEGIN
  301. # define YY_IGNORE_USELESS_CAST_END
  302. #endif
  303. #define YY_ASSERT(E) ((void) (0 && (E)))
  304. #if ! defined yyoverflow || YYERROR_VERBOSE
  305. /* The parser invokes alloca or malloc; define the necessary symbols. */
  306. # ifdef YYSTACK_USE_ALLOCA
  307. # if YYSTACK_USE_ALLOCA
  308. # ifdef __GNUC__
  309. # define YYSTACK_ALLOC __builtin_alloca
  310. # elif defined __BUILTIN_VA_ARG_INCR
  311. # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
  312. # elif defined _AIX
  313. # define YYSTACK_ALLOC __alloca
  314. # elif defined _MSC_VER
  315. # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
  316. # define alloca _alloca
  317. # else
  318. # define YYSTACK_ALLOC alloca
  319. # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
  320. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  321. /* Use EXIT_SUCCESS as a witness for stdlib.h. */
  322. # ifndef EXIT_SUCCESS
  323. # define EXIT_SUCCESS 0
  324. # endif
  325. # endif
  326. # endif
  327. # endif
  328. # endif
  329. # ifdef YYSTACK_ALLOC
  330. /* Pacify GCC's 'empty if-body' warning. */
  331. # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
  332. # ifndef YYSTACK_ALLOC_MAXIMUM
  333. /* The OS might guarantee only one guard page at the bottom of the stack,
  334. and a page size can be as small as 4096 bytes. So we cannot safely
  335. invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
  336. to allow for a few compiler-allocated temporary stack slots. */
  337. # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
  338. # endif
  339. # else
  340. # define YYSTACK_ALLOC YYMALLOC
  341. # define YYSTACK_FREE YYFREE
  342. # ifndef YYSTACK_ALLOC_MAXIMUM
  343. # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
  344. # endif
  345. # if (defined __cplusplus && ! defined EXIT_SUCCESS \
  346. && ! ((defined YYMALLOC || defined malloc) \
  347. && (defined YYFREE || defined free)))
  348. # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
  349. # ifndef EXIT_SUCCESS
  350. # define EXIT_SUCCESS 0
  351. # endif
  352. # endif
  353. # ifndef YYMALLOC
  354. # define YYMALLOC malloc
  355. # if ! defined malloc && ! defined EXIT_SUCCESS
  356. void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
  357. # endif
  358. # endif
  359. # ifndef YYFREE
  360. # define YYFREE free
  361. # if ! defined free && ! defined EXIT_SUCCESS
  362. void free (void *); /* INFRINGES ON USER NAME SPACE */
  363. # endif
  364. # endif
  365. # endif
  366. #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
  367. #if (! defined yyoverflow \
  368. && (! defined __cplusplus \
  369. || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
  370. && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
  371. /* A type that is properly aligned for any stack member. */
  372. union yyalloc
  373. {
  374. yy_state_t yyss_alloc;
  375. YYSTYPE yyvs_alloc;
  376. YYLTYPE yyls_alloc;
  377. };
  378. /* The size of the maximum gap between one aligned stack and the next. */
  379. # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
  380. /* The size of an array large to enough to hold all stacks, each with
  381. N elements. */
  382. # define YYSTACK_BYTES(N) \
  383. ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
  384. + YYSIZEOF (YYLTYPE)) \
  385. + 2 * YYSTACK_GAP_MAXIMUM)
  386. # define YYCOPY_NEEDED 1
  387. /* Relocate STACK from its old location to the new one. The
  388. local variables YYSIZE and YYSTACKSIZE give the old and new number of
  389. elements in the stack, and YYPTR gives the new location of the
  390. stack. Advance YYPTR to a properly aligned location for the next
  391. stack. */
  392. # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
  393. do \
  394. { \
  395. YYPTRDIFF_T yynewbytes; \
  396. YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
  397. Stack = &yyptr->Stack_alloc; \
  398. yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
  399. yyptr += yynewbytes / YYSIZEOF (*yyptr); \
  400. } \
  401. while (0)
  402. #endif
  403. #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
  404. /* Copy COUNT objects from SRC to DST. The source and destination do
  405. not overlap. */
  406. # ifndef YYCOPY
  407. # if defined __GNUC__ && 1 < __GNUC__
  408. # define YYCOPY(Dst, Src, Count) \
  409. __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
  410. # else
  411. # define YYCOPY(Dst, Src, Count) \
  412. do \
  413. { \
  414. YYPTRDIFF_T yyi; \
  415. for (yyi = 0; yyi < (Count); yyi++) \
  416. (Dst)[yyi] = (Src)[yyi]; \
  417. } \
  418. while (0)
  419. # endif
  420. # endif
  421. #endif /* !YYCOPY_NEEDED */
  422. /* YYFINAL -- State number of the termination state. */
  423. #define YYFINAL 7
  424. /* YYLAST -- Last index in YYTABLE. */
  425. #define YYLAST 10
  426. /* YYNTOKENS -- Number of terminals. */
  427. #define YYNTOKENS 9
  428. /* YYNNTS -- Number of nonterminals. */
  429. #define YYNNTS 7
  430. /* YYNRULES -- Number of rules. */
  431. #define YYNRULES 12
  432. /* YYNSTATES -- Number of states. */
  433. #define YYNSTATES 17
  434. #define YYUNDEFTOK 2
  435. #define YYMAXUTOK 262
  436. /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
  437. as returned by yylex, with out-of-bounds checking. */
  438. #define YYTRANSLATE(YYX) \
  439. (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
  440. /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
  441. as returned by yylex. */
  442. static const yytype_int8 yytranslate[] =
  443. {
  444. 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  445. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  446. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  447. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  448. 2, 2, 2, 8, 2, 2, 2, 2, 2, 2,
  449. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  450. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  451. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  452. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  453. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  454. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  455. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  456. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  457. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  458. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  459. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  460. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  461. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  462. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  463. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  464. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  465. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  466. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  467. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  468. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  469. 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
  470. 5, 6, 7
  471. };
  472. #if YYDEBUG
  473. /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
  474. static const yytype_int8 yyrline[] =
  475. {
  476. 0, 45, 45, 47, 51, 78, 80, 86, 87, 93,
  477. 94, 100, 101
  478. };
  479. #endif
  480. #if YYDEBUG || YYERROR_VERBOSE || 1
  481. /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
  482. First, the terminals, then, starting at YYNTOKENS, nonterminals. */
  483. static const char *const yytname[] =
  484. {
  485. "$end", "error", "$undefined", "ERROR", "NUMBER", "LAYER", "ALIGN",
  486. "NAME", "'+'", "$accept", "input", "location", "align", "layer", "mask",
  487. "shift", YY_NULLPTR
  488. };
  489. #endif
  490. # ifdef YYPRINT
  491. /* YYTOKNUM[NUM] -- (External) token number corresponding to the
  492. (internal) symbol number NUM (which must be that of a token). */
  493. static const yytype_int16 yytoknum[] =
  494. {
  495. 0, 256, 257, 258, 259, 260, 261, 262, 43
  496. };
  497. # endif
  498. #define YYPACT_NINF (-7)
  499. #define yypact_value_is_default(Yyn) \
  500. ((Yyn) == YYPACT_NINF)
  501. #define YYTABLE_NINF (-1)
  502. #define yytable_value_is_error(Yyn) \
  503. 0
  504. /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
  505. STATE-NUM. */
  506. static const yytype_int8 yypact[] =
  507. {
  508. -6, -4, 3, -6, -7, -7, -1, -7, -7, -3,
  509. 2, -7, 4, -7, 5, -7, -7
  510. };
  511. /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
  512. Performed when YYTABLE does not specify something else to do. Zero
  513. means the default is an error. */
  514. static const yytype_int8 yydefact[] =
  515. {
  516. 2, 0, 0, 2, 6, 5, 7, 1, 3, 0,
  517. 0, 8, 9, 10, 11, 12, 4
  518. };
  519. /* YYPGOTO[NTERM-NUM]. */
  520. static const yytype_int8 yypgoto[] =
  521. {
  522. -7, 7, -7, -7, -7, -7, -7
  523. };
  524. /* YYDEFGOTO[NTERM-NUM]. */
  525. static const yytype_int8 yydefgoto[] =
  526. {
  527. -1, 2, 3, 6, 10, 14, 16
  528. };
  529. /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
  530. positive, shift that token. If negative, reduce the rule whose
  531. number is the opposite. If YYTABLE_NINF, syntax error. */
  532. static const yytype_int8 yytable[] =
  533. {
  534. 4, 1, 5, 7, 9, 11, 12, 0, 13, 15,
  535. 8
  536. };
  537. static const yytype_int8 yycheck[] =
  538. {
  539. 4, 7, 6, 0, 5, 8, 4, -1, 4, 4,
  540. 3
  541. };
  542. /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
  543. symbol of state STATE-NUM. */
  544. static const yytype_int8 yystos[] =
  545. {
  546. 0, 7, 10, 11, 4, 6, 12, 0, 10, 5,
  547. 13, 8, 4, 4, 14, 4, 15
  548. };
  549. /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
  550. static const yytype_int8 yyr1[] =
  551. {
  552. 0, 9, 10, 10, 11, 12, 12, 13, 13, 14,
  553. 14, 15, 15
  554. };
  555. /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
  556. static const yytype_int8 yyr2[] =
  557. {
  558. 0, 2, 0, 2, 6, 1, 1, 0, 2, 0,
  559. 1, 0, 1
  560. };
  561. #define yyerrok (yyerrstatus = 0)
  562. #define yyclearin (yychar = YYEMPTY)
  563. #define YYEMPTY (-2)
  564. #define YYEOF 0
  565. #define YYACCEPT goto yyacceptlab
  566. #define YYABORT goto yyabortlab
  567. #define YYERROR goto yyerrorlab
  568. #define YYRECOVERING() (!!yyerrstatus)
  569. #define YYBACKUP(Token, Value) \
  570. do \
  571. if (yychar == YYEMPTY) \
  572. { \
  573. yychar = (Token); \
  574. yylval = (Value); \
  575. YYPOPSTACK (yylen); \
  576. yystate = *yyssp; \
  577. goto yybackup; \
  578. } \
  579. else \
  580. { \
  581. yyerror (&yylloc, scanner, YY_("syntax error: cannot back up")); \
  582. YYERROR; \
  583. } \
  584. while (0)
  585. /* Error token number */
  586. #define YYTERROR 1
  587. #define YYERRCODE 256
  588. /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
  589. If N is 0, then set CURRENT to the empty location which ends
  590. the previous symbol: RHS[0] (always defined). */
  591. #ifndef YYLLOC_DEFAULT
  592. # define YYLLOC_DEFAULT(Current, Rhs, N) \
  593. do \
  594. if (N) \
  595. { \
  596. (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
  597. (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
  598. (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
  599. (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
  600. } \
  601. else \
  602. { \
  603. (Current).first_line = (Current).last_line = \
  604. YYRHSLOC (Rhs, 0).last_line; \
  605. (Current).first_column = (Current).last_column = \
  606. YYRHSLOC (Rhs, 0).last_column; \
  607. } \
  608. while (0)
  609. #endif
  610. #define YYRHSLOC(Rhs, K) ((Rhs)[K])
  611. /* Enable debugging if requested. */
  612. #if YYDEBUG
  613. # ifndef YYFPRINTF
  614. # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
  615. # define YYFPRINTF fprintf
  616. # endif
  617. # define YYDPRINTF(Args) \
  618. do { \
  619. if (yydebug) \
  620. YYFPRINTF Args; \
  621. } while (0)
  622. /* YY_LOCATION_PRINT -- Print the location on the stream.
  623. This macro was not mandated originally: define only if we know
  624. we won't break user code: when these are the locations we know. */
  625. #ifndef YY_LOCATION_PRINT
  626. # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  627. /* Print *YYLOCP on YYO. Private, do not rely on its existence. */
  628. YY_ATTRIBUTE_UNUSED
  629. static int
  630. yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
  631. {
  632. int res = 0;
  633. int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
  634. if (0 <= yylocp->first_line)
  635. {
  636. res += YYFPRINTF (yyo, "%d", yylocp->first_line);
  637. if (0 <= yylocp->first_column)
  638. res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
  639. }
  640. if (0 <= yylocp->last_line)
  641. {
  642. if (yylocp->first_line < yylocp->last_line)
  643. {
  644. res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
  645. if (0 <= end_col)
  646. res += YYFPRINTF (yyo, ".%d", end_col);
  647. }
  648. else if (0 <= end_col && yylocp->first_column < end_col)
  649. res += YYFPRINTF (yyo, "-%d", end_col);
  650. }
  651. return res;
  652. }
  653. # define YY_LOCATION_PRINT(File, Loc) \
  654. yy_location_print_ (File, &(Loc))
  655. # else
  656. # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
  657. # endif
  658. #endif
  659. # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
  660. do { \
  661. if (yydebug) \
  662. { \
  663. YYFPRINTF (stderr, "%s ", Title); \
  664. yy_symbol_print (stderr, \
  665. Type, Value, Location, scanner); \
  666. YYFPRINTF (stderr, "\n"); \
  667. } \
  668. } while (0)
  669. /*-----------------------------------.
  670. | Print this symbol's value on YYO. |
  671. `-----------------------------------*/
  672. static void
  673. yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, void *scanner)
  674. {
  675. FILE *yyoutput = yyo;
  676. YYUSE (yyoutput);
  677. YYUSE (yylocationp);
  678. YYUSE (scanner);
  679. if (!yyvaluep)
  680. return;
  681. # ifdef YYPRINT
  682. if (yytype < YYNTOKENS)
  683. YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
  684. # endif
  685. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  686. YYUSE (yytype);
  687. YY_IGNORE_MAYBE_UNINITIALIZED_END
  688. }
  689. /*---------------------------.
  690. | Print this symbol on YYO. |
  691. `---------------------------*/
  692. static void
  693. yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, void *scanner)
  694. {
  695. YYFPRINTF (yyo, "%s %s (",
  696. yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
  697. YY_LOCATION_PRINT (yyo, *yylocationp);
  698. YYFPRINTF (yyo, ": ");
  699. yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp, scanner);
  700. YYFPRINTF (yyo, ")");
  701. }
  702. /*------------------------------------------------------------------.
  703. | yy_stack_print -- Print the state stack from its BOTTOM up to its |
  704. | TOP (included). |
  705. `------------------------------------------------------------------*/
  706. static void
  707. yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
  708. {
  709. YYFPRINTF (stderr, "Stack now");
  710. for (; yybottom <= yytop; yybottom++)
  711. {
  712. int yybot = *yybottom;
  713. YYFPRINTF (stderr, " %d", yybot);
  714. }
  715. YYFPRINTF (stderr, "\n");
  716. }
  717. # define YY_STACK_PRINT(Bottom, Top) \
  718. do { \
  719. if (yydebug) \
  720. yy_stack_print ((Bottom), (Top)); \
  721. } while (0)
  722. /*------------------------------------------------.
  723. | Report that the YYRULE is going to be reduced. |
  724. `------------------------------------------------*/
  725. static void
  726. yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, void *scanner)
  727. {
  728. int yylno = yyrline[yyrule];
  729. int yynrhs = yyr2[yyrule];
  730. int yyi;
  731. YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
  732. yyrule - 1, yylno);
  733. /* The symbols being reduced. */
  734. for (yyi = 0; yyi < yynrhs; yyi++)
  735. {
  736. YYFPRINTF (stderr, " $%d = ", yyi + 1);
  737. yy_symbol_print (stderr,
  738. yystos[+yyssp[yyi + 1 - yynrhs]],
  739. &yyvsp[(yyi + 1) - (yynrhs)]
  740. , &(yylsp[(yyi + 1) - (yynrhs)]) , scanner);
  741. YYFPRINTF (stderr, "\n");
  742. }
  743. }
  744. # define YY_REDUCE_PRINT(Rule) \
  745. do { \
  746. if (yydebug) \
  747. yy_reduce_print (yyssp, yyvsp, yylsp, Rule, scanner); \
  748. } while (0)
  749. /* Nonzero means print parse trace. It is left uninitialized so that
  750. multiple parsers can coexist. */
  751. int yydebug;
  752. #else /* !YYDEBUG */
  753. # define YYDPRINTF(Args)
  754. # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
  755. # define YY_STACK_PRINT(Bottom, Top)
  756. # define YY_REDUCE_PRINT(Rule)
  757. #endif /* !YYDEBUG */
  758. /* YYINITDEPTH -- initial size of the parser's stacks. */
  759. #ifndef YYINITDEPTH
  760. # define YYINITDEPTH 200
  761. #endif
  762. /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
  763. if the built-in stack extension method is used).
  764. Do not make this value too large; the results are undefined if
  765. YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
  766. evaluated with infinite-precision integer arithmetic. */
  767. #ifndef YYMAXDEPTH
  768. # define YYMAXDEPTH 10000
  769. #endif
  770. #if YYERROR_VERBOSE
  771. # ifndef yystrlen
  772. # if defined __GLIBC__ && defined _STRING_H
  773. # define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
  774. # else
  775. /* Return the length of YYSTR. */
  776. static YYPTRDIFF_T
  777. yystrlen (const char *yystr)
  778. {
  779. YYPTRDIFF_T yylen;
  780. for (yylen = 0; yystr[yylen]; yylen++)
  781. continue;
  782. return yylen;
  783. }
  784. # endif
  785. # endif
  786. # ifndef yystpcpy
  787. # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
  788. # define yystpcpy stpcpy
  789. # else
  790. /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
  791. YYDEST. */
  792. static char *
  793. yystpcpy (char *yydest, const char *yysrc)
  794. {
  795. char *yyd = yydest;
  796. const char *yys = yysrc;
  797. while ((*yyd++ = *yys++) != '\0')
  798. continue;
  799. return yyd - 1;
  800. }
  801. # endif
  802. # endif
  803. # ifndef yytnamerr
  804. /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
  805. quotes and backslashes, so that it's suitable for yyerror. The
  806. heuristic is that double-quoting is unnecessary unless the string
  807. contains an apostrophe, a comma, or backslash (other than
  808. backslash-backslash). YYSTR is taken from yytname. If YYRES is
  809. null, do not copy; instead, return the length of what the result
  810. would have been. */
  811. static YYPTRDIFF_T
  812. yytnamerr (char *yyres, const char *yystr)
  813. {
  814. if (*yystr == '"')
  815. {
  816. YYPTRDIFF_T yyn = 0;
  817. char const *yyp = yystr;
  818. for (;;)
  819. switch (*++yyp)
  820. {
  821. case '\'':
  822. case ',':
  823. goto do_not_strip_quotes;
  824. case '\\':
  825. if (*++yyp != '\\')
  826. goto do_not_strip_quotes;
  827. else
  828. goto append;
  829. append:
  830. default:
  831. if (yyres)
  832. yyres[yyn] = *yyp;
  833. yyn++;
  834. break;
  835. case '"':
  836. if (yyres)
  837. yyres[yyn] = '\0';
  838. return yyn;
  839. }
  840. do_not_strip_quotes: ;
  841. }
  842. if (yyres)
  843. return yystpcpy (yyres, yystr) - yyres;
  844. else
  845. return yystrlen (yystr);
  846. }
  847. # endif
  848. /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
  849. about the unexpected token YYTOKEN for the state stack whose top is
  850. YYSSP.
  851. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
  852. not large enough to hold the message. In that case, also set
  853. *YYMSG_ALLOC to the required number of bytes. Return 2 if the
  854. required number of bytes is too large to store. */
  855. static int
  856. yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
  857. yy_state_t *yyssp, int yytoken)
  858. {
  859. enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
  860. /* Internationalized format string. */
  861. const char *yyformat = YY_NULLPTR;
  862. /* Arguments of yyformat: reported tokens (one for the "unexpected",
  863. one per "expected"). */
  864. char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
  865. /* Actual size of YYARG. */
  866. int yycount = 0;
  867. /* Cumulated lengths of YYARG. */
  868. YYPTRDIFF_T yysize = 0;
  869. /* There are many possibilities here to consider:
  870. - If this state is a consistent state with a default action, then
  871. the only way this function was invoked is if the default action
  872. is an error action. In that case, don't check for expected
  873. tokens because there are none.
  874. - The only way there can be no lookahead present (in yychar) is if
  875. this state is a consistent state with a default action. Thus,
  876. detecting the absence of a lookahead is sufficient to determine
  877. that there is no unexpected or expected token to report. In that
  878. case, just report a simple "syntax error".
  879. - Don't assume there isn't a lookahead just because this state is a
  880. consistent state with a default action. There might have been a
  881. previous inconsistent state, consistent state with a non-default
  882. action, or user semantic action that manipulated yychar.
  883. - Of course, the expected token list depends on states to have
  884. correct lookahead information, and it depends on the parser not
  885. to perform extra reductions after fetching a lookahead from the
  886. scanner and before detecting a syntax error. Thus, state merging
  887. (from LALR or IELR) and default reductions corrupt the expected
  888. token list. However, the list is correct for canonical LR with
  889. one exception: it will still contain any token that will not be
  890. accepted due to an error action in a later state.
  891. */
  892. if (yytoken != YYEMPTY)
  893. {
  894. int yyn = yypact[+*yyssp];
  895. YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
  896. yysize = yysize0;
  897. yyarg[yycount++] = yytname[yytoken];
  898. if (!yypact_value_is_default (yyn))
  899. {
  900. /* Start YYX at -YYN if negative to avoid negative indexes in
  901. YYCHECK. In other words, skip the first -YYN actions for
  902. this state because they are default actions. */
  903. int yyxbegin = yyn < 0 ? -yyn : 0;
  904. /* Stay within bounds of both yycheck and yytname. */
  905. int yychecklim = YYLAST - yyn + 1;
  906. int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
  907. int yyx;
  908. for (yyx = yyxbegin; yyx < yyxend; ++yyx)
  909. if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
  910. && !yytable_value_is_error (yytable[yyx + yyn]))
  911. {
  912. if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
  913. {
  914. yycount = 1;
  915. yysize = yysize0;
  916. break;
  917. }
  918. yyarg[yycount++] = yytname[yyx];
  919. {
  920. YYPTRDIFF_T yysize1
  921. = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
  922. if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
  923. yysize = yysize1;
  924. else
  925. return 2;
  926. }
  927. }
  928. }
  929. }
  930. switch (yycount)
  931. {
  932. # define YYCASE_(N, S) \
  933. case N: \
  934. yyformat = S; \
  935. break
  936. default: /* Avoid compiler warnings. */
  937. YYCASE_(0, YY_("syntax error"));
  938. YYCASE_(1, YY_("syntax error, unexpected %s"));
  939. YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
  940. YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
  941. YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
  942. YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
  943. # undef YYCASE_
  944. }
  945. {
  946. /* Don't count the "%s"s in the final size, but reserve room for
  947. the terminator. */
  948. YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1;
  949. if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
  950. yysize = yysize1;
  951. else
  952. return 2;
  953. }
  954. if (*yymsg_alloc < yysize)
  955. {
  956. *yymsg_alloc = 2 * yysize;
  957. if (! (yysize <= *yymsg_alloc
  958. && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
  959. *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
  960. return 1;
  961. }
  962. /* Avoid sprintf, as that infringes on the user's name space.
  963. Don't have undefined behavior even if the translation
  964. produced a string with the wrong number of "%s"s. */
  965. {
  966. char *yyp = *yymsg;
  967. int yyi = 0;
  968. while ((*yyp = *yyformat) != '\0')
  969. if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
  970. {
  971. yyp += yytnamerr (yyp, yyarg[yyi++]);
  972. yyformat += 2;
  973. }
  974. else
  975. {
  976. ++yyp;
  977. ++yyformat;
  978. }
  979. }
  980. return 0;
  981. }
  982. #endif /* YYERROR_VERBOSE */
  983. /*-----------------------------------------------.
  984. | Release the memory associated to this symbol. |
  985. `-----------------------------------------------*/
  986. static void
  987. yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, void *scanner)
  988. {
  989. YYUSE (yyvaluep);
  990. YYUSE (yylocationp);
  991. YYUSE (scanner);
  992. if (!yymsg)
  993. yymsg = "Deleting";
  994. YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
  995. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  996. switch (yytype)
  997. {
  998. case 7: /* NAME */
  999. #line 39 "route/pktloc_syntax.y"
  1000. { free(((*yyvaluep).s)); }
  1001. #line 1165 "route/pktloc_syntax.c"
  1002. break;
  1003. default:
  1004. break;
  1005. }
  1006. YY_IGNORE_MAYBE_UNINITIALIZED_END
  1007. }
  1008. /*----------.
  1009. | yyparse. |
  1010. `----------*/
  1011. int
  1012. yyparse (void *scanner)
  1013. {
  1014. /* The lookahead symbol. */
  1015. int yychar;
  1016. /* The semantic value of the lookahead symbol. */
  1017. /* Default value used for initialization, for pacifying older GCCs
  1018. or non-GCC compilers. */
  1019. YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
  1020. YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
  1021. /* Location data for the lookahead symbol. */
  1022. static YYLTYPE yyloc_default
  1023. # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
  1024. = { 1, 1, 1, 1 }
  1025. # endif
  1026. ;
  1027. YYLTYPE yylloc = yyloc_default;
  1028. /* Number of syntax errors so far. */
  1029. int yynerrs;
  1030. yy_state_fast_t yystate;
  1031. /* Number of tokens to shift before error messages enabled. */
  1032. int yyerrstatus;
  1033. /* The stacks and their tools:
  1034. 'yyss': related to states.
  1035. 'yyvs': related to semantic values.
  1036. 'yyls': related to locations.
  1037. Refer to the stacks through separate pointers, to allow yyoverflow
  1038. to reallocate them elsewhere. */
  1039. /* The state stack. */
  1040. yy_state_t yyssa[YYINITDEPTH];
  1041. yy_state_t *yyss;
  1042. yy_state_t *yyssp;
  1043. /* The semantic value stack. */
  1044. YYSTYPE yyvsa[YYINITDEPTH];
  1045. YYSTYPE *yyvs;
  1046. YYSTYPE *yyvsp;
  1047. /* The location stack. */
  1048. YYLTYPE yylsa[YYINITDEPTH];
  1049. YYLTYPE *yyls;
  1050. YYLTYPE *yylsp;
  1051. /* The locations where the error started and ended. */
  1052. YYLTYPE yyerror_range[3];
  1053. YYPTRDIFF_T yystacksize;
  1054. int yyn;
  1055. int yyresult;
  1056. /* Lookahead token as an internal (translated) token number. */
  1057. int yytoken = 0;
  1058. /* The variables used to return semantic value and location from the
  1059. action routines. */
  1060. YYSTYPE yyval;
  1061. YYLTYPE yyloc;
  1062. #if YYERROR_VERBOSE
  1063. /* Buffer for error messages, and its allocated size. */
  1064. char yymsgbuf[128];
  1065. char *yymsg = yymsgbuf;
  1066. YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
  1067. #endif
  1068. #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
  1069. /* The number of symbols on the RHS of the reduced rule.
  1070. Keep to zero when no symbol should be popped. */
  1071. int yylen = 0;
  1072. yyssp = yyss = yyssa;
  1073. yyvsp = yyvs = yyvsa;
  1074. yylsp = yyls = yylsa;
  1075. yystacksize = YYINITDEPTH;
  1076. YYDPRINTF ((stderr, "Starting parse\n"));
  1077. yystate = 0;
  1078. yyerrstatus = 0;
  1079. yynerrs = 0;
  1080. yychar = YYEMPTY; /* Cause a token to be read. */
  1081. yylsp[0] = yylloc;
  1082. goto yysetstate;
  1083. /*------------------------------------------------------------.
  1084. | yynewstate -- push a new state, which is found in yystate. |
  1085. `------------------------------------------------------------*/
  1086. yynewstate:
  1087. /* In all cases, when you get here, the value and location stacks
  1088. have just been pushed. So pushing a state here evens the stacks. */
  1089. yyssp++;
  1090. /*--------------------------------------------------------------------.
  1091. | yysetstate -- set current state (the top of the stack) to yystate. |
  1092. `--------------------------------------------------------------------*/
  1093. yysetstate:
  1094. YYDPRINTF ((stderr, "Entering state %d\n", yystate));
  1095. YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
  1096. YY_IGNORE_USELESS_CAST_BEGIN
  1097. *yyssp = YY_CAST (yy_state_t, yystate);
  1098. YY_IGNORE_USELESS_CAST_END
  1099. if (yyss + yystacksize - 1 <= yyssp)
  1100. #if !defined yyoverflow && !defined YYSTACK_RELOCATE
  1101. goto yyexhaustedlab;
  1102. #else
  1103. {
  1104. /* Get the current used size of the three stacks, in elements. */
  1105. YYPTRDIFF_T yysize = yyssp - yyss + 1;
  1106. # if defined yyoverflow
  1107. {
  1108. /* Give user a chance to reallocate the stack. Use copies of
  1109. these so that the &'s don't force the real ones into
  1110. memory. */
  1111. yy_state_t *yyss1 = yyss;
  1112. YYSTYPE *yyvs1 = yyvs;
  1113. YYLTYPE *yyls1 = yyls;
  1114. /* Each stack pointer address is followed by the size of the
  1115. data in use in that stack, in bytes. This used to be a
  1116. conditional around just the two extra args, but that might
  1117. be undefined if yyoverflow is a macro. */
  1118. yyoverflow (YY_("memory exhausted"),
  1119. &yyss1, yysize * YYSIZEOF (*yyssp),
  1120. &yyvs1, yysize * YYSIZEOF (*yyvsp),
  1121. &yyls1, yysize * YYSIZEOF (*yylsp),
  1122. &yystacksize);
  1123. yyss = yyss1;
  1124. yyvs = yyvs1;
  1125. yyls = yyls1;
  1126. }
  1127. # else /* defined YYSTACK_RELOCATE */
  1128. /* Extend the stack our own way. */
  1129. if (YYMAXDEPTH <= yystacksize)
  1130. goto yyexhaustedlab;
  1131. yystacksize *= 2;
  1132. if (YYMAXDEPTH < yystacksize)
  1133. yystacksize = YYMAXDEPTH;
  1134. {
  1135. yy_state_t *yyss1 = yyss;
  1136. union yyalloc *yyptr =
  1137. YY_CAST (union yyalloc *,
  1138. YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
  1139. if (! yyptr)
  1140. goto yyexhaustedlab;
  1141. YYSTACK_RELOCATE (yyss_alloc, yyss);
  1142. YYSTACK_RELOCATE (yyvs_alloc, yyvs);
  1143. YYSTACK_RELOCATE (yyls_alloc, yyls);
  1144. # undef YYSTACK_RELOCATE
  1145. if (yyss1 != yyssa)
  1146. YYSTACK_FREE (yyss1);
  1147. }
  1148. # endif
  1149. yyssp = yyss + yysize - 1;
  1150. yyvsp = yyvs + yysize - 1;
  1151. yylsp = yyls + yysize - 1;
  1152. YY_IGNORE_USELESS_CAST_BEGIN
  1153. YYDPRINTF ((stderr, "Stack size increased to %ld\n",
  1154. YY_CAST (long, yystacksize)));
  1155. YY_IGNORE_USELESS_CAST_END
  1156. if (yyss + yystacksize - 1 <= yyssp)
  1157. YYABORT;
  1158. }
  1159. #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
  1160. if (yystate == YYFINAL)
  1161. YYACCEPT;
  1162. goto yybackup;
  1163. /*-----------.
  1164. | yybackup. |
  1165. `-----------*/
  1166. yybackup:
  1167. /* Do appropriate processing given the current state. Read a
  1168. lookahead token if we need one and don't already have one. */
  1169. /* First try to decide what to do without reference to lookahead token. */
  1170. yyn = yypact[yystate];
  1171. if (yypact_value_is_default (yyn))
  1172. goto yydefault;
  1173. /* Not known => get a lookahead token if don't already have one. */
  1174. /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
  1175. if (yychar == YYEMPTY)
  1176. {
  1177. YYDPRINTF ((stderr, "Reading a token: "));
  1178. yychar = yylex (&yylval, &yylloc, scanner);
  1179. }
  1180. if (yychar <= YYEOF)
  1181. {
  1182. yychar = yytoken = YYEOF;
  1183. YYDPRINTF ((stderr, "Now at end of input.\n"));
  1184. }
  1185. else
  1186. {
  1187. yytoken = YYTRANSLATE (yychar);
  1188. YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
  1189. }
  1190. /* If the proper action on seeing token YYTOKEN is to reduce or to
  1191. detect an error, take that action. */
  1192. yyn += yytoken;
  1193. if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
  1194. goto yydefault;
  1195. yyn = yytable[yyn];
  1196. if (yyn <= 0)
  1197. {
  1198. if (yytable_value_is_error (yyn))
  1199. goto yyerrlab;
  1200. yyn = -yyn;
  1201. goto yyreduce;
  1202. }
  1203. /* Count tokens shifted since error; after three, turn off error
  1204. status. */
  1205. if (yyerrstatus)
  1206. yyerrstatus--;
  1207. /* Shift the lookahead token. */
  1208. YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
  1209. yystate = yyn;
  1210. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1211. *++yyvsp = yylval;
  1212. YY_IGNORE_MAYBE_UNINITIALIZED_END
  1213. *++yylsp = yylloc;
  1214. /* Discard the shifted token. */
  1215. yychar = YYEMPTY;
  1216. goto yynewstate;
  1217. /*-----------------------------------------------------------.
  1218. | yydefault -- do the default action for the current state. |
  1219. `-----------------------------------------------------------*/
  1220. yydefault:
  1221. yyn = yydefact[yystate];
  1222. if (yyn == 0)
  1223. goto yyerrlab;
  1224. goto yyreduce;
  1225. /*-----------------------------.
  1226. | yyreduce -- do a reduction. |
  1227. `-----------------------------*/
  1228. yyreduce:
  1229. /* yyn is the number of a rule to reduce with. */
  1230. yylen = yyr2[yyn];
  1231. /* If YYLEN is nonzero, implement the default value of the action:
  1232. '$$ = $1'.
  1233. Otherwise, the following line sets YYVAL to garbage.
  1234. This behavior is undocumented and Bison
  1235. users should not rely upon it. Assigning to YYVAL
  1236. unconditionally makes the parser a bit smaller, and it avoids a
  1237. GCC warning that YYVAL may be used uninitialized. */
  1238. yyval = yyvsp[1-yylen];
  1239. /* Default location. */
  1240. YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
  1241. yyerror_range[1] = yyloc;
  1242. YY_REDUCE_PRINT (yyn);
  1243. switch (yyn)
  1244. {
  1245. case 4:
  1246. #line 52 "route/pktloc_syntax.y"
  1247. {
  1248. struct rtnl_pktloc *loc;
  1249. if (!(loc = rtnl_pktloc_alloc())) {
  1250. NL_DBG(1, "Allocating a packet location "
  1251. "object failed.\n");
  1252. YYABORT;
  1253. }
  1254. loc->name = (yyvsp[-5].s);
  1255. loc->align = (yyvsp[-4].i);
  1256. loc->layer = (yyvsp[-3].i);
  1257. loc->offset = (yyvsp[-2].i);
  1258. loc->mask = (yyvsp[-1].i);
  1259. loc->shift = (yyvsp[0].i);
  1260. if (rtnl_pktloc_add(loc) < 0) {
  1261. NL_DBG(1, "Duplicate packet location entry "
  1262. "\"%s\"\n", (yyvsp[-5].s));
  1263. }
  1264. (yyval.l) = loc;
  1265. }
  1266. #line 1489 "route/pktloc_syntax.c"
  1267. break;
  1268. case 5:
  1269. #line 79 "route/pktloc_syntax.y"
  1270. { (yyval.i) = (yyvsp[0].i); }
  1271. #line 1495 "route/pktloc_syntax.c"
  1272. break;
  1273. case 6:
  1274. #line 81 "route/pktloc_syntax.y"
  1275. { (yyval.i) = (yyvsp[0].i); }
  1276. #line 1501 "route/pktloc_syntax.c"
  1277. break;
  1278. case 7:
  1279. #line 86 "route/pktloc_syntax.y"
  1280. { (yyval.i) = TCF_LAYER_NETWORK; }
  1281. #line 1507 "route/pktloc_syntax.c"
  1282. break;
  1283. case 8:
  1284. #line 88 "route/pktloc_syntax.y"
  1285. { (yyval.i) = (yyvsp[-1].i); }
  1286. #line 1513 "route/pktloc_syntax.c"
  1287. break;
  1288. case 9:
  1289. #line 93 "route/pktloc_syntax.y"
  1290. { (yyval.i) = 0; }
  1291. #line 1519 "route/pktloc_syntax.c"
  1292. break;
  1293. case 10:
  1294. #line 95 "route/pktloc_syntax.y"
  1295. { (yyval.i) = (yyvsp[0].i); }
  1296. #line 1525 "route/pktloc_syntax.c"
  1297. break;
  1298. case 11:
  1299. #line 100 "route/pktloc_syntax.y"
  1300. { (yyval.i) = 0; }
  1301. #line 1531 "route/pktloc_syntax.c"
  1302. break;
  1303. case 12:
  1304. #line 102 "route/pktloc_syntax.y"
  1305. { (yyval.i) = (yyvsp[0].i); }
  1306. #line 1537 "route/pktloc_syntax.c"
  1307. break;
  1308. #line 1541 "route/pktloc_syntax.c"
  1309. default: break;
  1310. }
  1311. /* User semantic actions sometimes alter yychar, and that requires
  1312. that yytoken be updated with the new translation. We take the
  1313. approach of translating immediately before every use of yytoken.
  1314. One alternative is translating here after every semantic action,
  1315. but that translation would be missed if the semantic action invokes
  1316. YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
  1317. if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
  1318. incorrect destructor might then be invoked immediately. In the
  1319. case of YYERROR or YYBACKUP, subsequent parser actions might lead
  1320. to an incorrect destructor call or verbose syntax error message
  1321. before the lookahead is translated. */
  1322. YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
  1323. YYPOPSTACK (yylen);
  1324. yylen = 0;
  1325. YY_STACK_PRINT (yyss, yyssp);
  1326. *++yyvsp = yyval;
  1327. *++yylsp = yyloc;
  1328. /* Now 'shift' the result of the reduction. Determine what state
  1329. that goes to, based on the state we popped back to and the rule
  1330. number reduced by. */
  1331. {
  1332. const int yylhs = yyr1[yyn] - YYNTOKENS;
  1333. const int yyi = yypgoto[yylhs] + *yyssp;
  1334. yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
  1335. ? yytable[yyi]
  1336. : yydefgoto[yylhs]);
  1337. }
  1338. goto yynewstate;
  1339. /*--------------------------------------.
  1340. | yyerrlab -- here on detecting error. |
  1341. `--------------------------------------*/
  1342. yyerrlab:
  1343. /* Make sure we have latest lookahead translation. See comments at
  1344. user semantic actions for why this is necessary. */
  1345. yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
  1346. /* If not already recovering from an error, report this error. */
  1347. if (!yyerrstatus)
  1348. {
  1349. ++yynerrs;
  1350. #if ! YYERROR_VERBOSE
  1351. yyerror (&yylloc, scanner, YY_("syntax error"));
  1352. #else
  1353. # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
  1354. yyssp, yytoken)
  1355. {
  1356. char const *yymsgp = YY_("syntax error");
  1357. int yysyntax_error_status;
  1358. yysyntax_error_status = YYSYNTAX_ERROR;
  1359. if (yysyntax_error_status == 0)
  1360. yymsgp = yymsg;
  1361. else if (yysyntax_error_status == 1)
  1362. {
  1363. if (yymsg != yymsgbuf)
  1364. YYSTACK_FREE (yymsg);
  1365. yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
  1366. if (!yymsg)
  1367. {
  1368. yymsg = yymsgbuf;
  1369. yymsg_alloc = sizeof yymsgbuf;
  1370. yysyntax_error_status = 2;
  1371. }
  1372. else
  1373. {
  1374. yysyntax_error_status = YYSYNTAX_ERROR;
  1375. yymsgp = yymsg;
  1376. }
  1377. }
  1378. yyerror (&yylloc, scanner, yymsgp);
  1379. if (yysyntax_error_status == 2)
  1380. goto yyexhaustedlab;
  1381. }
  1382. # undef YYSYNTAX_ERROR
  1383. #endif
  1384. }
  1385. yyerror_range[1] = yylloc;
  1386. if (yyerrstatus == 3)
  1387. {
  1388. /* If just tried and failed to reuse lookahead token after an
  1389. error, discard it. */
  1390. if (yychar <= YYEOF)
  1391. {
  1392. /* Return failure if at end of input. */
  1393. if (yychar == YYEOF)
  1394. YYABORT;
  1395. }
  1396. else
  1397. {
  1398. yydestruct ("Error: discarding",
  1399. yytoken, &yylval, &yylloc, scanner);
  1400. yychar = YYEMPTY;
  1401. }
  1402. }
  1403. /* Else will try to reuse lookahead token after shifting the error
  1404. token. */
  1405. goto yyerrlab1;
  1406. /*---------------------------------------------------.
  1407. | yyerrorlab -- error raised explicitly by YYERROR. |
  1408. `---------------------------------------------------*/
  1409. yyerrorlab:
  1410. /* Pacify compilers when the user code never invokes YYERROR and the
  1411. label yyerrorlab therefore never appears in user code. */
  1412. if (0)
  1413. YYERROR;
  1414. /* Do not reclaim the symbols of the rule whose action triggered
  1415. this YYERROR. */
  1416. YYPOPSTACK (yylen);
  1417. yylen = 0;
  1418. YY_STACK_PRINT (yyss, yyssp);
  1419. yystate = *yyssp;
  1420. goto yyerrlab1;
  1421. /*-------------------------------------------------------------.
  1422. | yyerrlab1 -- common code for both syntax error and YYERROR. |
  1423. `-------------------------------------------------------------*/
  1424. yyerrlab1:
  1425. yyerrstatus = 3; /* Each real token shifted decrements this. */
  1426. for (;;)
  1427. {
  1428. yyn = yypact[yystate];
  1429. if (!yypact_value_is_default (yyn))
  1430. {
  1431. yyn += YYTERROR;
  1432. if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
  1433. {
  1434. yyn = yytable[yyn];
  1435. if (0 < yyn)
  1436. break;
  1437. }
  1438. }
  1439. /* Pop the current state because it cannot handle the error token. */
  1440. if (yyssp == yyss)
  1441. YYABORT;
  1442. yyerror_range[1] = *yylsp;
  1443. yydestruct ("Error: popping",
  1444. yystos[yystate], yyvsp, yylsp, scanner);
  1445. YYPOPSTACK (1);
  1446. yystate = *yyssp;
  1447. YY_STACK_PRINT (yyss, yyssp);
  1448. }
  1449. YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
  1450. *++yyvsp = yylval;
  1451. YY_IGNORE_MAYBE_UNINITIALIZED_END
  1452. yyerror_range[2] = yylloc;
  1453. /* Using YYLLOC is tempting, but would change the location of
  1454. the lookahead. YYLOC is available though. */
  1455. YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
  1456. *++yylsp = yyloc;
  1457. /* Shift the error token. */
  1458. YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
  1459. yystate = yyn;
  1460. goto yynewstate;
  1461. /*-------------------------------------.
  1462. | yyacceptlab -- YYACCEPT comes here. |
  1463. `-------------------------------------*/
  1464. yyacceptlab:
  1465. yyresult = 0;
  1466. goto yyreturn;
  1467. /*-----------------------------------.
  1468. | yyabortlab -- YYABORT comes here. |
  1469. `-----------------------------------*/
  1470. yyabortlab:
  1471. yyresult = 1;
  1472. goto yyreturn;
  1473. #if !defined yyoverflow || YYERROR_VERBOSE
  1474. /*-------------------------------------------------.
  1475. | yyexhaustedlab -- memory exhaustion comes here. |
  1476. `-------------------------------------------------*/
  1477. yyexhaustedlab:
  1478. yyerror (&yylloc, scanner, YY_("memory exhausted"));
  1479. yyresult = 2;
  1480. /* Fall through. */
  1481. #endif
  1482. /*-----------------------------------------------------.
  1483. | yyreturn -- parsing is finished, return the result. |
  1484. `-----------------------------------------------------*/
  1485. yyreturn:
  1486. if (yychar != YYEMPTY)
  1487. {
  1488. /* Make sure we have latest lookahead translation. See comments at
  1489. user semantic actions for why this is necessary. */
  1490. yytoken = YYTRANSLATE (yychar);
  1491. yydestruct ("Cleanup: discarding lookahead",
  1492. yytoken, &yylval, &yylloc, scanner);
  1493. }
  1494. /* Do not reclaim the symbols of the rule whose action triggered
  1495. this YYABORT or YYACCEPT. */
  1496. YYPOPSTACK (yylen);
  1497. YY_STACK_PRINT (yyss, yyssp);
  1498. while (yyssp != yyss)
  1499. {
  1500. yydestruct ("Cleanup: popping",
  1501. yystos[+*yyssp], yyvsp, yylsp, scanner);
  1502. YYPOPSTACK (1);
  1503. }
  1504. #ifndef yyoverflow
  1505. if (yyss != yyssa)
  1506. YYSTACK_FREE (yyss);
  1507. #endif
  1508. #if YYERROR_VERBOSE
  1509. if (yymsg != yymsgbuf)
  1510. YYSTACK_FREE (yymsg);
  1511. #endif
  1512. return yyresult;
  1513. }