Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Testing latest pari + WASM + node.js... and it works?! Wow.

28485 views
License: GPL3
ubuntu2004
1
/* A Bison parser, made by GNU Bison 3.3.2. */
2
3
/* Bison implementation for Yacc-like parsers in C
4
5
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2019 Free Software Foundation,
6
Inc.
7
8
This program is free software: you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation, either version 3 of the License, or
11
(at your option) any later version.
12
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
17
18
You should have received a copy of the GNU General Public License
19
along with this program. If not, see <http://www.gnu.org/licenses/>. */
20
21
/* As a special exception, you may create a larger work that contains
22
part or all of the Bison parser skeleton and distribute that work
23
under terms of your choice, so long as that work isn't itself a
24
parser generator using the skeleton or a modified version thereof
25
as a parser skeleton. Alternatively, if you modify or redistribute
26
the parser skeleton itself, you may (at your option) remove this
27
special exception, which will cause the skeleton and the resulting
28
Bison output files to be licensed under the GNU General Public
29
License without this special exception.
30
31
This special exception was added by the Free Software Foundation in
32
version 2.2 of Bison. */
33
34
/* C LALR(1) parser skeleton written by Richard Stallman, by
35
simplifying the original so-called "semantic" parser. */
36
37
/* All symbols defined below should begin with yy or YY, to avoid
38
infringing on user name space. This should be done even for local
39
variables, as they might otherwise be expanded by user macros.
40
There are some unavoidable exceptions within include files to
41
define necessary library symbols; they are noted "INFRINGES ON
42
USER NAME SPACE" below. */
43
44
/* Undocumented macros, especially those whose name start with YY_,
45
are private implementation details. Do not rely on them. */
46
47
/* Identify Bison output. */
48
#define YYBISON 1
49
50
/* Bison version. */
51
#define YYBISON_VERSION "3.3.2"
52
53
/* Skeleton name. */
54
#define YYSKELETON_NAME "yacc.c"
55
56
/* Pure parsers. */
57
#define YYPURE 2
58
59
/* Push parsers. */
60
#define YYPUSH 0
61
62
/* Pull parsers. */
63
#define YYPULL 1
64
65
/* Substitute the type names. */
66
#define YYSTYPE PARI_STYPE
67
#define YYLTYPE PARI_LTYPE
68
/* Substitute the variable and function names. */
69
#define yyparse pari_parse
70
#define yylex pari_lex
71
#define yyerror pari_error
72
#define yydebug pari_debug
73
#define yynerrs pari_nerrs
74
75
76
/* First part of user prologue. */
77
#line 1 "../src/language/parse.y" /* yacc.c:337 */
78
79
/* Copyright (C) 2006 The PARI group.
80
81
This file is part of the PARI package.
82
83
PARI/GP is free software; you can redistribute it and/or modify it under the
84
terms of the GNU General Public License as published by the Free Software
85
Foundation; either version 2 of the License, or (at your option) any later
86
version. It is distributed in the hope that it will be useful, but WITHOUT
87
ANY WARRANTY WHATSOEVER.
88
89
Check the License for details. You should have received a copy of it, along
90
with the package; see the file 'COPYING'. If not, write to the Free Software
91
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
92
93
#define PARI_STYPE union token_value
94
#define PARI_LTYPE struct node_loc
95
#define YYPTRDIFF_T long
96
#define YYPTRDIFF_MAXIMUM LONG_MAX
97
#define YYSIZE_T size_t
98
#define YYLLOC_DEFAULT(Current, Rhs, N) \
99
((Current).start = ((N)?(Rhs)[1].start:(Rhs)[0].end), \
100
(Current).end = (Rhs)[N].end)
101
#include "parsec.h"
102
#define NOARG(x) newnode(Fnoarg,-1,-1,&(x))
103
#define NORANGE(x) newnode(Fnorange,-1,-1,&(x))
104
105
#line 106 "../src/language/parse.c" /* yacc.c:337 */
106
# ifndef YY_NULLPTR
107
# if defined __cplusplus
108
# if 201103L <= __cplusplus
109
# define YY_NULLPTR nullptr
110
# else
111
# define YY_NULLPTR 0
112
# endif
113
# else
114
# define YY_NULLPTR ((void*)0)
115
# endif
116
# endif
117
118
/* Enabling verbose error messages. */
119
#ifdef YYERROR_VERBOSE
120
# undef YYERROR_VERBOSE
121
# define YYERROR_VERBOSE 1
122
#else
123
# define YYERROR_VERBOSE 1
124
#endif
125
126
/* In a future release of Bison, this section will be replaced
127
by #include "parse.h". */
128
#ifndef YY_PARI_SRC_LANGUAGE_PARSE_H_INCLUDED
129
# define YY_PARI_SRC_LANGUAGE_PARSE_H_INCLUDED
130
/* Debug traces. */
131
#ifndef PARI_DEBUG
132
# if defined YYDEBUG
133
#if YYDEBUG
134
# define PARI_DEBUG 1
135
# else
136
# define PARI_DEBUG 0
137
# endif
138
# else /* ! defined YYDEBUG */
139
# define PARI_DEBUG 0
140
# endif /* ! defined YYDEBUG */
141
#endif /* ! defined PARI_DEBUG */
142
#if PARI_DEBUG
143
extern int pari_debug;
144
#endif
145
146
/* Token type. */
147
#ifndef PARI_TOKENTYPE
148
# define PARI_TOKENTYPE
149
enum pari_tokentype
150
{
151
KPARROW = 258,
152
KARROW = 259,
153
KDOTDOT = 260,
154
KPE = 261,
155
KSE = 262,
156
KME = 263,
157
KDE = 264,
158
KDRE = 265,
159
KEUCE = 266,
160
KMODE = 267,
161
KAND = 268,
162
KOR = 269,
163
KID = 270,
164
KEQ = 271,
165
KNE = 272,
166
KGE = 273,
167
KLE = 274,
168
KSRE = 275,
169
KSLE = 276,
170
KSR = 277,
171
KSL = 278,
172
KDR = 279,
173
KPP = 280,
174
KSS = 281,
175
KINTEGER = 282,
176
KREAL = 283,
177
KENTRY = 284,
178
KSTRING = 285,
179
SEQ = 286,
180
DEFFUNC = 287,
181
INT = 288,
182
LVAL = 289,
183
SIGN = 290,
184
DERIV = 291
185
};
186
#endif
187
188
/* Value type. */
189
190
/* Location type. */
191
#if ! defined PARI_LTYPE && ! defined PARI_LTYPE_IS_DECLARED
192
typedef struct PARI_LTYPE PARI_LTYPE;
193
struct PARI_LTYPE
194
{
195
int first_line;
196
int first_column;
197
int last_line;
198
int last_column;
199
};
200
# define PARI_LTYPE_IS_DECLARED 1
201
# define PARI_LTYPE_IS_TRIVIAL 1
202
#endif
203
204
205
206
int pari_parse (char **lex);
207
208
#endif /* !YY_PARI_SRC_LANGUAGE_PARSE_H_INCLUDED */
209
210
211
212
#ifdef short
213
# undef short
214
#endif
215
216
#ifdef YYTYPE_UINT8
217
typedef YYTYPE_UINT8 yytype_uint8;
218
#else
219
typedef unsigned char yytype_uint8;
220
#endif
221
222
#ifdef YYTYPE_INT8
223
typedef YYTYPE_INT8 yytype_int8;
224
#else
225
typedef signed char yytype_int8;
226
#endif
227
228
#ifdef YYTYPE_UINT16
229
typedef YYTYPE_UINT16 yytype_uint16;
230
#else
231
typedef unsigned short yytype_uint16;
232
#endif
233
234
#ifdef YYTYPE_INT16
235
typedef YYTYPE_INT16 yytype_int16;
236
#else
237
typedef short yytype_int16;
238
#endif
239
240
#ifndef YYSIZE_T
241
# ifdef __SIZE_TYPE__
242
# define YYSIZE_T __SIZE_TYPE__
243
# elif defined size_t
244
# define YYSIZE_T size_t
245
# elif ! defined YYSIZE_T
246
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
247
# define YYSIZE_T size_t
248
# else
249
# define YYSIZE_T unsigned
250
# endif
251
#endif
252
253
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
254
255
#ifndef YY_
256
# if defined YYENABLE_NLS && YYENABLE_NLS
257
# if ENABLE_NLS
258
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
259
# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
260
# endif
261
# endif
262
# ifndef YY_
263
# define YY_(Msgid) Msgid
264
# endif
265
#endif
266
267
#ifndef YY_ATTRIBUTE
268
# if (defined __GNUC__ \
269
&& (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
270
|| defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
271
# define YY_ATTRIBUTE(Spec) __attribute__(Spec)
272
# else
273
# define YY_ATTRIBUTE(Spec) /* empty */
274
# endif
275
#endif
276
277
#ifndef YY_ATTRIBUTE_PURE
278
# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
279
#endif
280
281
#ifndef YY_ATTRIBUTE_UNUSED
282
# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
283
#endif
284
285
/* Suppress unused-variable warnings by "using" E. */
286
#if ! defined lint || defined __GNUC__
287
# define YYUSE(E) ((void) (E))
288
#else
289
# define YYUSE(E) /* empty */
290
#endif
291
292
#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
293
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
294
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
295
_Pragma ("GCC diagnostic push") \
296
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
297
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
298
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
299
_Pragma ("GCC diagnostic pop")
300
#else
301
# define YY_INITIAL_VALUE(Value) Value
302
#endif
303
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
304
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
305
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
306
#endif
307
#ifndef YY_INITIAL_VALUE
308
# define YY_INITIAL_VALUE(Value) /* Nothing. */
309
#endif
310
311
312
#if ! defined yyoverflow || YYERROR_VERBOSE
313
314
/* The parser invokes alloca or malloc; define the necessary symbols. */
315
316
# ifdef YYSTACK_USE_ALLOCA
317
# if YYSTACK_USE_ALLOCA
318
# ifdef __GNUC__
319
# define YYSTACK_ALLOC __builtin_alloca
320
# elif defined __BUILTIN_VA_ARG_INCR
321
# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
322
# elif defined _AIX
323
# define YYSTACK_ALLOC __alloca
324
# elif defined _MSC_VER
325
# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
326
# define alloca _alloca
327
# else
328
# define YYSTACK_ALLOC alloca
329
# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
330
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
331
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
332
# ifndef EXIT_SUCCESS
333
# define EXIT_SUCCESS 0
334
# endif
335
# endif
336
# endif
337
# endif
338
# endif
339
340
# ifdef YYSTACK_ALLOC
341
/* Pacify GCC's 'empty if-body' warning. */
342
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
343
# ifndef YYSTACK_ALLOC_MAXIMUM
344
/* The OS might guarantee only one guard page at the bottom of the stack,
345
and a page size can be as small as 4096 bytes. So we cannot safely
346
invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
347
to allow for a few compiler-allocated temporary stack slots. */
348
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
349
# endif
350
# else
351
# define YYSTACK_ALLOC YYMALLOC
352
# define YYSTACK_FREE YYFREE
353
# ifndef YYSTACK_ALLOC_MAXIMUM
354
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
355
# endif
356
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
357
&& ! ((defined YYMALLOC || defined malloc) \
358
&& (defined YYFREE || defined free)))
359
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
360
# ifndef EXIT_SUCCESS
361
# define EXIT_SUCCESS 0
362
# endif
363
# endif
364
# ifndef YYMALLOC
365
# define YYMALLOC malloc
366
# if ! defined malloc && ! defined EXIT_SUCCESS
367
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
368
# endif
369
# endif
370
# ifndef YYFREE
371
# define YYFREE free
372
# if ! defined free && ! defined EXIT_SUCCESS
373
void free (void *); /* INFRINGES ON USER NAME SPACE */
374
# endif
375
# endif
376
# endif
377
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
378
379
380
#if (! defined yyoverflow \
381
&& (! defined __cplusplus \
382
|| (defined PARI_LTYPE_IS_TRIVIAL && PARI_LTYPE_IS_TRIVIAL \
383
&& defined PARI_STYPE_IS_TRIVIAL && PARI_STYPE_IS_TRIVIAL)))
384
385
/* A type that is properly aligned for any stack member. */
386
union yyalloc
387
{
388
yytype_int16 yyss_alloc;
389
YYSTYPE yyvs_alloc;
390
YYLTYPE yyls_alloc;
391
};
392
393
/* The size of the maximum gap between one aligned stack and the next. */
394
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
395
396
/* The size of an array large to enough to hold all stacks, each with
397
N elements. */
398
# define YYSTACK_BYTES(N) \
399
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
400
+ 2 * YYSTACK_GAP_MAXIMUM)
401
402
# define YYCOPY_NEEDED 1
403
404
/* Relocate STACK from its old location to the new one. The
405
local variables YYSIZE and YYSTACKSIZE give the old and new number of
406
elements in the stack, and YYPTR gives the new location of the
407
stack. Advance YYPTR to a properly aligned location for the next
408
stack. */
409
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
410
do \
411
{ \
412
YYSIZE_T yynewbytes; \
413
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
414
Stack = &yyptr->Stack_alloc; \
415
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
416
yyptr += yynewbytes / sizeof (*yyptr); \
417
} \
418
while (0)
419
420
#endif
421
422
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
423
/* Copy COUNT objects from SRC to DST. The source and destination do
424
not overlap. */
425
# ifndef YYCOPY
426
# if defined __GNUC__ && 1 < __GNUC__
427
# define YYCOPY(Dst, Src, Count) \
428
__builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
429
# else
430
# define YYCOPY(Dst, Src, Count) \
431
do \
432
{ \
433
YYSIZE_T yyi; \
434
for (yyi = 0; yyi < (Count); yyi++) \
435
(Dst)[yyi] = (Src)[yyi]; \
436
} \
437
while (0)
438
# endif
439
# endif
440
#endif /* !YYCOPY_NEEDED */
441
442
/* YYFINAL -- State number of the termination state. */
443
#define YYFINAL 49
444
/* YYLAST -- Last index in YYTABLE. */
445
#define YYLAST 711
446
447
/* YYNTOKENS -- Number of terminals. */
448
#define YYNTOKENS 62
449
/* YYNNTS -- Number of nonterminals. */
450
#define YYNNTS 24
451
/* YYNRULES -- Number of rules. */
452
#define YYNRULES 116
453
/* YYNSTATES -- Number of states. */
454
#define YYNSTATES 198
455
456
#define YYUNDEFTOK 2
457
#define YYMAXUTOK 291
458
459
/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
460
as returned by yylex, with out-of-bounds checking. */
461
#define YYTRANSLATE(YYX) \
462
((unsigned) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
463
464
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
465
as returned by yylex. */
466
static const yytype_uint8 yytranslate[] =
467
{
468
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
469
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
470
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
471
2, 2, 2, 50, 2, 49, 2, 43, 38, 54,
472
56, 60, 46, 41, 36, 42, 55, 45, 2, 2,
473
2, 2, 2, 2, 2, 2, 2, 2, 57, 35,
474
40, 37, 39, 2, 2, 2, 2, 2, 2, 2,
475
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
476
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
477
2, 52, 44, 58, 48, 2, 59, 2, 2, 2,
478
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
479
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
480
2, 2, 2, 2, 61, 2, 51, 2, 2, 2,
481
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
482
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
483
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
484
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
485
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
486
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
487
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
488
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
489
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
490
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
491
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
492
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
493
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
494
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
495
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
496
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
497
47, 53
498
};
499
500
#if PARI_DEBUG
501
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
502
static const yytype_uint8 yyrline[] =
503
{
504
0, 90, 90, 93, 94, 95, 96, 99, 100, 101,
505
102, 105, 106, 109, 110, 113, 114, 115, 116, 117,
506
118, 121, 122, 125, 126, 127, 128, 130, 131, 132,
507
133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
508
143, 144, 145, 146, 147, 148, 149, 150, 151, 152,
509
153, 154, 155, 156, 157, 158, 159, 160, 161, 162,
510
163, 164, 165, 166, 167, 168, 169, 170, 171, 172,
511
173, 174, 175, 176, 177, 178, 179, 180, 181, 182,
512
185, 186, 187, 190, 191, 193, 194, 197, 198, 201,
513
202, 205, 206, 207, 208, 209, 210, 213, 216, 217,
514
218, 219, 222, 225, 226, 227, 228, 229, 229, 233,
515
234, 237, 240, 243, 245, 247, 248
516
};
517
#endif
518
519
#if PARI_DEBUG || YYERROR_VERBOSE || 1
520
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
521
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
522
static const char *const yytname[] =
523
{
524
"$end", "error", "$undefined", "\")->\"", "\"->\"", "\"..\"", "\"+=\"",
525
"\"-=\"", "\"*=\"", "\"/=\"", "\"\\\\/=\"", "\"\\\\=\"", "\"%=\"",
526
"\"&&\"", "\"||\"", "\"===\"", "\"==\"", "\"!=\"", "\">=\"", "\"<=\"",
527
"\">>=\"", "\"<<=\"", "\">>\"", "\"<<\"", "\"\\\\/\"", "\"++\"",
528
"\"--\"", "\"integer\"", "\"real number\"", "\"variable name\"",
529
"\"character string\"", "SEQ", "DEFFUNC", "INT", "LVAL", "';'", "','",
530
"'='", "'&'", "'>'", "'<'", "'+'", "'-'", "'%'", "'\\\\'", "'/'", "'*'",
531
"SIGN", "'^'", "'#'", "'!'", "'~'", "'['", "DERIV", "'\\''", "'.'",
532
"'('", "':'", "']'", "'`'", "')'", "'|'", "$accept", "sequence", "seq",
533
"range", "matrix_index", "backticks", "history", "deriv", "expr",
534
"lvalue", "exprno", "matrixeltsno", "matrixelts", "matrixlines",
535
"matrix", "in", "inseq", "compr", "arg", "$@1", "listarg", "funcid",
536
"memberid", "definition", YY_NULLPTR
537
};
538
#endif
539
540
# ifdef YYPRINT
541
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
542
(internal) symbol number NUM (which must be that of a token). */
543
static const yytype_uint16 yytoknum[] =
544
{
545
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
546
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
547
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
548
285, 286, 287, 288, 289, 59, 44, 61, 38, 62,
549
60, 43, 45, 37, 92, 47, 42, 290, 94, 35,
550
33, 126, 91, 291, 39, 46, 40, 58, 93, 96,
551
41, 124
552
};
553
# endif
554
555
#define YYPACT_NINF -109
556
557
#define yypact_value_is_default(Yystate) \
558
(!!((Yystate) == (-109)))
559
560
#define YYTABLE_NINF -111
561
562
#define yytable_value_is_error(Yytable_value) \
563
0
564
565
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
566
STATE-NUM. */
567
static const yytype_int16 yypact[] =
568
{
569
655, -26, -109, 17, -109, 655, 655, -15, 655, 655,
570
112, 2, -109, 621, 33, 40, -109, 496, 234, 49,
571
-109, -109, -109, -109, 60, 621, 64, 64, -109, 12,
572
-109, 35, 81, -33, 41, 44, -109, 178, 68, -18,
573
50, -109, 77, 77, 40, 357, 257, 6, 7, -109,
574
655, 655, 655, 655, 655, 655, 655, 655, 655, 655,
575
655, 655, 655, 655, 655, 655, 655, 655, 655, 655,
576
655, -109, -109, 638, -109, 78, 621, 82, -109, 63,
577
655, 655, 655, 655, 655, 655, 655, 655, 655, 655,
578
-109, -109, 655, 93, -109, 655, -109, -23, -109, 35,
579
-109, -109, -109, 655, 77, 655, 655, -109, 655, -109,
580
-109, -32, -32, -109, 313, -109, 655, 621, 496, 539,
581
539, 575, 575, 575, 575, 575, 64, 64, 64, 539,
582
575, 575, 590, 590, 64, 64, 64, 64, 64, 655,
583
-17, 282, 86, -22, -109, -109, 40, 496, 496, 496,
584
496, 496, 496, 496, 496, 496, 496, -109, 496, 87,
585
405, -25, 57, 67, 496, -109, 496, 90, 90, 70,
586
655, 40, 69, 496, 638, -109, 655, 655, -109, 655,
587
-109, 88, 77, 655, -109, -109, 496, 85, 496, 40,
588
40, 655, -109, 451, -109, 496, 77, -109
589
};
590
591
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
592
Performed when YYTABLE does not specify something else to do. Zero
593
means the default is an error. */
594
static const yytype_uint8 yydefact[] =
595
{
596
3, 23, 24, 80, 27, 0, 0, 15, 0, 0,
597
0, 0, 25, 3, 0, 2, 29, 4, 32, 33,
598
34, 31, 77, 35, 0, 3, 70, 71, 16, 18,
599
13, 17, 50, 49, 0, 0, 91, 87, 0, 85,
600
0, 28, 0, 0, 103, 4, 32, 0, 0, 1,
601
5, 0, 0, 0, 0, 0, 0, 0, 0, 0,
602
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
603
0, 75, 73, 7, 21, 0, 3, 0, 76, 74,
604
3, 0, 0, 0, 0, 0, 0, 0, 0, 0,
605
38, 39, 0, 0, 81, 0, 26, 0, 19, 20,
606
14, 96, 93, 0, 0, 84, 86, 94, 86, 95,
607
80, 105, 106, 79, 7, 107, 3, 3, 6, 52,
608
51, 54, 55, 56, 57, 59, 64, 63, 66, 53,
609
58, 60, 62, 61, 65, 67, 68, 69, 72, 0,
610
0, 8, 112, 0, 78, 22, 115, 47, 48, 40,
611
41, 42, 43, 44, 46, 45, 37, 82, 36, 111,
612
0, 0, 98, 0, 83, 88, 87, 89, 90, 0,
613
0, 116, 0, 10, 7, 12, 0, 3, 30, 3,
614
92, 0, 0, 0, 102, 104, 108, 0, 9, 114,
615
113, 0, 100, 99, 11, 97, 0, 101
616
};
617
618
/* YYPGOTO[NTERM-NUM]. */
619
static const yytype_int8 yypgoto[] =
620
{
621
-109, -109, 11, -30, -16, 117, -109, -109, -5, -7,
622
-109, -109, -80, -109, -109, -109, -108, -109, 32, -109,
623
-9, -109, -109, -109
624
};
625
626
/* YYDEFGOTO[NTERM-NUM]. */
627
static const yytype_int16 yydefgoto[] =
628
{
629
-1, 14, 44, 140, 78, 31, 16, 79, 17, 18,
630
165, 38, 39, 40, 19, 162, 163, 20, 47, 170,
631
48, 21, 22, 23
632
};
633
634
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
635
positive, shift that token. If negative, reduce the rule whose
636
number is the opposite. If YYTABLE_NINF, syntax error. */
637
static const yytype_int16 yytable[] =
638
{
639
26, 27, 94, 32, 33, 37, 46, 115, 45, -109,
640
116, 15, 28, 117, 117, 181, 97, 106, 46, 174,
641
73, 74, 75, 76, 77, 93, 167, 73, 168, 24,
642
94, 41, 93, 49, 29, 111, 112, 159, 178, 98,
643
107, 175, -109, 117, 30, 118, 119, 120, 121, 122,
644
123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
645
133, 134, 135, 136, 137, 138, -109, 143, 141, 46,
646
115, 30, -110, 25, 192, 50, 147, 148, 149, 150,
647
151, 152, 153, 154, 155, 108, 95, 156, 197, 96,
648
158, 146, 182, 183, 100, 94, 94, 161, 160, 101,
649
164, 166, 102, 166, 105, -110, 110, 142, 109, 141,
650
46, 144, 70, 34, 71, 72, 73, 145, 74, 75,
651
76, 77, 157, 177, 179, 184, -85, 171, 185, -110,
652
191, 71, 72, 73, 173, 74, 75, 76, 77, 1,
653
2, 3, 4, 194, 187, 94, 99, 35, -86, 172,
654
0, 0, 0, 5, 6, 7, 0, 0, 0, 0,
655
0, 8, 9, 0, 10, 186, 11, 12, 13, 141,
656
36, 188, 0, 0, 0, 161, 0, 0, 193, 0,
657
0, 0, 0, 103, 0, 0, 195, 0, 189, 161,
658
190, 51, 52, 53, 54, 55, 56, 57, 0, 0,
659
58, 59, 60, 0, 0, 0, 0, 0, 0, 0,
660
0, 0, 0, 0, 0, 0, 61, 62, 63, 64,
661
65, 66, 67, 68, 69, 0, 70, 0, 71, 72,
662
73, 0, 74, 75, 76, 77, 0, 0, 80, 104,
663
81, 82, 83, 84, 85, 86, 87, 0, 0, 0,
664
0, 0, 0, 0, 88, 89, 0, 0, 0, 90,
665
91, 80, 0, 81, 82, 83, 84, 85, 86, 87,
666
0, 92, 0, 0, 0, 0, 0, 88, 89, 0,
667
0, 0, 90, 91, 0, 0, 73, 176, 0, 0,
668
0, 93, 0, 0, 92, 51, 52, 53, 54, 55,
669
56, 57, 0, 0, 58, 59, 60, 0, 0, 114,
670
0, 0, 0, 0, 93, 0, 0, 0, 169, 0,
671
61, 62, 63, 64, 65, 66, 67, 68, 69, 0,
672
70, 0, 71, 72, 73, 0, 74, 75, 76, 77,
673
1, 2, 3, 4, 0, 0, 0, 0, 0, 0,
674
0, 0, 0, 0, 5, 6, 7, 0, 0, 0,
675
0, 139, 8, 9, 0, 10, 0, 11, 12, 13,
676
51, 52, 53, 54, 55, 56, 57, 0, 0, 58,
677
59, 60, 0, 0, 0, 0, 0, 0, 0, 0,
678
0, 0, 0, 0, 0, 61, 62, 63, 64, 65,
679
66, 67, 68, 69, 0, 70, 0, 71, 72, 73,
680
0, 74, 75, 76, 77, 0, 0, 113, 51, 52,
681
53, 54, 55, 56, 57, 0, 0, 58, 59, 60,
682
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
683
0, 0, 0, 61, 62, 63, 64, 65, 66, 67,
684
68, 69, 0, 70, 0, 71, 72, 73, 0, 74,
685
75, 76, 77, 180, 51, 52, 53, 54, 55, 56,
686
57, 0, 0, 58, 59, 60, 0, 0, 0, 0,
687
0, 0, 0, 0, 0, 0, 196, 0, 0, 61,
688
62, 63, 64, 65, 66, 67, 68, 69, 0, 70,
689
0, 71, 72, 73, 0, 74, 75, 76, 77, 51,
690
52, 53, 54, 55, 56, 57, 0, 0, 58, 59,
691
60, 0, 0, 0, 0, 0, 0, 0, 0, 0,
692
0, 0, 0, 0, 61, 62, 63, 64, 65, 66,
693
67, 68, 69, 0, 70, 0, 71, 72, 73, 0,
694
74, 75, 76, 77, 53, 54, 55, 56, 57, 0,
695
0, 58, 59, 60, 0, 0, 0, 0, 0, 0,
696
0, 0, 0, 0, 0, 0, 0, 0, 62, 63,
697
64, 65, 66, 67, 68, 69, 0, 70, 0, 71,
698
72, 73, 0, 74, 75, 76, 77, 58, 59, 60,
699
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
700
0, 0, 58, 59, 60, 0, 64, 65, 66, 67,
701
68, 69, 0, 70, 0, 71, 72, 73, 0, 74,
702
75, 76, 77, 66, 67, 68, 69, 0, 70, 0,
703
71, 72, 73, 0, 74, 75, 76, 77, 1, 2,
704
3, 4, 0, 0, 0, 0, 0, 0, 0, 42,
705
0, 0, 5, 6, 7, 1, 2, 3, 4, 0,
706
8, 9, 43, 10, 0, 11, 12, 13, 0, 5,
707
6, 7, 1, 2, 3, 4, 139, 8, 9, 0,
708
10, 0, 11, 12, 13, 0, 5, 6, 7, 0,
709
0, 0, 0, 0, 8, 9, 0, 10, 0, 11,
710
12, 13
711
};
712
713
static const yytype_int16 yycheck[] =
714
{
715
5, 6, 18, 8, 9, 10, 13, 1, 13, 3,
716
3, 0, 27, 36, 36, 40, 25, 35, 25, 36,
717
52, 54, 55, 56, 57, 57, 106, 52, 108, 55,
718
46, 29, 57, 0, 49, 42, 43, 60, 60, 27,
719
58, 58, 36, 36, 59, 50, 51, 52, 53, 54,
720
55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
721
65, 66, 67, 68, 69, 70, 60, 76, 73, 76,
722
1, 59, 3, 56, 182, 35, 81, 82, 83, 84,
723
85, 86, 87, 88, 89, 35, 37, 92, 196, 29,
724
95, 80, 35, 36, 59, 111, 112, 104, 103, 58,
725
105, 106, 58, 108, 36, 36, 29, 29, 58, 114,
726
117, 29, 48, 1, 50, 51, 52, 54, 54, 55,
727
56, 57, 29, 37, 37, 58, 36, 116, 58, 60,
728
42, 50, 51, 52, 139, 54, 55, 56, 57, 27,
729
28, 29, 30, 58, 174, 161, 29, 35, 36, 117,
730
-1, -1, -1, 41, 42, 43, -1, -1, -1, -1,
731
-1, 49, 50, -1, 52, 170, 54, 55, 56, 174,
732
58, 176, -1, -1, -1, 182, -1, -1, 183, -1,
733
-1, -1, -1, 5, -1, -1, 191, -1, 177, 196,
734
179, 13, 14, 15, 16, 17, 18, 19, -1, -1,
735
22, 23, 24, -1, -1, -1, -1, -1, -1, -1,
736
-1, -1, -1, -1, -1, -1, 38, 39, 40, 41,
737
42, 43, 44, 45, 46, -1, 48, -1, 50, 51,
738
52, -1, 54, 55, 56, 57, -1, -1, 4, 61,
739
6, 7, 8, 9, 10, 11, 12, -1, -1, -1,
740
-1, -1, -1, -1, 20, 21, -1, -1, -1, 25,
741
26, 4, -1, 6, 7, 8, 9, 10, 11, 12,
742
-1, 37, -1, -1, -1, -1, -1, 20, 21, -1,
743
-1, -1, 25, 26, -1, -1, 52, 5, -1, -1,
744
-1, 57, -1, -1, 37, 13, 14, 15, 16, 17,
745
18, 19, -1, -1, 22, 23, 24, -1, -1, 52,
746
-1, -1, -1, -1, 57, -1, -1, -1, 5, -1,
747
38, 39, 40, 41, 42, 43, 44, 45, 46, -1,
748
48, -1, 50, 51, 52, -1, 54, 55, 56, 57,
749
27, 28, 29, 30, -1, -1, -1, -1, -1, -1,
750
-1, -1, -1, -1, 41, 42, 43, -1, -1, -1,
751
-1, 48, 49, 50, -1, 52, -1, 54, 55, 56,
752
13, 14, 15, 16, 17, 18, 19, -1, -1, 22,
753
23, 24, -1, -1, -1, -1, -1, -1, -1, -1,
754
-1, -1, -1, -1, -1, 38, 39, 40, 41, 42,
755
43, 44, 45, 46, -1, 48, -1, 50, 51, 52,
756
-1, 54, 55, 56, 57, -1, -1, 60, 13, 14,
757
15, 16, 17, 18, 19, -1, -1, 22, 23, 24,
758
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
759
-1, -1, -1, 38, 39, 40, 41, 42, 43, 44,
760
45, 46, -1, 48, -1, 50, 51, 52, -1, 54,
761
55, 56, 57, 58, 13, 14, 15, 16, 17, 18,
762
19, -1, -1, 22, 23, 24, -1, -1, -1, -1,
763
-1, -1, -1, -1, -1, -1, 35, -1, -1, 38,
764
39, 40, 41, 42, 43, 44, 45, 46, -1, 48,
765
-1, 50, 51, 52, -1, 54, 55, 56, 57, 13,
766
14, 15, 16, 17, 18, 19, -1, -1, 22, 23,
767
24, -1, -1, -1, -1, -1, -1, -1, -1, -1,
768
-1, -1, -1, -1, 38, 39, 40, 41, 42, 43,
769
44, 45, 46, -1, 48, -1, 50, 51, 52, -1,
770
54, 55, 56, 57, 15, 16, 17, 18, 19, -1,
771
-1, 22, 23, 24, -1, -1, -1, -1, -1, -1,
772
-1, -1, -1, -1, -1, -1, -1, -1, 39, 40,
773
41, 42, 43, 44, 45, 46, -1, 48, -1, 50,
774
51, 52, -1, 54, 55, 56, 57, 22, 23, 24,
775
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
776
-1, -1, 22, 23, 24, -1, 41, 42, 43, 44,
777
45, 46, -1, 48, -1, 50, 51, 52, -1, 54,
778
55, 56, 57, 43, 44, 45, 46, -1, 48, -1,
779
50, 51, 52, -1, 54, 55, 56, 57, 27, 28,
780
29, 30, -1, -1, -1, -1, -1, -1, -1, 38,
781
-1, -1, 41, 42, 43, 27, 28, 29, 30, -1,
782
49, 50, 51, 52, -1, 54, 55, 56, -1, 41,
783
42, 43, 27, 28, 29, 30, 48, 49, 50, -1,
784
52, -1, 54, 55, 56, -1, 41, 42, 43, -1,
785
-1, -1, -1, -1, 49, 50, -1, 52, -1, 54,
786
55, 56
787
};
788
789
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
790
symbol of state STATE-NUM. */
791
static const yytype_uint8 yystos[] =
792
{
793
0, 27, 28, 29, 30, 41, 42, 43, 49, 50,
794
52, 54, 55, 56, 63, 64, 68, 70, 71, 76,
795
79, 83, 84, 85, 55, 56, 70, 70, 27, 49,
796
59, 67, 70, 70, 1, 35, 58, 70, 73, 74,
797
75, 29, 38, 51, 64, 70, 71, 80, 82, 0,
798
35, 13, 14, 15, 16, 17, 18, 19, 22, 23,
799
24, 38, 39, 40, 41, 42, 43, 44, 45, 46,
800
48, 50, 51, 52, 54, 55, 56, 57, 66, 69,
801
4, 6, 7, 8, 9, 10, 11, 12, 20, 21,
802
25, 26, 37, 57, 66, 37, 29, 82, 27, 67,
803
59, 58, 58, 5, 61, 36, 35, 58, 35, 58,
804
29, 71, 71, 60, 52, 1, 3, 36, 70, 70,
805
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
806
70, 70, 70, 70, 70, 70, 70, 70, 70, 48,
807
65, 70, 29, 82, 29, 54, 64, 70, 70, 70,
808
70, 70, 70, 70, 70, 70, 70, 29, 70, 60,
809
70, 71, 77, 78, 70, 72, 70, 74, 74, 5,
810
81, 64, 80, 70, 36, 58, 5, 37, 60, 37,
811
58, 40, 35, 36, 58, 58, 70, 65, 70, 64,
812
64, 42, 78, 70, 58, 70, 35, 78
813
};
814
815
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
816
static const yytype_uint8 yyr1[] =
817
{
818
0, 62, 63, 64, 64, 64, 64, 65, 65, 65,
819
65, 66, 66, 67, 67, 68, 68, 68, 68, 68,
820
68, 69, 69, 70, 70, 70, 70, 70, 70, 70,
821
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
822
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
823
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
824
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
825
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
826
71, 71, 71, 72, 72, 73, 73, 74, 74, 75,
827
75, 76, 76, 76, 76, 76, 76, 77, 78, 78,
828
78, 78, 79, 80, 80, 80, 80, 81, 80, 82,
829
82, 83, 84, 85, 85, 85, 85
830
};
831
832
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
833
static const yytype_uint8 yyr2[] =
834
{
835
0, 2, 1, 0, 1, 2, 3, 0, 1, 3,
836
2, 5, 3, 1, 2, 1, 2, 2, 2, 3,
837
3, 1, 2, 1, 1, 1, 3, 1, 2, 1,
838
4, 1, 1, 1, 1, 1, 3, 3, 2, 2,
839
3, 3, 3, 3, 3, 3, 3, 3, 3, 2,
840
2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
841
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
842
2, 2, 3, 2, 2, 2, 2, 1, 3, 3,
843
1, 2, 3, 1, 0, 1, 0, 1, 3, 3,
844
3, 2, 5, 3, 3, 3, 3, 4, 1, 3,
845
3, 5, 5, 1, 4, 2, 2, 0, 4, 1,
846
3, 4, 3, 6, 5, 3, 4
847
};
848
849
850
#define yyerrok (yyerrstatus = 0)
851
#define yyclearin (yychar = YYEMPTY)
852
#define YYEMPTY (-2)
853
#define YYEOF 0
854
855
#define YYACCEPT goto yyacceptlab
856
#define YYABORT goto yyabortlab
857
#define YYERROR goto yyerrorlab
858
859
860
#define YYRECOVERING() (!!yyerrstatus)
861
862
#define YYBACKUP(Token, Value) \
863
do \
864
if (yychar == YYEMPTY) \
865
{ \
866
yychar = (Token); \
867
yylval = (Value); \
868
YYPOPSTACK (yylen); \
869
yystate = *yyssp; \
870
goto yybackup; \
871
} \
872
else \
873
{ \
874
yyerror (&yylloc, lex, YY_("syntax error: cannot back up")); \
875
YYERROR; \
876
} \
877
while (0)
878
879
/* Error token number */
880
#define YYTERROR 1
881
#define YYERRCODE 256
882
883
884
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
885
If N is 0, then set CURRENT to the empty location which ends
886
the previous symbol: RHS[0] (always defined). */
887
888
#ifndef YYLLOC_DEFAULT
889
# define YYLLOC_DEFAULT(Current, Rhs, N) \
890
do \
891
if (N) \
892
{ \
893
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
894
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
895
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
896
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
897
} \
898
else \
899
{ \
900
(Current).first_line = (Current).last_line = \
901
YYRHSLOC (Rhs, 0).last_line; \
902
(Current).first_column = (Current).last_column = \
903
YYRHSLOC (Rhs, 0).last_column; \
904
} \
905
while (0)
906
#endif
907
908
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
909
910
911
/* Enable debugging if requested. */
912
#if PARI_DEBUG
913
914
# ifndef YYFPRINTF
915
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
916
# define YYFPRINTF fprintf
917
# endif
918
919
# define YYDPRINTF(Args) \
920
do { \
921
if (yydebug) \
922
YYFPRINTF Args; \
923
} while (0)
924
925
926
/* YY_LOCATION_PRINT -- Print the location on the stream.
927
This macro was not mandated originally: define only if we know
928
we won't break user code: when these are the locations we know. */
929
930
#ifndef YY_LOCATION_PRINT
931
# if defined PARI_LTYPE_IS_TRIVIAL && PARI_LTYPE_IS_TRIVIAL
932
933
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
934
935
YY_ATTRIBUTE_UNUSED
936
static int
937
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
938
{
939
int res = 0;
940
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
941
if (0 <= yylocp->first_line)
942
{
943
res += YYFPRINTF (yyo, "%d", yylocp->first_line);
944
if (0 <= yylocp->first_column)
945
res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
946
}
947
if (0 <= yylocp->last_line)
948
{
949
if (yylocp->first_line < yylocp->last_line)
950
{
951
res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
952
if (0 <= end_col)
953
res += YYFPRINTF (yyo, ".%d", end_col);
954
}
955
else if (0 <= end_col && yylocp->first_column < end_col)
956
res += YYFPRINTF (yyo, "-%d", end_col);
957
}
958
return res;
959
}
960
961
# define YY_LOCATION_PRINT(File, Loc) \
962
yy_location_print_ (File, &(Loc))
963
964
# else
965
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
966
# endif
967
#endif
968
969
970
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
971
do { \
972
if (yydebug) \
973
{ \
974
YYFPRINTF (stderr, "%s ", Title); \
975
yy_symbol_print (stderr, \
976
Type, Value, Location, lex); \
977
YYFPRINTF (stderr, "\n"); \
978
} \
979
} while (0)
980
981
982
/*-----------------------------------.
983
| Print this symbol's value on YYO. |
984
`-----------------------------------*/
985
986
static void
987
yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, char **lex)
988
{
989
FILE *yyoutput = yyo;
990
YYUSE (yyoutput);
991
YYUSE (yylocationp);
992
YYUSE (lex);
993
if (!yyvaluep)
994
return;
995
# ifdef YYPRINT
996
if (yytype < YYNTOKENS)
997
YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
998
# endif
999
YYUSE (yytype);
1000
}
1001
1002
1003
/*---------------------------.
1004
| Print this symbol on YYO. |
1005
`---------------------------*/
1006
1007
static void
1008
yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, char **lex)
1009
{
1010
YYFPRINTF (yyo, "%s %s (",
1011
yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1012
1013
YY_LOCATION_PRINT (yyo, *yylocationp);
1014
YYFPRINTF (yyo, ": ");
1015
yy_symbol_value_print (yyo, yytype, yyvaluep, yylocationp, lex);
1016
YYFPRINTF (yyo, ")");
1017
}
1018
1019
/*------------------------------------------------------------------.
1020
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1021
| TOP (included). |
1022
`------------------------------------------------------------------*/
1023
1024
static void
1025
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1026
{
1027
YYFPRINTF (stderr, "Stack now");
1028
for (; yybottom <= yytop; yybottom++)
1029
{
1030
int yybot = *yybottom;
1031
YYFPRINTF (stderr, " %d", yybot);
1032
}
1033
YYFPRINTF (stderr, "\n");
1034
}
1035
1036
# define YY_STACK_PRINT(Bottom, Top) \
1037
do { \
1038
if (yydebug) \
1039
yy_stack_print ((Bottom), (Top)); \
1040
} while (0)
1041
1042
1043
/*------------------------------------------------.
1044
| Report that the YYRULE is going to be reduced. |
1045
`------------------------------------------------*/
1046
1047
static void
1048
yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, char **lex)
1049
{
1050
unsigned long yylno = yyrline[yyrule];
1051
int yynrhs = yyr2[yyrule];
1052
int yyi;
1053
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1054
yyrule - 1, yylno);
1055
/* The symbols being reduced. */
1056
for (yyi = 0; yyi < yynrhs; yyi++)
1057
{
1058
YYFPRINTF (stderr, " $%d = ", yyi + 1);
1059
yy_symbol_print (stderr,
1060
yystos[yyssp[yyi + 1 - yynrhs]],
1061
&yyvsp[(yyi + 1) - (yynrhs)]
1062
, &(yylsp[(yyi + 1) - (yynrhs)]) , lex);
1063
YYFPRINTF (stderr, "\n");
1064
}
1065
}
1066
1067
# define YY_REDUCE_PRINT(Rule) \
1068
do { \
1069
if (yydebug) \
1070
yy_reduce_print (yyssp, yyvsp, yylsp, Rule, lex); \
1071
} while (0)
1072
1073
/* Nonzero means print parse trace. It is left uninitialized so that
1074
multiple parsers can coexist. */
1075
int yydebug;
1076
#else /* !PARI_DEBUG */
1077
# define YYDPRINTF(Args)
1078
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1079
# define YY_STACK_PRINT(Bottom, Top)
1080
# define YY_REDUCE_PRINT(Rule)
1081
#endif /* !PARI_DEBUG */
1082
1083
1084
/* YYINITDEPTH -- initial size of the parser's stacks. */
1085
#ifndef YYINITDEPTH
1086
# define YYINITDEPTH 200
1087
#endif
1088
1089
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1090
if the built-in stack extension method is used).
1091
1092
Do not make this value too large; the results are undefined if
1093
YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1094
evaluated with infinite-precision integer arithmetic. */
1095
1096
#ifndef YYMAXDEPTH
1097
# define YYMAXDEPTH 10000
1098
#endif
1099
1100
1101
#if YYERROR_VERBOSE
1102
1103
# ifndef yystrlen
1104
# if defined __GLIBC__ && defined _STRING_H
1105
# define yystrlen strlen
1106
# else
1107
/* Return the length of YYSTR. */
1108
static YYSIZE_T
1109
yystrlen (const char *yystr)
1110
{
1111
YYSIZE_T yylen;
1112
for (yylen = 0; yystr[yylen]; yylen++)
1113
continue;
1114
return yylen;
1115
}
1116
# endif
1117
# endif
1118
1119
# ifndef yystpcpy
1120
# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1121
# define yystpcpy stpcpy
1122
# else
1123
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1124
YYDEST. */
1125
static char *
1126
yystpcpy (char *yydest, const char *yysrc)
1127
{
1128
char *yyd = yydest;
1129
const char *yys = yysrc;
1130
1131
while ((*yyd++ = *yys++) != '\0')
1132
continue;
1133
1134
return yyd - 1;
1135
}
1136
# endif
1137
# endif
1138
1139
# ifndef yytnamerr
1140
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1141
quotes and backslashes, so that it's suitable for yyerror. The
1142
heuristic is that double-quoting is unnecessary unless the string
1143
contains an apostrophe, a comma, or backslash (other than
1144
backslash-backslash). YYSTR is taken from yytname. If YYRES is
1145
null, do not copy; instead, return the length of what the result
1146
would have been. */
1147
static YYSIZE_T
1148
yytnamerr (char *yyres, const char *yystr)
1149
{
1150
if (*yystr == '"')
1151
{
1152
YYSIZE_T yyn = 0;
1153
char const *yyp = yystr;
1154
1155
for (;;)
1156
switch (*++yyp)
1157
{
1158
case '\'':
1159
case ',':
1160
goto do_not_strip_quotes;
1161
1162
case '\\':
1163
if (*++yyp != '\\')
1164
goto do_not_strip_quotes;
1165
else
1166
goto append;
1167
1168
append:
1169
default:
1170
if (yyres)
1171
yyres[yyn] = *yyp;
1172
yyn++;
1173
break;
1174
1175
case '"':
1176
if (yyres)
1177
yyres[yyn] = '\0';
1178
return yyn;
1179
}
1180
do_not_strip_quotes: ;
1181
}
1182
1183
if (! yyres)
1184
return yystrlen (yystr);
1185
1186
return (YYSIZE_T) (yystpcpy (yyres, yystr) - yyres);
1187
}
1188
# endif
1189
1190
/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1191
about the unexpected token YYTOKEN for the state stack whose top is
1192
YYSSP.
1193
1194
Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1195
not large enough to hold the message. In that case, also set
1196
*YYMSG_ALLOC to the required number of bytes. Return 2 if the
1197
required number of bytes is too large to store. */
1198
static int
1199
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1200
yytype_int16 *yyssp, int yytoken)
1201
{
1202
YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1203
YYSIZE_T yysize = yysize0;
1204
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1205
/* Internationalized format string. */
1206
const char *yyformat = YY_NULLPTR;
1207
/* Arguments of yyformat. */
1208
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1209
/* Number of reported tokens (one for the "unexpected", one per
1210
"expected"). */
1211
int yycount = 0;
1212
1213
/* There are many possibilities here to consider:
1214
- If this state is a consistent state with a default action, then
1215
the only way this function was invoked is if the default action
1216
is an error action. In that case, don't check for expected
1217
tokens because there are none.
1218
- The only way there can be no lookahead present (in yychar) is if
1219
this state is a consistent state with a default action. Thus,
1220
detecting the absence of a lookahead is sufficient to determine
1221
that there is no unexpected or expected token to report. In that
1222
case, just report a simple "syntax error".
1223
- Don't assume there isn't a lookahead just because this state is a
1224
consistent state with a default action. There might have been a
1225
previous inconsistent state, consistent state with a non-default
1226
action, or user semantic action that manipulated yychar.
1227
- Of course, the expected token list depends on states to have
1228
correct lookahead information, and it depends on the parser not
1229
to perform extra reductions after fetching a lookahead from the
1230
scanner and before detecting a syntax error. Thus, state merging
1231
(from LALR or IELR) and default reductions corrupt the expected
1232
token list. However, the list is correct for canonical LR with
1233
one exception: it will still contain any token that will not be
1234
accepted due to an error action in a later state.
1235
*/
1236
if (yytoken != YYEMPTY)
1237
{
1238
int yyn = yypact[*yyssp];
1239
yyarg[yycount++] = yytname[yytoken];
1240
if (!yypact_value_is_default (yyn))
1241
{
1242
/* Start YYX at -YYN if negative to avoid negative indexes in
1243
YYCHECK. In other words, skip the first -YYN actions for
1244
this state because they are default actions. */
1245
int yyxbegin = yyn < 0 ? -yyn : 0;
1246
/* Stay within bounds of both yycheck and yytname. */
1247
int yychecklim = YYLAST - yyn + 1;
1248
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1249
int yyx;
1250
1251
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1252
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1253
&& !yytable_value_is_error (yytable[yyx + yyn]))
1254
{
1255
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1256
{
1257
yycount = 1;
1258
yysize = yysize0;
1259
break;
1260
}
1261
yyarg[yycount++] = yytname[yyx];
1262
{
1263
YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1264
if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1265
yysize = yysize1;
1266
else
1267
return 2;
1268
}
1269
}
1270
}
1271
}
1272
1273
switch (yycount)
1274
{
1275
# define YYCASE_(N, S) \
1276
case N: \
1277
yyformat = S; \
1278
break
1279
default: /* Avoid compiler warnings. */
1280
YYCASE_(0, YY_("syntax error"));
1281
YYCASE_(1, YY_("syntax error, unexpected %s"));
1282
YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1283
YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1284
YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1285
YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1286
# undef YYCASE_
1287
}
1288
1289
{
1290
YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1291
if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1292
yysize = yysize1;
1293
else
1294
return 2;
1295
}
1296
1297
if (*yymsg_alloc < yysize)
1298
{
1299
*yymsg_alloc = 2 * yysize;
1300
if (! (yysize <= *yymsg_alloc
1301
&& *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1302
*yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1303
return 1;
1304
}
1305
1306
/* Avoid sprintf, as that infringes on the user's name space.
1307
Don't have undefined behavior even if the translation
1308
produced a string with the wrong number of "%s"s. */
1309
{
1310
char *yyp = *yymsg;
1311
int yyi = 0;
1312
while ((*yyp = *yyformat) != '\0')
1313
if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1314
{
1315
yyp += yytnamerr (yyp, yyarg[yyi++]);
1316
yyformat += 2;
1317
}
1318
else
1319
{
1320
yyp++;
1321
yyformat++;
1322
}
1323
}
1324
return 0;
1325
}
1326
#endif /* YYERROR_VERBOSE */
1327
1328
/*-----------------------------------------------.
1329
| Release the memory associated to this symbol. |
1330
`-----------------------------------------------*/
1331
1332
static void
1333
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, char **lex)
1334
{
1335
YYUSE (yyvaluep);
1336
YYUSE (yylocationp);
1337
YYUSE (lex);
1338
if (!yymsg)
1339
yymsg = "Deleting";
1340
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1341
1342
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1343
switch (yytype)
1344
{
1345
case 64: /* seq */
1346
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1347
{ pari_discarded++; }
1348
#line 1349 "../src/language/parse.c" /* yacc.c:1257 */
1349
break;
1350
1351
case 65: /* range */
1352
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1353
{ pari_discarded++; }
1354
#line 1355 "../src/language/parse.c" /* yacc.c:1257 */
1355
break;
1356
1357
case 66: /* matrix_index */
1358
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1359
{ pari_discarded++; }
1360
#line 1361 "../src/language/parse.c" /* yacc.c:1257 */
1361
break;
1362
1363
case 67: /* backticks */
1364
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1365
{ pari_discarded++; }
1366
#line 1367 "../src/language/parse.c" /* yacc.c:1257 */
1367
break;
1368
1369
case 68: /* history */
1370
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1371
{ pari_discarded++; }
1372
#line 1373 "../src/language/parse.c" /* yacc.c:1257 */
1373
break;
1374
1375
case 69: /* deriv */
1376
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1377
{ pari_discarded++; }
1378
#line 1379 "../src/language/parse.c" /* yacc.c:1257 */
1379
break;
1380
1381
case 70: /* expr */
1382
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1383
{ pari_discarded++; }
1384
#line 1385 "../src/language/parse.c" /* yacc.c:1257 */
1385
break;
1386
1387
case 71: /* lvalue */
1388
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1389
{ pari_discarded++; }
1390
#line 1391 "../src/language/parse.c" /* yacc.c:1257 */
1391
break;
1392
1393
case 72: /* exprno */
1394
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1395
{ pari_discarded++; }
1396
#line 1397 "../src/language/parse.c" /* yacc.c:1257 */
1397
break;
1398
1399
case 73: /* matrixeltsno */
1400
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1401
{ pari_discarded++; }
1402
#line 1403 "../src/language/parse.c" /* yacc.c:1257 */
1403
break;
1404
1405
case 74: /* matrixelts */
1406
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1407
{ pari_discarded++; }
1408
#line 1409 "../src/language/parse.c" /* yacc.c:1257 */
1409
break;
1410
1411
case 75: /* matrixlines */
1412
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1413
{ pari_discarded++; }
1414
#line 1415 "../src/language/parse.c" /* yacc.c:1257 */
1415
break;
1416
1417
case 76: /* matrix */
1418
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1419
{ pari_discarded++; }
1420
#line 1421 "../src/language/parse.c" /* yacc.c:1257 */
1421
break;
1422
1423
case 77: /* in */
1424
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1425
{ pari_discarded++; }
1426
#line 1427 "../src/language/parse.c" /* yacc.c:1257 */
1427
break;
1428
1429
case 78: /* inseq */
1430
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1431
{ pari_discarded++; }
1432
#line 1433 "../src/language/parse.c" /* yacc.c:1257 */
1433
break;
1434
1435
case 79: /* compr */
1436
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1437
{ pari_discarded++; }
1438
#line 1439 "../src/language/parse.c" /* yacc.c:1257 */
1439
break;
1440
1441
case 80: /* arg */
1442
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1443
{ pari_discarded++; }
1444
#line 1445 "../src/language/parse.c" /* yacc.c:1257 */
1445
break;
1446
1447
case 82: /* listarg */
1448
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1449
{ pari_discarded++; }
1450
#line 1451 "../src/language/parse.c" /* yacc.c:1257 */
1451
break;
1452
1453
case 83: /* funcid */
1454
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1455
{ pari_discarded++; }
1456
#line 1457 "../src/language/parse.c" /* yacc.c:1257 */
1457
break;
1458
1459
case 84: /* memberid */
1460
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1461
{ pari_discarded++; }
1462
#line 1463 "../src/language/parse.c" /* yacc.c:1257 */
1463
break;
1464
1465
case 85: /* definition */
1466
#line 87 "../src/language/parse.y" /* yacc.c:1257 */
1467
{ pari_discarded++; }
1468
#line 1469 "../src/language/parse.c" /* yacc.c:1257 */
1469
break;
1470
1471
default:
1472
break;
1473
}
1474
YY_IGNORE_MAYBE_UNINITIALIZED_END
1475
}
1476
1477
1478
1479
1480
/*----------.
1481
| yyparse. |
1482
`----------*/
1483
1484
int
1485
yyparse (char **lex)
1486
{
1487
/* The lookahead symbol. */
1488
int yychar;
1489
1490
1491
/* The semantic value of the lookahead symbol. */
1492
/* Default value used for initialization, for pacifying older GCCs
1493
or non-GCC compilers. */
1494
YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
1495
YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
1496
1497
/* Location data for the lookahead symbol. */
1498
static YYLTYPE yyloc_default
1499
# if defined PARI_LTYPE_IS_TRIVIAL && PARI_LTYPE_IS_TRIVIAL
1500
= { 1, 1, 1, 1 }
1501
# endif
1502
;
1503
YYLTYPE yylloc = yyloc_default;
1504
1505
/* Number of syntax errors so far. */
1506
int yynerrs;
1507
1508
int yystate;
1509
/* Number of tokens to shift before error messages enabled. */
1510
int yyerrstatus;
1511
1512
/* The stacks and their tools:
1513
'yyss': related to states.
1514
'yyvs': related to semantic values.
1515
'yyls': related to locations.
1516
1517
Refer to the stacks through separate pointers, to allow yyoverflow
1518
to reallocate them elsewhere. */
1519
1520
/* The state stack. */
1521
yytype_int16 yyssa[YYINITDEPTH];
1522
yytype_int16 *yyss;
1523
yytype_int16 *yyssp;
1524
1525
/* The semantic value stack. */
1526
YYSTYPE yyvsa[YYINITDEPTH];
1527
YYSTYPE *yyvs;
1528
YYSTYPE *yyvsp;
1529
1530
/* The location stack. */
1531
YYLTYPE yylsa[YYINITDEPTH];
1532
YYLTYPE *yyls;
1533
YYLTYPE *yylsp;
1534
1535
/* The locations where the error started and ended. */
1536
YYLTYPE yyerror_range[3];
1537
1538
YYSIZE_T yystacksize;
1539
1540
int yyn;
1541
int yyresult;
1542
/* Lookahead token as an internal (translated) token number. */
1543
int yytoken = 0;
1544
/* The variables used to return semantic value and location from the
1545
action routines. */
1546
YYSTYPE yyval;
1547
YYLTYPE yyloc;
1548
1549
#if YYERROR_VERBOSE
1550
/* Buffer for error messages, and its allocated size. */
1551
char yymsgbuf[128];
1552
char *yymsg = yymsgbuf;
1553
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1554
#endif
1555
1556
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1557
1558
/* The number of symbols on the RHS of the reduced rule.
1559
Keep to zero when no symbol should be popped. */
1560
int yylen = 0;
1561
1562
yyssp = yyss = yyssa;
1563
yyvsp = yyvs = yyvsa;
1564
yylsp = yyls = yylsa;
1565
yystacksize = YYINITDEPTH;
1566
1567
YYDPRINTF ((stderr, "Starting parse\n"));
1568
1569
yystate = 0;
1570
yyerrstatus = 0;
1571
yynerrs = 0;
1572
yychar = YYEMPTY; /* Cause a token to be read. */
1573
1574
/* User initialization code. */
1575
#line 33 "../src/language/parse.y" /* yacc.c:1431 */
1576
{ yylloc.start=yylloc.end=*lex; }
1577
1578
#line 1579 "../src/language/parse.c" /* yacc.c:1431 */
1579
yylsp[0] = yylloc;
1580
goto yysetstate;
1581
1582
1583
/*------------------------------------------------------------.
1584
| yynewstate -- push a new state, which is found in yystate. |
1585
`------------------------------------------------------------*/
1586
yynewstate:
1587
/* In all cases, when you get here, the value and location stacks
1588
have just been pushed. So pushing a state here evens the stacks. */
1589
yyssp++;
1590
1591
1592
/*--------------------------------------------------------------------.
1593
| yynewstate -- set current state (the top of the stack) to yystate. |
1594
`--------------------------------------------------------------------*/
1595
yysetstate:
1596
*yyssp = (yytype_int16) yystate;
1597
1598
if (yyss + yystacksize - 1 <= yyssp)
1599
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1600
goto yyexhaustedlab;
1601
#else
1602
{
1603
/* Get the current used size of the three stacks, in elements. */
1604
YYSIZE_T yysize = (YYSIZE_T) (yyssp - yyss + 1);
1605
1606
# if defined yyoverflow
1607
{
1608
/* Give user a chance to reallocate the stack. Use copies of
1609
these so that the &'s don't force the real ones into
1610
memory. */
1611
YYSTYPE *yyvs1 = yyvs;
1612
yytype_int16 *yyss1 = yyss;
1613
YYLTYPE *yyls1 = yyls;
1614
1615
/* Each stack pointer address is followed by the size of the
1616
data in use in that stack, in bytes. This used to be a
1617
conditional around just the two extra args, but that might
1618
be undefined if yyoverflow is a macro. */
1619
yyoverflow (YY_("memory exhausted"),
1620
&yyss1, yysize * sizeof (*yyssp),
1621
&yyvs1, yysize * sizeof (*yyvsp),
1622
&yyls1, yysize * sizeof (*yylsp),
1623
&yystacksize);
1624
yyss = yyss1;
1625
yyvs = yyvs1;
1626
yyls = yyls1;
1627
}
1628
# else /* defined YYSTACK_RELOCATE */
1629
/* Extend the stack our own way. */
1630
if (YYMAXDEPTH <= yystacksize)
1631
goto yyexhaustedlab;
1632
yystacksize *= 2;
1633
if (YYMAXDEPTH < yystacksize)
1634
yystacksize = YYMAXDEPTH;
1635
1636
{
1637
yytype_int16 *yyss1 = yyss;
1638
union yyalloc *yyptr =
1639
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1640
if (! yyptr)
1641
goto yyexhaustedlab;
1642
YYSTACK_RELOCATE (yyss_alloc, yyss);
1643
YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1644
YYSTACK_RELOCATE (yyls_alloc, yyls);
1645
# undef YYSTACK_RELOCATE
1646
if (yyss1 != yyssa)
1647
YYSTACK_FREE (yyss1);
1648
}
1649
# endif
1650
1651
yyssp = yyss + yysize - 1;
1652
yyvsp = yyvs + yysize - 1;
1653
yylsp = yyls + yysize - 1;
1654
1655
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1656
(unsigned long) yystacksize));
1657
1658
if (yyss + yystacksize - 1 <= yyssp)
1659
YYABORT;
1660
}
1661
#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1662
1663
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1664
1665
if (yystate == YYFINAL)
1666
YYACCEPT;
1667
1668
goto yybackup;
1669
1670
1671
/*-----------.
1672
| yybackup. |
1673
`-----------*/
1674
yybackup:
1675
/* Do appropriate processing given the current state. Read a
1676
lookahead token if we need one and don't already have one. */
1677
1678
/* First try to decide what to do without reference to lookahead token. */
1679
yyn = yypact[yystate];
1680
if (yypact_value_is_default (yyn))
1681
goto yydefault;
1682
1683
/* Not known => get a lookahead token if don't already have one. */
1684
1685
/* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1686
if (yychar == YYEMPTY)
1687
{
1688
YYDPRINTF ((stderr, "Reading a token: "));
1689
yychar = yylex (&yylval, &yylloc, lex);
1690
}
1691
1692
if (yychar <= YYEOF)
1693
{
1694
yychar = yytoken = YYEOF;
1695
YYDPRINTF ((stderr, "Now at end of input.\n"));
1696
}
1697
else
1698
{
1699
yytoken = YYTRANSLATE (yychar);
1700
YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1701
}
1702
1703
/* If the proper action on seeing token YYTOKEN is to reduce or to
1704
detect an error, take that action. */
1705
yyn += yytoken;
1706
if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1707
goto yydefault;
1708
yyn = yytable[yyn];
1709
if (yyn <= 0)
1710
{
1711
if (yytable_value_is_error (yyn))
1712
goto yyerrlab;
1713
yyn = -yyn;
1714
goto yyreduce;
1715
}
1716
1717
/* Count tokens shifted since error; after three, turn off error
1718
status. */
1719
if (yyerrstatus)
1720
yyerrstatus--;
1721
1722
/* Shift the lookahead token. */
1723
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1724
1725
/* Discard the shifted token. */
1726
yychar = YYEMPTY;
1727
1728
yystate = yyn;
1729
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1730
*++yyvsp = yylval;
1731
YY_IGNORE_MAYBE_UNINITIALIZED_END
1732
*++yylsp = yylloc;
1733
goto yynewstate;
1734
1735
1736
/*-----------------------------------------------------------.
1737
| yydefault -- do the default action for the current state. |
1738
`-----------------------------------------------------------*/
1739
yydefault:
1740
yyn = yydefact[yystate];
1741
if (yyn == 0)
1742
goto yyerrlab;
1743
goto yyreduce;
1744
1745
1746
/*-----------------------------.
1747
| yyreduce -- do a reduction. |
1748
`-----------------------------*/
1749
yyreduce:
1750
/* yyn is the number of a rule to reduce with. */
1751
yylen = yyr2[yyn];
1752
1753
/* If YYLEN is nonzero, implement the default value of the action:
1754
'$$ = $1'.
1755
1756
Otherwise, the following line sets YYVAL to garbage.
1757
This behavior is undocumented and Bison
1758
users should not rely upon it. Assigning to YYVAL
1759
unconditionally makes the parser a bit smaller, and it avoids a
1760
GCC warning that YYVAL may be used uninitialized. */
1761
yyval = yyvsp[1-yylen];
1762
1763
/* Default location. */
1764
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
1765
yyerror_range[1] = yyloc;
1766
YY_REDUCE_PRINT (yyn);
1767
switch (yyn)
1768
{
1769
case 2:
1770
#line 90 "../src/language/parse.y" /* yacc.c:1652 */
1771
{(yyval.val)=(yyvsp[0].val);}
1772
#line 1773 "../src/language/parse.c" /* yacc.c:1652 */
1773
break;
1774
1775
case 3:
1776
#line 93 "../src/language/parse.y" /* yacc.c:1652 */
1777
{(yyval.val)=NOARG((yyloc));}
1778
#line 1779 "../src/language/parse.c" /* yacc.c:1652 */
1779
break;
1780
1781
case 4:
1782
#line 94 "../src/language/parse.y" /* yacc.c:1652 */
1783
{(yyval.val)=(yyvsp[0].val);}
1784
#line 1785 "../src/language/parse.c" /* yacc.c:1652 */
1785
break;
1786
1787
case 5:
1788
#line 95 "../src/language/parse.y" /* yacc.c:1652 */
1789
{(yyval.val)=(yyvsp[-1].val); (yyloc)=(yylsp[-1]);}
1790
#line 1791 "../src/language/parse.c" /* yacc.c:1652 */
1791
break;
1792
1793
case 6:
1794
#line 96 "../src/language/parse.y" /* yacc.c:1652 */
1795
{(yyval.val)=newnode(Fseq,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
1796
#line 1797 "../src/language/parse.c" /* yacc.c:1652 */
1797
break;
1798
1799
case 7:
1800
#line 99 "../src/language/parse.y" /* yacc.c:1652 */
1801
{ (yyval.val)=newnode(Frange,NORANGE((yyloc)),NORANGE((yyloc)),&(yyloc)); }
1802
#line 1803 "../src/language/parse.c" /* yacc.c:1652 */
1803
break;
1804
1805
case 8:
1806
#line 100 "../src/language/parse.y" /* yacc.c:1652 */
1807
{ (yyval.val)=newnode(Frange,(yyvsp[0].val),NORANGE((yyloc)),&(yyloc)); }
1808
#line 1809 "../src/language/parse.c" /* yacc.c:1652 */
1809
break;
1810
1811
case 9:
1812
#line 101 "../src/language/parse.y" /* yacc.c:1652 */
1813
{ (yyval.val)=newnode(Frange,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc)); }
1814
#line 1815 "../src/language/parse.c" /* yacc.c:1652 */
1815
break;
1816
1817
case 10:
1818
#line 102 "../src/language/parse.y" /* yacc.c:1652 */
1819
{ (yyval.val)=newnode(Frange,NORANGE((yyloc)),(yyvsp[0].val),&(yyloc)); }
1820
#line 1821 "../src/language/parse.c" /* yacc.c:1652 */
1821
break;
1822
1823
case 11:
1824
#line 105 "../src/language/parse.y" /* yacc.c:1652 */
1825
{(yyval.val)=newnode(Fmatrix,(yyvsp[-3].val),(yyvsp[-1].val),&(yyloc));}
1826
#line 1827 "../src/language/parse.c" /* yacc.c:1652 */
1827
break;
1828
1829
case 12:
1830
#line 106 "../src/language/parse.y" /* yacc.c:1652 */
1831
{(yyval.val)=newnode(Fmatrix,(yyvsp[-1].val),-1,&(yyloc));}
1832
#line 1833 "../src/language/parse.c" /* yacc.c:1652 */
1833
break;
1834
1835
case 13:
1836
#line 109 "../src/language/parse.y" /* yacc.c:1652 */
1837
{(yyval.val)=1;}
1838
#line 1839 "../src/language/parse.c" /* yacc.c:1652 */
1839
break;
1840
1841
case 14:
1842
#line 110 "../src/language/parse.y" /* yacc.c:1652 */
1843
{(yyval.val)=(yyvsp[-1].val)+1;}
1844
#line 1845 "../src/language/parse.c" /* yacc.c:1652 */
1845
break;
1846
1847
case 15:
1848
#line 113 "../src/language/parse.y" /* yacc.c:1652 */
1849
{(yyval.val)=newopcall(OPhist,-1,-1,&(yyloc));}
1850
#line 1851 "../src/language/parse.c" /* yacc.c:1652 */
1851
break;
1852
1853
case 16:
1854
#line 114 "../src/language/parse.y" /* yacc.c:1652 */
1855
{(yyval.val)=newopcall(OPhist,newintnode(&(yylsp[0])),-1,&(yyloc));}
1856
#line 1857 "../src/language/parse.c" /* yacc.c:1652 */
1857
break;
1858
1859
case 17:
1860
#line 115 "../src/language/parse.y" /* yacc.c:1652 */
1861
{(yyval.val)=newopcall(OPhist,newnode(Fsmall,-(yyvsp[0].val),-1,&(yyloc)),-1,&(yyloc));}
1862
#line 1863 "../src/language/parse.c" /* yacc.c:1652 */
1863
break;
1864
1865
case 18:
1866
#line 116 "../src/language/parse.y" /* yacc.c:1652 */
1867
{(yyval.val)=newopcall(OPhisttime,-1,-1,&(yyloc));}
1868
#line 1869 "../src/language/parse.c" /* yacc.c:1652 */
1869
break;
1870
1871
case 19:
1872
#line 117 "../src/language/parse.y" /* yacc.c:1652 */
1873
{(yyval.val)=newopcall(OPhisttime,newintnode(&(yylsp[0])),-1,&(yyloc));}
1874
#line 1875 "../src/language/parse.c" /* yacc.c:1652 */
1875
break;
1876
1877
case 20:
1878
#line 118 "../src/language/parse.y" /* yacc.c:1652 */
1879
{(yyval.val)=newopcall(OPhisttime,newnode(Fsmall,-(yyvsp[0].val),-1,&(yyloc)),-1,&(yyloc));}
1880
#line 1881 "../src/language/parse.c" /* yacc.c:1652 */
1881
break;
1882
1883
case 21:
1884
#line 121 "../src/language/parse.y" /* yacc.c:1652 */
1885
{(yyval.val) = 1;}
1886
#line 1887 "../src/language/parse.c" /* yacc.c:1652 */
1887
break;
1888
1889
case 22:
1890
#line 122 "../src/language/parse.y" /* yacc.c:1652 */
1891
{(yyval.val) = (yyvsp[-1].val)+1;}
1892
#line 1893 "../src/language/parse.c" /* yacc.c:1652 */
1893
break;
1894
1895
case 23:
1896
#line 125 "../src/language/parse.y" /* yacc.c:1652 */
1897
{(yyval.val)=newintnode(&(yylsp[0]));}
1898
#line 1899 "../src/language/parse.c" /* yacc.c:1652 */
1899
break;
1900
1901
case 24:
1902
#line 126 "../src/language/parse.y" /* yacc.c:1652 */
1903
{(yyval.val)=newconst(CSTreal,&(yyloc));}
1904
#line 1905 "../src/language/parse.c" /* yacc.c:1652 */
1905
break;
1906
1907
case 25:
1908
#line 127 "../src/language/parse.y" /* yacc.c:1652 */
1909
{(yyval.val)=newconst(CSTreal,&(yyloc));}
1910
#line 1911 "../src/language/parse.c" /* yacc.c:1652 */
1911
break;
1912
1913
case 26:
1914
#line 128 "../src/language/parse.y" /* yacc.c:1652 */
1915
{(yyval.val)=newnode(Ffunction,newconst(CSTmember,&(yylsp[0])),
1916
newintnode(&(yylsp[-2])),&(yyloc));}
1917
#line 1918 "../src/language/parse.c" /* yacc.c:1652 */
1918
break;
1919
1920
case 27:
1921
#line 130 "../src/language/parse.y" /* yacc.c:1652 */
1922
{(yyval.val)=newconst(CSTstr,&(yyloc));}
1923
#line 1924 "../src/language/parse.c" /* yacc.c:1652 */
1924
break;
1925
1926
case 28:
1927
#line 131 "../src/language/parse.y" /* yacc.c:1652 */
1928
{(yyval.val)=newconst(CSTquote,&(yyloc));}
1929
#line 1930 "../src/language/parse.c" /* yacc.c:1652 */
1930
break;
1931
1932
case 29:
1933
#line 132 "../src/language/parse.y" /* yacc.c:1652 */
1934
{(yyval.val)=(yyvsp[0].val);}
1935
#line 1936 "../src/language/parse.c" /* yacc.c:1652 */
1936
break;
1937
1938
case 30:
1939
#line 133 "../src/language/parse.y" /* yacc.c:1652 */
1940
{(yyval.val)=newnode(Fcall,(yyvsp[-3].val),(yyvsp[-1].val),&(yyloc));}
1941
#line 1942 "../src/language/parse.c" /* yacc.c:1652 */
1942
break;
1943
1944
case 31:
1945
#line 134 "../src/language/parse.y" /* yacc.c:1652 */
1946
{(yyval.val)=(yyvsp[0].val);}
1947
#line 1948 "../src/language/parse.c" /* yacc.c:1652 */
1948
break;
1949
1950
case 32:
1951
#line 135 "../src/language/parse.y" /* yacc.c:1652 */
1952
{(yyval.val)=(yyvsp[0].val);}
1953
#line 1954 "../src/language/parse.c" /* yacc.c:1652 */
1954
break;
1955
1956
case 33:
1957
#line 136 "../src/language/parse.y" /* yacc.c:1652 */
1958
{(yyval.val)=(yyvsp[0].val);}
1959
#line 1960 "../src/language/parse.c" /* yacc.c:1652 */
1960
break;
1961
1962
case 34:
1963
#line 137 "../src/language/parse.y" /* yacc.c:1652 */
1964
{(yyval.val)=(yyvsp[0].val);}
1965
#line 1966 "../src/language/parse.c" /* yacc.c:1652 */
1966
break;
1967
1968
case 35:
1969
#line 138 "../src/language/parse.y" /* yacc.c:1652 */
1970
{(yyval.val)=(yyvsp[0].val);}
1971
#line 1972 "../src/language/parse.c" /* yacc.c:1652 */
1972
break;
1973
1974
case 36:
1975
#line 139 "../src/language/parse.y" /* yacc.c:1652 */
1976
{(yyval.val)=newnode(Fassign,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
1977
#line 1978 "../src/language/parse.c" /* yacc.c:1652 */
1978
break;
1979
1980
case 37:
1981
#line 140 "../src/language/parse.y" /* yacc.c:1652 */
1982
{(yyval.val)=newnode(Fassign,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
1983
#line 1984 "../src/language/parse.c" /* yacc.c:1652 */
1984
break;
1985
1986
case 38:
1987
#line 141 "../src/language/parse.y" /* yacc.c:1652 */
1988
{(yyval.val)=newopcall(OPpp,(yyvsp[-1].val),-1,&(yyloc));}
1989
#line 1990 "../src/language/parse.c" /* yacc.c:1652 */
1990
break;
1991
1992
case 39:
1993
#line 142 "../src/language/parse.y" /* yacc.c:1652 */
1994
{(yyval.val)=newopcall(OPss,(yyvsp[-1].val),-1,&(yyloc));}
1995
#line 1996 "../src/language/parse.c" /* yacc.c:1652 */
1996
break;
1997
1998
case 40:
1999
#line 143 "../src/language/parse.y" /* yacc.c:1652 */
2000
{(yyval.val)=newopcall(OPme,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2001
#line 2002 "../src/language/parse.c" /* yacc.c:1652 */
2002
break;
2003
2004
case 41:
2005
#line 144 "../src/language/parse.y" /* yacc.c:1652 */
2006
{(yyval.val)=newopcall(OPde,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2007
#line 2008 "../src/language/parse.c" /* yacc.c:1652 */
2008
break;
2009
2010
case 42:
2011
#line 145 "../src/language/parse.y" /* yacc.c:1652 */
2012
{(yyval.val)=newopcall(OPdre,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2013
#line 2014 "../src/language/parse.c" /* yacc.c:1652 */
2014
break;
2015
2016
case 43:
2017
#line 146 "../src/language/parse.y" /* yacc.c:1652 */
2018
{(yyval.val)=newopcall(OPeuce,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2019
#line 2020 "../src/language/parse.c" /* yacc.c:1652 */
2020
break;
2021
2022
case 44:
2023
#line 147 "../src/language/parse.y" /* yacc.c:1652 */
2024
{(yyval.val)=newopcall(OPmode,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2025
#line 2026 "../src/language/parse.c" /* yacc.c:1652 */
2026
break;
2027
2028
case 45:
2029
#line 148 "../src/language/parse.y" /* yacc.c:1652 */
2030
{(yyval.val)=newopcall(OPsle,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2031
#line 2032 "../src/language/parse.c" /* yacc.c:1652 */
2032
break;
2033
2034
case 46:
2035
#line 149 "../src/language/parse.y" /* yacc.c:1652 */
2036
{(yyval.val)=newopcall(OPsre,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2037
#line 2038 "../src/language/parse.c" /* yacc.c:1652 */
2038
break;
2039
2040
case 47:
2041
#line 150 "../src/language/parse.y" /* yacc.c:1652 */
2042
{(yyval.val)=newopcall(OPpe,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2043
#line 2044 "../src/language/parse.c" /* yacc.c:1652 */
2044
break;
2045
2046
case 48:
2047
#line 151 "../src/language/parse.y" /* yacc.c:1652 */
2048
{(yyval.val)=newopcall(OPse,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2049
#line 2050 "../src/language/parse.c" /* yacc.c:1652 */
2050
break;
2051
2052
case 49:
2053
#line 152 "../src/language/parse.y" /* yacc.c:1652 */
2054
{(yyval.val)=newopcall(OPnb,(yyvsp[0].val),-1,&(yyloc));}
2055
#line 2056 "../src/language/parse.c" /* yacc.c:1652 */
2056
break;
2057
2058
case 50:
2059
#line 153 "../src/language/parse.y" /* yacc.c:1652 */
2060
{(yyval.val)=newopcall(OPlength,(yyvsp[0].val),-1,&(yyloc));}
2061
#line 2062 "../src/language/parse.c" /* yacc.c:1652 */
2062
break;
2063
2064
case 51:
2065
#line 154 "../src/language/parse.y" /* yacc.c:1652 */
2066
{(yyval.val)=newopcall(OPor,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2067
#line 2068 "../src/language/parse.c" /* yacc.c:1652 */
2068
break;
2069
2070
case 52:
2071
#line 155 "../src/language/parse.y" /* yacc.c:1652 */
2072
{(yyval.val)=newopcall(OPand,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2073
#line 2074 "../src/language/parse.c" /* yacc.c:1652 */
2074
break;
2075
2076
case 53:
2077
#line 156 "../src/language/parse.y" /* yacc.c:1652 */
2078
{(yyval.val)=newopcall(OPand,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2079
#line 2080 "../src/language/parse.c" /* yacc.c:1652 */
2080
break;
2081
2082
case 54:
2083
#line 157 "../src/language/parse.y" /* yacc.c:1652 */
2084
{(yyval.val)=newopcall(OPid,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2085
#line 2086 "../src/language/parse.c" /* yacc.c:1652 */
2086
break;
2087
2088
case 55:
2089
#line 158 "../src/language/parse.y" /* yacc.c:1652 */
2090
{(yyval.val)=newopcall(OPeq,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2091
#line 2092 "../src/language/parse.c" /* yacc.c:1652 */
2092
break;
2093
2094
case 56:
2095
#line 159 "../src/language/parse.y" /* yacc.c:1652 */
2096
{(yyval.val)=newopcall(OPne,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2097
#line 2098 "../src/language/parse.c" /* yacc.c:1652 */
2098
break;
2099
2100
case 57:
2101
#line 160 "../src/language/parse.y" /* yacc.c:1652 */
2102
{(yyval.val)=newopcall(OPge,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2103
#line 2104 "../src/language/parse.c" /* yacc.c:1652 */
2104
break;
2105
2106
case 58:
2107
#line 161 "../src/language/parse.y" /* yacc.c:1652 */
2108
{(yyval.val)=newopcall(OPg,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2109
#line 2110 "../src/language/parse.c" /* yacc.c:1652 */
2110
break;
2111
2112
case 59:
2113
#line 162 "../src/language/parse.y" /* yacc.c:1652 */
2114
{(yyval.val)=newopcall(OPle,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2115
#line 2116 "../src/language/parse.c" /* yacc.c:1652 */
2116
break;
2117
2118
case 60:
2119
#line 163 "../src/language/parse.y" /* yacc.c:1652 */
2120
{(yyval.val)=newopcall(OPl,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2121
#line 2122 "../src/language/parse.c" /* yacc.c:1652 */
2122
break;
2123
2124
case 61:
2125
#line 164 "../src/language/parse.y" /* yacc.c:1652 */
2126
{(yyval.val)=newopcall(OPs,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2127
#line 2128 "../src/language/parse.c" /* yacc.c:1652 */
2128
break;
2129
2130
case 62:
2131
#line 165 "../src/language/parse.y" /* yacc.c:1652 */
2132
{(yyval.val)=newopcall(OPp,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2133
#line 2134 "../src/language/parse.c" /* yacc.c:1652 */
2134
break;
2135
2136
case 63:
2137
#line 166 "../src/language/parse.y" /* yacc.c:1652 */
2138
{(yyval.val)=newopcall(OPsl,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2139
#line 2140 "../src/language/parse.c" /* yacc.c:1652 */
2140
break;
2141
2142
case 64:
2143
#line 167 "../src/language/parse.y" /* yacc.c:1652 */
2144
{(yyval.val)=newopcall(OPsr,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2145
#line 2146 "../src/language/parse.c" /* yacc.c:1652 */
2146
break;
2147
2148
case 65:
2149
#line 168 "../src/language/parse.y" /* yacc.c:1652 */
2150
{(yyval.val)=newopcall(OPmod,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2151
#line 2152 "../src/language/parse.c" /* yacc.c:1652 */
2152
break;
2153
2154
case 66:
2155
#line 169 "../src/language/parse.y" /* yacc.c:1652 */
2156
{(yyval.val)=newopcall(OPdr,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2157
#line 2158 "../src/language/parse.c" /* yacc.c:1652 */
2158
break;
2159
2160
case 67:
2161
#line 170 "../src/language/parse.y" /* yacc.c:1652 */
2162
{(yyval.val)=newopcall(OPeuc,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2163
#line 2164 "../src/language/parse.c" /* yacc.c:1652 */
2164
break;
2165
2166
case 68:
2167
#line 171 "../src/language/parse.y" /* yacc.c:1652 */
2168
{(yyval.val)=newopcall(OPd,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2169
#line 2170 "../src/language/parse.c" /* yacc.c:1652 */
2170
break;
2171
2172
case 69:
2173
#line 172 "../src/language/parse.y" /* yacc.c:1652 */
2174
{(yyval.val)=newopcall(OPm,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2175
#line 2176 "../src/language/parse.c" /* yacc.c:1652 */
2176
break;
2177
2178
case 70:
2179
#line 173 "../src/language/parse.y" /* yacc.c:1652 */
2180
{(yyval.val)=(yyvsp[0].val);}
2181
#line 2182 "../src/language/parse.c" /* yacc.c:1652 */
2182
break;
2183
2184
case 71:
2185
#line 174 "../src/language/parse.y" /* yacc.c:1652 */
2186
{(yyval.val)=newopcall(OPn,(yyvsp[0].val),-1,&(yyloc));}
2187
#line 2188 "../src/language/parse.c" /* yacc.c:1652 */
2188
break;
2189
2190
case 72:
2191
#line 175 "../src/language/parse.y" /* yacc.c:1652 */
2192
{(yyval.val)=newopcall(OPpow,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2193
#line 2194 "../src/language/parse.c" /* yacc.c:1652 */
2194
break;
2195
2196
case 73:
2197
#line 176 "../src/language/parse.y" /* yacc.c:1652 */
2198
{(yyval.val)=newopcall(OPtrans,(yyvsp[-1].val),-1,&(yyloc));}
2199
#line 2200 "../src/language/parse.c" /* yacc.c:1652 */
2200
break;
2201
2202
case 74:
2203
#line 177 "../src/language/parse.y" /* yacc.c:1652 */
2204
{(yyval.val)=newopcall(OPderivn,(yyvsp[-1].val), newnode(Fsmall,(yyvsp[0].val),-1,&(yyloc)),&(yyloc));}
2205
#line 2206 "../src/language/parse.c" /* yacc.c:1652 */
2206
break;
2207
2208
case 75:
2209
#line 178 "../src/language/parse.y" /* yacc.c:1652 */
2210
{(yyval.val)=newopcall(OPfact,(yyvsp[-1].val),-1,&(yyloc));}
2211
#line 2212 "../src/language/parse.c" /* yacc.c:1652 */
2212
break;
2213
2214
case 76:
2215
#line 179 "../src/language/parse.y" /* yacc.c:1652 */
2216
{(yyval.val)=newnode(Fmatcoeff,(yyvsp[-1].val),(yyvsp[0].val),&(yyloc));}
2217
#line 2218 "../src/language/parse.c" /* yacc.c:1652 */
2218
break;
2219
2220
case 77:
2221
#line 180 "../src/language/parse.y" /* yacc.c:1652 */
2222
{(yyval.val)=(yyvsp[0].val);}
2223
#line 2224 "../src/language/parse.c" /* yacc.c:1652 */
2224
break;
2225
2226
case 78:
2227
#line 181 "../src/language/parse.y" /* yacc.c:1652 */
2228
{(yyval.val)=newnode(Ftag,(yyvsp[-2].val),0,&(yyloc));}
2229
#line 2230 "../src/language/parse.c" /* yacc.c:1652 */
2230
break;
2231
2232
case 79:
2233
#line 182 "../src/language/parse.y" /* yacc.c:1652 */
2234
{(yyval.val)=(yyvsp[-1].val);}
2235
#line 2236 "../src/language/parse.c" /* yacc.c:1652 */
2236
break;
2237
2238
case 80:
2239
#line 185 "../src/language/parse.y" /* yacc.c:1652 */
2240
{(yyval.val)=newnode(Fentry,newconst(CSTentry,&(yylsp[0])),-1,&(yyloc));}
2241
#line 2242 "../src/language/parse.c" /* yacc.c:1652 */
2242
break;
2243
2244
case 81:
2245
#line 186 "../src/language/parse.y" /* yacc.c:1652 */
2246
{(yyval.val)=newnode(Fmatcoeff,(yyvsp[-1].val),(yyvsp[0].val),&(yyloc));}
2247
#line 2248 "../src/language/parse.c" /* yacc.c:1652 */
2248
break;
2249
2250
case 82:
2251
#line 187 "../src/language/parse.y" /* yacc.c:1652 */
2252
{(yyval.val)=newnode(Ftag,(yyvsp[-2].val),newconst(CSTentry,&(yylsp[-1])),&(yyloc));}
2253
#line 2254 "../src/language/parse.c" /* yacc.c:1652 */
2254
break;
2255
2256
case 83:
2257
#line 190 "../src/language/parse.y" /* yacc.c:1652 */
2258
{(yyval.val)=(yyvsp[0].val);}
2259
#line 2260 "../src/language/parse.c" /* yacc.c:1652 */
2260
break;
2261
2262
case 84:
2263
#line 191 "../src/language/parse.y" /* yacc.c:1652 */
2264
{(yyval.val)=NOARG((yyloc));}
2265
#line 2266 "../src/language/parse.c" /* yacc.c:1652 */
2266
break;
2267
2268
case 85:
2269
#line 193 "../src/language/parse.y" /* yacc.c:1652 */
2270
{(yyval.val)=(yyvsp[0].val);}
2271
#line 2272 "../src/language/parse.c" /* yacc.c:1652 */
2272
break;
2273
2274
case 86:
2275
#line 194 "../src/language/parse.y" /* yacc.c:1652 */
2276
{(yyval.val)=NOARG((yyloc));}
2277
#line 2278 "../src/language/parse.c" /* yacc.c:1652 */
2278
break;
2279
2280
case 87:
2281
#line 197 "../src/language/parse.y" /* yacc.c:1652 */
2282
{(yyval.val)=(yyvsp[0].val);}
2283
#line 2284 "../src/language/parse.c" /* yacc.c:1652 */
2284
break;
2285
2286
case 88:
2287
#line 198 "../src/language/parse.y" /* yacc.c:1652 */
2288
{(yyval.val)=newnode(Fmatrixelts,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2289
#line 2290 "../src/language/parse.c" /* yacc.c:1652 */
2290
break;
2291
2292
case 89:
2293
#line 201 "../src/language/parse.y" /* yacc.c:1652 */
2294
{(yyval.val)=newnode(Fmatrixlines,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2295
#line 2296 "../src/language/parse.c" /* yacc.c:1652 */
2296
break;
2297
2298
case 90:
2299
#line 202 "../src/language/parse.y" /* yacc.c:1652 */
2300
{(yyval.val)=newnode(Fmatrixlines,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2301
#line 2302 "../src/language/parse.c" /* yacc.c:1652 */
2302
break;
2303
2304
case 91:
2305
#line 205 "../src/language/parse.y" /* yacc.c:1652 */
2306
{(yyval.val)=newnode(Fvec,-1,-1,&(yyloc));}
2307
#line 2308 "../src/language/parse.c" /* yacc.c:1652 */
2308
break;
2309
2310
case 92:
2311
#line 206 "../src/language/parse.y" /* yacc.c:1652 */
2312
{(yyval.val)=newopcall(OPrange,(yyvsp[-3].val),(yyvsp[-1].val),&(yyloc));}
2313
#line 2314 "../src/language/parse.c" /* yacc.c:1652 */
2314
break;
2315
2316
case 93:
2317
#line 207 "../src/language/parse.y" /* yacc.c:1652 */
2318
{(yyval.val)=newnode(Fmat,-1,-1,&(yyloc));}
2319
#line 2320 "../src/language/parse.c" /* yacc.c:1652 */
2320
break;
2321
2322
case 94:
2323
#line 208 "../src/language/parse.y" /* yacc.c:1652 */
2324
{(yyval.val)=newnode(Fvec,(yyvsp[-1].val),-1,&(yyloc));}
2325
#line 2326 "../src/language/parse.c" /* yacc.c:1652 */
2326
break;
2327
2328
case 95:
2329
#line 209 "../src/language/parse.y" /* yacc.c:1652 */
2330
{(yyval.val)=newnode(Fmat,(yyvsp[-1].val),-1,&(yyloc));}
2331
#line 2332 "../src/language/parse.c" /* yacc.c:1652 */
2332
break;
2333
2334
case 96:
2335
#line 210 "../src/language/parse.y" /* yacc.c:1652 */
2336
{(yyval.val)=-1; YYABORT;}
2337
#line 2338 "../src/language/parse.c" /* yacc.c:1652 */
2338
break;
2339
2340
case 97:
2341
#line 213 "../src/language/parse.y" /* yacc.c:1652 */
2342
{(yyval.val)=newnode(Flistarg,(yyvsp[0].val),(yyvsp[-3].val),&(yyloc));}
2343
#line 2344 "../src/language/parse.c" /* yacc.c:1652 */
2344
break;
2345
2346
case 98:
2347
#line 216 "../src/language/parse.y" /* yacc.c:1652 */
2348
{(yyval.val)=newopcall(OPcompr,(yyvsp[0].val),-2,&(yyloc));}
2349
#line 2350 "../src/language/parse.c" /* yacc.c:1652 */
2350
break;
2351
2352
case 99:
2353
#line 217 "../src/language/parse.y" /* yacc.c:1652 */
2354
{(yyval.val)=newopcall3(OPcompr,(yyvsp[-2].val),-2,(yyvsp[0].val),&(yyloc));}
2355
#line 2356 "../src/language/parse.c" /* yacc.c:1652 */
2356
break;
2357
2358
case 100:
2359
#line 218 "../src/language/parse.y" /* yacc.c:1652 */
2360
{(yyval.val)=newopcall(OPcomprc,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2361
#line 2362 "../src/language/parse.c" /* yacc.c:1652 */
2362
break;
2363
2364
case 101:
2365
#line 219 "../src/language/parse.y" /* yacc.c:1652 */
2366
{(yyval.val)=newopcall3(OPcomprc,(yyvsp[-4].val),(yyvsp[0].val),(yyvsp[-2].val),&(yyloc));}
2367
#line 2368 "../src/language/parse.c" /* yacc.c:1652 */
2368
break;
2369
2370
case 102:
2371
#line 222 "../src/language/parse.y" /* yacc.c:1652 */
2372
{(yyval.val)=addcurrexpr((yyvsp[-1].val),(yyvsp[-3].val),&(yyloc));}
2373
#line 2374 "../src/language/parse.c" /* yacc.c:1652 */
2374
break;
2375
2376
case 103:
2377
#line 225 "../src/language/parse.y" /* yacc.c:1652 */
2378
{(yyval.val)=(yyvsp[0].val);}
2379
#line 2380 "../src/language/parse.c" /* yacc.c:1652 */
2380
break;
2381
2382
case 104:
2383
#line 226 "../src/language/parse.y" /* yacc.c:1652 */
2384
{(yyval.val)=newnode(Fvararg,(yyvsp[-3].val),-1,&(yyloc));}
2385
#line 2386 "../src/language/parse.c" /* yacc.c:1652 */
2386
break;
2387
2388
case 105:
2389
#line 227 "../src/language/parse.y" /* yacc.c:1652 */
2390
{(yyval.val)=newnode(Frefarg,(yyvsp[0].val),-1,&(yyloc));}
2391
#line 2392 "../src/language/parse.c" /* yacc.c:1652 */
2392
break;
2393
2394
case 106:
2395
#line 228 "../src/language/parse.y" /* yacc.c:1652 */
2396
{(yyval.val)=newnode(Findarg,(yyvsp[0].val),-1,&(yyloc));}
2397
#line 2398 "../src/language/parse.c" /* yacc.c:1652 */
2398
break;
2399
2400
case 107:
2401
#line 229 "../src/language/parse.y" /* yacc.c:1652 */
2402
{if (!pari_once) { yyerrok; } pari_once=1;}
2403
#line 2404 "../src/language/parse.c" /* yacc.c:1652 */
2404
break;
2405
2406
case 108:
2407
#line 230 "../src/language/parse.y" /* yacc.c:1652 */
2408
{pari_once=0; (yyval.val)=newopcall(OPcat,(yyvsp[-3].val),(yyvsp[0].val),&(yyloc));}
2409
#line 2410 "../src/language/parse.c" /* yacc.c:1652 */
2410
break;
2411
2412
case 109:
2413
#line 233 "../src/language/parse.y" /* yacc.c:1652 */
2414
{(yyval.val)=(yyvsp[0].val);}
2415
#line 2416 "../src/language/parse.c" /* yacc.c:1652 */
2416
break;
2417
2418
case 110:
2419
#line 234 "../src/language/parse.y" /* yacc.c:1652 */
2420
{(yyval.val)=newnode(Flistarg,(yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2421
#line 2422 "../src/language/parse.c" /* yacc.c:1652 */
2422
break;
2423
2424
case 111:
2425
#line 237 "../src/language/parse.y" /* yacc.c:1652 */
2426
{(yyval.val)=newnode(Ffunction,newconst(CSTentry,&(yylsp[-3])),(yyvsp[-1].val),&(yyloc));}
2427
#line 2428 "../src/language/parse.c" /* yacc.c:1652 */
2428
break;
2429
2430
case 112:
2431
#line 240 "../src/language/parse.y" /* yacc.c:1652 */
2432
{(yyval.val)=newnode(Ffunction,newconst(CSTmember,&(yylsp[0])),(yyvsp[-2].val),&(yyloc));}
2433
#line 2434 "../src/language/parse.c" /* yacc.c:1652 */
2434
break;
2435
2436
case 113:
2437
#line 244 "../src/language/parse.y" /* yacc.c:1652 */
2438
{(yyval.val)=newfunc(CSTentry,&(yylsp[-5]),(yyvsp[-3].val),(yyvsp[0].val),&(yyloc));}
2439
#line 2440 "../src/language/parse.c" /* yacc.c:1652 */
2440
break;
2441
2442
case 114:
2443
#line 246 "../src/language/parse.y" /* yacc.c:1652 */
2444
{(yyval.val)=newfunc(CSTmember,&(yylsp[-2]),newnode(Findarg,(yyvsp[-4].val),-1,&(yylsp[-4])),(yyvsp[0].val),&(yyloc));}
2445
#line 2446 "../src/language/parse.c" /* yacc.c:1652 */
2446
break;
2447
2448
case 115:
2449
#line 247 "../src/language/parse.y" /* yacc.c:1652 */
2450
{(yyval.val)=newnode(Flambda, (yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2451
#line 2452 "../src/language/parse.c" /* yacc.c:1652 */
2452
break;
2453
2454
case 116:
2455
#line 248 "../src/language/parse.y" /* yacc.c:1652 */
2456
{(yyval.val)=newnode(Flambda, (yyvsp[-2].val),(yyvsp[0].val),&(yyloc));}
2457
#line 2458 "../src/language/parse.c" /* yacc.c:1652 */
2458
break;
2459
2460
2461
#line 2462 "../src/language/parse.c" /* yacc.c:1652 */
2462
default: break;
2463
}
2464
/* User semantic actions sometimes alter yychar, and that requires
2465
that yytoken be updated with the new translation. We take the
2466
approach of translating immediately before every use of yytoken.
2467
One alternative is translating here after every semantic action,
2468
but that translation would be missed if the semantic action invokes
2469
YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2470
if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2471
incorrect destructor might then be invoked immediately. In the
2472
case of YYERROR or YYBACKUP, subsequent parser actions might lead
2473
to an incorrect destructor call or verbose syntax error message
2474
before the lookahead is translated. */
2475
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2476
2477
YYPOPSTACK (yylen);
2478
yylen = 0;
2479
YY_STACK_PRINT (yyss, yyssp);
2480
2481
*++yyvsp = yyval;
2482
*++yylsp = yyloc;
2483
2484
/* Now 'shift' the result of the reduction. Determine what state
2485
that goes to, based on the state we popped back to and the rule
2486
number reduced by. */
2487
{
2488
const int yylhs = yyr1[yyn] - YYNTOKENS;
2489
const int yyi = yypgoto[yylhs] + *yyssp;
2490
yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
2491
? yytable[yyi]
2492
: yydefgoto[yylhs]);
2493
}
2494
2495
goto yynewstate;
2496
2497
2498
/*--------------------------------------.
2499
| yyerrlab -- here on detecting error. |
2500
`--------------------------------------*/
2501
yyerrlab:
2502
/* Make sure we have latest lookahead translation. See comments at
2503
user semantic actions for why this is necessary. */
2504
yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2505
2506
/* If not already recovering from an error, report this error. */
2507
if (!yyerrstatus)
2508
{
2509
++yynerrs;
2510
#if ! YYERROR_VERBOSE
2511
yyerror (&yylloc, lex, YY_("syntax error"));
2512
#else
2513
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2514
yyssp, yytoken)
2515
{
2516
char const *yymsgp = YY_("syntax error");
2517
int yysyntax_error_status;
2518
yysyntax_error_status = YYSYNTAX_ERROR;
2519
if (yysyntax_error_status == 0)
2520
yymsgp = yymsg;
2521
else if (yysyntax_error_status == 1)
2522
{
2523
if (yymsg != yymsgbuf)
2524
YYSTACK_FREE (yymsg);
2525
yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
2526
if (!yymsg)
2527
{
2528
yymsg = yymsgbuf;
2529
yymsg_alloc = sizeof yymsgbuf;
2530
yysyntax_error_status = 2;
2531
}
2532
else
2533
{
2534
yysyntax_error_status = YYSYNTAX_ERROR;
2535
yymsgp = yymsg;
2536
}
2537
}
2538
yyerror (&yylloc, lex, yymsgp);
2539
if (yysyntax_error_status == 2)
2540
goto yyexhaustedlab;
2541
}
2542
# undef YYSYNTAX_ERROR
2543
#endif
2544
}
2545
2546
yyerror_range[1] = yylloc;
2547
2548
if (yyerrstatus == 3)
2549
{
2550
/* If just tried and failed to reuse lookahead token after an
2551
error, discard it. */
2552
2553
if (yychar <= YYEOF)
2554
{
2555
/* Return failure if at end of input. */
2556
if (yychar == YYEOF)
2557
YYABORT;
2558
}
2559
else
2560
{
2561
yydestruct ("Error: discarding",
2562
yytoken, &yylval, &yylloc, lex);
2563
yychar = YYEMPTY;
2564
}
2565
}
2566
2567
/* Else will try to reuse lookahead token after shifting the error
2568
token. */
2569
goto yyerrlab1;
2570
2571
2572
/*---------------------------------------------------.
2573
| yyerrorlab -- error raised explicitly by YYERROR. |
2574
`---------------------------------------------------*/
2575
yyerrorlab:
2576
/* Pacify compilers when the user code never invokes YYERROR and the
2577
label yyerrorlab therefore never appears in user code. */
2578
if (0)
2579
YYERROR;
2580
2581
/* Do not reclaim the symbols of the rule whose action triggered
2582
this YYERROR. */
2583
YYPOPSTACK (yylen);
2584
yylen = 0;
2585
YY_STACK_PRINT (yyss, yyssp);
2586
yystate = *yyssp;
2587
goto yyerrlab1;
2588
2589
2590
/*-------------------------------------------------------------.
2591
| yyerrlab1 -- common code for both syntax error and YYERROR. |
2592
`-------------------------------------------------------------*/
2593
yyerrlab1:
2594
yyerrstatus = 3; /* Each real token shifted decrements this. */
2595
2596
for (;;)
2597
{
2598
yyn = yypact[yystate];
2599
if (!yypact_value_is_default (yyn))
2600
{
2601
yyn += YYTERROR;
2602
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2603
{
2604
yyn = yytable[yyn];
2605
if (0 < yyn)
2606
break;
2607
}
2608
}
2609
2610
/* Pop the current state because it cannot handle the error token. */
2611
if (yyssp == yyss)
2612
YYABORT;
2613
2614
yyerror_range[1] = *yylsp;
2615
yydestruct ("Error: popping",
2616
yystos[yystate], yyvsp, yylsp, lex);
2617
YYPOPSTACK (1);
2618
yystate = *yyssp;
2619
YY_STACK_PRINT (yyss, yyssp);
2620
}
2621
2622
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
2623
*++yyvsp = yylval;
2624
YY_IGNORE_MAYBE_UNINITIALIZED_END
2625
2626
yyerror_range[2] = yylloc;
2627
/* Using YYLLOC is tempting, but would change the location of
2628
the lookahead. YYLOC is available though. */
2629
YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
2630
*++yylsp = yyloc;
2631
2632
/* Shift the error token. */
2633
YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2634
2635
yystate = yyn;
2636
goto yynewstate;
2637
2638
2639
/*-------------------------------------.
2640
| yyacceptlab -- YYACCEPT comes here. |
2641
`-------------------------------------*/
2642
yyacceptlab:
2643
yyresult = 0;
2644
goto yyreturn;
2645
2646
2647
/*-----------------------------------.
2648
| yyabortlab -- YYABORT comes here. |
2649
`-----------------------------------*/
2650
yyabortlab:
2651
yyresult = 1;
2652
goto yyreturn;
2653
2654
2655
#if !defined yyoverflow || YYERROR_VERBOSE
2656
/*-------------------------------------------------.
2657
| yyexhaustedlab -- memory exhaustion comes here. |
2658
`-------------------------------------------------*/
2659
yyexhaustedlab:
2660
yyerror (&yylloc, lex, YY_("memory exhausted"));
2661
yyresult = 2;
2662
/* Fall through. */
2663
#endif
2664
2665
2666
/*-----------------------------------------------------.
2667
| yyreturn -- parsing is finished, return the result. |
2668
`-----------------------------------------------------*/
2669
yyreturn:
2670
if (yychar != YYEMPTY)
2671
{
2672
/* Make sure we have latest lookahead translation. See comments at
2673
user semantic actions for why this is necessary. */
2674
yytoken = YYTRANSLATE (yychar);
2675
yydestruct ("Cleanup: discarding lookahead",
2676
yytoken, &yylval, &yylloc, lex);
2677
}
2678
/* Do not reclaim the symbols of the rule whose action triggered
2679
this YYABORT or YYACCEPT. */
2680
YYPOPSTACK (yylen);
2681
YY_STACK_PRINT (yyss, yyssp);
2682
while (yyssp != yyss)
2683
{
2684
yydestruct ("Cleanup: popping",
2685
yystos[*yyssp], yyvsp, yylsp, lex);
2686
YYPOPSTACK (1);
2687
}
2688
#ifndef yyoverflow
2689
if (yyss != yyssa)
2690
YYSTACK_FREE (yyss);
2691
#endif
2692
#if YYERROR_VERBOSE
2693
if (yymsg != yymsgbuf)
2694
YYSTACK_FREE (yymsg);
2695
#endif
2696
return yyresult;
2697
}
2698
#line 251 "../src/language/parse.y" /* yacc.c:1918 */
2699
2700
2701