Blame src/parser.c

Packit 728676
/* A Bison parser, made by GNU Bison 3.0.4.  */
Packit 728676
Packit 728676
/* Bison implementation for Yacc-like parsers in C
Packit 728676
Packit 728676
   Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
Packit 728676
Packit 728676
   This program is free software: you can redistribute it and/or modify
Packit 728676
   it under the terms of the GNU General Public License as published by
Packit 728676
   the Free Software Foundation, either version 3 of the License, or
Packit 728676
   (at your option) any later version.
Packit 728676
Packit 728676
   This program is distributed in the hope that it will be useful,
Packit 728676
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 728676
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit 728676
   GNU General Public License for more details.
Packit 728676
Packit 728676
   You should have received a copy of the GNU General Public License
Packit 728676
   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
Packit 728676
Packit 728676
/* As a special exception, you may create a larger work that contains
Packit 728676
   part or all of the Bison parser skeleton and distribute that work
Packit 728676
   under terms of your choice, so long as that work isn't itself a
Packit 728676
   parser generator using the skeleton or a modified version thereof
Packit 728676
   as a parser skeleton.  Alternatively, if you modify or redistribute
Packit 728676
   the parser skeleton itself, you may (at your option) remove this
Packit 728676
   special exception, which will cause the skeleton and the resulting
Packit 728676
   Bison output files to be licensed under the GNU General Public
Packit 728676
   License without this special exception.
Packit 728676
Packit 728676
   This special exception was added by the Free Software Foundation in
Packit 728676
   version 2.2 of Bison.  */
Packit 728676
Packit 728676
/* C LALR(1) parser skeleton written by Richard Stallman, by
Packit 728676
   simplifying the original so-called "semantic" parser.  */
Packit 728676
Packit 728676
/* All symbols defined below should begin with yy or YY, to avoid
Packit 728676
   infringing on user name space.  This should be done even for local
Packit 728676
   variables, as they might otherwise be expanded by user macros.
Packit 728676
   There are some unavoidable exceptions within include files to
Packit 728676
   define necessary library symbols; they are noted "INFRINGES ON
Packit 728676
   USER NAME SPACE" below.  */
Packit 728676
Packit 728676
/* Identify Bison output.  */
Packit 728676
#define YYBISON 1
Packit 728676
Packit 728676
/* Bison version.  */
Packit 728676
#define YYBISON_VERSION "3.0.4"
Packit 728676
Packit 728676
/* Skeleton name.  */
Packit 728676
#define YYSKELETON_NAME "yacc.c"
Packit 728676
Packit 728676
/* Pure parsers.  */
Packit 728676
#define YYPURE 0
Packit 728676
Packit 728676
/* Push parsers.  */
Packit 728676
#define YYPUSH 0
Packit 728676
Packit 728676
/* Pull parsers.  */
Packit 728676
#define YYPULL 1
Packit 728676
Packit 728676
Packit 728676
Packit 728676
Packit 728676
/* Copy the first part of user declarations.  */
Packit 728676
#line 14 "parser.y" /* yacc.c:339  */
Packit 728676
Packit 728676
#include <stdio.h>
Packit 728676
#include <stdlib.h>
Packit 728676
#include <string.h>
Packit 728676
#include <apr_base64.h>
Packit 728676
int yylex(void);
Packit 728676
typedef struct yy_buffer_state * YY_BUFFER_STATE;
Packit 728676
extern void yyerror(const char **keys, const char **vals,
Packit 728676
                    int *status, const char *s);
Packit 728676
extern int yyparse(const char **keys, const char **vals, int *status);
Packit 728676
extern YY_BUFFER_STATE yy_scan_string(char * str);
Packit 728676
extern void yy_delete_buffer(YY_BUFFER_STATE buffer);
Packit 728676
static size_t b64_len(const char *val);
Packit 728676
static char *b64_enc(const char *val, size_t len);
Packit 728676
Packit 728676
#line 82 "parser.c" /* yacc.c:339  */
Packit 728676
Packit 728676
# ifndef YY_NULLPTR
Packit 728676
#  if defined __cplusplus && 201103L <= __cplusplus
Packit 728676
#   define YY_NULLPTR nullptr
Packit 728676
#  else
Packit 728676
#   define YY_NULLPTR 0
Packit 728676
#  endif
Packit 728676
# endif
Packit 728676
Packit 728676
/* Enabling verbose error messages.  */
Packit 728676
#ifdef YYERROR_VERBOSE
Packit 728676
# undef YYERROR_VERBOSE
Packit 728676
# define YYERROR_VERBOSE 1
Packit 728676
#else
Packit 728676
# define YYERROR_VERBOSE 0
Packit 728676
#endif
Packit 728676
Packit 728676
/* In a future release of Bison, this section will be replaced
Packit 728676
   by #include "y.tab.h".  */
Packit 728676
#ifndef YY_YY_PARSER_H_INCLUDED
Packit 728676
# define YY_YY_PARSER_H_INCLUDED
Packit 728676
/* Debug traces.  */
Packit 728676
#ifndef YYDEBUG
Packit 728676
# define YYDEBUG 0
Packit 728676
#endif
Packit 728676
#if YYDEBUG
Packit 728676
extern int yydebug;
Packit 728676
#endif
Packit 728676
Packit 728676
/* Token type.  */
Packit 728676
#ifndef YYTOKENTYPE
Packit 728676
# define YYTOKENTYPE
Packit 728676
  enum yytokentype
Packit 728676
  {
Packit 728676
    LPAREN = 258,
Packit 728676
    RPAREN = 259,
Packit 728676
    SPACE = 260,
Packit 728676
    OR = 261,
Packit 728676
    AND = 262,
Packit 728676
    EQUAL = 263,
Packit 728676
    EQUALBIN = 264,
Packit 728676
    AST = 265,
Packit 728676
    STRING = 266,
Packit 728676
    INT = 267
Packit 728676
  };
Packit 728676
#endif
Packit 728676
/* Tokens.  */
Packit 728676
#define LPAREN 258
Packit 728676
#define RPAREN 259
Packit 728676
#define SPACE 260
Packit 728676
#define OR 261
Packit 728676
#define AND 262
Packit 728676
#define EQUAL 263
Packit 728676
#define EQUALBIN 264
Packit 728676
#define AST 265
Packit 728676
#define STRING 266
Packit 728676
#define INT 267
Packit 728676
Packit 728676
/* Value type.  */
Packit 728676
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
Packit 728676
Packit 728676
union YYSTYPE
Packit 728676
{
Packit 728676
#line 30 "parser.y" /* yacc.c:355  */
Packit 728676
Packit 728676
    char *sval;
Packit 728676
    int ival;
Packit 728676
Packit 728676
#line 151 "parser.c" /* yacc.c:355  */
Packit 728676
};
Packit 728676
Packit 728676
typedef union YYSTYPE YYSTYPE;
Packit 728676
# define YYSTYPE_IS_TRIVIAL 1
Packit 728676
# define YYSTYPE_IS_DECLARED 1
Packit 728676
#endif
Packit 728676
Packit 728676
Packit 728676
extern YYSTYPE yylval;
Packit 728676
Packit 728676
int yyparse (const char **keys, const char **vals, int *status);
Packit 728676
Packit 728676
#endif /* !YY_YY_PARSER_H_INCLUDED  */
Packit 728676
Packit 728676
/* Copy the second part of user declarations.  */
Packit 728676
Packit 728676
#line 168 "parser.c" /* yacc.c:358  */
Packit 728676
Packit 728676
#ifdef short
Packit 728676
# undef short
Packit 728676
#endif
Packit 728676
Packit 728676
#ifdef YYTYPE_UINT8
Packit 728676
typedef YYTYPE_UINT8 yytype_uint8;
Packit 728676
#else
Packit 728676
typedef unsigned char yytype_uint8;
Packit 728676
#endif
Packit 728676
Packit 728676
#ifdef YYTYPE_INT8
Packit 728676
typedef YYTYPE_INT8 yytype_int8;
Packit 728676
#else
Packit 728676
typedef signed char yytype_int8;
Packit 728676
#endif
Packit 728676
Packit 728676
#ifdef YYTYPE_UINT16
Packit 728676
typedef YYTYPE_UINT16 yytype_uint16;
Packit 728676
#else
Packit 728676
typedef unsigned short int yytype_uint16;
Packit 728676
#endif
Packit 728676
Packit 728676
#ifdef YYTYPE_INT16
Packit 728676
typedef YYTYPE_INT16 yytype_int16;
Packit 728676
#else
Packit 728676
typedef short int yytype_int16;
Packit 728676
#endif
Packit 728676
Packit 728676
#ifndef YYSIZE_T
Packit 728676
# ifdef __SIZE_TYPE__
Packit 728676
#  define YYSIZE_T __SIZE_TYPE__
Packit 728676
# elif defined size_t
Packit 728676
#  define YYSIZE_T size_t
Packit 728676
# elif ! defined YYSIZE_T
Packit 728676
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
Packit 728676
#  define YYSIZE_T size_t
Packit 728676
# else
Packit 728676
#  define YYSIZE_T unsigned int
Packit 728676
# endif
Packit 728676
#endif
Packit 728676
Packit 728676
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
Packit 728676
Packit 728676
#ifndef YY_
Packit 728676
# if defined YYENABLE_NLS && YYENABLE_NLS
Packit 728676
#  if ENABLE_NLS
Packit 728676
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
Packit 728676
#   define YY_(Msgid) dgettext ("bison-runtime", Msgid)
Packit 728676
#  endif
Packit 728676
# endif
Packit 728676
# ifndef YY_
Packit 728676
#  define YY_(Msgid) Msgid
Packit 728676
# endif
Packit 728676
#endif
Packit 728676
Packit 728676
#ifndef YY_ATTRIBUTE
Packit 728676
# if (defined __GNUC__                                               \
Packit 728676
      && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__)))  \
