| 1 |
/* A Bison parser, made by GNU Bison 3.0.4. */ |
| 2 |
|
| 3 |
/* Bison implementation for Yacc-like parsers in C |
| 4 |
|
| 5 |
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. |
| 6 |
|
| 7 |
This program is free software: you can redistribute it and/or modify |
| 8 |
it under the terms of the GNU General Public License as published by |
| 9 |
the Free Software Foundation, either version 3 of the License, or |
| 10 |
(at your option) any later version. |
| 11 |
|
| 12 |
This program is distributed in the hope that it will be useful, |
| 13 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
GNU General Public License for more details. |
| 16 |
|
| 17 |
You should have received a copy of the GNU General Public License |
| 18 |
along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
| 19 |
|
| 20 |
/* As a special exception, you may create a larger work that contains |
| 21 |
part or all of the Bison parser skeleton and distribute that work |
| 22 |
under terms of your choice, so long as that work isn't itself a |
| 23 |
parser generator using the skeleton or a modified version thereof |
| 24 |
as a parser skeleton. Alternatively, if you modify or redistribute |
| 25 |
the parser skeleton itself, you may (at your option) remove this |
| 26 |
special exception, which will cause the skeleton and the resulting |
| 27 |
Bison output files to be licensed under the GNU General Public |
| 28 |
License without this special exception. |
| 29 |
|
| 30 |
This special exception was added by the Free Software Foundation in |
| 31 |
version 2.2 of Bison. */ |
| 32 |
|
| 33 |
/* C LALR(1) parser skeleton written by Richard Stallman, by |
| 34 |
simplifying the original so-called "semantic" parser. */ |
| 35 |
|
| 36 |
/* All symbols defined below should begin with yy or YY, to avoid |
| 37 |
infringing on user name space. This should be done even for local |
| 38 |
variables, as they might otherwise be expanded by user macros. |
| 39 |
There are some unavoidable exceptions within include files to |
| 40 |
define necessary library symbols; they are noted "INFRINGES ON |
| 41 |
USER NAME SPACE" below. */ |
| 42 |
|
| 43 |
/* Identify Bison output. */ |
| 44 |
#define YYBISON 1 |
| 45 |
|
| 46 |
/* Bison version. */ |
| 47 |
#define YYBISON_VERSION "3.0.4" |
| 48 |
|
| 49 |
/* Skeleton name. */ |
| 50 |
#define YYSKELETON_NAME "yacc.c" |
| 51 |
|
| 52 |
/* Pure parsers. */ |
| 53 |
#define YYPURE 0 |
| 54 |
|
| 55 |
/* Push parsers. */ |
| 56 |
#define YYPUSH 0 |
| 57 |
|
| 58 |
/* Pull parsers. */ |
| 59 |
#define YYPULL 1 |
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
/* Copy the first part of user declarations. */ |
| 65 |
#line 25 "otp-parser.y" /* yacc.c:339 */ |
| 66 |
|
| 67 |
#include "otp.h" |
| 68 |
#include "routines.h" |
| 69 |
#include "yystype.h" |
| 70 |
int k, len; |
| 71 |
|
| 72 |
static void |
| 73 |
yyerror(const char *msg) |
| 74 |
{ |
| 75 |
fprintf(stderr, "line %d: %s\n", line_number, msg); |
| 76 |
} |
| 77 |
|
| 78 |
#line 79 "otp-parser.c" /* yacc.c:339 */ |
| 79 |
|
| 80 |
# ifndef YY_NULLPTR |
| 81 |
# if defined __cplusplus && 201103L <= __cplusplus |
| 82 |
# define YY_NULLPTR nullptr |
| 83 |
# else |
| 84 |
# define YY_NULLPTR 0 |
| 85 |
# endif |
| 86 |
# endif |
| 87 |
|
| 88 |
/* Enabling verbose error messages. */ |
| 89 |
#ifdef YYERROR_VERBOSE |
| 90 |
# undef YYERROR_VERBOSE |
| 91 |
# define YYERROR_VERBOSE 1 |
| 92 |
#else |
| 93 |
# define YYERROR_VERBOSE 0 |
| 94 |
#endif |
| 95 |
|
| 96 |
/* In a future release of Bison, this section will be replaced |
| 97 |
by #include "y.tab.h". */ |
| 98 |
#ifndef YY_YY__TEX_LIVE_TEXK_WEB_C_OTPS_OTP_PARSER_H_INCLUDED |
| 99 |
# define YY_YY__TEX_LIVE_TEXK_WEB_C_OTPS_OTP_PARSER_H_INCLUDED |
| 100 |
/* Debug traces. */ |
| 101 |
#ifndef YYDEBUG |
| 102 |
# define YYDEBUG 0 |
| 103 |
#endif |
| 104 |
#if YYDEBUG |
| 105 |
extern int yydebug; |
| 106 |
#endif |
| 107 |
|
| 108 |
/* Token type. */ |
| 109 |
#ifndef YYTOKENTYPE |
| 110 |
# define YYTOKENTYPE |
| 111 |
enum yytokentype |
| 112 |
{ |
| 113 |
NUMBER = 258, |
| 114 |
ID = 259, |
| 115 |
STRING = 260, |
| 116 |
LEFTARROW = 261, |
| 117 |
RIGHTARROW = 262, |
| 118 |
MYINPUT = 263, |
| 119 |
OUTPUT = 264, |
| 120 |
ALIASES = 265, |
| 121 |
STATES = 266, |
| 122 |
TABLES = 267, |
| 123 |
EXPRESSIONS = 268, |
| 124 |
PUSH = 269, |
| 125 |
POP = 270, |
| 126 |
DIV = 271, |
| 127 |
MOD = 272, |
| 128 |
BEG = 273, |
| 129 |
END = 274 |
| 130 |
}; |
| 131 |
#endif |
| 132 |
/* Tokens. */ |
| 133 |
#define NUMBER 258 |
| 134 |
#define ID 259 |
| 135 |
#define STRING 260 |
| 136 |
#define LEFTARROW 261 |
| 137 |
#define RIGHTARROW 262 |
| 138 |
#define MYINPUT 263 |
| 139 |
#define OUTPUT 264 |
| 140 |
#define ALIASES 265 |
| 141 |
#define STATES 266 |
| 142 |
#define TABLES 267 |
| 143 |
#define EXPRESSIONS 268 |
| 144 |
#define PUSH 269 |
| 145 |
#define POP 270 |
| 146 |
#define DIV 271 |
| 147 |
#define MOD 272 |
| 148 |
#define BEG 273 |
| 149 |
#define END 274 |
| 150 |
|
| 151 |
/* Value type. */ |
| 152 |
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED |
| 153 |
typedef int YYSTYPE; |
| 154 |
# define YYSTYPE_IS_TRIVIAL 1 |
| 155 |
# define YYSTYPE_IS_DECLARED 1 |
| 156 |
#endif |
| 157 |
|
| 158 |
|
| 159 |
extern YYSTYPE yylval; |
| 160 |
|
| 161 |
int yyparse (void); |
| 162 |
|
| 163 |
#endif /* !YY_YY__TEX_LIVE_TEXK_WEB_C_OTPS_OTP_PARSER_H_INCLUDED */ |
| 164 |
|
| 165 |
/* Copy the second part of user declarations. */ |
| 166 |
|
| 167 |
#line 168 "otp-parser.c" /* yacc.c:358 */ |
| 168 |
|
| 169 |
#ifdef short |
| 170 |
# undef short |
| 171 |
#endif |
| 172 |
|
| 173 |
#ifdef YYTYPE_UINT8 |
| 174 |
typedef YYTYPE_UINT8 yytype_uint8; |
| 175 |
#else |
| 176 |
typedef unsigned char yytype_uint8; |
| 177 |
#endif |
| 178 |
|
| 179 |
#ifdef YYTYPE_INT8 |
| 180 |
typedef YYTYPE_INT8 yytype_int8; |
| 181 |
#else |
| 182 |
typedef signed char yytype_int8; |
| 183 |
#endif |
| 184 |
|
| 185 |
#ifdef YYTYPE_UINT16 |
| 186 |
typedef YYTYPE_UINT16 yytype_uint16; |
| 187 |
#else |
| 188 |
typedef unsigned short int yytype_uint16; |
| 189 |
#endif |
| 190 |
|
| 191 |
#ifdef YYTYPE_INT16 |
| 192 |
typedef YYTYPE_INT16 yytype_int16; |
| 193 |
#else |
| 194 |
typedef short int yytype_int16; |
| 195 |
#endif |
| 196 |
|
| 197 |
#ifndef YYSIZE_T |
| 198 |
# ifdef __SIZE_TYPE__ |
| 199 |
# define YYSIZE_T __SIZE_TYPE__ |
| 200 |
# elif defined size_t |
| 201 |
# define YYSIZE_T size_t |
| 202 |
# elif ! defined YYSIZE_T |
| 203 |
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ |
| 204 |
# define YYSIZE_T size_t |
| 205 |
# else |
| 206 |
# define YYSIZE_T unsigned int |
| 207 |
# endif |
| 208 |
#endif |
| 209 |
|
| 210 |
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) |
| 211 |
|
| 212 |
#ifndef YY_ |
| 213 |
# if defined YYENABLE_NLS && YYENABLE_NLS |
| 214 |
# if ENABLE_NLS |
| 215 |
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ |
| 216 |
# define YY_(Msgid) dgettext ("bison-runtime", Msgid) |
| 217 |
# endif |
| 218 |
# endif |
| 219 |
# ifndef YY_ |
| 220 |
# define YY_(Msgid) Msgid |
| 221 |
# endif |
| 222 |
#endif |
| 223 |
|
| 224 |
#ifndef YY_ATTRIBUTE |
| 225 |
# if (defined __GNUC__ \ |
| 226 |
&& (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ |
| 227 |
|| defined __SUNPRO_C && 0x5110 <= __SUNPRO_C |
| 228 |
# define YY_ATTRIBUTE(Spec) __attribute__(Spec) |
| 229 |
# else |
| 230 |
# define YY_ATTRIBUTE(Spec) /* empty */ |
| 231 |
# endif |
| 232 |
#endif |
| 233 |
|
| 234 |
#ifndef YY_ATTRIBUTE_PURE |
| 235 |
# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) |
| 236 |
#endif |
| 237 |
|
| 238 |
#ifndef YY_ATTRIBUTE_UNUSED |
| 239 |
# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) |
| 240 |
#endif |
| 241 |
|
| 242 |
#if !defined _Noreturn \ |
| 243 |
&& (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) |
| 244 |
# if defined _MSC_VER && 1200 <= _MSC_VER |
| 245 |
# define _Noreturn __declspec (noreturn) |
| 246 |
# else |
| 247 |
# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) |
| 248 |
# endif |
| 249 |
#endif |
| 250 |
|
| 251 |
/* Suppress unused-variable warnings by "using" E. */ |
| 252 |
#if ! defined lint || defined __GNUC__ |
| 253 |
# define YYUSE(E) ((void) (E)) |
| 254 |
#else |
| 255 |
# define YYUSE(E) /* empty */ |
| 256 |
#endif |
| 257 |
|
| 258 |
#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ |
| 259 |
/* Suppress an incorrect diagnostic about yylval being uninitialized. */ |
| 260 |
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ |
| 261 |
_Pragma ("GCC diagnostic push") \ |
| 262 |
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ |
| 263 |
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") |
| 264 |
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ |
| 265 |
_Pragma ("GCC diagnostic pop") |
| 266 |
#else |
| 267 |
# define YY_INITIAL_VALUE(Value) Value |
| 268 |
#endif |
| 269 |
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| 270 |
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| 271 |
# define YY_IGNORE_MAYBE_UNINITIALIZED_END |
| 272 |
#endif |
| 273 |
#ifndef YY_INITIAL_VALUE |
| 274 |
# define YY_INITIAL_VALUE(Value) /* Nothing. */ |
| 275 |
#endif |
| 276 |
|
| 277 |
|
| 278 |
#if ! defined yyoverflow || YYERROR_VERBOSE |
| 279 |
|
| 280 |
/* The parser invokes alloca or malloc; define the necessary symbols. */ |
| 281 |
|
| 282 |
# ifdef YYSTACK_USE_ALLOCA |
| 283 |
# if YYSTACK_USE_ALLOCA |
| 284 |
# ifdef __GNUC__ |
| 285 |
# define YYSTACK_ALLOC __builtin_alloca |
| 286 |
# elif defined __BUILTIN_VA_ARG_INCR |
| 287 |
# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ |
| 288 |
# elif defined _AIX |
| 289 |
# define YYSTACK_ALLOC __alloca |
| 290 |
# elif defined _MSC_VER |
| 291 |
# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ |
| 292 |
# define alloca _alloca |
| 293 |
# else |
| 294 |
# define YYSTACK_ALLOC alloca |
| 295 |
# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS |
| 296 |
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
| 297 |
/* Use EXIT_SUCCESS as a witness for stdlib.h. */ |
| 298 |
# ifndef EXIT_SUCCESS |
| 299 |
# define EXIT_SUCCESS 0 |
| 300 |
# endif |
| 301 |
# endif |
| 302 |
# endif |
| 303 |
# endif |
| 304 |
# endif |
| 305 |
|
| 306 |
# ifdef YYSTACK_ALLOC |
| 307 |
/* Pacify GCC's 'empty if-body' warning. */ |
| 308 |
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) |
| 309 |
# ifndef YYSTACK_ALLOC_MAXIMUM |
| 310 |
/* The OS might guarantee only one guard page at the bottom of the stack, |
| 311 |
and a page size can be as small as 4096 bytes. So we cannot safely |
| 312 |
invoke alloca (N) if N exceeds 4096. Use a slightly smaller number |
| 313 |
to allow for a few compiler-allocated temporary stack slots. */ |
| 314 |
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ |
| 315 |
# endif |
| 316 |
# else |
| 317 |
# define YYSTACK_ALLOC YYMALLOC |
| 318 |
# define YYSTACK_FREE YYFREE |
| 319 |
# ifndef YYSTACK_ALLOC_MAXIMUM |
| 320 |
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM |
| 321 |
# endif |
| 322 |
# if (defined __cplusplus && ! defined EXIT_SUCCESS \ |
| 323 |
&& ! ((defined YYMALLOC || defined malloc) \ |
| 324 |
&& (defined YYFREE || defined free))) |
| 325 |
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ |
| 326 |
# ifndef EXIT_SUCCESS |
| 327 |
# define EXIT_SUCCESS 0 |
| 328 |
# endif |
| 329 |
# endif |
| 330 |
# ifndef YYMALLOC |
| 331 |
# define YYMALLOC malloc |
| 332 |
# if ! defined malloc && ! defined EXIT_SUCCESS |
| 333 |
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ |
| 334 |
# endif |
| 335 |
# endif |
| 336 |
# ifndef YYFREE |
| 337 |
# define YYFREE free |
| 338 |
# if ! defined free && ! defined EXIT_SUCCESS |
| 339 |
void free (void *); /* INFRINGES ON USER NAME SPACE */ |
| 340 |
# endif |
| 341 |
# endif |
| 342 |
# endif |
| 343 |
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ |
| 344 |
|
| 345 |
|
| 346 |
#if (! defined yyoverflow \ |
| 347 |
&& (! defined __cplusplus \ |
| 348 |
|| (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) |
| 349 |
|
| 350 |
/* A type that is properly aligned for any stack member. */ |
| 351 |
union yyalloc |
| 352 |
{ |
| 353 |
yytype_int16 yyss_alloc; |
| 354 |
YYSTYPE yyvs_alloc; |
| 355 |
}; |
| 356 |
|
| 357 |
/* The size of the maximum gap between one aligned stack and the next. */ |
| 358 |
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) |
| 359 |
|
| 360 |
/* The size of an array large to enough to hold all stacks, each with |
| 361 |
N elements. */ |
| 362 |
# define YYSTACK_BYTES(N) \ |
| 363 |
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ |
| 364 |
+ YYSTACK_GAP_MAXIMUM) |
| 365 |
|
| 366 |
# define YYCOPY_NEEDED 1 |
| 367 |
|
| 368 |
/* Relocate STACK from its old location to the new one. The |
| 369 |
local variables YYSIZE and YYSTACKSIZE give the old and new number of |
| 370 |
elements in the stack, and YYPTR gives the new location of the |
| 371 |
stack. Advance YYPTR to a properly aligned location for the next |
| 372 |
stack. */ |
| 373 |
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ |
| 374 |
do \ |
| 375 |
{ \ |
| 376 |
YYSIZE_T yynewbytes; \ |
| 377 |
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ |
| 378 |
Stack = &yyptr->Stack_alloc; \ |
| 379 |
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ |
| 380 |
yyptr += yynewbytes / sizeof (*yyptr); \ |
| 381 |
} \ |
| 382 |
while (0) |
| 383 |
|
| 384 |
#endif |
| 385 |
|
| 386 |
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED |
| 387 |
/* Copy COUNT objects from SRC to DST. The source and destination do |
| 388 |
not overlap. */ |
| 389 |
# ifndef YYCOPY |
| 390 |
# if defined __GNUC__ && 1 < __GNUC__ |
| 391 |
# define YYCOPY(Dst, Src, Count) \ |
| 392 |
__builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) |
| 393 |
# else |
| 394 |
# define YYCOPY(Dst, Src, Count) \ |
| 395 |
do \ |
| 396 |
{ \ |
| 397 |
YYSIZE_T yyi; \ |
| 398 |
for (yyi = 0; yyi < (Count); yyi++) \ |
| 399 |
(Dst)[yyi] = (Src)[yyi]; \ |
| 400 |
} \ |
| 401 |
while (0) |
| 402 |
# endif |
| 403 |
# endif |
| 404 |
#endif /* !YYCOPY_NEEDED */ |
| 405 |
|
| 406 |
/* YYFINAL -- State number of the termination state. */ |
| 407 |
#define YYFINAL 5 |
| 408 |
/* YYLAST -- Last index in YYTABLE. */ |
| 409 |
#define YYLAST 173 |
| 410 |
|
| 411 |
/* YYNTOKENS -- Number of terminals. */ |
| 412 |
#define YYNTOKENS 40 |
| 413 |
/* YYNNTS -- Number of nonterminals. */ |
| 414 |
#define YYNNTS 36 |
| 415 |
/* YYNRULES -- Number of rules. */ |
| 416 |
#define YYNRULES 87 |
| 417 |
/* YYNSTATES -- Number of states. */ |
| 418 |
#define YYNSTATES 161 |
| 419 |
|
| 420 |
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned |
| 421 |
by yylex, with out-of-bounds checking. */ |
| 422 |
#define YYUNDEFTOK 2 |
| 423 |
#define YYMAXUTOK 274 |
| 424 |
|
| 425 |
#define YYTRANSLATE(YYX) \ |
| 426 |
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) |
| 427 |
|
| 428 |
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM |
| 429 |
as returned by yylex, without out-of-bounds checking. */ |
| 430 |
static const yytype_uint8 yytranslate[] = |
| 431 |
{ |
| 432 |
0, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 433 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 434 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 435 |
2, 2, 2, 2, 2, 39, 38, 2, 2, 2, |
| 436 |
34, 35, 22, 20, 29, 21, 32, 2, 2, 2, |
| 437 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 23, |
| 438 |
30, 26, 31, 2, 2, 2, 2, 2, 2, 2, |
| 439 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 440 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 441 |
2, 24, 37, 25, 33, 2, 2, 2, 2, 2, |
| 442 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 443 |
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, |
| 444 |
2, 2, 2, 27, 36, 28, 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, 2, 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, 1, 2, 3, 4, |
| 458 |
5, 6, 7, 8, 9, 10, 11, 12, 13, 14, |
| 459 |
15, 16, 17, 18, 19 |
| 460 |
}; |
| 461 |
|
| 462 |
#if YYDEBUG |
| 463 |
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ |
| 464 |
static const yytype_uint16 yyrline[] = |
| 465 |
{ |
| 466 |
0, 62, 62, 72, 73, 79, 80, 84, 86, 90, |
| 467 |
91, 96, 95, 100, 102, 106, 108, 112, 114, 118, |
| 468 |
120, 124, 126, 130, 131, 135, 140, 142, 144, 146, |
| 469 |
148, 153, 155, 157, 159, 161, 163, 168, 170, 175, |
| 470 |
190, 191, 196, 198, 200, 195, 205, 207, 212, 213, |
| 471 |
218, 220, 226, 227, 233, 234, 239, 241, 245, 247, |
| 472 |
251, 258, 260, 262, 264, 266, 271, 276, 281, 286, |
| 473 |
291, 292, 294, 296, 298, 300, 303, 302, 309, 311, |
| 474 |
313, 315, 317, 320, 322, 324, 326, 328 |
| 475 |
}; |
| 476 |
#endif |
| 477 |
|
| 478 |
#if YYDEBUG || YYERROR_VERBOSE || 0 |
| 479 |
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. |
| 480 |
First, the terminals, then, starting at YYNTOKENS, nonterminals. */ |
| 481 |
static const char *const yytname[] = |
| 482 |
{ |
| 483 |
"$end", "error", "$undefined", "NUMBER", "ID", "STRING", "LEFTARROW", |
| 484 |
"RIGHTARROW", "MYINPUT", "OUTPUT", "ALIASES", "STATES", "TABLES", |
| 485 |
"EXPRESSIONS", "PUSH", "POP", "DIV", "MOD", "BEG", "END", "'+'", "'-'", |
| 486 |
"'*'", "';'", "'['", "']'", "'='", "'{'", "'}'", "','", "'<'", "'>'", |
| 487 |
"'.'", "'^'", "'('", "')'", "'|'", "'\\\\'", "'$'", "'#'", "$accept", |
| 488 |
"File", "Input", "Output", "Tables", "MoreTables", "OneTable", "$@1", |
| 489 |
"Numbers", "MoreNumbers", "States", "MoreStates", "Aliases", |
| 490 |
"MoreAliases", "OneAlias", "OneCompleteLeft", "OneLeft", "ChoiceLeft", |
| 491 |
"Expressions", "MoreExpressions", "OneExpr", "$@2", "$@3", "$@4", |
| 492 |
"PushBack", "LeftState", "TotalLeft", "BegLeft", "EndLeft", "Left", |
| 493 |
"Right", "OneRight", "RestRightExpr", "$@5", "OneRightExpr", |
| 494 |
"RightState", YY_NULLPTR |
| 495 |
}; |
| 496 |
#endif |
| 497 |
|
| 498 |
# ifdef YYPRINT |
| 499 |
/* YYTOKNUM[NUM] -- (External) token number corresponding to the |
| 500 |
(internal) symbol number NUM (which must be that of a token). */ |
| 501 |
static const yytype_uint16 yytoknum[] = |
| 502 |
{ |
| 503 |
0, 256, 257, 258, 259, 260, 261, 262, 263, 264, |
| 504 |
265, 266, 267, 268, 269, 270, 271, 272, 273, 274, |
| 505 |
43, 45, 42, 59, 91, 93, 61, 123, 125, 44, |
| 506 |
60, 62, 46, 94, 40, 41, 124, 92, 36, 35 |
| 507 |
}; |
| 508 |
# endif |
| 509 |
|
| 510 |
#define YYPACT_NINF -97 |
| 511 |
|
| 512 |
#define yypact_value_is_default(Yystate) \ |
| 513 |
(!!((Yystate) == (-97))) |
| 514 |
|
| 515 |
#define YYTABLE_NINF -40 |
| 516 |
|
| 517 |
#define yytable_value_is_error(Yytable_value) \ |
| 518 |
0 |
| 519 |
|
| 520 |
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing |
| 521 |
STATE-NUM. */ |
| 522 |
static const yytype_int16 yypact[] = |
| 523 |
{ |
| 524 |
0, 13, 18, 11, 34, -97, 69, 66, -97, 65, |
| 525 |
85, 79, -97, 67, 85, -97, 88, 83, 91, -97, |
| 526 |
-97, 56, 92, 82, 72, -97, 94, 73, 92, -97, |
| 527 |
70, -97, -97, -97, 22, -97, 97, 17, -97, -97, |
| 528 |
76, 84, -97, 99, -97, 74, 41, 81, 77, 75, |
| 529 |
-97, 93, 86, 106, 87, 41, -97, 47, -97, 107, |
| 530 |
-97, -97, -97, 19, 109, -97, -97, 51, -97, 41, |
| 531 |
-16, 110, -97, -97, -97, 19, -97, 90, 95, -97, |
| 532 |
-97, 45, -97, -97, -97, -97, 96, 111, 89, -97, |
| 533 |
-3, -97, -97, -97, -97, -97, 1, 8, 115, -97, |
| 534 |
-97, -97, -17, -97, -97, 6, 3, -97, -97, 98, |
| 535 |
60, 101, -97, 49, -97, -97, 78, -97, -3, 46, |
| 536 |
100, 122, 123, 124, 105, 8, 8, 8, 8, 8, |
| 537 |
-97, 112, 103, 126, 104, -97, -97, -7, 102, 108, |
| 538 |
6, -97, -97, -97, -97, -97, 128, -97, 113, -97, |
| 539 |
129, -97, -97, -97, 42, 114, -97, 116, -97, -97, |
| 540 |
-97 |
| 541 |
}; |
| 542 |
|
| 543 |
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. |
| 544 |
Performed when YYTABLE does not specify something else to do. Zero |
| 545 |
means the default is an error. */ |
| 546 |
static const yytype_uint8 yydefact[] = |
| 547 |
{ |
| 548 |
3, 0, 0, 5, 0, 1, 0, 7, 4, 0, |
| 549 |
0, 17, 6, 0, 8, 9, 0, 21, 0, 10, |
| 550 |
19, 0, 0, 0, 0, 18, 0, 0, 22, 23, |
| 551 |
48, 2, 11, 20, 0, 24, 0, 48, 40, 42, |
| 552 |
0, 31, 26, 0, 33, 0, 0, 0, 30, 0, |
| 553 |
41, 52, 0, 0, 0, 0, 37, 0, 25, 0, |
| 554 |
49, 53, 43, 54, 13, 32, 36, 0, 35, 0, |
| 555 |
0, 0, 55, 56, 51, 54, 15, 0, 14, 34, |
| 556 |
38, 0, 29, 58, 57, 50, 0, 0, 0, 28, |
| 557 |
44, 12, 16, 27, 61, 60, 0, 0, 46, 59, |
| 558 |
62, 65, 0, 63, 78, 0, 0, 69, 58, 83, |
| 559 |
0, 0, 76, 0, 70, 79, 0, 80, 47, 0, |
| 560 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 561 |
82, 0, 0, 0, 0, 84, 45, 0, 0, 0, |
| 562 |
0, 74, 75, 71, 72, 73, 0, 85, 0, 87, |
| 563 |
0, 66, 67, 64, 0, 0, 86, 0, 77, 81, |
| 564 |
68 |
| 565 |
}; |
| 566 |
|
| 567 |
/* YYPGOTO[NTERM-NUM]. */ |
| 568 |
static const yytype_int8 yypgoto[] = |
| 569 |
{ |
| 570 |
-97, -97, -97, -97, -97, -97, 125, -97, -97, -97, |
| 571 |
-97, -97, -97, -97, 117, -56, -43, 118, -97, -97, |
| 572 |
119, -97, -97, -97, -97, -97, -97, -97, 61, -97, |
| 573 |
30, -97, 2, -97, -96, -97 |
| 574 |
}; |
| 575 |
|
| 576 |
/* YYDEFGOTO[NTERM-NUM]. */ |
| 577 |
static const yytype_int8 yydefgoto[] = |
| 578 |
{ |
| 579 |
-1, 2, 3, 7, 11, 14, 15, 40, 77, 78, |
| 580 |
17, 21, 23, 28, 29, 47, 48, 57, 31, 37, |
| 581 |
38, 51, 71, 98, 109, 39, 62, 63, 74, 75, |
| 582 |
90, 99, 113, 124, 114, 120 |
| 583 |
}; |
| 584 |
|
| 585 |
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If |
| 586 |
positive, shift that token. If negative, reduce the rule whose |
| 587 |
number is the opposite. If YYTABLE_NINF, syntax error. */ |
| 588 |
static const yytype_int16 yytable[] = |
| 589 |
{ |
| 590 |
94, 107, 95, 56, 100, 110, 115, 73, 1, 104, |
| 591 |
112, 104, 56, 81, 150, 82, 4, -39, 5, 84, |
| 592 |
6, 111, 41, 101, 42, 41, 80, 42, 151, 141, |
| 593 |
142, 143, 144, 145, 96, 102, 97, 116, 72, 103, |
| 594 |
105, 117, 105, 106, 41, 106, 43, 36, 88, 43, |
| 595 |
132, 44, 45, 46, 44, 45, 46, 8, 125, 126, |
| 596 |
133, 134, 127, 128, 129, 125, 126, 158, 43, 127, |
| 597 |
128, 129, 9, 44, 45, 46, 89, 135, 10, 25, |
| 598 |
121, 122, 68, 69, 130, 26, 79, 69, 12, 13, |
| 599 |
16, 18, 20, 22, 24, 30, 27, 32, 33, 34, |
| 600 |
36, 49, 52, 54, 58, 53, 60, 59, 55, 65, |
| 601 |
70, 61, 76, 64, 92, 66, 131, 83, 86, 91, |
| 602 |
93, 108, 123, 136, 87, 137, 138, 139, 119, 140, |
| 603 |
148, 155, 157, 146, 147, 149, 85, 152, 118, 19, |
| 604 |
0, 0, 154, 153, 156, 35, 0, 0, 0, 159, |
| 605 |
0, 160, 0, 0, 0, 0, 50, 0, 0, 0, |
| 606 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 607 |
0, 0, 0, 67 |
| 608 |
}; |
| 609 |
|
| 610 |
static const yytype_int16 yycheck[] = |
| 611 |
{ |
| 612 |
3, 97, 5, 46, 3, 22, 3, 63, 8, 3, |
| 613 |
4, 3, 55, 29, 21, 31, 3, 0, 0, 75, |
| 614 |
9, 38, 3, 22, 5, 3, 69, 5, 35, 125, |
| 615 |
126, 127, 128, 129, 37, 34, 39, 34, 19, 38, |
| 616 |
34, 38, 34, 37, 3, 37, 27, 30, 3, 27, |
| 617 |
4, 32, 33, 34, 32, 33, 34, 23, 16, 17, |
| 618 |
14, 15, 20, 21, 22, 16, 17, 25, 27, 20, |
| 619 |
21, 22, 3, 32, 33, 34, 31, 31, 12, 23, |
| 620 |
20, 21, 35, 36, 35, 29, 35, 36, 23, 4, |
| 621 |
11, 24, 4, 10, 3, 13, 4, 25, 4, 26, |
| 622 |
30, 4, 26, 4, 23, 21, 31, 30, 34, 3, |
| 623 |
3, 18, 3, 27, 3, 28, 38, 7, 28, 23, |
| 624 |
31, 6, 21, 23, 29, 3, 3, 3, 30, 24, |
| 625 |
4, 3, 3, 21, 31, 31, 75, 35, 108, 14, |
| 626 |
-1, -1, 140, 35, 31, 28, -1, -1, -1, 35, |
| 627 |
-1, 35, -1, -1, -1, -1, 37, -1, -1, -1, |
| 628 |
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
| 629 |
-1, -1, -1, 55 |
| 630 |
}; |
| 631 |
|
| 632 |
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing |
| 633 |
symbol of state STATE-NUM. */ |
| 634 |
static const yytype_uint8 yystos[] = |
| 635 |
{ |
| 636 |
0, 8, 41, 42, 3, 0, 9, 43, 23, 3, |
| 637 |
12, 44, 23, 4, 45, 46, 11, 50, 24, 46, |
| 638 |
4, 51, 10, 52, 3, 23, 29, 4, 53, 54, |
| 639 |
13, 58, 25, 4, 26, 54, 30, 59, 60, 65, |
| 640 |
47, 3, 5, 27, 32, 33, 34, 55, 56, 4, |
| 641 |
60, 61, 26, 21, 4, 34, 56, 57, 23, 30, |
| 642 |
31, 18, 66, 67, 27, 3, 28, 57, 35, 36, |
| 643 |
3, 62, 19, 55, 68, 69, 3, 48, 49, 35, |
| 644 |
56, 29, 31, 7, 55, 68, 28, 29, 3, 31, |
| 645 |
70, 23, 3, 31, 3, 5, 37, 39, 63, 71, |
| 646 |
3, 22, 34, 38, 3, 34, 37, 74, 6, 64, |
| 647 |
22, 38, 4, 72, 74, 3, 34, 38, 70, 30, |
| 648 |
75, 20, 21, 21, 73, 16, 17, 20, 21, 22, |
| 649 |
35, 38, 4, 14, 15, 31, 23, 3, 3, 3, |
| 650 |
24, 74, 74, 74, 74, 74, 21, 31, 4, 31, |
| 651 |
21, 35, 35, 35, 72, 3, 31, 3, 25, 35, |
| 652 |
35 |
| 653 |
}; |
| 654 |
|
| 655 |
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ |
| 656 |
static const yytype_uint8 yyr1[] = |
| 657 |
{ |
| 658 |
0, 40, 41, 42, 42, 43, 43, 44, 44, 45, |
| 659 |
45, 47, 46, 48, 48, 49, 49, 50, 50, 51, |
| 660 |
51, 52, 52, 53, 53, 54, 55, 55, 55, 55, |
| 661 |
55, 56, 56, 56, 56, 56, 56, 57, 57, 58, |
| 662 |
59, 59, 61, 62, 63, 60, 64, 64, 65, 65, |
| 663 |
66, 66, 67, 67, 68, 68, 69, 69, 70, 70, |
| 664 |
71, 71, 71, 71, 71, 71, 71, 71, 71, 71, |
| 665 |
72, 72, 72, 72, 72, 72, 73, 72, 74, 74, |
| 666 |
74, 74, 74, 75, 75, 75, 75, 75 |
| 667 |
}; |
| 668 |
|
| 669 |
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ |
| 670 |
static const yytype_uint8 yyr2[] = |
| 671 |
{ |
| 672 |
0, 2, 6, 0, 3, 0, 3, 0, 2, 1, |
| 673 |
2, 0, 10, 0, 1, 1, 3, 0, 3, 1, |
| 674 |
3, 0, 2, 1, 2, 4, 1, 6, 5, 4, |
| 675 |
1, 1, 3, 1, 4, 3, 3, 1, 3, 2, |
| 676 |
1, 2, 0, 0, 0, 10, 0, 2, 0, 3, |
| 677 |
3, 2, 0, 1, 0, 1, 1, 2, 0, 2, |
| 678 |
1, 1, 2, 2, 6, 2, 6, 6, 8, 2, |
| 679 |
1, 3, 3, 3, 3, 3, 0, 5, 1, 2, |
| 680 |
2, 6, 3, 0, 2, 3, 4, 3 |
| 681 |
}; |
| 682 |
|
| 683 |
|
| 684 |
#define yyerrok (yyerrstatus = 0) |
| 685 |
#define yyclearin (yychar = YYEMPTY) |
| 686 |
#define YYEMPTY (-2) |
| 687 |
#define YYEOF 0 |
| 688 |
|
| 689 |
#define YYACCEPT goto yyacceptlab |
| 690 |
#define YYABORT goto yyabortlab |
| 691 |
#define YYERROR goto yyerrorlab |
| 692 |
|
| 693 |
|
| 694 |
#define YYRECOVERING() (!!yyerrstatus) |
| 695 |
|
| 696 |
#define YYBACKUP(Token, Value) \ |
| 697 |
do \ |
| 698 |
if (yychar == YYEMPTY) \ |
| 699 |
{ \ |
| 700 |
yychar = (Token); \ |
| 701 |
yylval = (Value); \ |
| 702 |
YYPOPSTACK (yylen); \ |
| 703 |
yystate = *yyssp; \ |
| 704 |
goto yybackup; \ |
| 705 |
} \ |
| 706 |
else \ |
| 707 |
{ \ |
| 708 |
yyerror (YY_("syntax error: cannot back up")); \ |
| 709 |
YYERROR; \ |
| 710 |
} \ |
| 711 |
while (0) |
| 712 |
|
| 713 |
/* Error token number */ |
| 714 |
#define YYTERROR 1 |
| 715 |
#define YYERRCODE 256 |
| 716 |
|
| 717 |
|
| 718 |
|
| 719 |
/* Enable debugging if requested. */ |
| 720 |
#if YYDEBUG |
| 721 |
|
| 722 |
# ifndef YYFPRINTF |
| 723 |
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ |
| 724 |
# define YYFPRINTF fprintf |
| 725 |
# endif |
| 726 |
|
| 727 |
# define YYDPRINTF(Args) \ |
| 728 |
do { \ |
| 729 |
if (yydebug) \ |
| 730 |
YYFPRINTF Args; \ |
| 731 |
} while (0) |
| 732 |
|
| 733 |
/* This macro is provided for backward compatibility. */ |
| 734 |
#ifndef YY_LOCATION_PRINT |
| 735 |
# define YY_LOCATION_PRINT(File, Loc) ((void) 0) |
| 736 |
#endif |
| 737 |
|
| 738 |
|
| 739 |
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ |
| 740 |
do { \ |
| 741 |
if (yydebug) \ |
| 742 |
{ \ |
| 743 |
YYFPRINTF (stderr, "%s ", Title); \ |
| 744 |
yy_symbol_print (stderr, \ |
| 745 |
Type, Value); \ |
| 746 |
YYFPRINTF (stderr, "\n"); \ |
| 747 |
} \ |
| 748 |
} while (0) |
| 749 |
|
| 750 |
|
| 751 |
/*----------------------------------------. |
| 752 |
| Print this symbol's value on YYOUTPUT. | |
| 753 |
`----------------------------------------*/ |
| 754 |
|
| 755 |
static void |
| 756 |
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
| 757 |
{ |
| 758 |
FILE *yyo = yyoutput; |
| 759 |
YYUSE (yyo); |
| 760 |
if (!yyvaluep) |
| 761 |
return; |
| 762 |
# ifdef YYPRINT |
| 763 |
if (yytype < YYNTOKENS) |
| 764 |
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); |
| 765 |
# endif |
| 766 |
YYUSE (yytype); |
| 767 |
} |
| 768 |
|
| 769 |
|
| 770 |
/*--------------------------------. |
| 771 |
| Print this symbol on YYOUTPUT. | |
| 772 |
`--------------------------------*/ |
| 773 |
|
| 774 |
static void |
| 775 |
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) |
| 776 |
{ |
| 777 |
YYFPRINTF (yyoutput, "%s %s (", |
| 778 |
yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); |
| 779 |
|
| 780 |
yy_symbol_value_print (yyoutput, yytype, yyvaluep); |
| 781 |
YYFPRINTF (yyoutput, ")"); |
| 782 |
} |
| 783 |
|
| 784 |
/*------------------------------------------------------------------. |
| 785 |
| yy_stack_print -- Print the state stack from its BOTTOM up to its | |
| 786 |
| TOP (included). | |
| 787 |
`------------------------------------------------------------------*/ |
| 788 |
|
| 789 |
static void |
| 790 |
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) |
| 791 |
{ |
| 792 |
YYFPRINTF (stderr, "Stack now"); |
| 793 |
for (; yybottom <= yytop; yybottom++) |
| 794 |
{ |
| 795 |
int yybot = *yybottom; |
| 796 |
YYFPRINTF (stderr, " %d", yybot); |
| 797 |
} |
| 798 |
YYFPRINTF (stderr, "\n"); |
| 799 |
} |
| 800 |
|
| 801 |
# define YY_STACK_PRINT(Bottom, Top) \ |
| 802 |
do { \ |
| 803 |
if (yydebug) \ |
| 804 |
yy_stack_print ((Bottom), (Top)); \ |
| 805 |
} while (0) |
| 806 |
|
| 807 |
|
| 808 |
/*------------------------------------------------. |
| 809 |
| Report that the YYRULE is going to be reduced. | |
| 810 |
`------------------------------------------------*/ |
| 811 |
|
| 812 |
static void |
| 813 |
yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) |
| 814 |
{ |
| 815 |
unsigned long int yylno = yyrline[yyrule]; |
| 816 |
int yynrhs = yyr2[yyrule]; |
| 817 |
int yyi; |
| 818 |
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", |
| 819 |
yyrule - 1, yylno); |
| 820 |
/* The symbols being reduced. */ |
| 821 |
for (yyi = 0; yyi < yynrhs; yyi++) |
| 822 |
{ |
| 823 |
YYFPRINTF (stderr, " $%d = ", yyi + 1); |
| 824 |
yy_symbol_print (stderr, |
| 825 |
yystos[yyssp[yyi + 1 - yynrhs]], |
| 826 |
&(yyvsp[(yyi + 1) - (yynrhs)]) |
| 827 |
); |
| 828 |
YYFPRINTF (stderr, "\n"); |
| 829 |
} |
| 830 |
} |
| 831 |
|
| 832 |
# define YY_REDUCE_PRINT(Rule) \ |
| 833 |
do { \ |
| 834 |
if (yydebug) \ |
| 835 |
yy_reduce_print (yyssp, yyvsp, Rule); \ |
| 836 |
} while (0) |
| 837 |
|
| 838 |
/* Nonzero means print parse trace. It is left uninitialized so that |
| 839 |
multiple parsers can coexist. */ |
| 840 |
int yydebug; |
| 841 |
#else /* !YYDEBUG */ |
| 842 |
# define YYDPRINTF(Args) |
| 843 |
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) |
| 844 |
# define YY_STACK_PRINT(Bottom, Top) |
| 845 |
# define YY_REDUCE_PRINT(Rule) |
| 846 |
#endif /* !YYDEBUG */ |
| 847 |
|
| 848 |
|
| 849 |
/* YYINITDEPTH -- initial size of the parser's stacks. */ |
| 850 |
#ifndef YYINITDEPTH |
| 851 |
# define YYINITDEPTH 200 |
| 852 |
#endif |
| 853 |
|
| 854 |
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only |
| 855 |
if the built-in stack extension method is used). |
| 856 |
|
| 857 |
Do not make this value too large; the results are undefined if |
| 858 |
YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) |
| 859 |
evaluated with infinite-precision integer arithmetic. */ |
| 860 |
|
| 861 |
#ifndef YYMAXDEPTH |
| 862 |
# define YYMAXDEPTH 10000 |
| 863 |
#endif |
| 864 |
|
| 865 |
|
| 866 |
#if YYERROR_VERBOSE |
| 867 |
|
| 868 |
# ifndef yystrlen |
| 869 |
# if defined __GLIBC__ && defined _STRING_H |
| 870 |
# define yystrlen strlen |
| 871 |
# else |
| 872 |
/* Return the length of YYSTR. */ |
| 873 |
static YYSIZE_T |
| 874 |
yystrlen (const char *yystr) |
| 875 |
{ |
| 876 |
YYSIZE_T yylen; |
| 877 |
for (yylen = 0; yystr[yylen]; yylen++) |
| 878 |
continue; |
| 879 |
return yylen; |
| 880 |
} |
| 881 |
# endif |
| 882 |
# endif |
| 883 |
|
| 884 |
# ifndef yystpcpy |
| 885 |
# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE |
| 886 |
# define yystpcpy stpcpy |
| 887 |
# else |
| 888 |
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in |
| 889 |
YYDEST. */ |
| 890 |
static char * |
| 891 |
yystpcpy (char *yydest, const char *yysrc) |
| 892 |
{ |
| 893 |
char *yyd = yydest; |
| 894 |
const char *yys = yysrc; |
| 895 |
|
| 896 |
while ((*yyd++ = *yys++) != '\0') |
| 897 |
continue; |
| 898 |
|
| 899 |
return yyd - 1; |
| 900 |
} |
| 901 |
# endif |
| 902 |
# endif |
| 903 |
|
| 904 |
# ifndef yytnamerr |
| 905 |
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary |
| 906 |
quotes and backslashes, so that it's suitable for yyerror. The |
| 907 |
heuristic is that double-quoting is unnecessary unless the string |
| 908 |
contains an apostrophe, a comma, or backslash (other than |
| 909 |
backslash-backslash). YYSTR is taken from yytname. If YYRES is |
| 910 |
null, do not copy; instead, return the length of what the result |
| 911 |
would have been. */ |
| 912 |
static YYSIZE_T |
| 913 |
yytnamerr (char *yyres, const char *yystr) |
| 914 |
{ |
| 915 |
if (*yystr == '"') |
| 916 |
{ |
| 917 |
YYSIZE_T yyn = 0; |
| 918 |
char const *yyp = yystr; |
| 919 |
|
| 920 |
for (;;) |
| 921 |
switch (*++yyp) |
| 922 |
{ |
| 923 |
case '\'': |
| 924 |
case ',': |
| 925 |
goto do_not_strip_quotes; |
| 926 |
|
| 927 |
case '\\': |
| 928 |
if (*++yyp != '\\') |
| 929 |
goto do_not_strip_quotes; |
| 930 |
/* Fall through. */ |
| 931 |
default: |
| 932 |
if (yyres) |
| 933 |
yyres[yyn] = *yyp; |
| 934 |
yyn++; |
| 935 |
break; |
| 936 |
|
| 937 |
case '"': |
| 938 |
if (yyres) |
| 939 |
yyres[yyn] = '\0'; |
| 940 |
return yyn; |
| 941 |
} |
| 942 |
do_not_strip_quotes: ; |
| 943 |
} |
| 944 |
|
| 945 |
if (! yyres) |
| 946 |
return yystrlen (yystr); |
| 947 |
|
| 948 |
return yystpcpy (yyres, yystr) - yyres; |
| 949 |
} |
| 950 |
# endif |
| 951 |
|
| 952 |
/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message |
| 953 |
about the unexpected token YYTOKEN for the state stack whose top is |
| 954 |
YYSSP. |
| 955 |
|
| 956 |
Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is |
| 957 |
not large enough to hold the message. In that case, also set |
| 958 |
*YYMSG_ALLOC to the required number of bytes. Return 2 if the |
| 959 |
required number of bytes is too large to store. */ |
| 960 |
static int |
| 961 |
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, |
| 962 |
yytype_int16 *yyssp, int yytoken) |
| 963 |
{ |
| 964 |
YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); |
| 965 |
YYSIZE_T yysize = yysize0; |
| 966 |
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; |
| 967 |
/* Internationalized format string. */ |
| 968 |
const char *yyformat = YY_NULLPTR; |
| 969 |
/* Arguments of yyformat. */ |
| 970 |
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; |
| 971 |
/* Number of reported tokens (one for the "unexpected", one per |
| 972 |
"expected"). */ |
| 973 |
int yycount = 0; |
| 974 |
|
| 975 |
/* There are many possibilities here to consider: |
| 976 |
- If this state is a consistent state with a default action, then |
| 977 |
the only way this function was invoked is if the default action |
| 978 |
is an error action. In that case, don't check for expected |
| 979 |
tokens because there are none. |
| 980 |
- The only way there can be no lookahead present (in yychar) is if |
| 981 |
this state is a consistent state with a default action. Thus, |
| 982 |
detecting the absence of a lookahead is sufficient to determine |
| 983 |
that there is no unexpected or expected token to report. In that |
| 984 |
case, just report a simple "syntax error". |
| 985 |
- Don't assume there isn't a lookahead just because this state is a |
| 986 |
consistent state with a default action. There might have been a |
| 987 |
previous inconsistent state, consistent state with a non-default |
| 988 |
action, or user semantic action that manipulated yychar. |
| 989 |
- Of course, the expected token list depends on states to have |
| 990 |
correct lookahead information, and it depends on the parser not |
| 991 |
to perform extra reductions after fetching a lookahead from the |
| 992 |
scanner and before detecting a syntax error. Thus, state merging |
| 993 |
(from LALR or IELR) and default reductions corrupt the expected |
| 994 |
token list. However, the list is correct for canonical LR with |
| 995 |
one exception: it will still contain any token that will not be |
| 996 |
accepted due to an error action in a later state. |
| 997 |
*/ |
| 998 |
if (yytoken != YYEMPTY) |
| 999 |
{ |
| 1000 |
int yyn = yypact[*yyssp]; |
| 1001 |
yyarg[yycount++] = yytname[yytoken]; |
| 1002 |
if (!yypact_value_is_default (yyn)) |
| 1003 |
{ |
| 1004 |
/* Start YYX at -YYN if negative to avoid negative indexes in |
| 1005 |
YYCHECK. In other words, skip the first -YYN actions for |
| 1006 |
this state because they are default actions. */ |
| 1007 |
int yyxbegin = yyn < 0 ? -yyn : 0; |
| 1008 |
/* Stay within bounds of both yycheck and yytname. */ |
| 1009 |
int yychecklim = YYLAST - yyn + 1; |
| 1010 |
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; |
| 1011 |
int yyx; |
| 1012 |
|
| 1013 |
for (yyx = yyxbegin; yyx < yyxend; ++yyx) |
| 1014 |
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR |
| 1015 |
&& !yytable_value_is_error (yytable[yyx + yyn])) |
| 1016 |
{ |
| 1017 |
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) |
| 1018 |
{ |
| 1019 |
yycount = 1; |
| 1020 |
yysize = yysize0; |
| 1021 |
break; |
| 1022 |
} |
| 1023 |
yyarg[yycount++] = yytname[yyx]; |
| 1024 |
{ |
| 1025 |
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); |
| 1026 |
if (! (yysize <= yysize1 |
| 1027 |
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
| 1028 |
return 2; |
| 1029 |
yysize = yysize1; |
| 1030 |
} |
| 1031 |
} |
| 1032 |
} |
| 1033 |
} |
| 1034 |
|
| 1035 |
switch (yycount) |
| 1036 |
{ |
| 1037 |
# define YYCASE_(N, S) \ |
| 1038 |
case N: \ |
| 1039 |
yyformat = S; \ |
| 1040 |
break |
| 1041 |
YYCASE_(0, YY_("syntax error")); |
| 1042 |
YYCASE_(1, YY_("syntax error, unexpected %s")); |
| 1043 |
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); |
| 1044 |
YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); |
| 1045 |
YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); |
| 1046 |
YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); |
| 1047 |
# undef YYCASE_ |
| 1048 |
} |
| 1049 |
|
| 1050 |
{ |
| 1051 |
YYSIZE_T yysize1 = yysize + yystrlen (yyformat); |
| 1052 |
if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) |
| 1053 |
return 2; |
| 1054 |
yysize = yysize1; |
| 1055 |
} |
| 1056 |
|
| 1057 |
if (*yymsg_alloc < yysize) |
| 1058 |
{ |
| 1059 |
*yymsg_alloc = 2 * yysize; |
| 1060 |
if (! (yysize <= *yymsg_alloc |
| 1061 |
&& *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) |
| 1062 |
*yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; |
| 1063 |
return 1; |
| 1064 |
} |
| 1065 |
|
| 1066 |
/* Avoid sprintf, as that infringes on the user's name space. |
| 1067 |
Don't have undefined behavior even if the translation |
| 1068 |
produced a string with the wrong number of "%s"s. */ |
| 1069 |
{ |
| 1070 |
char *yyp = *yymsg; |
| 1071 |
int yyi = 0; |
| 1072 |
while ((*yyp = *yyformat) != '\0') |
| 1073 |
if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) |
| 1074 |
{ |
| 1075 |
yyp += yytnamerr (yyp, yyarg[yyi++]); |
| 1076 |
yyformat += 2; |
| 1077 |
} |
| 1078 |
else |
| 1079 |
{ |
| 1080 |
yyp++; |
| 1081 |
yyformat++; |
| 1082 |
} |
| 1083 |
} |
| 1084 |
return 0; |
| 1085 |
} |
| 1086 |
#endif /* YYERROR_VERBOSE */ |
| 1087 |
|
| 1088 |
/*-----------------------------------------------. |
| 1089 |
| Release the memory associated to this symbol. | |
| 1090 |
`-----------------------------------------------*/ |
| 1091 |
|
| 1092 |
static void |
| 1093 |
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) |
| 1094 |
{ |
| 1095 |
YYUSE (yyvaluep); |
| 1096 |
if (!yymsg) |
| 1097 |
yymsg = "Deleting"; |
| 1098 |
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); |
| 1099 |
|
| 1100 |
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| 1101 |
YYUSE (yytype); |
| 1102 |
YY_IGNORE_MAYBE_UNINITIALIZED_END |
| 1103 |
} |
| 1104 |
|
| 1105 |
|
| 1106 |
|
| 1107 |
|
| 1108 |
/* The lookahead symbol. */ |
| 1109 |
int yychar; |
| 1110 |
|
| 1111 |
/* The semantic value of the lookahead symbol. */ |
| 1112 |
YYSTYPE yylval; |
| 1113 |
/* Number of syntax errors so far. */ |
| 1114 |
int yynerrs; |
| 1115 |
|
| 1116 |
|
| 1117 |
/*----------. |
| 1118 |
| yyparse. | |
| 1119 |
`----------*/ |
| 1120 |
|
| 1121 |
int |
| 1122 |
yyparse (void) |
| 1123 |
{ |
| 1124 |
int yystate; |
| 1125 |
/* Number of tokens to shift before error messages enabled. */ |
| 1126 |
int yyerrstatus; |
| 1127 |
|
| 1128 |
/* The stacks and their tools: |
| 1129 |
'yyss': related to states. |
| 1130 |
'yyvs': related to semantic values. |
| 1131 |
|
| 1132 |
Refer to the stacks through separate pointers, to allow yyoverflow |
| 1133 |
to reallocate them elsewhere. */ |
| 1134 |
|
| 1135 |
/* The state stack. */ |
| 1136 |
yytype_int16 yyssa[YYINITDEPTH]; |
| 1137 |
yytype_int16 *yyss; |
| 1138 |
yytype_int16 *yyssp; |
| 1139 |
|
| 1140 |
/* The semantic value stack. */ |
| 1141 |
YYSTYPE yyvsa[YYINITDEPTH]; |
| 1142 |
YYSTYPE *yyvs; |
| 1143 |
YYSTYPE *yyvsp; |
| 1144 |
|
| 1145 |
YYSIZE_T yystacksize; |
| 1146 |
|
| 1147 |
int yyn; |
| 1148 |
int yyresult; |
| 1149 |
/* Lookahead token as an internal (translated) token number. */ |
| 1150 |
int yytoken = 0; |
| 1151 |
/* The variables used to return semantic value and location from the |
| 1152 |
action routines. */ |
| 1153 |
YYSTYPE yyval; |
| 1154 |
|
| 1155 |
#if YYERROR_VERBOSE |
| 1156 |
/* Buffer for error messages, and its allocated size. */ |
| 1157 |
char yymsgbuf[128]; |
| 1158 |
char *yymsg = yymsgbuf; |
| 1159 |
YYSIZE_T yymsg_alloc = sizeof yymsgbuf; |
| 1160 |
#endif |
| 1161 |
|
| 1162 |
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) |
| 1163 |
|
| 1164 |
/* The number of symbols on the RHS of the reduced rule. |
| 1165 |
Keep to zero when no symbol should be popped. */ |
| 1166 |
int yylen = 0; |
| 1167 |
|
| 1168 |
yyssp = yyss = yyssa; |
| 1169 |
yyvsp = yyvs = yyvsa; |
| 1170 |
yystacksize = YYINITDEPTH; |
| 1171 |
|
| 1172 |
YYDPRINTF ((stderr, "Starting parse\n")); |
| 1173 |
|
| 1174 |
yystate = 0; |
| 1175 |
yyerrstatus = 0; |
| 1176 |
yynerrs = 0; |
| 1177 |
yychar = YYEMPTY; /* Cause a token to be read. */ |
| 1178 |
goto yysetstate; |
| 1179 |
|
| 1180 |
/*------------------------------------------------------------. |
| 1181 |
| yynewstate -- Push a new state, which is found in yystate. | |
| 1182 |
`------------------------------------------------------------*/ |
| 1183 |
yynewstate: |
| 1184 |
/* In all cases, when you get here, the value and location stacks |
| 1185 |
have just been pushed. So pushing a state here evens the stacks. */ |
| 1186 |
yyssp++; |
| 1187 |
|
| 1188 |
yysetstate: |
| 1189 |
*yyssp = yystate; |
| 1190 |
|
| 1191 |
if (yyss + yystacksize - 1 <= yyssp) |
| 1192 |
{ |
| 1193 |
/* Get the current used size of the three stacks, in elements. */ |
| 1194 |
YYSIZE_T yysize = yyssp - yyss + 1; |
| 1195 |
|
| 1196 |
#ifdef yyoverflow |
| 1197 |
{ |
| 1198 |
/* Give user a chance to reallocate the stack. Use copies of |
| 1199 |
these so that the &'s don't force the real ones into |
| 1200 |
memory. */ |
| 1201 |
YYSTYPE *yyvs1 = yyvs; |
| 1202 |
yytype_int16 *yyss1 = yyss; |
| 1203 |
|
| 1204 |
/* Each stack pointer address is followed by the size of the |
| 1205 |
data in use in that stack, in bytes. This used to be a |
| 1206 |
conditional around just the two extra args, but that might |
| 1207 |
be undefined if yyoverflow is a macro. */ |
| 1208 |
yyoverflow (YY_("memory exhausted"), |
| 1209 |
&yyss1, yysize * sizeof (*yyssp), |
| 1210 |
&yyvs1, yysize * sizeof (*yyvsp), |
| 1211 |
&yystacksize); |
| 1212 |
|
| 1213 |
yyss = yyss1; |
| 1214 |
yyvs = yyvs1; |
| 1215 |
} |
| 1216 |
#else /* no yyoverflow */ |
| 1217 |
# ifndef YYSTACK_RELOCATE |
| 1218 |
goto yyexhaustedlab; |
| 1219 |
# else |
| 1220 |
/* Extend the stack our own way. */ |
| 1221 |
if (YYMAXDEPTH <= yystacksize) |
| 1222 |
goto yyexhaustedlab; |
| 1223 |
yystacksize *= 2; |
| 1224 |
if (YYMAXDEPTH < yystacksize) |
| 1225 |
yystacksize = YYMAXDEPTH; |
| 1226 |
|
| 1227 |
{ |
| 1228 |
yytype_int16 *yyss1 = yyss; |
| 1229 |
union yyalloc *yyptr = |
| 1230 |
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); |
| 1231 |
if (! yyptr) |
| 1232 |
goto yyexhaustedlab; |
| 1233 |
YYSTACK_RELOCATE (yyss_alloc, yyss); |
| 1234 |
YYSTACK_RELOCATE (yyvs_alloc, yyvs); |
| 1235 |
# undef YYSTACK_RELOCATE |
| 1236 |
if (yyss1 != yyssa) |
| 1237 |
YYSTACK_FREE (yyss1); |
| 1238 |
} |
| 1239 |
# endif |
| 1240 |
#endif /* no yyoverflow */ |
| 1241 |
|
| 1242 |
yyssp = yyss + yysize - 1; |
| 1243 |
yyvsp = yyvs + yysize - 1; |
| 1244 |
|
| 1245 |
YYDPRINTF ((stderr, "Stack size increased to %lu\n", |
| 1246 |
(unsigned long int) yystacksize)); |
| 1247 |
|
| 1248 |
if (yyss + yystacksize - 1 <= yyssp) |
| 1249 |
YYABORT; |
| 1250 |
} |
| 1251 |
|
| 1252 |
YYDPRINTF ((stderr, "Entering state %d\n", yystate)); |
| 1253 |
|
| 1254 |
if (yystate == YYFINAL) |
| 1255 |
YYACCEPT; |
| 1256 |
|
| 1257 |
goto yybackup; |
| 1258 |
|
| 1259 |
/*-----------. |
| 1260 |
| yybackup. | |
| 1261 |
`-----------*/ |
| 1262 |
yybackup: |
| 1263 |
|
| 1264 |
/* Do appropriate processing given the current state. Read a |
| 1265 |
lookahead token if we need one and don't already have one. */ |
| 1266 |
|
| 1267 |
/* First try to decide what to do without reference to lookahead token. */ |
| 1268 |
yyn = yypact[yystate]; |
| 1269 |
if (yypact_value_is_default (yyn)) |
| 1270 |
goto yydefault; |
| 1271 |
|
| 1272 |
/* Not known => get a lookahead token if don't already have one. */ |
| 1273 |
|
| 1274 |
/* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ |
| 1275 |
if (yychar == YYEMPTY) |
| 1276 |
{ |
| 1277 |
YYDPRINTF ((stderr, "Reading a token: ")); |
| 1278 |
yychar = yylex (); |
| 1279 |
} |
| 1280 |
|
| 1281 |
if (yychar <= YYEOF) |
| 1282 |
{ |
| 1283 |
yychar = yytoken = YYEOF; |
| 1284 |
YYDPRINTF ((stderr, "Now at end of input.\n")); |
| 1285 |
} |
| 1286 |
else |
| 1287 |
{ |
| 1288 |
yytoken = YYTRANSLATE (yychar); |
| 1289 |
YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); |
| 1290 |
} |
| 1291 |
|
| 1292 |
/* If the proper action on seeing token YYTOKEN is to reduce or to |
| 1293 |
detect an error, take that action. */ |
| 1294 |
yyn += yytoken; |
| 1295 |
if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) |
| 1296 |
goto yydefault; |
| 1297 |
yyn = yytable[yyn]; |
| 1298 |
if (yyn <= 0) |
| 1299 |
{ |
| 1300 |
if (yytable_value_is_error (yyn)) |
| 1301 |
goto yyerrlab; |
| 1302 |
yyn = -yyn; |
| 1303 |
goto yyreduce; |
| 1304 |
} |
| 1305 |
|
| 1306 |
/* Count tokens shifted since error; after three, turn off error |
| 1307 |
status. */ |
| 1308 |
if (yyerrstatus) |
| 1309 |
yyerrstatus--; |
| 1310 |
|
| 1311 |
/* Shift the lookahead token. */ |
| 1312 |
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); |
| 1313 |
|
| 1314 |
/* Discard the shifted token. */ |
| 1315 |
yychar = YYEMPTY; |
| 1316 |
|
| 1317 |
yystate = yyn; |
| 1318 |
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| 1319 |
*++yyvsp = yylval; |
| 1320 |
YY_IGNORE_MAYBE_UNINITIALIZED_END |
| 1321 |
|
| 1322 |
goto yynewstate; |
| 1323 |
|
| 1324 |
|
| 1325 |
/*-----------------------------------------------------------. |
| 1326 |
| yydefault -- do the default action for the current state. | |
| 1327 |
`-----------------------------------------------------------*/ |
| 1328 |
yydefault: |
| 1329 |
yyn = yydefact[yystate]; |
| 1330 |
if (yyn == 0) |
| 1331 |
goto yyerrlab; |
| 1332 |
goto yyreduce; |
| 1333 |
|
| 1334 |
|
| 1335 |
/*-----------------------------. |
| 1336 |
| yyreduce -- Do a reduction. | |
| 1337 |
`-----------------------------*/ |
| 1338 |
yyreduce: |
| 1339 |
/* yyn is the number of a rule to reduce with. */ |
| 1340 |
yylen = yyr2[yyn]; |
| 1341 |
|
| 1342 |
/* If YYLEN is nonzero, implement the default value of the action: |
| 1343 |
'$$ = $1'. |
| 1344 |
|
| 1345 |
Otherwise, the following line sets YYVAL to garbage. |
| 1346 |
This behavior is undocumented and Bison |
| 1347 |
users should not rely upon it. Assigning to YYVAL |
| 1348 |
unconditionally makes the parser a bit smaller, and it avoids a |
| 1349 |
GCC warning that YYVAL may be used uninitialized. */ |
| 1350 |
yyval = yyvsp[1-yylen]; |
| 1351 |
|
| 1352 |
|
| 1353 |
YY_REDUCE_PRINT (yyn); |
| 1354 |
switch (yyn) |
| 1355 |
{ |
| 1356 |
case 3: |
| 1357 |
#line 72 "otp-parser.y" /* yacc.c:1646 */ |
| 1358 |
{ input_bytes=2; } |
| 1359 |
#line 1360 "otp-parser.c" /* yacc.c:1646 */ |
| 1360 |
break; |
| 1361 |
|
| 1362 |
case 4: |
| 1363 |
#line 74 "otp-parser.y" /* yacc.c:1646 */ |
| 1364 |
{ input_bytes=(yyvsp[-1]).yint; } |
| 1365 |
#line 1366 "otp-parser.c" /* yacc.c:1646 */ |
| 1366 |
break; |
| 1367 |
|
| 1368 |
case 5: |
| 1369 |
#line 79 "otp-parser.y" /* yacc.c:1646 */ |
| 1370 |
{ output_bytes=2; } |
| 1371 |
#line 1372 "otp-parser.c" /* yacc.c:1646 */ |
| 1372 |
break; |
| 1373 |
|
| 1374 |
case 6: |
| 1375 |
#line 81 "otp-parser.y" /* yacc.c:1646 */ |
| 1376 |
{ output_bytes=(yyvsp[-1]).yint; } |
| 1377 |
#line 1378 "otp-parser.c" /* yacc.c:1646 */ |
| 1378 |
break; |
| 1379 |
|
| 1380 |
case 11: |
| 1381 |
#line 96 "otp-parser.y" /* yacc.c:1646 */ |
| 1382 |
{ store_table((yyvsp[-3]).ystring, (yyvsp[-1]).yint); } |
| 1383 |
#line 1384 "otp-parser.c" /* yacc.c:1646 */ |
| 1384 |
break; |
| 1385 |
|
| 1386 |
case 15: |
| 1387 |
#line 107 "otp-parser.y" /* yacc.c:1646 */ |
| 1388 |
{ add_to_table((yyvsp[0]).yint); } |
| 1389 |
#line 1390 "otp-parser.c" /* yacc.c:1646 */ |
| 1390 |
break; |
| 1391 |
|
| 1392 |
case 16: |
| 1393 |
#line 109 "otp-parser.y" /* yacc.c:1646 */ |
| 1394 |
{ add_to_table((yyvsp[0]).yint); } |
| 1395 |
#line 1396 "otp-parser.c" /* yacc.c:1646 */ |
| 1396 |
break; |
| 1397 |
|
| 1398 |
case 19: |
| 1399 |
#line 119 "otp-parser.y" /* yacc.c:1646 */ |
| 1400 |
{ store_state((yyvsp[0]).ystring); } |
| 1401 |
#line 1402 "otp-parser.c" /* yacc.c:1646 */ |
| 1402 |
break; |
| 1403 |
|
| 1404 |
case 20: |
| 1405 |
#line 121 "otp-parser.y" /* yacc.c:1646 */ |
| 1406 |
{ store_state((yyvsp[0]).ystring); } |
| 1407 |
#line 1408 "otp-parser.c" /* yacc.c:1646 */ |
| 1408 |
break; |
| 1409 |
|
| 1410 |
case 25: |
| 1411 |
#line 136 "otp-parser.y" /* yacc.c:1646 */ |
| 1412 |
{ store_alias((yyvsp[-3]).ystring, (yyvsp[-1]).yleft); } |
| 1413 |
#line 1414 "otp-parser.c" /* yacc.c:1646 */ |
| 1414 |
break; |
| 1415 |
|
| 1416 |
case 26: |
| 1417 |
#line 141 "otp-parser.y" /* yacc.c:1646 */ |
| 1418 |
{ (yyval).yleft = StringLeft((yyvsp[0]).ystring); } |
| 1419 |
#line 1420 "otp-parser.c" /* yacc.c:1646 */ |
| 1420 |
break; |
| 1421 |
|
| 1422 |
case 27: |
| 1423 |
#line 143 "otp-parser.y" /* yacc.c:1646 */ |
| 1424 |
{ (yyval).yleft = CompleteLeft((yyvsp[-5]).yleft, (yyvsp[-3]).yint, (yyvsp[-1]).yint); } |
| 1425 |
#line 1426 "otp-parser.c" /* yacc.c:1646 */ |
| 1426 |
break; |
| 1427 |
|
| 1428 |
case 28: |
| 1429 |
#line 145 "otp-parser.y" /* yacc.c:1646 */ |
| 1430 |
{ (yyval).yleft = PlusLeft((yyvsp[-4]).yleft, (yyvsp[-2]).yint); } |
| 1431 |
#line 1432 "otp-parser.c" /* yacc.c:1646 */ |
| 1432 |
break; |
| 1433 |
|
| 1434 |
case 29: |
| 1435 |
#line 147 "otp-parser.y" /* yacc.c:1646 */ |
| 1436 |
{ (yyval).yleft = CompleteLeft((yyvsp[-3]).yleft, (yyvsp[-1]).yint, (yyvsp[-1]).yint); } |
| 1437 |
#line 1438 "otp-parser.c" /* yacc.c:1646 */ |
| 1438 |
break; |
| 1439 |
|
| 1440 |
case 30: |
| 1441 |
#line 149 "otp-parser.y" /* yacc.c:1646 */ |
| 1442 |
{ (yyval).yleft = (yyvsp[0]).yleft; } |
| 1443 |
#line 1444 "otp-parser.c" /* yacc.c:1646 */ |
| 1444 |
break; |
| 1445 |
|
| 1446 |
case 31: |
| 1447 |
#line 154 "otp-parser.y" /* yacc.c:1646 */ |
| 1448 |
{ (yyval).yleft = SingleLeft((yyvsp[0]).yint); } |
| 1449 |
#line 1450 "otp-parser.c" /* yacc.c:1646 */ |
| 1450 |
break; |
| 1451 |
|
| 1452 |
case 32: |
| 1453 |
#line 156 "otp-parser.y" /* yacc.c:1646 */ |
| 1454 |
{ (yyval).yleft = DoubleLeft((yyvsp[-2]).yint, (yyvsp[0]).yint); } |
| 1455 |
#line 1456 "otp-parser.c" /* yacc.c:1646 */ |
| 1456 |
break; |
| 1457 |
|
| 1458 |
case 33: |
| 1459 |
#line 158 "otp-parser.y" /* yacc.c:1646 */ |
| 1460 |
{ (yyval).yleft = WildCard(); } |
| 1461 |
#line 1462 "otp-parser.c" /* yacc.c:1646 */ |
| 1462 |
break; |
| 1463 |
|
| 1464 |
case 34: |
| 1465 |
#line 160 "otp-parser.y" /* yacc.c:1646 */ |
| 1466 |
{ (yyval).yleft = NotChoiceLeft((yyvsp[-1]).ylleft); } |
| 1467 |
#line 1468 "otp-parser.c" /* yacc.c:1646 */ |
| 1468 |
break; |
| 1469 |
|
| 1470 |
case 35: |
| 1471 |
#line 162 "otp-parser.y" /* yacc.c:1646 */ |
| 1472 |
{ (yyval).yleft = ChoiceLeft((yyvsp[-1]).ylleft); } |
| 1473 |
#line 1474 "otp-parser.c" /* yacc.c:1646 */ |
| 1474 |
break; |
| 1475 |
|
| 1476 |
case 36: |
| 1477 |
#line 164 "otp-parser.y" /* yacc.c:1646 */ |
| 1478 |
{ (yyval).yleft = lookup_alias((yyvsp[-1]).ystring); } |
| 1479 |
#line 1480 "otp-parser.c" /* yacc.c:1646 */ |
| 1480 |
break; |
| 1481 |
|
| 1482 |
case 37: |
| 1483 |
#line 169 "otp-parser.y" /* yacc.c:1646 */ |
| 1484 |
{ (yyval).ylleft = llist1((yyvsp[0]).yleft); } |
| 1485 |
#line 1486 "otp-parser.c" /* yacc.c:1646 */ |
| 1486 |
break; |
| 1487 |
|
| 1488 |
case 38: |
| 1489 |
#line 171 "otp-parser.y" /* yacc.c:1646 */ |
| 1490 |
{ (yyval).ylleft = lappend1((yyvsp[-2]).ylleft, (yyvsp[0]).yleft); } |
| 1491 |
#line 1492 "otp-parser.c" /* yacc.c:1646 */ |
| 1492 |
break; |
| 1493 |
|
| 1494 |
case 39: |
| 1495 |
#line 176 "otp-parser.y" /* yacc.c:1646 */ |
| 1496 |
{ |
| 1497 |
for(cur_state=0; cur_state<no_states; cur_state++) { |
| 1498 |
if ((states[cur_state].no_exprs)==0) { |
| 1499 |
out_int(OTP_LEFT_START, 0); |
| 1500 |
} else { |
| 1501 |
out_int(OTP_LEFT_RETURN, 0); |
| 1502 |
} |
| 1503 |
out_int(OTP_RIGHT_CHAR, 1); |
| 1504 |
out_int(OTP_STOP, 0); |
| 1505 |
} |
| 1506 |
} |
| 1507 |
#line 1508 "otp-parser.c" /* yacc.c:1646 */ |
| 1508 |
break; |
| 1509 |
|
| 1510 |
case 42: |
| 1511 |
#line 196 "otp-parser.y" /* yacc.c:1646 */ |
| 1512 |
{ states[cur_state].no_exprs++; } |
| 1513 |
#line 1514 "otp-parser.c" /* yacc.c:1646 */ |
| 1514 |
break; |
| 1515 |
|
| 1516 |
case 43: |
| 1517 |
#line 198 "otp-parser.y" /* yacc.c:1646 */ |
| 1518 |
{ out_left((yyvsp[0]).ylleft); right_offset=0; } |
| 1519 |
#line 1520 "otp-parser.c" /* yacc.c:1646 */ |
| 1520 |
break; |
| 1521 |
|
| 1522 |
case 44: |
| 1523 |
#line 200 "otp-parser.y" /* yacc.c:1646 */ |
| 1524 |
{ right_offset=OTP_PBACK_OFFSET; } |
| 1525 |
#line 1526 "otp-parser.c" /* yacc.c:1646 */ |
| 1526 |
break; |
| 1527 |
|
| 1528 |
case 45: |
| 1529 |
#line 202 "otp-parser.y" /* yacc.c:1646 */ |
| 1530 |
{ fill_in_left(); } |
| 1531 |
#line 1532 "otp-parser.c" /* yacc.c:1646 */ |
| 1532 |
break; |
| 1533 |
|
| 1534 |
case 48: |
| 1535 |
#line 212 "otp-parser.y" /* yacc.c:1646 */ |
| 1536 |
{ cur_state = 0; } |
| 1537 |
#line 1538 "otp-parser.c" /* yacc.c:1646 */ |
| 1538 |
break; |
| 1539 |
|
| 1540 |
case 49: |
| 1541 |
#line 214 "otp-parser.y" /* yacc.c:1646 */ |
| 1542 |
{ cur_state = lookup_state((yyvsp[-1]).ystring); } |
| 1543 |
#line 1544 "otp-parser.c" /* yacc.c:1646 */ |
| 1544 |
break; |
| 1545 |
|
| 1546 |
case 50: |
| 1547 |
#line 219 "otp-parser.y" /* yacc.c:1646 */ |
| 1548 |
{ (yyval).ylleft = lappend((yyvsp[-2]).ylleft, lappend((yyvsp[-1]).ylleft, (yyvsp[0]).ylleft)); } |
| 1549 |
#line 1550 "otp-parser.c" /* yacc.c:1646 */ |
| 1550 |
break; |
| 1551 |
|
| 1552 |
case 51: |
| 1553 |
#line 221 "otp-parser.y" /* yacc.c:1646 */ |
| 1554 |
{ (yyval).ylleft = lappend((yyvsp[-1]).ylleft, (yyvsp[0]).ylleft); } |
| 1555 |
#line 1556 "otp-parser.c" /* yacc.c:1646 */ |
| 1556 |
break; |
| 1557 |
|
| 1558 |
case 52: |
| 1559 |
#line 226 "otp-parser.y" /* yacc.c:1646 */ |
| 1560 |
{ (yyval).ylleft = nil; } |
| 1561 |
#line 1562 "otp-parser.c" /* yacc.c:1646 */ |
| 1562 |
break; |
| 1563 |
|
| 1564 |
case 53: |
| 1565 |
#line 228 "otp-parser.y" /* yacc.c:1646 */ |
| 1566 |
{ (yyval).ylleft = llist1(BeginningLeft()); } |
| 1567 |
#line 1568 "otp-parser.c" /* yacc.c:1646 */ |
| 1568 |
break; |
| 1569 |
|
| 1570 |
case 54: |
| 1571 |
#line 233 "otp-parser.y" /* yacc.c:1646 */ |
| 1572 |
{ (yyval).ylleft = nil; } |
| 1573 |
#line 1574 "otp-parser.c" /* yacc.c:1646 */ |
| 1574 |
break; |
| 1575 |
|
| 1576 |
case 55: |
| 1577 |
#line 235 "otp-parser.y" /* yacc.c:1646 */ |
| 1578 |
{ (yyval).ylleft = llist1(EndLeft()); } |
| 1579 |
#line 1580 "otp-parser.c" /* yacc.c:1646 */ |
| 1580 |
break; |
| 1581 |
|
| 1582 |
case 56: |
| 1583 |
#line 240 "otp-parser.y" /* yacc.c:1646 */ |
| 1584 |
{ (yyval).ylleft = llist1((yyvsp[0]).yleft); } |
| 1585 |
#line 1586 "otp-parser.c" /* yacc.c:1646 */ |
| 1586 |
break; |
| 1587 |
|
| 1588 |
case 57: |
| 1589 |
#line 242 "otp-parser.y" /* yacc.c:1646 */ |
| 1590 |
{ (yyval).ylleft = lappend1((yyvsp[-1]).ylleft, (yyvsp[0]).yleft); } |
| 1591 |
#line 1592 "otp-parser.c" /* yacc.c:1646 */ |
| 1592 |
break; |
| 1593 |
|
| 1594 |
case 60: |
| 1595 |
#line 252 "otp-parser.y" /* yacc.c:1646 */ |
| 1596 |
{ |
| 1597 |
len=strlen((yyvsp[0]).ystring); |
| 1598 |
for (k=0; k<len; k++) { |
| 1599 |
out_right(OTP_RIGHT_NUM, ((yyvsp[0]).ystring)[k]); |
| 1600 |
} |
| 1601 |
} |
| 1602 |
#line 1603 "otp-parser.c" /* yacc.c:1646 */ |
| 1603 |
break; |
| 1604 |
|
| 1605 |
case 61: |
| 1606 |
#line 259 "otp-parser.y" /* yacc.c:1646 */ |
| 1607 |
{ out_right(OTP_RIGHT_NUM, (yyvsp[0]).yint); } |
| 1608 |
#line 1609 "otp-parser.c" /* yacc.c:1646 */ |
| 1609 |
break; |
| 1610 |
|
| 1611 |
case 62: |
| 1612 |
#line 261 "otp-parser.y" /* yacc.c:1646 */ |
| 1613 |
{ out_right(OTP_RIGHT_CHAR, (yyvsp[0]).yint); } |
| 1614 |
#line 1615 "otp-parser.c" /* yacc.c:1646 */ |
| 1615 |
break; |
| 1616 |
|
| 1617 |
case 63: |
| 1618 |
#line 263 "otp-parser.y" /* yacc.c:1646 */ |
| 1619 |
{ out_right(OTP_RIGHT_LCHAR, 0); } |
| 1620 |
#line 1621 "otp-parser.c" /* yacc.c:1646 */ |
| 1621 |
break; |
| 1622 |
|
| 1623 |
case 64: |
| 1624 |
#line 265 "otp-parser.y" /* yacc.c:1646 */ |
| 1625 |
{ out_right(OTP_RIGHT_LCHAR, (yyvsp[-1]).yint); } |
| 1626 |
#line 1627 "otp-parser.c" /* yacc.c:1646 */ |
| 1627 |
break; |
| 1628 |
|
| 1629 |
case 65: |
| 1630 |
#line 267 "otp-parser.y" /* yacc.c:1646 */ |
| 1631 |
{ |
| 1632 |
out_right(OTP_RIGHT_SOME, 0); |
| 1633 |
out_int(0,0); |
| 1634 |
} |
| 1635 |
#line 1636 "otp-parser.c" /* yacc.c:1646 */ |
| 1636 |
break; |
| 1637 |
|
| 1638 |
case 66: |
| 1639 |
#line 272 "otp-parser.y" /* yacc.c:1646 */ |
| 1640 |
{ |
| 1641 |
out_right(OTP_RIGHT_SOME, (yyvsp[-1]).yint); |
| 1642 |
out_int(0, 0); |
| 1643 |
} |
| 1644 |
#line 1645 "otp-parser.c" /* yacc.c:1646 */ |
| 1645 |
break; |
| 1646 |
|
| 1647 |
case 67: |
| 1648 |
#line 277 "otp-parser.y" /* yacc.c:1646 */ |
| 1649 |
{ |
| 1650 |
out_right(OTP_RIGHT_SOME, 0); |
| 1651 |
out_int(0, (yyvsp[-1]).yint); |
| 1652 |
} |
| 1653 |
#line 1654 "otp-parser.c" /* yacc.c:1646 */ |
| 1654 |
break; |
| 1655 |
|
| 1656 |
case 68: |
| 1657 |
#line 282 "otp-parser.y" /* yacc.c:1646 */ |
| 1658 |
{ |
| 1659 |
out_right(OTP_RIGHT_SOME, (yyvsp[-3]).yint); |
| 1660 |
out_int(0, (yyvsp[-1]).yint); |
| 1661 |
} |
| 1662 |
#line 1663 "otp-parser.c" /* yacc.c:1646 */ |
| 1663 |
break; |
| 1664 |
|
| 1665 |
case 69: |
| 1666 |
#line 287 "otp-parser.y" /* yacc.c:1646 */ |
| 1667 |
{ out_right(OTP_RIGHT_OUTPUT, 0); } |
| 1668 |
#line 1669 "otp-parser.c" /* yacc.c:1646 */ |
| 1669 |
break; |
| 1670 |
|
| 1671 |
case 71: |
| 1672 |
#line 293 "otp-parser.y" /* yacc.c:1646 */ |
| 1673 |
{ out_int(OTP_ADD, 0); } |
| 1674 |
#line 1675 "otp-parser.c" /* yacc.c:1646 */ |
| 1675 |
break; |
| 1676 |
|
| 1677 |
case 72: |
| 1678 |
#line 295 "otp-parser.y" /* yacc.c:1646 */ |
| 1679 |
{ out_int(OTP_SUB, 0); } |
| 1680 |
#line 1681 "otp-parser.c" /* yacc.c:1646 */ |
| 1681 |
break; |
| 1682 |
|
| 1683 |
case 73: |
| 1684 |
#line 297 "otp-parser.y" /* yacc.c:1646 */ |
| 1685 |
{ out_int(OTP_MULT, 0); } |
| 1686 |
#line 1687 "otp-parser.c" /* yacc.c:1646 */ |
| 1687 |
break; |
| 1688 |
|
| 1689 |
case 74: |
| 1690 |
#line 299 "otp-parser.y" /* yacc.c:1646 */ |
| 1691 |
{ out_int(OTP_DIV, 0); } |
| 1692 |
#line 1693 "otp-parser.c" /* yacc.c:1646 */ |
| 1693 |
break; |
| 1694 |
|
| 1695 |
case 75: |
| 1696 |
#line 301 "otp-parser.y" /* yacc.c:1646 */ |
| 1697 |
{ out_int(OTP_MOD, 0); } |
| 1698 |
#line 1699 "otp-parser.c" /* yacc.c:1646 */ |
| 1699 |
break; |
| 1700 |
|
| 1701 |
case 76: |
| 1702 |
#line 303 "otp-parser.y" /* yacc.c:1646 */ |
| 1703 |
{ out_int(OTP_PUSH_NUM, lookup_table((yyvsp[0]).ystring)); } |
| 1704 |
#line 1705 "otp-parser.c" /* yacc.c:1646 */ |
| 1705 |
break; |
| 1706 |
|
| 1707 |
case 77: |
| 1708 |
#line 305 "otp-parser.y" /* yacc.c:1646 */ |
| 1709 |
{ out_int(OTP_LOOKUP, 0); } |
| 1710 |
#line 1711 "otp-parser.c" /* yacc.c:1646 */ |
| 1711 |
break; |
| 1712 |
|
| 1713 |
case 78: |
| 1714 |
#line 310 "otp-parser.y" /* yacc.c:1646 */ |
| 1715 |
{ out_int(OTP_PUSH_NUM, (yyvsp[0]).yint); } |
| 1716 |
#line 1717 "otp-parser.c" /* yacc.c:1646 */ |
| 1717 |
break; |
| 1718 |
|
| 1719 |
case 79: |
| 1720 |
#line 312 "otp-parser.y" /* yacc.c:1646 */ |
| 1721 |
{ out_int(OTP_PUSH_CHAR, (yyvsp[0]).yint); } |
| 1722 |
#line 1723 "otp-parser.c" /* yacc.c:1646 */ |
| 1723 |
break; |
| 1724 |
|
| 1725 |
case 80: |
| 1726 |
#line 314 "otp-parser.y" /* yacc.c:1646 */ |
| 1727 |
{ out_int(OTP_PUSH_LCHAR, 0); } |
| 1728 |
#line 1729 "otp-parser.c" /* yacc.c:1646 */ |
| 1729 |
break; |
| 1730 |
|
| 1731 |
case 81: |
| 1732 |
#line 316 "otp-parser.y" /* yacc.c:1646 */ |
| 1733 |
{ out_int(OTP_PUSH_LCHAR, (yyvsp[-1]).yint); } |
| 1734 |
#line 1735 "otp-parser.c" /* yacc.c:1646 */ |
| 1735 |
break; |
| 1736 |
|
| 1737 |
case 84: |
| 1738 |
#line 323 "otp-parser.y" /* yacc.c:1646 */ |
| 1739 |
{ out_int(OTP_STATE_CHANGE, 0); } |
| 1740 |
#line 1741 "otp-parser.c" /* yacc.c:1646 */ |
| 1741 |
break; |
| 1742 |
|
| 1743 |
case 85: |
| 1744 |
#line 325 "otp-parser.y" /* yacc.c:1646 */ |
| 1745 |
{ out_int(OTP_STATE_CHANGE, lookup_state((yyvsp[-1]).ystring)); } |
| 1746 |
#line 1747 "otp-parser.c" /* yacc.c:1646 */ |
| 1747 |
break; |
| 1748 |
|
| 1749 |
case 86: |
| 1750 |
#line 327 "otp-parser.y" /* yacc.c:1646 */ |
| 1751 |
{ out_int(OTP_STATE_PUSH, lookup_state((yyvsp[-1]).ystring)); } |
| 1752 |
#line 1753 "otp-parser.c" /* yacc.c:1646 */ |
| 1753 |
break; |
| 1754 |
|
| 1755 |
case 87: |
| 1756 |
#line 329 "otp-parser.y" /* yacc.c:1646 */ |
| 1757 |
{ out_int(OTP_STATE_POP, 0); } |
| 1758 |
#line 1759 "otp-parser.c" /* yacc.c:1646 */ |
| 1759 |
break; |
| 1760 |
|
| 1761 |
|
| 1762 |
#line 1763 "otp-parser.c" /* yacc.c:1646 */ |
| 1763 |
default: break; |
| 1764 |
} |
| 1765 |
/* User semantic actions sometimes alter yychar, and that requires |
| 1766 |
that yytoken be updated with the new translation. We take the |
| 1767 |
approach of translating immediately before every use of yytoken. |
| 1768 |
One alternative is translating here after every semantic action, |
| 1769 |
but that translation would be missed if the semantic action invokes |
| 1770 |
YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or |
| 1771 |
if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an |
| 1772 |
incorrect destructor might then be invoked immediately. In the |
| 1773 |
case of YYERROR or YYBACKUP, subsequent parser actions might lead |
| 1774 |
to an incorrect destructor call or verbose syntax error message |
| 1775 |
before the lookahead is translated. */ |
| 1776 |
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); |
| 1777 |
|
| 1778 |
YYPOPSTACK (yylen); |
| 1779 |
yylen = 0; |
| 1780 |
YY_STACK_PRINT (yyss, yyssp); |
| 1781 |
|
| 1782 |
*++yyvsp = yyval; |
| 1783 |
|
| 1784 |
/* Now 'shift' the result of the reduction. Determine what state |
| 1785 |
that goes to, based on the state we popped back to and the rule |
| 1786 |
number reduced by. */ |
| 1787 |
|
| 1788 |
yyn = yyr1[yyn]; |
| 1789 |
|
| 1790 |
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; |
| 1791 |
if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) |
| 1792 |
yystate = yytable[yystate]; |
| 1793 |
else |
| 1794 |
yystate = yydefgoto[yyn - YYNTOKENS]; |
| 1795 |
|
| 1796 |
goto yynewstate; |
| 1797 |
|
| 1798 |
|
| 1799 |
/*--------------------------------------. |
| 1800 |
| yyerrlab -- here on detecting error. | |
| 1801 |
`--------------------------------------*/ |
| 1802 |
yyerrlab: |
| 1803 |
/* Make sure we have latest lookahead translation. See comments at |
| 1804 |
user semantic actions for why this is necessary. */ |
| 1805 |
yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); |
| 1806 |
|
| 1807 |
/* If not already recovering from an error, report this error. */ |
| 1808 |
if (!yyerrstatus) |
| 1809 |
{ |
| 1810 |
++yynerrs; |
| 1811 |
#if ! YYERROR_VERBOSE |
| 1812 |
yyerror (YY_("syntax error")); |
| 1813 |
#else |
| 1814 |
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ |
| 1815 |
yyssp, yytoken) |
| 1816 |
{ |
| 1817 |
char const *yymsgp = YY_("syntax error"); |
| 1818 |
int yysyntax_error_status; |
| 1819 |
yysyntax_error_status = YYSYNTAX_ERROR; |
| 1820 |
if (yysyntax_error_status == 0) |
| 1821 |
yymsgp = yymsg; |
| 1822 |
else if (yysyntax_error_status == 1) |
| 1823 |
{ |
| 1824 |
if (yymsg != yymsgbuf) |
| 1825 |
YYSTACK_FREE (yymsg); |
| 1826 |
yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); |
| 1827 |
if (!yymsg) |
| 1828 |
{ |
| 1829 |
yymsg = yymsgbuf; |
| 1830 |
yymsg_alloc = sizeof yymsgbuf; |
| 1831 |
yysyntax_error_status = 2; |
| 1832 |
} |
| 1833 |
else |
| 1834 |
{ |
| 1835 |
yysyntax_error_status = YYSYNTAX_ERROR; |
| 1836 |
yymsgp = yymsg; |
| 1837 |
} |
| 1838 |
} |
| 1839 |
yyerror (yymsgp); |
| 1840 |
if (yysyntax_error_status == 2) |
| 1841 |
goto yyexhaustedlab; |
| 1842 |
} |
| 1843 |
# undef YYSYNTAX_ERROR |
| 1844 |
#endif |
| 1845 |
} |
| 1846 |
|
| 1847 |
|
| 1848 |
|
| 1849 |
if (yyerrstatus == 3) |
| 1850 |
{ |
| 1851 |
/* If just tried and failed to reuse lookahead token after an |
| 1852 |
error, discard it. */ |
| 1853 |
|
| 1854 |
if (yychar <= YYEOF) |
| 1855 |
{ |
| 1856 |
/* Return failure if at end of input. */ |
| 1857 |
if (yychar == YYEOF) |
| 1858 |
YYABORT; |
| 1859 |
} |
| 1860 |
else |
| 1861 |
{ |
| 1862 |
yydestruct ("Error: discarding", |
| 1863 |
yytoken, &yylval); |
| 1864 |
yychar = YYEMPTY; |
| 1865 |
} |
| 1866 |
} |
| 1867 |
|
| 1868 |
/* Else will try to reuse lookahead token after shifting the error |
| 1869 |
token. */ |
| 1870 |
goto yyerrlab1; |
| 1871 |
|
| 1872 |
|
| 1873 |
/*---------------------------------------------------. |
| 1874 |
| yyerrorlab -- error raised explicitly by YYERROR. | |
| 1875 |
`---------------------------------------------------*/ |
| 1876 |
yyerrorlab: |
| 1877 |
|
| 1878 |
/* Pacify compilers like GCC when the user code never invokes |
| 1879 |
YYERROR and the label yyerrorlab therefore never appears in user |
| 1880 |
code. */ |
| 1881 |
if (/*CONSTCOND*/ 0) |
| 1882 |
goto yyerrorlab; |
| 1883 |
|
| 1884 |
/* Do not reclaim the symbols of the rule whose action triggered |
| 1885 |
this YYERROR. */ |
| 1886 |
YYPOPSTACK (yylen); |
| 1887 |
yylen = 0; |
| 1888 |
YY_STACK_PRINT (yyss, yyssp); |
| 1889 |
yystate = *yyssp; |
| 1890 |
goto yyerrlab1; |
| 1891 |
|
| 1892 |
|
| 1893 |
/*-------------------------------------------------------------. |
| 1894 |
| yyerrlab1 -- common code for both syntax error and YYERROR. | |
| 1895 |
`-------------------------------------------------------------*/ |
| 1896 |
yyerrlab1: |
| 1897 |
yyerrstatus = 3; /* Each real token shifted decrements this. */ |
| 1898 |
|
| 1899 |
for (;;) |
| 1900 |
{ |
| 1901 |
yyn = yypact[yystate]; |
| 1902 |
if (!yypact_value_is_default (yyn)) |
| 1903 |
{ |
| 1904 |
yyn += YYTERROR; |
| 1905 |
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) |
| 1906 |
{ |
| 1907 |
yyn = yytable[yyn]; |
| 1908 |
if (0 < yyn) |
| 1909 |
break; |
| 1910 |
} |
| 1911 |
} |
| 1912 |
|
| 1913 |
/* Pop the current state because it cannot handle the error token. */ |
| 1914 |
if (yyssp == yyss) |
| 1915 |
YYABORT; |
| 1916 |
|
| 1917 |
|
| 1918 |
yydestruct ("Error: popping", |
| 1919 |
yystos[yystate], yyvsp); |
| 1920 |
YYPOPSTACK (1); |
| 1921 |
yystate = *yyssp; |
| 1922 |
YY_STACK_PRINT (yyss, yyssp); |
| 1923 |
} |
| 1924 |
|
| 1925 |
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN |
| 1926 |
*++yyvsp = yylval; |
| 1927 |
YY_IGNORE_MAYBE_UNINITIALIZED_END |
| 1928 |
|
| 1929 |
|
| 1930 |
/* Shift the error token. */ |
| 1931 |
YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); |
| 1932 |
|
| 1933 |
yystate = yyn; |
| 1934 |
goto yynewstate; |
| 1935 |
|
| 1936 |
|
| 1937 |
/*-------------------------------------. |
| 1938 |
| yyacceptlab -- YYACCEPT comes here. | |
| 1939 |
`-------------------------------------*/ |
| 1940 |
yyacceptlab: |
| 1941 |
yyresult = 0; |
| 1942 |
goto yyreturn; |
| 1943 |
|
| 1944 |
/*-----------------------------------. |
| 1945 |
| yyabortlab -- YYABORT comes here. | |
| 1946 |
`-----------------------------------*/ |
| 1947 |
yyabortlab: |
| 1948 |
yyresult = 1; |
| 1949 |
goto yyreturn; |
| 1950 |
|
| 1951 |
#if !defined yyoverflow || YYERROR_VERBOSE |
| 1952 |
/*-------------------------------------------------. |
| 1953 |
| yyexhaustedlab -- memory exhaustion comes here. | |
| 1954 |
`-------------------------------------------------*/ |
| 1955 |
yyexhaustedlab: |
| 1956 |
yyerror (YY_("memory exhausted")); |
| 1957 |
yyresult = 2; |
| 1958 |
/* Fall through. */ |
| 1959 |
#endif |
| 1960 |
|
| 1961 |
yyreturn: |
| 1962 |
if (yychar != YYEMPTY) |
| 1963 |
{ |
| 1964 |
/* Make sure we have latest lookahead translation. See comments at |
| 1965 |
user semantic actions for why this is necessary. */ |
| 1966 |
yytoken = YYTRANSLATE (yychar); |
| 1967 |
yydestruct ("Cleanup: discarding lookahead", |
| 1968 |
yytoken, &yylval); |
| 1969 |
} |
| 1970 |
/* Do not reclaim the symbols of the rule whose action triggered |
| 1971 |
this YYABORT or YYACCEPT. */ |
| 1972 |
YYPOPSTACK (yylen); |
| 1973 |
YY_STACK_PRINT (yyss, yyssp); |
| 1974 |
while (yyssp != yyss) |
| 1975 |
{ |
| 1976 |
yydestruct ("Cleanup: popping", |
| 1977 |
yystos[*yyssp], yyvsp); |
| 1978 |
YYPOPSTACK (1); |
| 1979 |
} |
| 1980 |
#ifndef yyoverflow |
| 1981 |
if (yyss != yyssa) |
| 1982 |
YYSTACK_FREE (yyss); |
| 1983 |
#endif |
| 1984 |
#if YYERROR_VERBOSE |
| 1985 |
if (yymsg != yymsgbuf) |
| 1986 |
YYSTACK_FREE (yymsg); |
| 1987 |
#endif |
| 1988 |
return yyresult; |
| 1989 |
} |
| 1990 |
#line 331 "otp-parser.y" /* yacc.c:1906 */ |
| 1991 |
|