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