Packit 728676
     || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
Packit 728676
#  define YY_ATTRIBUTE(Spec) __attribute__(Spec)
Packit 728676
# else
Packit 728676
#  define YY_ATTRIBUTE(Spec) /* empty */
Packit 728676
# endif
Packit 728676
#endif
Packit 728676
Packit 728676
#ifndef YY_ATTRIBUTE_PURE
Packit 728676
# define YY_ATTRIBUTE_PURE   YY_ATTRIBUTE ((__pure__))
Packit 728676
#endif
Packit 728676
Packit 728676
#ifndef YY_ATTRIBUTE_UNUSED
Packit 728676
# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
Packit 728676
#endif
Packit 728676
Packit 728676
#if !defined _Noreturn \
Packit 728676
     && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
Packit 728676
# if defined _MSC_VER && 1200 <= _MSC_VER
Packit 728676
#  define _Noreturn __declspec (noreturn)
Packit 728676
# else
Packit 728676
#  define _Noreturn YY_ATTRIBUTE ((__noreturn__))
Packit 728676
# endif
Packit 728676
#endif
Packit 728676
Packit 728676
/* Suppress unused-variable warnings by "using" E.  */
Packit 728676
#if ! defined lint || defined __GNUC__
Packit 728676
# define YYUSE(E) ((void) (E))
Packit 728676
#else
Packit 728676
# define YYUSE(E) /* empty */
Packit 728676
#endif
Packit 728676
Packit 728676
#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
Packit 728676
/* Suppress an incorrect diagnostic about yylval being uninitialized.  */
Packit 728676
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
Packit 728676
    _Pragma ("GCC diagnostic push") \
Packit 728676
    _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
Packit 728676
    _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
Packit 728676
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
Packit 728676
    _Pragma ("GCC diagnostic pop")
Packit 728676
#else
Packit 728676
# define YY_INITIAL_VALUE(Value) Value
Packit 728676
#endif
Packit 728676
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Packit 728676
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Packit 728676
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
Packit 728676
#endif
Packit 728676
#ifndef YY_INITIAL_VALUE
Packit 728676
# define YY_INITIAL_VALUE(Value) /* Nothing. */
Packit 728676
#endif
Packit 728676
Packit 728676
Packit 728676
#if ! defined yyoverflow || YYERROR_VERBOSE
Packit 728676
Packit 728676
/* The parser invokes alloca or malloc; define the necessary symbols.  */
Packit 728676
Packit 728676
# ifdef YYSTACK_USE_ALLOCA
Packit 728676
#  if YYSTACK_USE_ALLOCA
Packit 728676
#   ifdef __GNUC__
Packit 728676
#    define YYSTACK_ALLOC __builtin_alloca
Packit 728676
#   elif defined __BUILTIN_VA_ARG_INCR
Packit 728676
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
Packit 728676
#   elif defined _AIX
Packit 728676
#    define YYSTACK_ALLOC __alloca
Packit 728676
#   elif defined _MSC_VER
Packit 728676
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
Packit 728676
#    define alloca _alloca
Packit 728676
#   else
Packit 728676
#    define YYSTACK_ALLOC alloca
Packit 728676
#    if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
Packit 728676
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Packit 728676
      /* Use EXIT_SUCCESS as a witness for stdlib.h.  */
Packit 728676
#     ifndef EXIT_SUCCESS
Packit 728676
#      define EXIT_SUCCESS 0
Packit 728676
#     endif
Packit 728676
#    endif
Packit 728676
#   endif
Packit 728676
#  endif
Packit 728676
# endif
Packit 728676
Packit 728676
# ifdef YYSTACK_ALLOC
Packit 728676
   /* Pacify GCC's 'empty if-body' warning.  */
Packit 728676
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
Packit 728676
#  ifndef YYSTACK_ALLOC_MAXIMUM
Packit 728676
    /* The OS might guarantee only one guard page at the bottom of the stack,
Packit 728676
       and a page size can be as small as 4096 bytes.  So we cannot safely
Packit 728676
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
Packit 728676
       to allow for a few compiler-allocated temporary stack slots.  */
Packit 728676
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
Packit 728676
#  endif
Packit 728676
# else
Packit 728676
#  define YYSTACK_ALLOC YYMALLOC
Packit 728676
#  define YYSTACK_FREE YYFREE
Packit 728676
#  ifndef YYSTACK_ALLOC_MAXIMUM
Packit 728676
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
Packit 728676
#  endif
Packit 728676
#  if (defined __cplusplus && ! defined EXIT_SUCCESS \
Packit 728676
       && ! ((defined YYMALLOC || defined malloc) \
Packit 728676
             && (defined YYFREE || defined free)))
Packit 728676
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
Packit 728676
#   ifndef EXIT_SUCCESS
Packit 728676
#    define EXIT_SUCCESS 0
Packit 728676
#   endif
Packit 728676
#  endif
Packit 728676
#  ifndef YYMALLOC
Packit 728676
#   define YYMALLOC malloc
Packit 728676
#   if ! defined malloc && ! defined EXIT_SUCCESS
Packit 728676
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
Packit 728676
#   endif
Packit 728676
#  endif
Packit 728676
#  ifndef YYFREE
Packit 728676
#   define YYFREE free
Packit 728676
#   if ! defined free && ! defined EXIT_SUCCESS
Packit 728676
void free (void *); /* INFRINGES ON USER NAME SPACE */
Packit 728676
#   endif
Packit 728676
#  endif
Packit 728676
# endif
Packit 728676
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
Packit 728676
Packit 728676
Packit 728676
#if (! defined yyoverflow \
Packit 728676
     && (! defined __cplusplus \
Packit 728676
         || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
Packit 728676
Packit 728676
/* A type that is properly aligned for any stack member.  */
Packit 728676
union yyalloc
Packit 728676
{
Packit 728676
  yytype_int16 yyss_alloc;
Packit 728676
  YYSTYPE yyvs_alloc;
Packit 728676
};
Packit 728676
Packit 728676
/* The size of the maximum gap between one aligned stack and the next.  */
Packit 728676
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
Packit 728676
Packit 728676
/* The size of an array large to enough to hold all stacks, each with
Packit 728676
   N elements.  */
Packit 728676
# define YYSTACK_BYTES(N) \
Packit 728676
     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
Packit 728676
      + YYSTACK_GAP_MAXIMUM)
Packit 728676
Packit 728676
# define YYCOPY_NEEDED 1
Packit 728676
Packit 728676
/* Relocate STACK from its old location to the new one.  The
Packit 728676
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
Packit 728676
   elements in the stack, and YYPTR gives the new location of the
Packit 728676
   stack.  Advance YYPTR to a properly aligned location for the next
Packit 728676
   stack.  */
Packit 728676
# define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
Packit 728676
    do                                                                  \
Packit 728676
      {                                                                 \
Packit 728676
        YYSIZE_T yynewbytes;                                            \
Packit 728676
        YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
Packit 728676
        Stack = &yyptr->Stack_alloc;                                    \
Packit 728676
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
Packit 728676
        yyptr += yynewbytes / sizeof (*yyptr);                          \
Packit 728676
      }                                                                 \
Packit 728676
    while (0)
Packit 728676
Packit 728676
#endif
Packit 728676
Packit 728676
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
Packit 728676
/* Copy COUNT objects from SRC to DST.  The source and destination do
Packit 728676
   not overlap.  */
Packit 728676
# ifndef YYCOPY
Packit 728676
#  if defined __GNUC__ && 1 < __GNUC__
Packit 728676
#   define YYCOPY(Dst, Src, Count) \
Packit 728676
      __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
Packit 728676
#  else
Packit 728676
#   define YYCOPY(Dst, Src, Count)              \
Packit 728676
      do                                        \
Packit 728676
        {                                       \
Packit 728676
          YYSIZE_T yyi;                         \
Packit 728676
          for (yyi = 0; yyi < (Count); yyi++)   \
Packit 728676
            (Dst)[yyi] = (Src)[yyi];            \
Packit 728676
        }                                       \
Packit 728676
      while (0)
