47 #define YYBISON_VERSION "3.0.2"
50 #define YYSKELETON_NAME "yacc.c"
62 #define YYSTYPE GLPS_STYPE
64 #define yyparse glps_parse
65 #define yylex glps_lex
66 #define yyerror glps_error
67 #define yydebug glps_debug
68 #define yynerrs glps_nerrs
72 #line 2 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
76 #include "glps_parser.h"
80 void yyerror (yacc_arg arg,
const char* msg)
82 glps_error(arg.scanner, arg.ctxt,
"%s", msg);
88 # if defined __cplusplus && 201103L <= __cplusplus
89 # define YY_NULLPTR nullptr
96 #ifdef YYERROR_VERBOSE
97 # undef YYERROR_VERBOSE
98 # define YYERROR_VERBOSE 1
100 # define YYERROR_VERBOSE 0
105 #ifndef YY_GLPS_GLPS_PAR_H_INCLUDED
106 # define YY_GLPS_GLPS_PAR_H_INCLUDED
111 # define GLPS_DEBUG 1
113 # define GLPS_DEBUG 0
116 # define GLPS_DEBUG 1
120 extern int glps_debug;
124 #ifndef GLPS_TOKENTYPE
125 # define GLPS_TOKENTYPE
137 #if ! defined GLPS_STYPE && ! defined GLPS_STYPE_IS_DECLARED
138 typedef union GLPS_STYPE GLPS_STYPE;
141 #line 22 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
143 #line 29 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
145 #line 34 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
147 #line 40 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
149 #line 46 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
151 #line 52 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
153 #line 58 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
156 #line 157 "glps.par.c"
158 # define GLPS_STYPE_IS_TRIVIAL 1
159 # define GLPS_STYPE_IS_DECLARED 1
164 int glps_parse (yacc_arg parg);
169 #line 70 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
171 #include "glps.tab.h"
173 #define PCLR(X) (X) = NULL
174 #define PERR(X) if(!X) YYERROR;
176 #define scanner (yyscan_t)(parg.scanner)
177 #define ctxt parg.ctxt
179 #line 180 "glps.par.c"
186 typedef YYTYPE_UINT8 yytype_uint8;
188 typedef unsigned char yytype_uint8;
192 typedef YYTYPE_INT8 yytype_int8;
194 typedef signed char yytype_int8;
198 typedef YYTYPE_UINT16 yytype_uint16;
200 typedef unsigned short int yytype_uint16;
204 typedef YYTYPE_INT16 yytype_int16;
206 typedef short int yytype_int16;
210 # ifdef __SIZE_TYPE__
211 # define YYSIZE_T __SIZE_TYPE__
212 # elif defined size_t
213 # define YYSIZE_T size_t
214 # elif ! defined YYSIZE_T
216 # define YYSIZE_T size_t
218 # define YYSIZE_T unsigned int
222 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
225 # if defined YYENABLE_NLS && YYENABLE_NLS
227 # include <libintl.h>
228 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
232 # define YY_(Msgid) Msgid
237 # if (defined __GNUC__ \
238 && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
239 || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
240 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
242 # define YY_ATTRIBUTE(Spec)
246 #ifndef YY_ATTRIBUTE_PURE
247 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
250 #ifndef YY_ATTRIBUTE_UNUSED
251 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
254 #if !defined _Noreturn \
255 && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
256 # if defined _MSC_VER && 1200 <= _MSC_VER
257 # define _Noreturn __declspec (noreturn)
259 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
264 #if ! defined lint || defined __GNUC__
265 # define YYUSE(E) ((void) (E))
270 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
272 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
273 _Pragma ("GCC diagnostic push") \
274 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
275 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
276 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
277 _Pragma ("GCC diagnostic pop")
279 # define YY_INITIAL_VALUE(Value) Value
281 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
282 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
283 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
285 #ifndef YY_INITIAL_VALUE
286 # define YY_INITIAL_VALUE(Value)
290 #if ! defined yyoverflow || YYERROR_VERBOSE
294 # ifdef YYSTACK_USE_ALLOCA
295 # if YYSTACK_USE_ALLOCA
297 # define YYSTACK_ALLOC __builtin_alloca
298 # elif defined __BUILTIN_VA_ARG_INCR
301 # define YYSTACK_ALLOC __alloca
302 # elif defined _MSC_VER
304 # define alloca _alloca
306 # define YYSTACK_ALLOC alloca
307 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
310 # ifndef EXIT_SUCCESS
311 # define EXIT_SUCCESS 0
318 # ifdef YYSTACK_ALLOC
320 # define YYSTACK_FREE(Ptr) do { ; } while (0)
321 # ifndef YYSTACK_ALLOC_MAXIMUM
326 # define YYSTACK_ALLOC_MAXIMUM 4032
329 # define YYSTACK_ALLOC YYMALLOC
330 # define YYSTACK_FREE YYFREE
331 # ifndef YYSTACK_ALLOC_MAXIMUM
332 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
334 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
335 && ! ((defined YYMALLOC || defined malloc) \
336 && (defined YYFREE || defined free)))
338 # ifndef EXIT_SUCCESS
339 # define EXIT_SUCCESS 0
343 # define YYMALLOC malloc
344 # if ! defined malloc && ! defined EXIT_SUCCESS
345 void *malloc (YYSIZE_T);
350 # if ! defined free && ! defined EXIT_SUCCESS
358 #if (! defined yyoverflow \
359 && (! defined __cplusplus \
360 || (defined GLPS_STYPE_IS_TRIVIAL && GLPS_STYPE_IS_TRIVIAL)))
365 yytype_int16 yyss_alloc;
370 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
374 # define YYSTACK_BYTES(N) \
375 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
376 + YYSTACK_GAP_MAXIMUM)
378 # define YYCOPY_NEEDED 1
385 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
388 YYSIZE_T yynewbytes; \
389 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
390 Stack = &yyptr->Stack_alloc; \
391 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
392 yyptr += yynewbytes / sizeof (*yyptr); \
398 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
402 # if defined __GNUC__ && 1 < __GNUC__
403 # define YYCOPY(Dst, Src, Count) \
404 __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
406 # define YYCOPY(Dst, Src, Count) \
410 for (yyi = 0; yyi < (Count); yyi++) \
411 (Dst)[yyi] = (Src)[yyi]; \
435 #define YYMAXUTOK 262
437 #define YYTRANSLATE(YYX) \
438 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
442 static const yytype_uint8 yytranslate[] =
444 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
445 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
446 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
447 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
448 15, 16, 9, 8, 17, 7, 2, 10, 2, 2,
449 2, 2, 2, 2, 2, 2, 2, 2, 14, 13,
450 2, 12, 2, 2, 2, 2, 2, 2, 2, 2,
451 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
452 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
453 2, 18, 2, 19, 2, 2, 2, 2, 2, 2,
454 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
455 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
456 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
457 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
458 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
459 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
460 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
461 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
462 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
463 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
464 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
465 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
466 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
467 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
468 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
469 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
475 static const yytype_uint8 yyrline[] =
477 0, 82, 82, 83, 85, 86, 87, 88, 89, 91,
478 93, 95, 97, 99, 101, 102, 104, 106, 107, 108,
479 110, 111, 112, 113, 114, 115, 116, 117, 118, 119,
480 120, 122, 123, 124, 126
484 #if GLPS_DEBUG || YYERROR_VERBOSE || 0
487 static const char *
const yytname[] =
489 "$end",
"error",
"$undefined",
"KEYWORD",
"STR",
"NUM",
"COMMENT",
490 "'-'",
"'+'",
"'*'",
"'/'",
"NEG",
"'='",
"';'",
"':'",
"'('",
"')'",
491 "','",
"'['",
"']'",
"$accept",
"file",
"entry",
"assignment",
"element",
492 "line",
"func",
"command",
"properties",
"property",
"line_list",
"expr",
493 "expr_list",
"vector", YY_NULLPTR
500 static const yytype_uint16 yytoknum[] =
502 0, 256, 257, 258, 259, 260, 261, 45, 43, 42,
503 47, 262, 61, 59, 58, 40, 41, 44, 91, 93
507 #define YYPACT_NINF -10
509 #define yypact_value_is_default(Yystate) \
510 (!!((Yystate) == (-10)))
512 #define YYTABLE_NINF -1
514 #define yytable_value_is_error(Yytable_value) \
519 static const yytype_int8 yypact[] =
521 1, 57, 12, 1, -10, -10, -10, -10, -10, 10,
522 -10, 15, 10, -10, -10, 4, -10, -10, 10, 10,
523 10, -2, -10, 25, 44, 10, -10, 48, 22, 7,
524 10, 10, 10, 10, -10, 5, 24, 27, 28, 58,
525 -10, 10, -10, -8, -8, -10, -10, 10, 32, 29,
526 -10, -10, -10, -10, 33, 26, 10, -10, 35, 10,
533 static const yytype_uint8 yydefact[] =
535 2, 0, 0, 2, 4, 5, 6, 7, 8, 0,
536 13, 0, 0, 1, 3, 23, 22, 20, 0, 0,
537 31, 0, 21, 14, 0, 0, 28, 0, 32, 0,
538 0, 0, 0, 0, 9, 0, 0, 0, 0, 0,
539 29, 31, 34, 25, 24, 26, 27, 17, 0, 14,
540 10, 12, 30, 33, 0, 18, 0, 15, 0, 17,
545 static const yytype_int8 yypgoto[] =
547 -10, 42, -10, -10, -10, -10, -10, -10, 13, -10,
552 static const yytype_int8 yydefgoto[] =
554 -1, 2, 3, 4, 5, 6, 7, 8, 37, 49,
561 static const yytype_uint8 yytable[] =
563 21, 32, 33, 24, 1, 30, 31, 32, 33, 26,
564 27, 34, 13, 15, 16, 17, 39, 18, 23, 25,
565 47, 43, 44, 45, 46, 19, 42, 48, 20, 30,
566 31, 32, 33, 30, 31, 32, 33, 35, 55, 41,
567 50, 51, 36, 59, 56, 14, 36, 60, 61, 58,
568 55, 30, 31, 32, 33, 30, 31, 32, 33, 62,
569 38, 53, 57, 0, 40, 30, 31, 32, 33, 9,
570 10, 11, 12, 0, 52, 30, 31, 32, 33
573 static const yytype_int8 yycheck[] =
575 9, 9, 10, 12, 3, 7, 8, 9, 10, 18,
576 19, 13, 0, 3, 4, 5, 25, 7, 3, 15,
577 15, 30, 31, 32, 33, 15, 19, 3, 18, 7,
578 8, 9, 10, 7, 8, 9, 10, 12, 47, 17,
579 13, 13, 17, 17, 12, 3, 17, 56, 13, 16,
580 59, 7, 8, 9, 10, 7, 8, 9, 10, 59,
581 16, 41, 49, -1, 16, 7, 8, 9, 10, 12,
582 13, 14, 15, -1, 16, 7, 8, 9, 10
587 static const yytype_uint8 yystos[] =
589 0, 3, 21, 22, 23, 24, 25, 26, 27, 12,
590 13, 14, 15, 0, 21, 3, 4, 5, 7, 15,
591 18, 31, 33, 3, 31, 15, 31, 31, 31, 32,
592 7, 8, 9, 10, 13, 12, 17, 28, 16, 31,
593 16, 17, 19, 31, 31, 31, 31, 15, 3, 29,
594 13, 13, 16, 32, 30, 31, 12, 28, 16, 17,
599 static const yytype_uint8 yyr1[] =
601 0, 20, 21, 21, 22, 22, 22, 22, 22, 23,
602 24, 25, 26, 27, 28, 28, 29, 30, 30, 30,
603 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
608 static const yytype_uint8 yyr2[] =
610 0, 2, 0, 2, 1, 1, 1, 1, 1, 4,
611 5, 8, 5, 2, 0, 3, 3, 0, 1, 3,
612 1, 1, 1, 1, 3, 3, 3, 3, 2, 3,
617 #define yyerrok (yyerrstatus = 0)
618 #define yyclearin (yychar = YYEMPTY)
622 #define YYACCEPT goto yyacceptlab
623 #define YYABORT goto yyabortlab
624 #define YYERROR goto yyerrorlab
627 #define YYRECOVERING() (!!yyerrstatus)
629 #define YYBACKUP(Token, Value) \
631 if (yychar == YYEMPTY) \
635 YYPOPSTACK (yylen); \
641 yyerror (parg, YY_("syntax error: cannot back up")); \
648 #define YYERRCODE 256
657 # define YYFPRINTF fprintf
660 # define YYDPRINTF(Args) \
667 #ifndef YY_LOCATION_PRINT
668 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
672 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
676 YYFPRINTF (stderr, "%s ", Title); \
677 yy_symbol_print (stderr, \
678 Type, Value, parg); \
679 YYFPRINTF (stderr, "\n"); \
689 yy_symbol_value_print (FILE *yyoutput,
int yytype, YYSTYPE
const *
const yyvaluep, yacc_arg parg)
691 FILE *yyo = yyoutput;
697 if (yytype < YYNTOKENS)
698 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
703 #line 27 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
704 { glps_string_debug(yyoutput, ((*yyvaluep).string)); }
705 #line 706 "glps.par.c"
709 #line 27 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
710 { glps_string_debug(yyoutput, ((*yyvaluep).string)); }
711 #line 712 "glps.par.c"
715 #line 32 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
716 { fprintf(yyoutput,
"%g", ((*yyvaluep).real)); }
717 #line 718 "glps.par.c"
721 #line 50 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
722 { fprintf(yyoutput,
"%p", ((*yyvaluep).kvlist)); }
723 #line 724 "glps.par.c"
727 #line 56 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
728 { fprintf(yyoutput,
"%p", ((*yyvaluep).strlist)); }
729 #line 730 "glps.par.c"
733 #line 38 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
734 { glps_expr_debug(yyoutput, ((*yyvaluep).exprv)); }
735 #line 736 "glps.par.c"
739 #line 44 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
740 { fprintf(yyoutput,
"%p", ((*yyvaluep).vector)); }
741 #line 742 "glps.par.c"
745 #line 44 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
746 { fprintf(yyoutput,
"%p", ((*yyvaluep).vector)); }
747 #line 748 "glps.par.c"
762 yy_symbol_print (FILE *yyoutput,
int yytype, YYSTYPE
const *
const yyvaluep, yacc_arg parg)
764 YYFPRINTF (yyoutput,
"%s %s (",
765 yytype < YYNTOKENS ?
"token" :
"nterm", yytname[yytype]);
767 yy_symbol_value_print (yyoutput, yytype, yyvaluep, parg);
768 YYFPRINTF (yyoutput,
")");
777 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
779 YYFPRINTF (stderr,
"Stack now");
780 for (; yybottom <= yytop; yybottom++)
782 int yybot = *yybottom;
783 YYFPRINTF (stderr,
" %d", yybot);
785 YYFPRINTF (stderr,
"\n");
788 # define YY_STACK_PRINT(Bottom, Top) \
791 yy_stack_print ((Bottom), (Top)); \
800 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp,
int yyrule, yacc_arg parg)
802 unsigned long int yylno = yyrline[yyrule];
803 int yynrhs = yyr2[yyrule];
805 YYFPRINTF (stderr,
"Reducing stack by rule %d (line %lu):\n",
808 for (yyi = 0; yyi < yynrhs; yyi++)
810 YYFPRINTF (stderr,
" $%d = ", yyi + 1);
811 yy_symbol_print (stderr,
812 yystos[yyssp[yyi + 1 - yynrhs]],
813 &(yyvsp[(yyi + 1) - (yynrhs)])
815 YYFPRINTF (stderr,
"\n");
819 # define YY_REDUCE_PRINT(Rule) \
822 yy_reduce_print (yyssp, yyvsp, Rule, parg); \
829 # define YYDPRINTF(Args)
830 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
831 # define YY_STACK_PRINT(Bottom, Top)
832 # define YY_REDUCE_PRINT(Rule)
838 # define YYINITDEPTH 200
849 # define YYMAXDEPTH 10000
856 # if defined __GLIBC__ && defined _STRING_H
857 # define yystrlen strlen
861 yystrlen (
const char *yystr)
864 for (yylen = 0; yystr[yylen]; yylen++)
872 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
873 # define yystpcpy stpcpy
878 yystpcpy (
char *yydest,
const char *yysrc)
881 const char *yys = yysrc;
883 while ((*yyd++ = *yys++) !=
'\0')
900 yytnamerr (
char *yyres,
const char *yystr)
905 char const *yyp = yystr;
912 goto do_not_strip_quotes;
916 goto do_not_strip_quotes;
929 do_not_strip_quotes: ;
933 return yystrlen (yystr);
935 return yystpcpy (yyres, yystr) - yyres;
948 yysyntax_error (YYSIZE_T *yymsg_alloc,
char **yymsg,
949 yytype_int16 *yyssp,
int yytoken)
951 YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
952 YYSIZE_T yysize = yysize0;
953 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
955 const char *yyformat = YY_NULLPTR;
957 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
985 if (yytoken != YYEMPTY)
987 int yyn = yypact[*yyssp];
988 yyarg[yycount++] = yytname[yytoken];
989 if (!yypact_value_is_default (yyn))
994 int yyxbegin = yyn < 0 ? -yyn : 0;
996 int yychecklim = YYLAST - yyn + 1;
997 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1000 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1001 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1002 && !yytable_value_is_error (yytable[yyx + yyn]))
1004 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1010 yyarg[yycount++] = yytname[yyx];
1012 YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1013 if (! (yysize <= yysize1
1014 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1024 # define YYCASE_(N, S) \
1028 YYCASE_(0, YY_(
"syntax error"));
1029 YYCASE_(1, YY_(
"syntax error, unexpected %s"));
1030 YYCASE_(2, YY_(
"syntax error, unexpected %s, expecting %s"));
1031 YYCASE_(3, YY_(
"syntax error, unexpected %s, expecting %s or %s"));
1032 YYCASE_(4, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s"));
1033 YYCASE_(5, YY_(
"syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1038 YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1039 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1044 if (*yymsg_alloc < yysize)
1046 *yymsg_alloc = 2 * yysize;
1047 if (! (yysize <= *yymsg_alloc
1048 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1049 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1059 while ((*yyp = *yyformat) !=
'\0')
1060 if (*yyp ==
'%' && yyformat[1] ==
's' && yyi < yycount)
1062 yyp += yytnamerr (yyp, yyarg[yyi++]);
1080 yydestruct (
const char *yymsg,
int yytype, YYSTYPE *yyvaluep, yacc_arg parg)
1086 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1088 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1092 #line 23 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1093 { glps_string_cleanup(((*yyvaluep).string)); ((*yyvaluep).string) = NULL; }
1094 #line 1095 "glps.par.c"
1098 #line 23 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1099 { glps_string_cleanup(((*yyvaluep).string)); ((*yyvaluep).string) = NULL; }
1100 #line 1101 "glps.par.c"
1104 #line 47 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1105 { glps_kvlist_cleanup(((*yyvaluep).kvlist)); }
1106 #line 1107 "glps.par.c"
1110 #line 59 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1111 { free(((*yyvaluep).kv).key); ((*yyvaluep).kv).key = NULL;glps_expr_cleanup(((*yyvaluep).kv).value); }
1112 #line 1113 "glps.par.c"
1116 #line 53 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1117 { glps_strlist_cleanup(((*yyvaluep).strlist)); }
1118 #line 1119 "glps.par.c"
1122 #line 35 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1123 { glps_expr_cleanup(((*yyvaluep).exprv)); }
1124 #line 1125 "glps.par.c"
1128 #line 41 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1129 { glps_vector_cleanup(((*yyvaluep).vector)); }
1130 #line 1131 "glps.par.c"
1134 #line 41 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1135 { glps_vector_cleanup(((*yyvaluep).vector)); }
1136 #line 1137 "glps.par.c"
1143 YY_IGNORE_MAYBE_UNINITIALIZED_END
1154 yyparse (yacc_arg parg)
1163 YY_INITIAL_VALUE (
static YYSTYPE yyval_default;)
1164 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
1181 yytype_int16 yyssa[YYINITDEPTH];
1183 yytype_int16 *yyssp;
1186 YYSTYPE yyvsa[YYINITDEPTH];
1190 YYSIZE_T yystacksize;
1203 char *yymsg = yymsgbuf;
1204 YYSIZE_T yymsg_alloc =
sizeof yymsgbuf;
1207 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1213 yyssp = yyss = yyssa;
1214 yyvsp = yyvs = yyvsa;
1215 yystacksize = YYINITDEPTH;
1217 YYDPRINTF ((stderr,
"Starting parse\n"));
1236 if (yyss + yystacksize - 1 <= yyssp)
1239 YYSIZE_T yysize = yyssp - yyss + 1;
1246 YYSTYPE *yyvs1 = yyvs;
1247 yytype_int16 *yyss1 = yyss;
1253 yyoverflow (YY_(
"memory exhausted"),
1254 &yyss1, yysize *
sizeof (*yyssp),
1255 &yyvs1, yysize *
sizeof (*yyvsp),
1262 # ifndef YYSTACK_RELOCATE
1263 goto yyexhaustedlab;
1266 if (YYMAXDEPTH <= yystacksize)
1267 goto yyexhaustedlab;
1269 if (YYMAXDEPTH < yystacksize)
1270 yystacksize = YYMAXDEPTH;
1273 yytype_int16 *yyss1 = yyss;
1274 union yyalloc *yyptr =
1275 (
union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1277 goto yyexhaustedlab;
1278 YYSTACK_RELOCATE (yyss_alloc, yyss);
1279 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1280 # undef YYSTACK_RELOCATE
1282 YYSTACK_FREE (yyss1);
1287 yyssp = yyss + yysize - 1;
1288 yyvsp = yyvs + yysize - 1;
1290 YYDPRINTF ((stderr,
"Stack size increased to %lu\n",
1291 (
unsigned long int) yystacksize));
1293 if (yyss + yystacksize - 1 <= yyssp)
1297 YYDPRINTF ((stderr,
"Entering state %d\n", yystate));
1299 if (yystate == YYFINAL)
1313 yyn = yypact[yystate];
1314 if (yypact_value_is_default (yyn))
1320 if (yychar == YYEMPTY)
1322 YYDPRINTF ((stderr,
"Reading a token: "));
1323 yychar = yylex (&yylval, scanner);
1326 if (yychar <= YYEOF)
1328 yychar = yytoken = YYEOF;
1329 YYDPRINTF ((stderr,
"Now at end of input.\n"));
1333 yytoken = YYTRANSLATE (yychar);
1334 YY_SYMBOL_PRINT (
"Next token is", yytoken, &yylval, &yylloc);
1340 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1345 if (yytable_value_is_error (yyn))
1357 YY_SYMBOL_PRINT (
"Shifting", yytoken, &yylval, &yylloc);
1363 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1365 YY_IGNORE_MAYBE_UNINITIALIZED_END
1374 yyn = yydefact[yystate];
1395 yyval = yyvsp[1-yylen];
1398 YY_REDUCE_PRINT (yyn);
1402 #line 91 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1403 { glps_assign(ctxt, (yyvsp[-3].
string), (yyvsp[-1].exprv)); PCLR((yyvsp[-3].
string)); }
1404 #line 1405 "glps.par.c"
1408 #line 93 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1409 { glps_add_element(ctxt, (yyvsp[-4].
string), (yyvsp[-2].
string), (yyvsp[-1].kvlist)); PCLR((yyvsp[-4].
string)); PCLR((yyvsp[-2].
string)); PCLR((yyvsp[-1].kvlist)); }
1410 #line 1411 "glps.par.c"
1414 #line 95 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1415 { glps_add_line(ctxt, (yyvsp[-7].
string), (yyvsp[-5].
string), (yyvsp[-2].strlist)); PCLR((yyvsp[-7].
string)); PCLR((yyvsp[-5].
string)); PCLR((yyvsp[-2].strlist)); }
1416 #line 1417 "glps.par.c"
1420 #line 97 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1421 { glps_call1(ctxt, (yyvsp[-4].
string), (yyvsp[-2].exprv)); PCLR((yyvsp[-4].
string)); PCLR((yyvsp[-2].exprv)); }
1422 #line 1423 "glps.par.c"
1426 #line 99 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1427 { glps_command(ctxt, (yyvsp[-1].
string)); }
1428 #line 1429 "glps.par.c"
1432 #line 101 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1433 { (yyval.kvlist) = NULL; }
1434 #line 1435 "glps.par.c"
1438 #line 102 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1439 { (yyval.kvlist) = glps_append_kv(ctxt, (yyvsp[0].kvlist), &(yyvsp[-1].kv)); PCLR((yyvsp[0].kvlist)); PERR((yyval.kvlist)); }
1440 #line 1441 "glps.par.c"
1444 #line 104 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1445 { (yyval.kv).key = (yyvsp[-2].
string); (yyval.kv).value = (yyvsp[0].exprv); PCLR((yyvsp[-2].
string)); PCLR((yyvsp[0].exprv)); }
1446 #line 1447 "glps.par.c"
1450 #line 106 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1451 { (yyval.strlist) = NULL; }
1452 #line 1453 "glps.par.c"
1456 #line 107 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1457 { (yyval.strlist) = glps_append_expr(ctxt, NULL, (yyvsp[0].exprv)); PERR((yyval.strlist)); }
1458 #line 1459 "glps.par.c"
1462 #line 108 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1463 { (yyval.strlist) = glps_append_expr(ctxt, (yyvsp[0].strlist), (yyvsp[-2].exprv)); PERR((yyval.strlist)); }
1464 #line 1465 "glps.par.c"
1468 #line 110 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1469 { (yyval.exprv) = glps_add_value(ctxt, glps_expr_number, (yyvsp[0].real)); }
1470 #line 1471 "glps.par.c"
1474 #line 111 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1475 { (yyval.exprv) = glps_add_value(ctxt, glps_expr_vector, (yyvsp[0].vector)); PCLR((yyvsp[0].vector)); PERR((yyval.exprv)); }
1476 #line 1477 "glps.par.c"
1480 #line 112 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1481 { (yyval.exprv) = glps_add_value(ctxt, glps_expr_string, (yyvsp[0].
string)); PCLR((yyvsp[0].
string)); PERR((yyval.exprv)); }
1482 #line 1483 "glps.par.c"
1486 #line 113 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1487 { (yyval.exprv) = glps_add_value(ctxt, glps_expr_var, (yyvsp[0].
string)); PCLR((yyvsp[0].
string)); PERR((yyval.exprv)); }
1488 #line 1489 "glps.par.c"
1492 #line 114 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1493 { expr_t *A[2] = {(yyvsp[-2].exprv),(yyvsp[0].exprv)}; (yyval.exprv) = glps_add_op(ctxt, glps_string_alloc(
"+",1), 2, A); PCLR((yyvsp[-2].exprv)); PCLR((yyvsp[0].exprv)); PERR((yyval.exprv)); }
1494 #line 1495 "glps.par.c"
1498 #line 115 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1499 { expr_t *A[2] = {(yyvsp[-2].exprv),(yyvsp[0].exprv)}; (yyval.exprv) = glps_add_op(ctxt, glps_string_alloc(
"-",1), 2, A); PCLR((yyvsp[-2].exprv)); PCLR((yyvsp[0].exprv)); PERR((yyval.exprv)); }
1500 #line 1501 "glps.par.c"
1504 #line 116 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1505 { expr_t *A[2] = {(yyvsp[-2].exprv),(yyvsp[0].exprv)}; (yyval.exprv) = glps_add_op(ctxt, glps_string_alloc(
"*",1), 2, A); PCLR((yyvsp[-2].exprv)); PCLR((yyvsp[0].exprv)); PERR((yyval.exprv)); }
1506 #line 1507 "glps.par.c"
1510 #line 117 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1511 { expr_t *A[2] = {(yyvsp[-2].exprv),(yyvsp[0].exprv)}; (yyval.exprv) = glps_add_op(ctxt, glps_string_alloc(
"/",1), 2, A); PCLR((yyvsp[-2].exprv)); PCLR((yyvsp[0].exprv)); PERR((yyval.exprv)); }
1512 #line 1513 "glps.par.c"
1516 #line 118 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1517 { expr_t *A[1] = {(yyvsp[0].exprv)}; (yyval.exprv) = glps_add_op(ctxt, glps_string_alloc(
"-",1), 1, A); PCLR((yyvsp[0].exprv)); PERR((yyval.exprv)); }
1518 #line 1519 "glps.par.c"
1522 #line 119 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1523 { (yyval.exprv) = (yyvsp[-1].exprv); PCLR((yyvsp[-1].exprv)); PERR((yyval.exprv)); }
1524 #line 1525 "glps.par.c"
1528 #line 120 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1529 { expr_t *A[1] = {(yyvsp[-1].exprv)}; (yyval.exprv) = glps_add_op(ctxt, (yyvsp[-3].
string), 1, A); PCLR((yyvsp[-3].
string)); PCLR((yyvsp[-1].exprv)); PERR((yyval.exprv)); }
1530 #line 1531 "glps.par.c"
1534 #line 122 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1535 { (yyval.vector) = NULL; }
1536 #line 1537 "glps.par.c"
1540 #line 123 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1541 { (yyval.vector) = glps_append_vector(ctxt, NULL, (yyvsp[0].exprv)); PERR((yyval.vector)); }
1542 #line 1543 "glps.par.c"
1546 #line 124 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1547 { (yyval.vector) = glps_append_vector(ctxt, (yyvsp[0].vector), (yyvsp[-2].exprv)); PERR((yyval.vector)); }
1548 #line 1549 "glps.par.c"
1552 #line 126 "/home/mdavidsaver/work.frib/jmbgsddb/src/glps.y"
1553 { (yyval.vector) = (yyvsp[-1].vector); }
1554 #line 1555 "glps.par.c"
1558 #line 1559 "glps.par.c"
1572 YY_SYMBOL_PRINT (
"-> $$ =", yyr1[yyn], &yyval, &yyloc);
1576 YY_STACK_PRINT (yyss, yyssp);
1586 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
1587 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
1588 yystate = yytable[yystate];
1590 yystate = yydefgoto[yyn - YYNTOKENS];
1601 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
1607 #if ! YYERROR_VERBOSE
1608 yyerror (parg, YY_(
"syntax error"));
1610 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
1613 char const *yymsgp = YY_(
"syntax error");
1614 int yysyntax_error_status;
1615 yysyntax_error_status = YYSYNTAX_ERROR;
1616 if (yysyntax_error_status == 0)
1618 else if (yysyntax_error_status == 1)
1620 if (yymsg != yymsgbuf)
1621 YYSTACK_FREE (yymsg);
1622 yymsg = (
char *) YYSTACK_ALLOC (yymsg_alloc);
1626 yymsg_alloc =
sizeof yymsgbuf;
1627 yysyntax_error_status = 2;
1631 yysyntax_error_status = YYSYNTAX_ERROR;
1635 yyerror (parg, yymsgp);
1636 if (yysyntax_error_status == 2)
1637 goto yyexhaustedlab;
1639 # undef YYSYNTAX_ERROR
1645 if (yyerrstatus == 3)
1650 if (yychar <= YYEOF)
1653 if (yychar == YYEOF)
1658 yydestruct (
"Error: discarding",
1659 yytoken, &yylval, parg);
1684 YY_STACK_PRINT (yyss, yyssp);
1697 yyn = yypact[yystate];
1698 if (!yypact_value_is_default (yyn))
1701 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
1714 yydestruct (
"Error: popping",
1715 yystos[yystate], yyvsp, parg);
1718 YY_STACK_PRINT (yyss, yyssp);
1721 YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
1723 YY_IGNORE_MAYBE_UNINITIALIZED_END
1727 YY_SYMBOL_PRINT (
"Shifting", yystos[yyn], yyvsp, yylsp);
1747 #if !defined yyoverflow || YYERROR_VERBOSE
1752 yyerror (parg, YY_(
"memory exhausted"));
1758 if (yychar != YYEMPTY)
1762 yytoken = YYTRANSLATE (yychar);
1763 yydestruct (
"Cleanup: discarding lookahead",
1764 yytoken, &yylval, parg);
1769 YY_STACK_PRINT (yyss, yyssp);
1770 while (yyssp != yyss)
1772 yydestruct (
"Cleanup: popping",
1773 yystos[*yyssp], yyvsp, parg);
1778 YYSTACK_FREE (yyss);
1781 if (yymsg != yymsgbuf)
1782 YYSTACK_FREE (yymsg);