Packit 728676
#  endif
Packit 728676
# endif
Packit 728676
#endif /* !YYCOPY_NEEDED */
Packit 728676
Packit 728676
/* YYFINAL -- State number of the termination state.  */
Packit 728676
#define YYFINAL  10
Packit 728676
/* YYLAST -- Last index in YYTABLE.  */
Packit 728676
#define YYLAST   18
Packit 728676
Packit 728676
/* YYNTOKENS -- Number of terminals.  */
Packit 728676
#define YYNTOKENS  13
Packit 728676
/* YYNNTS -- Number of nonterminals.  */
Packit 728676
#define YYNNTS  5
Packit 728676
/* YYNRULES -- Number of rules.  */
Packit 728676
#define YYNRULES  10
Packit 728676
/* YYNSTATES -- Number of states.  */
Packit 728676
#define YYNSTATES  22
Packit 728676
Packit 728676
/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
Packit 728676
   by yylex, with out-of-bounds checking.  */
Packit 728676
#define YYUNDEFTOK  2
Packit 728676
#define YYMAXUTOK   267
Packit 728676
Packit 728676
#define YYTRANSLATE(YYX)                                                \
Packit 728676
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
Packit 728676
Packit 728676
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
Packit 728676
   as returned by yylex, without out-of-bounds checking.  */
Packit 728676
static const yytype_uint8 yytranslate[] =
Packit 728676
{
Packit 728676
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
Packit 728676
       2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
Packit 728676
       5,     6,     7,     8,     9,    10,    11,    12
Packit 728676
};
Packit 728676
Packit 728676
#if YYDEBUG
Packit 728676
  /* YYRLINE[YYN] -- Source line where rule number YYN was defined.  */
Packit 728676
static const yytype_uint8 yyrline[] =
Packit 728676
{
Packit 728676
       0,    53,    53,    59,    60,    63,    68,    71,    76,    97,
Packit 728676
     109
Packit 728676
};
Packit 728676
#endif
Packit 728676
Packit 728676
#if YYDEBUG || YYERROR_VERBOSE || 0
Packit 728676
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
Packit 728676
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
Packit 728676
static const char *const yytname[] =
Packit 728676
{
Packit 728676
  "$end", "error", "$undefined", "LPAREN", "RPAREN", "SPACE", "OR", "AND",
Packit 728676
  "EQUAL", "EQUALBIN", "AST", "STRING", "INT", "$accept", "expr", "rule",
Packit 728676
  "rule_start", "requiredkv", YY_NULLPTR
Packit 728676
};
Packit 728676
#endif
Packit 728676
Packit 728676
# ifdef YYPRINT
Packit 728676
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
Packit 728676
   (internal) symbol number NUM (which must be that of a token).  */
Packit 728676
static const yytype_uint16 yytoknum[] =
Packit 728676
{
Packit 728676
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
Packit 728676
     265,   266,   267
Packit 728676
};
Packit 728676
# endif
Packit 728676
Packit 728676
#define YYPACT_NINF -7
Packit 728676
Packit 728676
#define yypact_value_is_default(Yystate) \
Packit 728676
  (!!((Yystate) == (-7)))
Packit 728676
Packit 728676
#define YYTABLE_NINF -1
Packit 728676
Packit 728676
#define yytable_value_is_error(Yytable_value) \
Packit 728676
  0
Packit 728676
Packit 728676
  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
Packit 728676
     STATE-NUM.  */
Packit 728676
static const yytype_int8 yypact[] =
Packit 728676
{
Packit 728676
      -2,    -2,    -6,     4,    -7,     5,    -7,     7,    -5,     2,
Packit 728676
      -7,     1,    -7,    -7,    -7,    -7,     9,    10,    -2,    -2,
Packit 728676
      -7,    -7
Packit 728676
};
Packit 728676
Packit 728676
  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
Packit 728676
     Performed when YYTABLE does not specify something else to do.  Zero
Packit 728676
     means the default is an error.  */
Packit 728676
static const yytype_uint8 yydefact[] =
Packit 728676
{
Packit 728676
       0,     0,     0,     0,     2,     3,     7,     0,     0,     0,
Packit 728676
       1,     0,     6,     9,     8,    10,     0,     0,     0,     0,
Packit 728676
       5,     4
Packit 728676
};
Packit 728676
Packit 728676
  /* YYPGOTO[NTERM-NUM].  */
Packit 728676
static const yytype_int8 yypgoto[] =
Packit 728676
{
Packit 728676
      -7,    -7,    -1,    -7,    -7
Packit 728676
};
Packit 728676
Packit 728676
  /* YYDEFGOTO[NTERM-NUM].  */
Packit 728676
static const yytype_int8 yydefgoto[] =
Packit 728676
{
Packit 728676
      -1,     3,     4,     5,     6
Packit 728676
};
Packit 728676
Packit 728676
  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM.  If
Packit 728676
     positive, shift that token.  If negative, reduce the rule whose
Packit 728676
     number is the opposite.  If YYTABLE_NINF, syntax error.  */
Packit 728676
static const yytype_uint8 yytable[] =
Packit 728676
{
Packit 728676
       7,     1,     8,     9,    10,    13,    14,    16,    17,     2,
Packit 728676
      11,    12,     0,    15,    18,    19,     0,    20,    21
Packit 728676
};
Packit 728676
Packit 728676
static const yytype_int8 yycheck[] =
Packit 728676
{
Packit 728676
       1,     3,     8,     9,     0,    10,    11,     6,     7,    11,
Packit 728676
       5,     4,    -1,    11,     5,     5,    -1,    18,    19
Packit 728676
};
Packit 728676
Packit 728676
  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
Packit 728676
     symbol of state STATE-NUM.  */
Packit 728676
static const yytype_uint8 yystos[] =
Packit 728676
{
Packit 728676
       0,     3,    11,    14,    15,    16,    17,    15,     8,     9,
Packit 728676
       0,     5,     4,    10,    11,    11,     6,     7,     5,     5,
Packit 728676
      15,    15
Packit 728676
};
Packit 728676
Packit 728676
  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
Packit 728676
static const yytype_uint8 yyr1[] =
Packit 728676
{
Packit 728676
       0,    13,    14,    15,    15,    15,    16,    16,    17,    17,
Packit 728676
      17
Packit 728676
};
Packit 728676
Packit 728676
  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN.  */
Packit 728676
static const yytype_uint8 yyr2[] =
Packit 728676
{
Packit 728676
       0,     2,     1,     1,     5,     5,     3,     1,     3,     3,
Packit 728676
       3
Packit 728676
};
Packit 728676
Packit 728676
Packit 728676
#define yyerrok         (yyerrstatus = 0)
Packit 728676
#define yyclearin       (yychar = YYEMPTY)
Packit 728676
#define YYEMPTY         (-2)
Packit 728676
#define YYEOF           0
Packit 728676
Packit 728676
#define YYACCEPT        goto yyacceptlab
Packit 728676
#define YYABORT         goto yyabortlab
Packit 728676
#define YYERROR         goto yyerrorlab
Packit 728676
Packit 728676
Packit 728676
#define YYRECOVERING()  (!!yyerrstatus)
Packit 728676
Packit 728676
#define YYBACKUP(Token, Value)                                  \
Packit 728676
do                                                              \
Packit 728676
  if (yychar == YYEMPTY)                                        \
Packit 728676
    {                                                           \
Packit 728676
      yychar = (Token);                                         \
Packit 728676
      yylval = (Value);                                         \
Packit 728676
      YYPOPSTACK (yylen);                                       \
Packit 728676
      yystate = *yyssp;                                         \
Packit 728676
      goto yybackup;                                            \
Packit 728676
    }                                                           \
Packit 728676
  else                                                          \
Packit 728676
    {                                                           \
Packit 728676
      yyerror (keys, vals, status, YY_("syntax error: cannot back up")); \
Packit 728676
      YYERROR;                                                  \
Packit 728676
    }                                                           \
Packit 728676
while (0)
Packit 728676
Packit 728676
/* Error token number */
Packit 728676
#define YYTERROR        1
Packit 728676
#define YYERRCODE       256
Packit 728676
Packit 728676
Packit 728676
Packit 728676
/* Enable debugging if requested.  */
Packit 728676
#if YYDEBUG
Packit 728676
Packit 728676
# ifndef YYFPRINTF
Packit 728676
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
Packit 728676
#  define YYFPRINTF fprintf
Packit 728676
# endif
Packit 728676
Packit 728676
# define YYDPRINTF(Args)                        \
Packit 728676
do {                                            \
Packit 728676
  if (yydebug)                                  \
Packit 728676
    YYFPRINTF Args;                             \
Packit 728676
} while (0)
Packit 728676
Packit 728676
/* This macro is provided for backward compatibility. */
Packit 728676
#ifndef YY_LOCATION_PRINT
Packit 728676
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
Packit 728676
#endif
Packit 728676
Packit 728676
Packit 728676
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
Packit 728676
do {                                                                      \
Packit 728676
  if (yydebug)                                                            \
Packit 728676
    {                                                                     \
Packit 728676
      YYFPRINTF (stderr, "%s ", Title);                                   \
Packit 728676
      yy_symbol_print (stderr,                                            \
Packit 728676
                  Type, Value, keys, vals, status); \
Packit 728676
      YYFPRINTF (stderr, "\n");                                           \
Packit 728676
    }                                                                     \
Packit 728676
} while (0)
Packit 728676
Packit 728676
Packit 728676
/*----------------------------------------.
Packit 728676
| Print this symbol's value on YYOUTPUT.  |
Packit 728676
`----------------------------------------*/
Packit 728676
Packit 728676
static void
Packit 728676
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, const char **keys, const char **vals, int *status)
Packit 728676
{
Packit 728676
  FILE *yyo = yyoutput;
Packit 728676
  YYUSE (yyo);
Packit 728676
  YYUSE (keys);
Packit 728676
  YYUSE (vals);
Packit 728676
  YYUSE (status);
Packit 728676
  if (!yyvaluep)
Packit 728676
    return;
Packit 728676
# ifdef YYPRINT
Packit 728676
  if (yytype < YYNTOKENS)
Packit 728676
    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
Packit 728676
# endif
Packit 728676
  YYUSE (yytype);
Packit 728676
}
Packit 728676
Packit 728676
Packit 728676
/*--------------------------------.
Packit 728676
| Print this symbol on YYOUTPUT.  |
Packit 728676
`--------------------------------*/
Packit 728676
Packit 728676
static void
Packit 728676
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, const char **keys, const char **vals, int *status)
Packit 728676
{
Packit 728676
  YYFPRINTF (yyoutput, "%s %s (",
Packit 728676
             yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
Packit 728676
Packit 728676
  yy_symbol_value_print (yyoutput, yytype, yyvaluep, keys, vals, status);
Packit 728676
  YYFPRINTF (yyoutput, ")");
Packit 728676
}
Packit 728676
Packit 728676
/*------------------------------------------------------------------.
Packit 728676
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
Packit 728676
| TOP (included).                                                   |
Packit 728676
`------------------------------------------------------------------*/
Packit 728676
Packit 728676
static void
Packit 728676
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
Packit 728676
{
Packit 728676
  YYFPRINTF (stderr, "Stack now");
Packit 728676
  for (; yybottom <= yytop; yybottom++)
Packit 728676
    {
Packit 728676
      int yybot = *yybottom;
Packit 728676
      YYFPRINTF (stderr, " %d", yybot);
Packit 728676
    }
Packit 728676
  YYFPRINTF (stderr, "\n");
Packit 728676
}
Packit 728676
Packit 728676
# define YY_STACK_PRINT(Bottom, Top)                            \
Packit 728676
do {                                                            \
Packit 728676
  if (yydebug)                                                  \
Packit 728676
    yy_stack_print ((Bottom), (Top));                           \
Packit 728676
} while (0)
Packit 728676
Packit 728676
Packit 728676
/*------------------------------------------------.
Packit 728676
| Report that the YYRULE is going to be reduced.  |
Packit 728676
`------------------------------------------------*/
Packit 728676
Packit 728676
static void
Packit 728676
yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, const char **keys, const char **vals, int *status)
Packit 728676
{
Packit 728676
  unsigned long int yylno = yyrline[yyrule];
Packit 728676
  int yynrhs = yyr2[yyrule];
Packit 728676
  int yyi;
Packit 728676
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
Packit 728676
             yyrule - 1, yylno);
Packit 728676
  /* The symbols being reduced.  */
Packit 728676
  for (yyi = 0; yyi < yynrhs; yyi++)
Packit 728676
    {
Packit 728676
      YYFPRINTF (stderr, "   $%d = ", yyi + 1);
Packit 728676
      yy_symbol_print (stderr,
Packit 728676
                       yystos[yyssp[yyi + 1 - yynrhs]],
Packit 728676
                       &(yyvsp[(yyi + 1) - (yynrhs)])
Packit 728676
                                              , keys, vals, status);
Packit 728676
      YYFPRINTF (stderr, "\n");
Packit 728676
    }
Packit 728676
}
Packit 728676
Packit 728676
# define YY_REDUCE_PRINT(Rule)          \
Packit 728676
do {                                    \
Packit 728676
  if (yydebug)                          \
Packit 728676
    yy_reduce_print (yyssp, yyvsp, Rule, keys, vals, status); \
Packit 728676
} while (0)
Packit 728676
Packit 728676
/* Nonzero means print parse trace.  It is left uninitialized so that
Packit 728676
   multiple parsers can coexist.  */
Packit 728676
int yydebug;
Packit 728676
#else /* !YYDEBUG */
Packit 728676
# define YYDPRINTF(Args)
Packit 728676
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Packit 728676
# define YY_STACK_PRINT(Bottom, Top)
Packit 728676
# define YY_REDUCE_PRINT(Rule)
Packit 728676
#endif /* !YYDEBUG */
Packit 728676
Packit 728676
Packit 728676
/* YYINITDEPTH -- initial size of the parser's stacks.  */
Packit 728676
#ifndef YYINITDEPTH
Packit 728676
# define YYINITDEPTH 200
Packit 728676
#endif
Packit 728676
Packit 728676
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
Packit 728676
   if the built-in stack extension method is used).
Packit 728676
Packit 728676
   Do not make this value too large; the results are undefined if
Packit 728676
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
Packit 728676
   evaluated with infinite-precision integer arithmetic.  */
Packit 728676
Packit 728676
#ifndef YYMAXDEPTH
Packit 728676
# define YYMAXDEPTH 10000
Packit 728676
#endif
Packit 728676
Packit 728676
Packit 728676
#if YYERROR_VERBOSE
Packit 728676
Packit 728676
# ifndef yystrlen
Packit 728676
#  if defined __GLIBC__ && defined _STRING_H
Packit 728676
#   define yystrlen strlen
Packit 728676
#  else
Packit 728676
/* Return the length of YYSTR.  */
Packit 728676
static YYSIZE_T
Packit 728676
yystrlen (const char *yystr)
Packit 728676
{
Packit 728676
  YYSIZE_T yylen;
Packit 728676
  for (yylen = 0; yystr[yylen]; yylen++)
Packit 728676
    continue;
Packit 728676
  return yylen;
Packit 728676
}
Packit 728676
#  endif
Packit 728676
# endif
Packit 728676
Packit 728676
# ifndef yystpcpy
Packit 728676
#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
Packit 728676
#   define yystpcpy stpcpy
Packit 728676
#  else
Packit 728676
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
Packit 728676
   YYDEST.  */
Packit 728676
static char *
Packit 728676
yystpcpy (char *yydest, const char *yysrc)
Packit 728676
{
Packit 728676
  char *yyd = yydest;
Packit 728676
  const char *yys = yysrc;
Packit 728676
Packit 728676
  while ((*yyd++ = *yys++) != '\0')
Packit 728676
    continue;
Packit 728676
Packit 728676
  return yyd - 1;
Packit 728676
}
Packit 728676
#  endif
Packit 728676
# endif
Packit 728676
Packit 728676
# ifndef yytnamerr
Packit 728676
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
Packit 728676
   quotes and backslashes, so that it's suitable for yyerror.  The
Packit 728676
   heuristic is that double-quoting is unnecessary unless the string
Packit 728676
   contains an apostrophe, a comma, or backslash (other than
Packit 728676
   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
Packit 728676
   null, do not copy; instead, return the length of what the result
Packit 728676
   would have been.  */
Packit 728676
static YYSIZE_T
Packit 728676
yytnamerr (char *yyres, const char *yystr)
Packit 728676
{
Packit 728676
  if (*yystr == '"')
Packit 728676
    {
Packit 728676
      YYSIZE_T yyn = 0;
Packit 728676
      char const *yyp = yystr;
Packit 728676
Packit 728676
      for (;;)
Packit 728676
        switch (*++yyp)
Packit 728676
          {
Packit 728676
          case '\'':
Packit 728676
          case ',':
Packit 728676
            goto do_not_strip_quotes;
Packit 728676
Packit 728676
          case '\\':
Packit 728676
            if (*++yyp != '\\')
Packit 728676
              goto do_not_strip_quotes;
Packit 728676
            /* Fall through.  */
Packit 728676
          default:
Packit 728676
            if (yyres)
Packit 728676
              yyres[yyn] = *yyp;
Packit 728676
            yyn++;
Packit 728676
            break;
Packit 728676
Packit 728676
          case '"':
Packit 728676
            if (yyres)
Packit 728676
              yyres[yyn] = '\0';
Packit 728676
            return yyn;
Packit 728676
          }
Packit 728676
    do_not_strip_quotes: ;
Packit 728676
    }
Packit 728676
Packit 728676
  if (! yyres)
Packit 728676
    return yystrlen (yystr);
Packit 728676
Packit 728676
  return yystpcpy (yyres, yystr) - yyres;
Packit 728676
}
Packit 728676
# endif
Packit 728676
Packit 728676
/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
Packit 728676
   about the unexpected token YYTOKEN for the state stack whose top is
Packit 728676
   YYSSP.
Packit 728676
Packit 728676
   Return 0 if *YYMSG was successfully written.  Return 1 if *YYMSG is
Packit 728676
   not large enough to hold the message.  In that case, also set
Packit 728676
   *YYMSG_ALLOC to the required number of bytes.  Return 2 if the
Packit 728676
   required number of bytes is too large to store.  */
Packit 728676
static int
Packit 728676
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
Packit 728676
                yytype_int16 *yyssp, int yytoken)
Packit 728676
{
Packit 728676
  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
Packit 728676
  YYSIZE_T yysize = yysize0;
Packit 728676
  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
Packit 728676
  /* Internationalized format string. */
Packit 728676
  const char *yyformat = YY_NULLPTR;
Packit 728676
  /* Arguments of yyformat. */
Packit 728676
  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
Packit 728676
  /* Number of reported tokens (one for the "unexpected", one per
Packit 728676
     "expected"). */
Packit 728676
  int yycount = 0;
Packit 728676
Packit 728676
  /* There are many possibilities here to consider:
Packit 728676
     - If this state is a consistent state with a default action, then
Packit 728676
       the only way this function was invoked is if the default action
Packit 728676
       is an error action.  In that case, don't check for expected
Packit 728676
       tokens because there are none.
Packit 728676
     - The only way there can be no lookahead present (in yychar) is if
Packit 728676
       this state is a consistent state with a default action.  Thus,
Packit 728676
       detecting the absence of a lookahead is sufficient to determine
Packit 728676
       that there is no unexpected or expected token to report.  In that
Packit 728676
       case, just report a simple "syntax error".
Packit 728676
     - Don't assume there isn't a lookahead just because this state is a
Packit 728676
       consistent state with a default action.  There might have been a
Packit 728676
       previous inconsistent state, consistent state with a non-default
Packit 728676
       action, or user semantic action that manipulated yychar.
Packit 728676
     - Of course, the expected token list depends on states to have
Packit 728676
       correct lookahead information, and it depends on the parser not
Packit 728676
       to perform extra reductions after fetching a lookahead from the
Packit 728676
       scanner and before detecting a syntax error.  Thus, state merging
Packit 728676
       (from LALR or IELR) and default reductions corrupt the expected
Packit 728676
       token list.  However, the list is correct for canonical LR with
Packit 728676
       one exception: it will still contain any token that will not be
Packit 728676
       accepted due to an error action in a later state.
Packit 728676
  */
Packit 728676
  if (yytoken != YYEMPTY)
Packit 728676
    {
Packit 728676
      int yyn = yypact[*yyssp];
Packit 728676
      yyarg[yycount++] = yytname[yytoken];
Packit 728676
      if (!yypact_value_is_default (yyn))
Packit 728676
        {
Packit 728676
          /* Start YYX at -YYN if negative to avoid negative indexes in
Packit 728676
             YYCHECK.  In other words, skip the first -YYN actions for
Packit 728676
             this state because they are default actions.  */
Packit 728676
          int yyxbegin = yyn < 0 ? -yyn : 0;
Packit 728676
          /* Stay within bounds of both yycheck and yytname.  */
Packit 728676
          int yychecklim = YYLAST - yyn + 1;
Packit 728676
          int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
Packit 728676
          int yyx;
Packit 728676
Packit 728676
          for (yyx = yyxbegin; yyx < yyxend; ++yyx)
Packit 728676
            if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
Packit 728676
                && !yytable_value_is_error (yytable[yyx + yyn]))
Packit 728676
              {
Packit 728676
                if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
Packit 728676
                  {
Packit 728676
                    yycount = 1;
Packit 728676
                    yysize = yysize0;
Packit 728676
                    break;
Packit 728676
                  }
Packit 728676
                yyarg[yycount++] = yytname[yyx];
Packit 728676
                {
Packit 728676
                  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
Packit 728676
                  if (! (yysize <= yysize1
Packit 728676
                         && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
Packit 728676
                    return 2;
Packit 728676
                  yysize = yysize1;
Packit 728676
                }
Packit 728676
              }
Packit 728676
        }
Packit 728676
    }
Packit 728676
Packit 728676
  switch (yycount)
Packit 728676
    {
Packit 728676
# define YYCASE_(N, S)                      \
Packit 728676
      case N:                               \
Packit 728676
        yyformat = S;                       \
Packit 728676
      break
Packit 728676
      YYCASE_(0, YY_("syntax error"));
Packit 728676
      YYCASE_(1, YY_("syntax error, unexpected %s"));
Packit 728676
      YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
Packit 728676
      YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
Packit 728676
      YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
Packit 728676
      YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
Packit 728676
# undef YYCASE_
Packit 728676
    }
Packit 728676
Packit 728676
  {
Packit 728676
    YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
Packit 728676
    if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
Packit 728676
      return 2;
Packit 728676
    yysize = yysize1;
Packit 728676
  }
Packit 728676
Packit 728676
  if (*yymsg_alloc < yysize)
Packit 728676
    {
Packit 728676
      *yymsg_alloc = 2 * yysize;
Packit 728676
      if (! (yysize <= *yymsg_alloc
Packit 728676
             && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
Packit 728676
        *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
Packit 728676
      return 1;
Packit 728676
    }
Packit 728676
Packit 728676
  /* Avoid sprintf, as that infringes on the user's name space.
Packit 728676
     Don't have undefined behavior even if the translation
Packit 728676
     produced a string with the wrong number of "%s"s.  */
Packit 728676
  {
Packit 728676
    char *yyp = *yymsg;
Packit 728676
    int yyi = 0;
Packit 728676
    while ((*yyp = *yyformat) != '\0')
Packit 728676
      if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
Packit 728676
        {
Packit 728676
          yyp += yytnamerr (yyp, yyarg[yyi++]);
Packit 728676
          yyformat += 2;
Packit 728676
        }
Packit 728676
      else
Packit 728676
        {
Packit 728676
          yyp++;
Packit 728676
          yyformat++;
Packit 728676
        }
Packit 728676
  }
Packit 728676
  return 0;
Packit 728676
}
Packit 728676
#endif /* YYERROR_VERBOSE */
Packit 728676
Packit 728676
/*-----------------------------------------------.
Packit 728676
| Release the memory associated to this symbol.  |
Packit 728676
`-----------------------------------------------*/
Packit 728676
Packit 728676
static void
Packit 728676
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, const char **keys, const char **vals, int *status)
Packit 728676
{
Packit 728676
  YYUSE (yyvaluep);
Packit 728676
  YYUSE (keys);
Packit 728676
  YYUSE (vals);
Packit 728676
  YYUSE (status);
Packit 728676
  if (!yymsg)
Packit 728676
    yymsg = "Deleting";
Packit 728676
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
Packit 728676
Packit 728676
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Packit 728676
  YYUSE (yytype);
Packit 728676
  YY_IGNORE_MAYBE_UNINITIALIZED_END
Packit 728676
}
Packit 728676
Packit 728676
Packit 728676
Packit 728676
Packit 728676
/* The lookahead symbol.  */
Packit 728676
int yychar;
Packit 728676
Packit 728676
/* The semantic value of the lookahead symbol.  */
Packit 728676
YYSTYPE yylval;
Packit 728676
/* Number of syntax errors so far.  */
Packit 728676
int yynerrs;
Packit 728676
Packit 728676
Packit 728676
/*----------.
Packit 728676
| yyparse.  |
Packit 728676
`----------*/
Packit 728676
Packit 728676
int
Packit 728676
yyparse (const char **keys, const char **vals, int *status)
Packit 728676
{
Packit 728676
    int yystate;
Packit 728676
    /* Number of tokens to shift before error messages enabled.  */
Packit 728676
    int yyerrstatus;
Packit 728676
Packit 728676
    /* The stacks and their tools:
Packit 728676
       'yyss': related to states.
Packit 728676
       'yyvs': related to semantic values.
Packit 728676
Packit 728676
       Refer to the stacks through separate pointers, to allow yyoverflow
Packit 728676
       to reallocate them elsewhere.  */
Packit 728676
Packit 728676
    /* The state stack.  */
Packit 728676
    yytype_int16 yyssa[YYINITDEPTH];
Packit 728676
    yytype_int16 *yyss;
Packit 728676
    yytype_int16 *yyssp;
Packit 728676
Packit 728676
    /* The semantic value stack.  */
Packit 728676
    YYSTYPE yyvsa[YYINITDEPTH];
Packit 728676
    YYSTYPE *yyvs;
Packit 728676
    YYSTYPE *yyvsp;
Packit 728676
Packit 728676
    YYSIZE_T yystacksize;
Packit 728676
Packit 728676
  int yyn;
Packit 728676
  int yyresult;
Packit 728676
  /* Lookahead token as an internal (translated) token number.  */
Packit 728676
  int yytoken = 0;
Packit 728676
  /* The variables used to return semantic value and location from the
Packit 728676
     action routines.  */
Packit 728676
  YYSTYPE yyval;
Packit 728676
Packit 728676
#if YYERROR_VERBOSE
Packit 728676
  /* Buffer for error messages, and its allocated size.  */
Packit 728676
  char yymsgbuf[128];
Packit 728676
  char *yymsg = yymsgbuf;
Packit 728676
  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
Packit 728676
#endif
Packit 728676
Packit 728676
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
Packit 728676
Packit 728676
  /* The number of symbols on the RHS of the reduced rule.
Packit 728676
     Keep to zero when no symbol should be popped.  */
Packit 728676
  int yylen = 0;
Packit 728676
Packit 728676
  yyssp = yyss = yyssa;
Packit 728676
  yyvsp = yyvs = yyvsa;
Packit 728676
  yystacksize = YYINITDEPTH;
Packit 728676
Packit 728676
  YYDPRINTF ((stderr, "Starting parse\n"));
Packit 728676
Packit 728676
  yystate = 0;
Packit 728676
  yyerrstatus = 0;
Packit 728676
  yynerrs = 0;
Packit 728676
  yychar = YYEMPTY; /* Cause a token to be read.  */
Packit 728676
  goto yysetstate;
Packit 728676
Packit 728676
/*------------------------------------------------------------.
Packit 728676
| yynewstate -- Push a new state, which is found in yystate.  |
Packit 728676
`------------------------------------------------------------*/
Packit 728676
 yynewstate:
Packit 728676
  /* In all cases, when you get here, the value and location stacks
Packit 728676
     have just been pushed.  So pushing a state here evens the stacks.  */
Packit 728676
  yyssp++;
Packit 728676
Packit 728676
 yysetstate:
Packit 728676
  *yyssp = yystate;
Packit 728676
Packit 728676
  if (yyss + yystacksize - 1 <= yyssp)
Packit 728676
    {
Packit 728676
      /* Get the current used size of the three stacks, in elements.  */
Packit 728676
      YYSIZE_T yysize = yyssp - yyss + 1;
Packit 728676
Packit 728676
#ifdef yyoverflow
Packit 728676
      {
Packit 728676
        /* Give user a chance to reallocate the stack.  Use copies of
Packit 728676
           these so that the &'s don't force the real ones into
Packit 728676
           memory.  */
Packit 728676
        YYSTYPE *yyvs1 = yyvs;
Packit 728676
        yytype_int16 *yyss1 = yyss;
Packit 728676
Packit 728676
        /* Each stack pointer address is followed by the size of the
Packit 728676
           data in use in that stack, in bytes.  This used to be a
Packit 728676
           conditional around just the two extra args, but that might
Packit 728676
           be undefined if yyoverflow is a macro.  */
Packit 728676
        yyoverflow (YY_("memory exhausted"),
Packit 728676
                    &yyss1, yysize * sizeof (*yyssp),
Packit 728676
                    &yyvs1, yysize * sizeof (*yyvsp),
Packit 728676
                    &yystacksize);
Packit 728676
Packit 728676
        yyss = yyss1;
Packit 728676
        yyvs = yyvs1;
Packit 728676
      }
Packit 728676
#else /* no yyoverflow */
Packit 728676
# ifndef YYSTACK_RELOCATE
Packit 728676
      goto yyexhaustedlab;
Packit 728676
# else
Packit 728676
      /* Extend the stack our own way.  */
Packit 728676
      if (YYMAXDEPTH <= yystacksize)
Packit 728676
        goto yyexhaustedlab;
Packit 728676
      yystacksize *= 2;
Packit 728676
      if (YYMAXDEPTH < yystacksize)
Packit 728676
        yystacksize = YYMAXDEPTH;
Packit 728676
Packit 728676
      {
Packit 728676
        yytype_int16 *yyss1 = yyss;
Packit 728676
        union yyalloc *yyptr =
Packit 728676
          (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
Packit 728676
        if (! yyptr)
Packit 728676
          goto yyexhaustedlab;
Packit 728676
        YYSTACK_RELOCATE (yyss_alloc, yyss);
Packit 728676
        YYSTACK_RELOCATE (yyvs_alloc, yyvs);
Packit 728676
#  undef YYSTACK_RELOCATE
Packit 728676
        if (yyss1 != yyssa)
Packit 728676
          YYSTACK_FREE (yyss1);
Packit 728676
      }
Packit 728676
# endif
Packit 728676
#endif /* no yyoverflow */
Packit 728676
Packit 728676
      yyssp = yyss + yysize - 1;
Packit 728676
      yyvsp = yyvs + yysize - 1;
Packit 728676
Packit 728676
      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
Packit 728676
                  (unsigned long int) yystacksize));
Packit 728676
Packit 728676
      if (yyss + yystacksize - 1 <= yyssp)
Packit 728676
        YYABORT;
Packit 728676
    }
Packit 728676
Packit 728676
  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
Packit 728676
Packit 728676
  if (yystate == YYFINAL)
Packit 728676
    YYACCEPT;
Packit 728676
Packit 728676
  goto yybackup;
Packit 728676
Packit 728676
/*-----------.
Packit 728676
| yybackup.  |
Packit 728676
`-----------*/
Packit 728676
yybackup:
Packit 728676
Packit 728676
  /* Do appropriate processing given the current state.  Read a
Packit 728676
     lookahead token if we need one and don't already have one.  */
Packit 728676
Packit 728676
  /* First try to decide what to do without reference to lookahead token.  */
Packit 728676
  yyn = yypact[yystate];
Packit 728676
  if (yypact_value_is_default (yyn))
Packit 728676
    goto yydefault;
Packit 728676
Packit 728676
  /* Not known => get a lookahead token if don't already have one.  */
Packit 728676
Packit 728676
  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
Packit 728676
  if (yychar == YYEMPTY)
Packit 728676
    {
Packit 728676
      YYDPRINTF ((stderr, "Reading a token: "));
Packit 728676
      yychar = yylex ();
Packit 728676
    }
Packit 728676
Packit 728676
  if (yychar <= YYEOF)
Packit 728676
    {
Packit 728676
      yychar = yytoken = YYEOF;
Packit 728676
      YYDPRINTF ((stderr, "Now at end of input.\n"));
Packit 728676
    }
Packit 728676
  else
Packit 728676
    {
Packit 728676
      yytoken = YYTRANSLATE (yychar);
Packit 728676
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
Packit 728676
    }
Packit 728676
Packit 728676
  /* If the proper action on seeing token YYTOKEN is to reduce or to
Packit 728676
     detect an error, take that action.  */
Packit 728676
  yyn += yytoken;
Packit 728676
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
Packit 728676
    goto yydefault;
Packit 728676
  yyn = yytable[yyn];
Packit 728676
  if (yyn <= 0)
Packit 728676
    {
Packit 728676
      if (yytable_value_is_error (yyn))
Packit 728676
        goto yyerrlab;
Packit 728676
      yyn = -yyn;
Packit 728676
      goto yyreduce;
Packit 728676
    }
Packit 728676
Packit 728676
  /* Count tokens shifted since error; after three, turn off error
Packit 728676
     status.  */
Packit 728676
  if (yyerrstatus)
Packit 728676
    yyerrstatus--;
Packit 728676
Packit 728676
  /* Shift the lookahead token.  */
Packit 728676
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
Packit 728676
Packit 728676
  /* Discard the shifted token.  */
Packit 728676
  yychar = YYEMPTY;
Packit 728676
Packit 728676
  yystate = yyn;
Packit 728676
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Packit 728676
  *++yyvsp = yylval;
Packit 728676
  YY_IGNORE_MAYBE_UNINITIALIZED_END
Packit 728676
Packit 728676
  goto yynewstate;
Packit 728676
Packit 728676
Packit 728676
/*-----------------------------------------------------------.
Packit 728676
| yydefault -- do the default action for the current state.  |
Packit 728676
`-----------------------------------------------------------*/
Packit 728676
yydefault:
Packit 728676
  yyn = yydefact[yystate];
Packit 728676
  if (yyn == 0)
Packit 728676
    goto yyerrlab;
Packit 728676
  goto yyreduce;
Packit 728676
Packit 728676
Packit 728676
/*-----------------------------.
Packit 728676
| yyreduce -- Do a reduction.  |
Packit 728676
`-----------------------------*/
Packit 728676
yyreduce:
Packit 728676
  /* yyn is the number of a rule to reduce with.  */
Packit 728676
  yylen = yyr2[yyn];
Packit 728676
Packit 728676
  /* If YYLEN is nonzero, implement the default value of the action:
Packit 728676
     '$$ = $1'.
Packit 728676
Packit 728676
     Otherwise, the following line sets YYVAL to garbage.
Packit 728676
     This behavior is undocumented and Bison
Packit 728676
     users should not rely upon it.  Assigning to YYVAL
Packit 728676
     unconditionally makes the parser a bit smaller, and it avoids a
Packit 728676
     GCC warning that YYVAL may be used uninitialized.  */
Packit 728676
  yyval = yyvsp[1-yylen];
Packit 728676
Packit 728676
Packit 728676
  YY_REDUCE_PRINT (yyn);
Packit 728676
  switch (yyn)
Packit 728676
    {
Packit 728676
        case 2:
Packit 728676
#line 53 "parser.y" /* yacc.c:1646  */
Packit 728676
    {
Packit 728676
      if (status != NULL)
Packit 728676
          *status = (yyvsp[0].ival);
Packit 728676
    }
Packit 728676
#line 1256 "parser.c" /* yacc.c:1646  */
Packit 728676
    break;
Packit 728676
Packit 728676
  case 4:
Packit 728676
#line 60 "parser.y" /* yacc.c:1646  */
Packit 728676
    {
Packit 728676
      (yyval.ival) = (yyvsp[-4].ival) && (yyvsp[0].ival);
Packit 728676
    }
Packit 728676
#line 1264 "parser.c" /* yacc.c:1646  */
Packit 728676
    break;
Packit 728676
Packit 728676
  case 5:
Packit 728676
#line 63 "parser.y" /* yacc.c:1646  */
Packit 728676
    {
Packit 728676
      (yyval.ival) = (yyvsp[-4].ival) || (yyvsp[0].ival);
Packit 728676
    }
Packit 728676
#line 1272 "parser.c" /* yacc.c:1646  */
Packit 728676
    break;
Packit 728676
Packit 728676
  case 6:
Packit 728676
#line 68 "parser.y" /* yacc.c:1646  */
Packit 728676
    {
Packit 728676
            (yyval.ival) = (yyvsp[-1].ival);
Packit 728676
          }
Packit 728676
#line 1280 "parser.c" /* yacc.c:1646  */
Packit 728676
    break;
Packit 728676
Packit 728676
  case 7:
Packit 728676
#line 71 "parser.y" /* yacc.c:1646  */
Packit 728676
    {
Packit 728676
            (yyval.ival) = (yyvsp[0].ival);
Packit 728676
          }
Packit 728676
#line 1288 "parser.c" /* yacc.c:1646  */
Packit 728676
    break;
Packit 728676
Packit 728676
  case 8:
Packit 728676
#line 76 "parser.y" /* yacc.c:1646  */
Packit 728676
    {
Packit 728676
            int ret = 0;
Packit 728676
            size_t sz;
Packit 728676
            if (keys != NULL && vals != NULL) {
Packit 728676
                for (int i = 0; keys[i] != NULL && vals[i] != NULL; i++) {
Packit 728676
                    if (strcmp((yyvsp[-2].sval), keys[i]) != 0) {
Packit 728676
                        continue;
Packit 728676
                    }
Packit 728676
                    sz = 0;
Packit 728676
                    memcpy(&sz, vals[i], sizeof(sz));
Packit 728676
                    if (sz == 0) {
Packit 728676
                        continue;
Packit 728676
                    }
Packit 728676
                    if (!memcmp((yyvsp[0].sval), vals[i] + sizeof(sz), sz)) {
Packit 728676
                        ret = 1;
Packit 728676
                        break;
Packit 728676
                    }
Packit 728676
                }
Packit 728676
            }
Packit 728676
            (yyval.ival) = ret;
Packit 728676
          }
Packit 728676
#line 1314 "parser.c" /* yacc.c:1646  */
Packit 728676
    break;
Packit 728676
Packit 728676
  case 9:
Packit 728676
#line 97 "parser.y" /* yacc.c:1646  */
Packit 728676
    {
Packit 728676
            int ret = 0;
Packit 728676
            if (keys != NULL && vals != NULL) {
Packit 728676
                for (int i = 0; keys[i] != NULL && vals[i] != NULL; i++) {
Packit 728676
                    if (strcmp((yyvsp[-2].sval), keys[i]) == 0) {
Packit 728676
                       ret = 1;
Packit 728676
                       break;
Packit 728676
                    }
Packit 728676
                }
Packit 728676
            }
Packit 728676
            (yyval.ival) = ret;
Packit 728676
          }
Packit 728676
#line 1331 "parser.c" /* yacc.c:1646  */
Packit 728676
    break;
Packit 728676
Packit 728676
  case 10:
Packit 728676
#line 109 "parser.y" /* yacc.c:1646  */
Packit 728676
    {
Packit 728676
            int ret = 0;
Packit 728676
            if (keys != NULL && vals != NULL) {
Packit 728676
                for (int i = 0; keys[i] != NULL && vals[i] != NULL; i++) {
Packit 728676
                    if (strcmp((yyvsp[-2].sval), keys[i]) != 0) {
Packit 728676
                        continue;
Packit 728676
                    }
Packit 728676
                    size_t b64len = b64_len(vals[i]);
Packit 728676
                    /* b64len includes the NULL terminator. */
Packit 728676
                    if (strlen((yyvsp[0].sval)) + 1 != b64len) {
Packit 728676
                        continue;
Packit 728676
                    }
Packit 728676
                    char *b64val = b64_enc(vals[i], b64len);
Packit 728676
                    if (!b64val) {
Packit 728676
                        continue;
Packit 728676
                    }
Packit 728676
                    if (strcmp((yyvsp[0].sval), b64val) == 0) {
Packit 728676
                        ret = 1;
Packit 728676
                    }
Packit 728676
                    free(b64val);
Packit 728676
                    if (ret) {
Packit 728676
                        break;
Packit 728676
                    }
Packit 728676
                }
Packit 728676
            }
Packit 728676
            (yyval.ival) = ret;
Packit 728676
          }
Packit 728676
#line 1363 "parser.c" /* yacc.c:1646  */
Packit 728676
    break;
Packit 728676
Packit 728676
Packit 728676
#line 1367 "parser.c" /* yacc.c:1646  */
Packit 728676
      default: break;
Packit 728676
    }
Packit 728676
  /* User semantic actions sometimes alter yychar, and that requires
Packit 728676
     that yytoken be updated with the new translation.  We take the
Packit 728676
     approach of translating immediately before every use of yytoken.
Packit 728676
     One alternative is translating here after every semantic action,
Packit 728676
     but that translation would be missed if the semantic action invokes
Packit 728676
     YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
Packit 728676
     if it invokes YYBACKUP.  In the case of YYABORT or YYACCEPT, an
Packit 728676
     incorrect destructor might then be invoked immediately.  In the
Packit 728676
     case of YYERROR or YYBACKUP, subsequent parser actions might lead
Packit 728676
     to an incorrect destructor call or verbose syntax error message
Packit 728676
     before the lookahead is translated.  */
Packit 728676
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
Packit 728676
Packit 728676
  YYPOPSTACK (yylen);
Packit 728676
  yylen = 0;
Packit 728676
  YY_STACK_PRINT (yyss, yyssp);
Packit 728676
Packit 728676
  *++yyvsp = yyval;
Packit 728676
Packit 728676
  /* Now 'shift' the result of the reduction.  Determine what state
Packit 728676
     that goes to, based on the state we popped back to and the rule
Packit 728676
     number reduced by.  */
Packit 728676
Packit 728676
  yyn = yyr1[yyn];
Packit 728676
Packit 728676
  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
Packit 728676
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
Packit 728676
    yystate = yytable[yystate];
Packit 728676
  else
Packit 728676
    yystate = yydefgoto[yyn - YYNTOKENS];
Packit 728676
Packit 728676
  goto yynewstate;
Packit 728676
Packit 728676
Packit 728676
/*--------------------------------------.
Packit 728676
| yyerrlab -- here on detecting error.  |
Packit 728676
`--------------------------------------*/
Packit 728676
yyerrlab:
Packit 728676
  /* Make sure we have latest lookahead translation.  See comments at
Packit 728676
     user semantic actions for why this is necessary.  */
Packit 728676
  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
Packit 728676
Packit 728676
  /* If not already recovering from an error, report this error.  */
Packit 728676
  if (!yyerrstatus)
Packit 728676
    {
Packit 728676
      ++yynerrs;
Packit 728676
#if ! YYERROR_VERBOSE
Packit 728676
      yyerror (keys, vals, status, YY_("syntax error"));
Packit 728676
#else
Packit 728676
# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
Packit 728676
                                        yyssp, yytoken)
Packit 728676
      {
Packit 728676
        char const *yymsgp = YY_("syntax error");
Packit 728676
        int yysyntax_error_status;
Packit 728676
        yysyntax_error_status = YYSYNTAX_ERROR;
Packit 728676
        if (yysyntax_error_status == 0)
Packit 728676
          yymsgp = yymsg;
Packit 728676
        else if (yysyntax_error_status == 1)
Packit 728676
          {
Packit 728676
            if (yymsg != yymsgbuf)
Packit 728676
              YYSTACK_FREE (yymsg);
Packit 728676
            yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
Packit 728676
            if (!yymsg)
Packit 728676
              {
Packit 728676
                yymsg = yymsgbuf;
Packit 728676
                yymsg_alloc = sizeof yymsgbuf;
Packit 728676
                yysyntax_error_status = 2;
Packit 728676
              }
Packit 728676
            else
Packit 728676
              {
Packit 728676
                yysyntax_error_status = YYSYNTAX_ERROR;
Packit 728676
                yymsgp = yymsg;
Packit 728676
              }
Packit 728676
          }
Packit 728676
        yyerror (keys, vals, status, yymsgp);
Packit 728676
        if (yysyntax_error_status == 2)
Packit 728676
          goto yyexhaustedlab;
Packit 728676
      }
Packit 728676
# undef YYSYNTAX_ERROR
Packit 728676
#endif
Packit 728676
    }
Packit 728676
Packit 728676
Packit 728676
Packit 728676
  if (yyerrstatus == 3)
Packit 728676
    {
Packit 728676
      /* If just tried and failed to reuse lookahead token after an
Packit 728676
         error, discard it.  */
Packit 728676
Packit 728676
      if (yychar <= YYEOF)
Packit 728676
        {
Packit 728676
          /* Return failure if at end of input.  */
Packit 728676
          if (yychar == YYEOF)
Packit 728676
            YYABORT;
Packit 728676
        }
Packit 728676
      else
Packit 728676
        {
Packit 728676
          yydestruct ("Error: discarding",
Packit 728676
                      yytoken, &yylval, keys, vals, status);
Packit 728676
          yychar = YYEMPTY;
Packit 728676
        }
Packit 728676
    }
Packit 728676
Packit 728676
  /* Else will try to reuse lookahead token after shifting the error
Packit 728676
     token.  */
Packit 728676
  goto yyerrlab1;
Packit 728676
Packit 728676
Packit 728676
/*---------------------------------------------------.
Packit 728676
| yyerrorlab -- error raised explicitly by YYERROR.  |
Packit 728676
`---------------------------------------------------*/
Packit 728676
yyerrorlab:
Packit 728676
Packit 728676
  /* Pacify compilers like GCC when the user code never invokes
Packit 728676
     YYERROR and the label yyerrorlab therefore never appears in user
Packit 728676
     code.  */
Packit 728676
  if (/*CONSTCOND*/ 0)
Packit 728676
     goto yyerrorlab;
Packit 728676
Packit 728676
  /* Do not reclaim the symbols of the rule whose action triggered
Packit 728676
     this YYERROR.  */
Packit 728676
  YYPOPSTACK (yylen);
Packit 728676
  yylen = 0;
Packit 728676
  YY_STACK_PRINT (yyss, yyssp);
Packit 728676
  yystate = *yyssp;
Packit 728676
  goto yyerrlab1;
Packit 728676
Packit 728676
Packit 728676
/*-------------------------------------------------------------.
Packit 728676
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
Packit 728676
`-------------------------------------------------------------*/
Packit 728676
yyerrlab1:
Packit 728676
  yyerrstatus = 3;      /* Each real token shifted decrements this.  */
Packit 728676
Packit 728676
  for (;;)
Packit 728676
    {
Packit 728676
      yyn = yypact[yystate];
Packit 728676
      if (!yypact_value_is_default (yyn))
Packit 728676
        {
Packit 728676
          yyn += YYTERROR;
Packit 728676
          if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
Packit 728676
            {
Packit 728676
              yyn = yytable[yyn];
Packit 728676
              if (0 < yyn)
Packit 728676
                break;
Packit 728676
            }
Packit 728676
        }
Packit 728676
Packit 728676
      /* Pop the current state because it cannot handle the error token.  */
Packit 728676
      if (yyssp == yyss)
Packit 728676
        YYABORT;
Packit 728676
Packit 728676
Packit 728676
      yydestruct ("Error: popping",
Packit 728676
                  yystos[yystate], yyvsp, keys, vals, status);
Packit 728676
      YYPOPSTACK (1);
Packit 728676
      yystate = *yyssp;
Packit 728676
      YY_STACK_PRINT (yyss, yyssp);
Packit 728676
    }
Packit 728676
Packit 728676
  YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Packit 728676
  *++yyvsp = yylval;
Packit 728676
  YY_IGNORE_MAYBE_UNINITIALIZED_END
Packit 728676
Packit 728676
Packit 728676
  /* Shift the error token.  */
Packit 728676
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
Packit 728676
Packit 728676
  yystate = yyn;
Packit 728676
  goto yynewstate;
Packit 728676
Packit 728676
Packit 728676
/*-------------------------------------.
Packit 728676
| yyacceptlab -- YYACCEPT comes here.  |
Packit 728676
`-------------------------------------*/
Packit 728676
yyacceptlab:
Packit 728676
  yyresult = 0;
Packit 728676
  goto yyreturn;
Packit 728676
Packit 728676
/*-----------------------------------.
Packit 728676
| yyabortlab -- YYABORT comes here.  |
Packit 728676
`-----------------------------------*/
Packit 728676
yyabortlab:
Packit 728676
  yyresult = 1;
Packit 728676
  goto yyreturn;
Packit 728676
Packit 728676
#if !defined yyoverflow || YYERROR_VERBOSE
Packit 728676
/*-------------------------------------------------.
Packit 728676
| yyexhaustedlab -- memory exhaustion comes here.  |
Packit 728676
`-------------------------------------------------*/
Packit 728676
yyexhaustedlab:
Packit 728676
  yyerror (keys, vals, status, YY_("memory exhausted"));
Packit 728676
  yyresult = 2;
Packit 728676
  /* Fall through.  */
Packit 728676
#endif
Packit 728676
Packit 728676
yyreturn:
Packit 728676
  if (yychar != YYEMPTY)
Packit 728676
    {
Packit 728676
      /* Make sure we have latest lookahead translation.  See comments at
Packit 728676
         user semantic actions for why this is necessary.  */
Packit 728676
      yytoken = YYTRANSLATE (yychar);
Packit 728676
      yydestruct ("Cleanup: discarding lookahead",
Packit 728676
                  yytoken, &yylval, keys, vals, status);
Packit 728676
    }
Packit 728676
  /* Do not reclaim the symbols of the rule whose action triggered
Packit 728676
     this YYABORT or YYACCEPT.  */
Packit 728676
  YYPOPSTACK (yylen);
Packit 728676
  YY_STACK_PRINT (yyss, yyssp);
Packit 728676
  while (yyssp != yyss)
Packit 728676
    {
Packit 728676
      yydestruct ("Cleanup: popping",
Packit 728676
                  yystos[*yyssp], yyvsp, keys, vals, status);
Packit 728676
      YYPOPSTACK (1);
Packit 728676
    }
Packit 728676
#ifndef yyoverflow
Packit 728676
  if (yyss != yyssa)
Packit 728676
    YYSTACK_FREE (yyss);
Packit 728676
#endif
Packit 728676
#if YYERROR_VERBOSE
Packit 728676
  if (yymsg != yymsgbuf)
Packit 728676
    YYSTACK_FREE (yymsg);
Packit 728676
#endif
Packit 728676
  return yyresult;
Packit 728676
}
Packit 728676
#line 138 "parser.y" /* yacc.c:1906  */
Packit 728676
Packit 728676
Packit 728676
static size_t b64_len(const char *val)
Packit 728676
{
Packit 728676
    size_t sz = 0;
Packit 728676
Packit 728676
    memcpy(&sz, val, sizeof(sz));
Packit 728676
    if (sz == 0)
Packit 728676
        return sz;
Packit 728676
Packit 728676
    return apr_base64_encode_len(sz);
Packit 728676
}
Packit 728676
Packit 728676
static char *b64_enc(const char *val, size_t len)
Packit 728676
{
Packit 728676
    size_t sz = 0;
Packit 728676
    char *b64val;
Packit 728676
Packit 728676
    memcpy(&sz, val, sizeof(sz));
Packit 728676
    if (sz == 0)
Packit 728676
        return NULL;
Packit 728676
Packit 728676
    b64val = calloc(1, len + 1);
Packit 728676
    if (!b64val)
Packit 728676
        return NULL;
Packit 728676
Packit 728676
    apr_base64_encode(b64val, val + sizeof(sz), sz);
Packit 728676
    return b64val;
Packit 728676
}
Packit 728676
Packit 728676
/* Return 1 if the given name attributes and values (NULL terminated arrays)
Packit 728676
 * satisfy the expression.  This does not handle parsing errors from yyparse,
Packit 728676
 * so expr should be checked by required_name_attr_expr_check() first. */
Packit 728676
int mag_verify_name_attributes(const char *expr, const char **attrs,
Packit 728676
                               const char **vals)
Packit 728676
{
Packit 728676
    int ret = 0, status = 0;
Packit 728676
    YY_BUFFER_STATE buffer;
Packit 728676
Packit 728676
    /* No name attribute requirements. Pass. */
Packit 728676
    if (expr == NULL) {
Packit 728676
        return 1;
Packit 728676
    }
Packit 728676
Packit 728676
    /* No name attributes but required attributes are specified. Fail. */
Packit 728676
    if (attrs == NULL || vals == NULL ||
Packit 728676
        attrs[0] == NULL || vals[0] == NULL) {
Packit 728676
        return 0;
Packit 728676
    }
Packit 728676
Packit 728676
    buffer = yy_scan_string((char *)expr);
Packit 728676
    ret = yyparse(attrs, vals, &status);
Packit 728676
    yy_delete_buffer(buffer);
Packit 728676
Packit 728676
    return ret == 0 && status;
Packit 728676
}
Packit 728676
Packit 728676
/* Return 1 if the expression is provided and valid, else return 0. */
Packit 728676
int mag_check_name_attr_expr(const char *expr)
Packit 728676
{
Packit 728676
    int ret;
Packit 728676
    YY_BUFFER_STATE buffer = yy_scan_string((char *)expr);
Packit 728676
Packit 728676
    /* Just verify the syntax. */
Packit 728676
    ret = yyparse(NULL, NULL, NULL);
Packit 728676
    yy_delete_buffer(buffer);
Packit 728676
Packit 728676
    return ret == 0;
Packit 728676
}
Packit 728676
Packit 728676
/* Define a no-op yyerror().  Syntax errors are logged outside of calling
Packit 728676
 * required_name_attr_expr_check(). */
Packit 728676
void yyerror(const char **keys, const char **vals, int *status, const char *s)
Packit 728676
{
Packit 728676
    return;
Packit 728676
}