y.tab.c

Go to the documentation of this file.
00001 /* A Bison parser, made by GNU Bison 2.3.  */
00002 
00003 /* Skeleton implementation for Bison's Yacc-like parsers in C
00004 
00005    Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
00006    Free Software Foundation, Inc.
00007 
00008    This program is free software; you can redistribute it and/or modify
00009    it under the terms of the GNU General Public License as published by
00010    the Free Software Foundation; either version 2, or (at your option)
00011    any later version.
00012 
00013    This program is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017 
00018    You should have received a copy of the GNU General Public License
00019    along with this program; if not, write to the Free Software
00020    Foundation, Inc., 51 Franklin Street, Fifth Floor,
00021    Boston, MA 02110-1301, USA.  */
00022 
00023 /* As a special exception, you may create a larger work that contains
00024    part or all of the Bison parser skeleton and distribute that work
00025    under terms of your choice, so long as that work isn't itself a
00026    parser generator using the skeleton or a modified version thereof
00027    as a parser skeleton.  Alternatively, if you modify or redistribute
00028    the parser skeleton itself, you may (at your option) remove this
00029    special exception, which will cause the skeleton and the resulting
00030    Bison output files to be licensed under the GNU General Public
00031    License without this special exception.
00032 
00033    This special exception was added by the Free Software Foundation in
00034    version 2.2 of Bison.  */
00035 
00036 /* C LALR(1) parser skeleton written by Richard Stallman, by
00037    simplifying the original so-called "semantic" parser.  */
00038 
00039 /* All symbols defined below should begin with yy or YY, to avoid
00040    infringing on user name space.  This should be done even for local
00041    variables, as they might otherwise be expanded by user macros.
00042    There are some unavoidable exceptions within include files to
00043    define necessary library symbols; they are noted "INFRINGES ON
00044    USER NAME SPACE" below.  */
00045 
00046 /* Identify Bison output.  */
00047 #define YYBISON 1
00048 
00049 /* Bison version.  */
00050 #define YYBISON_VERSION "2.3"
00051 
00052 /* Skeleton name.  */
00053 #define YYSKELETON_NAME "yacc.c"
00054 
00055 /* Pure parsers.  */
00056 #define YYPURE 0
00057 
00058 /* Using locations.  */
00059 #define YYLSP_NEEDED 0
00060 
00061 
00062 
00063 /* Tokens.  */
00064 #ifndef YYTOKENTYPE
00065 # define YYTOKENTYPE
00066    /* Put the tokens into the symbol table, so that GDB and other debuggers
00067       know about them.  */
00068    enum yytokentype {
00069      COMPARISON_OPERATOR = 258,
00070      NAME = 259,
00071      STRING = 260,
00072      INTNUM = 261,
00073      FLOATNUM = 262,
00074      ADD = 263,
00075      DROP = 264,
00076      COLUMN = 265,
00077      EQUAL = 266,
00078      SELECT = 267,
00079      FROM = 268,
00080      WHERE = 269,
00081      DELETE = 270,
00082      INSERT = 271,
00083      INTO = 272,
00084      VALUES = 273,
00085      UPDATE = 274,
00086      SET = 275,
00087      AND = 276,
00088      OR = 277,
00089      NOT = 278,
00090      ALTER = 279,
00091      TABLE = 280,
00092      CREATE = 281,
00093      NULL_VALUE = 282,
00094      VARCHAR = 283,
00095      INT = 284,
00096      INTEGER = 285,
00097      DOUBLE = 286,
00098      PRECISION = 287,
00099      DATE = 288,
00100      TIME = 289,
00101      ORDER = 290,
00102      BY = 291,
00103      IS = 292,
00104      ASC = 293,
00105      DESC = 294
00106    };
00107 #endif
00108 /* Tokens.  */
00109 #define COMPARISON_OPERATOR 258
00110 #define NAME 259
00111 #define STRING 260
00112 #define INTNUM 261
00113 #define FLOATNUM 262
00114 #define ADD 263
00115 #define DROP 264
00116 #define COLUMN 265
00117 #define EQUAL 266
00118 #define SELECT 267
00119 #define FROM 268
00120 #define WHERE 269
00121 #define DELETE 270
00122 #define INSERT 271
00123 #define INTO 272
00124 #define VALUES 273
00125 #define UPDATE 274
00126 #define SET 275
00127 #define AND 276
00128 #define OR 277
00129 #define NOT 278
00130 #define ALTER 279
00131 #define TABLE 280
00132 #define CREATE 281
00133 #define NULL_VALUE 282
00134 #define VARCHAR 283
00135 #define INT 284
00136 #define INTEGER 285
00137 #define DOUBLE 286
00138 #define PRECISION 287
00139 #define DATE 288
00140 #define TIME 289
00141 #define ORDER 290
00142 #define BY 291
00143 #define IS 292
00144 #define ASC 293
00145 #define DESC 294
00146 
00147 
00148 
00149 
00150 /* Copy the first part of user declarations.  */
00151 #line 21 "yac.y"
00152 
00153 #include <stdlib.h>
00154 #include <string.h>
00155 #include <math.h>
00156 #include <grass/sqlp.h>
00157 
00158 #define YYDEBUG 1
00159 #define YYERROR_VERBOSE 1
00160 
00161 
00162 
00163 /* Enabling traces.  */
00164 #ifndef YYDEBUG
00165 # define YYDEBUG 0
00166 #endif
00167 
00168 /* Enabling verbose error messages.  */
00169 #ifdef YYERROR_VERBOSE
00170 # undef YYERROR_VERBOSE
00171 # define YYERROR_VERBOSE 1
00172 #else
00173 # define YYERROR_VERBOSE 0
00174 #endif
00175 
00176 /* Enabling the token table.  */
00177 #ifndef YYTOKEN_TABLE
00178 # define YYTOKEN_TABLE 0
00179 #endif
00180 
00181 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
00182 typedef union YYSTYPE
00183 #line 34 "yac.y"
00184 {
00185         int    intval;
00186         double floatval;
00187         char   *strval;
00188         int    subtok;
00189         SQLPNODE   *node;
00190 }
00191 /* Line 187 of yacc.c.  */
00192 #line 193 "y.tab.c"
00193         YYSTYPE;
00194 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
00195 # define YYSTYPE_IS_DECLARED 1
00196 # define YYSTYPE_IS_TRIVIAL 1
00197 #endif
00198 
00199 
00200 
00201 /* Copy the second part of user declarations.  */
00202 #line 88 "yac.y"
00203 
00204  
00205 extern int yylex(void);
00206 
00207 
00208 
00209 /* Line 216 of yacc.c.  */
00210 #line 211 "y.tab.c"
00211 
00212 #ifdef short
00213 # undef short
00214 #endif
00215 
00216 #ifdef YYTYPE_UINT8
00217 typedef YYTYPE_UINT8 yytype_uint8;
00218 #else
00219 typedef unsigned char yytype_uint8;
00220 #endif
00221 
00222 #ifdef YYTYPE_INT8
00223 typedef YYTYPE_INT8 yytype_int8;
00224 #elif (defined __STDC__ || defined __C99__FUNC__ \
00225      || defined __cplusplus || defined _MSC_VER)
00226 typedef signed char yytype_int8;
00227 #else
00228 typedef short int yytype_int8;
00229 #endif
00230 
00231 #ifdef YYTYPE_UINT16
00232 typedef YYTYPE_UINT16 yytype_uint16;
00233 #else
00234 typedef unsigned short int yytype_uint16;
00235 #endif
00236 
00237 #ifdef YYTYPE_INT16
00238 typedef YYTYPE_INT16 yytype_int16;
00239 #else
00240 typedef short int yytype_int16;
00241 #endif
00242 
00243 #ifndef YYSIZE_T
00244 # ifdef __SIZE_TYPE__
00245 #  define YYSIZE_T __SIZE_TYPE__
00246 # elif defined size_t
00247 #  define YYSIZE_T size_t
00248 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
00249      || defined __cplusplus || defined _MSC_VER)
00250 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
00251 #  define YYSIZE_T size_t
00252 # else
00253 #  define YYSIZE_T unsigned int
00254 # endif
00255 #endif
00256 
00257 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
00258 
00259 #ifndef YY_
00260 # if YYENABLE_NLS
00261 #  if ENABLE_NLS
00262 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
00263 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
00264 #  endif
00265 # endif
00266 # ifndef YY_
00267 #  define YY_(msgid) msgid
00268 # endif
00269 #endif
00270 
00271 /* Suppress unused-variable warnings by "using" E.  */
00272 #if ! defined lint || defined __GNUC__
00273 # define YYUSE(e) ((void) (e))
00274 #else
00275 # define YYUSE(e) /* empty */
00276 #endif
00277 
00278 /* Identity function, used to suppress warnings about constant conditions.  */
00279 #ifndef lint
00280 # define YYID(n) (n)
00281 #else
00282 #if (defined __STDC__ || defined __C99__FUNC__ \
00283      || defined __cplusplus || defined _MSC_VER)
00284 static int
00285 YYID (int i)
00286 #else
00287 static int
00288 YYID (i)
00289     int i;
00290 #endif
00291 {
00292   return i;
00293 }
00294 #endif
00295 
00296 #if ! defined yyoverflow || YYERROR_VERBOSE
00297 
00298 /* The parser invokes alloca or malloc; define the necessary symbols.  */
00299 
00300 # ifdef YYSTACK_USE_ALLOCA
00301 #  if YYSTACK_USE_ALLOCA
00302 #   ifdef __GNUC__
00303 #    define YYSTACK_ALLOC __builtin_alloca
00304 #   elif defined __BUILTIN_VA_ARG_INCR
00305 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
00306 #   elif defined _AIX
00307 #    define YYSTACK_ALLOC __alloca
00308 #   elif defined _MSC_VER
00309 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
00310 #    define alloca _alloca
00311 #   else
00312 #    define YYSTACK_ALLOC alloca
00313 #    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00314      || defined __cplusplus || defined _MSC_VER)
00315 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
00316 #     ifndef _STDLIB_H
00317 #      define _STDLIB_H 1
00318 #     endif
00319 #    endif
00320 #   endif
00321 #  endif
00322 # endif
00323 
00324 # ifdef YYSTACK_ALLOC
00325    /* Pacify GCC's `empty if-body' warning.  */
00326 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
00327 #  ifndef YYSTACK_ALLOC_MAXIMUM
00328     /* The OS might guarantee only one guard page at the bottom of the stack,
00329        and a page size can be as small as 4096 bytes.  So we cannot safely
00330        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
00331        to allow for a few compiler-allocated temporary stack slots.  */
00332 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
00333 #  endif
00334 # else
00335 #  define YYSTACK_ALLOC YYMALLOC
00336 #  define YYSTACK_FREE YYFREE
00337 #  ifndef YYSTACK_ALLOC_MAXIMUM
00338 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
00339 #  endif
00340 #  if (defined __cplusplus && ! defined _STDLIB_H \
00341        && ! ((defined YYMALLOC || defined malloc) \
00342              && (defined YYFREE || defined free)))
00343 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
00344 #   ifndef _STDLIB_H
00345 #    define _STDLIB_H 1
00346 #   endif
00347 #  endif
00348 #  ifndef YYMALLOC
00349 #   define YYMALLOC malloc
00350 #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00351      || defined __cplusplus || defined _MSC_VER)
00352 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
00353 #   endif
00354 #  endif
00355 #  ifndef YYFREE
00356 #   define YYFREE free
00357 #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
00358      || defined __cplusplus || defined _MSC_VER)
00359 void free (void *); /* INFRINGES ON USER NAME SPACE */
00360 #   endif
00361 #  endif
00362 # endif
00363 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
00364 
00365 
00366 #if (! defined yyoverflow \
00367      && (! defined __cplusplus \
00368          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
00369 
00370 /* A type that is properly aligned for any stack member.  */
00371 union yyalloc
00372 {
00373   yytype_int16 yyss;
00374   YYSTYPE yyvs;
00375   };
00376 
00377 /* The size of the maximum gap between one aligned stack and the next.  */
00378 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
00379 
00380 /* The size of an array large to enough to hold all stacks, each with
00381    N elements.  */
00382 # define YYSTACK_BYTES(N) \
00383      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
00384       + YYSTACK_GAP_MAXIMUM)
00385 
00386 /* Copy COUNT objects from FROM to TO.  The source and destination do
00387    not overlap.  */
00388 # ifndef YYCOPY
00389 #  if defined __GNUC__ && 1 < __GNUC__
00390 #   define YYCOPY(To, From, Count) \
00391       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
00392 #  else
00393 #   define YYCOPY(To, From, Count)              \
00394       do                                        \
00395         {                                       \
00396           YYSIZE_T yyi;                         \
00397           for (yyi = 0; yyi < (Count); yyi++)   \
00398             (To)[yyi] = (From)[yyi];            \
00399         }                                       \
00400       while (YYID (0))
00401 #  endif
00402 # endif
00403 
00404 /* Relocate STACK from its old location to the new one.  The
00405    local variables YYSIZE and YYSTACKSIZE give the old and new number of
00406    elements in the stack, and YYPTR gives the new location of the
00407    stack.  Advance YYPTR to a properly aligned location for the next
00408    stack.  */
00409 # define YYSTACK_RELOCATE(Stack)                                        \
00410     do                                                                  \
00411       {                                                                 \
00412         YYSIZE_T yynewbytes;                                            \
00413         YYCOPY (&yyptr->Stack, Stack, yysize);                          \
00414         Stack = &yyptr->Stack;                                          \
00415         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
00416         yyptr += yynewbytes / sizeof (*yyptr);                          \
00417       }                                                                 \
00418     while (YYID (0))
00419 
00420 #endif
00421 
00422 /* YYFINAL -- State number of the termination state.  */
00423 #define YYFINAL  27
00424 /* YYLAST -- Last index in YYTABLE.  */
00425 #define YYLAST   156
00426 
00427 /* YYNTOKENS -- Number of terminals.  */
00428 #define YYNTOKENS  48
00429 /* YYNNTS -- Number of nonterminals.  */
00430 #define YYNNTS  32
00431 /* YYNRULES -- Number of rules.  */
00432 #define YYNRULES  87
00433 /* YYNRULES -- Number of states.  */
00434 #define YYNSTATES  157
00435 
00436 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
00437 #define YYUNDEFTOK  2
00438 #define YYMAXUTOK   294
00439 
00440 #define YYTRANSLATE(YYX)                                                \
00441   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
00442 
00443 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
00444 static const yytype_uint8 yytranslate[] =
00445 {
00446        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00447        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00448        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00449        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00450       41,    42,    44,    46,    43,    45,     2,    47,     2,     2,
00451        2,     2,     2,     2,     2,     2,     2,     2,     2,    40,
00452        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00453        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00454        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00455        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00456        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00457        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00458        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00459        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00460        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00461        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00462        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00463        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00464        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00465        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00466        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00467        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00468        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00469        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00470        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
00471        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
00472        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
00473       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
00474       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
00475       35,    36,    37,    38,    39
00476 };
00477 
00478 #if YYDEBUG
00479 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
00480    YYRHS.  */
00481 static const yytype_uint16 yyprhs[] =
00482 {
00483        0,     0,     3,     5,     7,     9,    11,    13,    15,    17,
00484       20,    27,    33,    40,    47,    51,    56,    63,    71,    81,
00485       85,    91,    96,   104,   109,   116,   118,   122,   128,   131,
00486      134,   137,   141,   144,   147,   149,   151,   153,   157,   159,
00487      164,   166,   168,   170,   173,   175,   178,   182,   186,   190,
00488      195,   199,   204,   206,   210,   214,   218,   220,   222,   226,
00489      228,   232,   234,   238,   241,   245,   249,   253,   257,   259,
00490      263,   267,   269,   273,   277,   279,   282,   284,   286,   290,
00491      292,   294,   296,   298,   300,   302,   304,   307
00492 };
00493 
00494 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
00495 static const yytype_int8 yyrhs[] =
00496 {
00497       49,     0,    -1,    50,    -1,    51,    -1,    52,    -1,    55,
00498       -1,    53,    -1,    56,    -1,    54,    -1,    49,    40,    -1,
00499       24,    25,    61,     8,    10,    58,    -1,    24,    25,    61,
00500        8,    58,    -1,    24,    25,    61,     9,    10,     4,    -1,
00501       26,    25,    61,    41,    57,    42,    -1,     9,    25,    61,
00502       -1,    12,    59,    13,    61,    -1,    12,    59,    13,    61,
00503       14,    66,    -1,    12,    59,    13,    61,    35,    36,    77,
00504       -1,    12,    59,    13,    61,    14,    66,    35,    36,    77,
00505       -1,    15,    13,    61,    -1,    15,    13,    61,    14,    66,
00506       -1,    16,    17,    61,    62,    -1,    16,    17,    61,    41,
00507       59,    42,    62,    -1,    19,    61,    20,    64,    -1,    19,
00508       61,    20,    64,    14,    66,    -1,    58,    -1,    57,    43,
00509       58,    -1,     4,    28,    41,     6,    42,    -1,     4,    29,
00510       -1,     4,    30,    -1,     4,    31,    -1,     4,    31,    32,
00511       -1,     4,    33,    -1,     4,    34,    -1,    44,    -1,    60,
00512       -1,     4,    -1,    60,    43,     4,    -1,     4,    -1,    18,
00513       41,    63,    42,    -1,    27,    -1,     5,    -1,     6,    -1,
00514       45,     6,    -1,     7,    -1,    45,     7,    -1,    63,    43,
00515       27,    -1,    63,    43,     5,    -1,    63,    43,     6,    -1,
00516       63,    43,    45,     6,    -1,    63,    43,     7,    -1,    63,
00517       43,    45,     7,    -1,    65,    -1,    64,    43,    65,    -1,
00518        4,    11,    27,    -1,     4,    11,    71,    -1,    67,    -1,
00519       68,    -1,    67,    22,    68,    -1,    69,    -1,    68,    21,
00520       69,    -1,    70,    -1,    41,    67,    42,    -1,    23,    69,
00521       -1,    71,    11,    71,    -1,    71,     3,    71,    -1,    71,
00522       37,    27,    -1,    71,    23,    27,    -1,    72,    -1,    71,
00523       46,    72,    -1,    71,    45,    72,    -1,    73,    -1,    72,
00524       44,    73,    -1,    72,    47,    73,    -1,    74,    -1,    45,
00525       73,    -1,    75,    -1,    76,    -1,    41,    71,    42,    -1,
00526        5,    -1,     6,    -1,     7,    -1,     4,    -1,    78,    -1,
00527       79,    -1,     4,    -1,     4,    38,    -1,     4,    39,    -1
00528 };
00529 
00530 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
00531 static const yytype_uint16 yyrline[] =
00532 {
00533        0,    97,    97,    98,    99,   100,   101,   102,   103,   104,
00534      108,   109,   110,   114,   118,   122,   123,   124,   125,   129,
00535      130,   134,   135,   139,   140,   145,   146,   150,   151,   152,
00536      153,   154,   155,   156,   160,   161,   165,   166,   170,   174,
00537      178,   179,   180,   181,   182,   183,   184,   185,   186,   187,
00538      188,   189,   193,   194,   198,   202,   206,   213,   214,   218,
00539      219,   223,   224,   225,   230,   233,   236,   239,   246,   247,
00540      250,   256,   257,   260,   266,   267,   273,   274,   275,   280,
00541      281,   282,   287,   290,   290,   293,   294,   297
00542 };
00543 #endif
00544 
00545 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
00546 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
00547    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
00548 static const char *const yytname[] =
00549 {
00550   "$end", "error", "$undefined", "COMPARISON_OPERATOR", "NAME", "STRING",
00551   "INTNUM", "FLOATNUM", "ADD", "DROP", "COLUMN", "EQUAL", "SELECT", "FROM",
00552   "WHERE", "DELETE", "INSERT", "INTO", "VALUES", "UPDATE", "SET", "AND",
00553   "OR", "NOT", "ALTER", "TABLE", "CREATE", "NULL_VALUE", "VARCHAR", "INT",
00554   "INTEGER", "DOUBLE", "PRECISION", "DATE", "TIME", "ORDER", "BY", "IS",
00555   "ASC", "DESC", "';'", "'('", "')'", "','", "'*'", "'-'", "'+'", "'/'",
00556   "$accept", "y_sql", "y_alter", "y_create", "y_drop", "y_select",
00557   "y_delete", "y_insert", "y_update", "y_columndefs", "y_columndef",
00558   "y_columns", "y_column_list", "y_table", "y_values", "y_value_list",
00559   "y_assignments", "y_assignment", "y_condition", "y_sub_condition",
00560   "y_sub_condition2", "y_boolean", "y_comparison", "y_expression",
00561   "y_product", "y_term", "y_atom", "y_value", "y_column", "y_order",
00562   "y_order_asc", "y_order_desc", 0
00563 };
00564 #endif
00565 
00566 # ifdef YYPRINT
00567 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
00568    token YYLEX-NUM.  */
00569 static const yytype_uint16 yytoknum[] =
00570 {
00571        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
00572      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
00573      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
00574      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
00575       59,    40,    41,    44,    42,    45,    43,    47
00576 };
00577 # endif
00578 
00579 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
00580 static const yytype_uint8 yyr1[] =
00581 {
00582        0,    48,    49,    49,    49,    49,    49,    49,    49,    49,
00583       50,    50,    50,    51,    52,    53,    53,    53,    53,    54,
00584       54,    55,    55,    56,    56,    57,    57,    58,    58,    58,
00585       58,    58,    58,    58,    59,    59,    60,    60,    61,    62,
00586       63,    63,    63,    63,    63,    63,    63,    63,    63,    63,
00587       63,    63,    64,    64,    65,    65,    66,    67,    67,    68,
00588       68,    69,    69,    69,    70,    70,    70,    70,    71,    71,
00589       71,    72,    72,    72,    73,    73,    74,    74,    74,    75,
00590       75,    75,    76,    77,    77,    78,    78,    79
00591 };
00592 
00593 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
00594 static const yytype_uint8 yyr2[] =
00595 {
00596        0,     2,     1,     1,     1,     1,     1,     1,     1,     2,
00597        6,     5,     6,     6,     3,     4,     6,     7,     9,     3,
00598        5,     4,     7,     4,     6,     1,     3,     5,     2,     2,
00599        2,     3,     2,     2,     1,     1,     1,     3,     1,     4,
00600        1,     1,     1,     2,     1,     2,     3,     3,     3,     4,
00601        3,     4,     1,     3,     3,     3,     1,     1,     3,     1,
00602        3,     1,     3,     2,     3,     3,     3,     3,     1,     3,
00603        3,     1,     3,     3,     1,     2,     1,     1,     3,     1,
00604        1,     1,     1,     1,     1,     1,     2,     2
00605 };
00606 
00607 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
00608    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
00609    means the default is an error.  */
00610 static const yytype_uint8 yydefact[] =
00611 {
00612        0,     0,     0,     0,     0,     0,     0,     0,     0,     2,
00613        3,     4,     6,     8,     5,     7,     0,    36,    34,     0,
00614       35,     0,     0,    38,     0,     0,     0,     1,     9,    14,
00615        0,     0,    19,     0,     0,     0,     0,    15,    37,     0,
00616        0,     0,    21,     0,    23,    52,     0,     0,     0,     0,
00617        0,    82,    79,    80,    81,     0,     0,     0,    20,    56,
00618       57,    59,    61,     0,    68,    71,    74,    76,    77,     0,
00619        0,     0,     0,     0,     0,     0,    11,     0,     0,    25,
00620       16,     0,    63,     0,     0,     0,    75,     0,     0,     0,
00621        0,     0,     0,     0,     0,     0,     0,    41,    42,    44,
00622       40,     0,     0,     0,    54,    55,    24,    53,     0,    28,
00623       29,    30,    32,    33,    10,    12,    13,     0,     0,    85,
00624       17,    83,    84,    62,    78,     0,    58,    60,    65,    64,
00625       67,    66,    70,    69,    72,    73,    43,    45,    39,     0,
00626       22,     0,    31,    26,     0,    86,    87,    47,    48,    50,
00627       46,     0,     0,    18,    49,    51,    27
00628 };
00629 
00630 /* YYDEFGOTO[NTERM-NUM].  */
00631 static const yytype_int8 yydefgoto[] =
00632 {
00633       -1,     8,     9,    10,    11,    12,    13,    14,    15,    78,
00634       76,    19,    20,    24,    42,   102,    44,    45,    58,    59,
00635       60,    61,    62,    63,    64,    65,    66,    67,    68,   120,
00636      121,   122
00637 };
00638 
00639 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
00640    STATE-NUM.  */
00641 #define YYPACT_NINF -52
00642 static const yytype_int16 yypact[] =
00643 {
00644       64,    -8,     3,    11,     5,    32,    49,    57,     2,   -52,
00645      -52,   -52,   -52,   -52,   -52,   -52,    32,   -52,   -52,    39,
00646       41,    32,    32,   -52,   102,    32,    32,   -52,   -52,   -52,
00647       32,    85,   109,     7,    95,    10,    83,    37,   -52,     8,
00648       84,     3,   -52,   115,   -10,   -52,     6,   117,   124,     8,
00649       93,   -52,   -52,   -52,   -52,     8,     8,    55,   -52,   108,
00650      110,   -52,   -52,     0,    31,   -52,   -52,   -52,   -52,    23,
00651       90,    50,     8,    95,    79,   124,   -52,   129,    24,   -52,
00652       99,   131,   -52,   -16,    -2,    55,   -52,     8,     8,    55,
00653       55,   111,   113,    55,    55,    55,    55,   -52,   -52,   -52,
00654      -52,    80,    51,   118,   -52,    59,   -52,   -52,    96,   -52,
00655      -52,   107,   -52,   -52,   -52,   -52,   -52,   124,   105,    78,
00656      -52,   -52,   -52,   -52,   -52,    69,   110,   -52,    59,    59,
00657      -52,   -52,    31,    31,   -52,   -52,   -52,   -52,   -52,    58,
00658      -52,   136,   -52,   -52,   131,   -52,   -52,   -52,   -52,   -52,
00659      -52,   112,   101,   -52,   -52,   -52,   -52
00660 };
00661 
00662 /* YYPGOTO[NTERM-NUM].  */
00663 static const yytype_int8 yypgoto[] =
00664 {
00665      -52,   -52,   -52,   -52,   -52,   -52,   -52,   -52,   -52,   -52,
00666      -48,   103,   -52,    76,    42,   -52,   -52,    73,     9,    91,
00667       61,   -47,   -52,   -51,    27,   -25,   -52,   -52,   -52,    12,
00668      -52,   -52
00669 };
00670 
00671 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
00672    positive, shift that token.  If negative, reduce the rule which
00673    number is the opposite.  If zero, do what YYDEFACT says.
00674    If YYTABLE_NINF, syntax error.  */
00675 #define YYTABLE_NINF -1
00676 static const yytype_uint8 yytable[] =
00677 {
00678       79,    89,    27,    89,    72,    84,    87,    17,    82,    90,
00679       74,    90,    51,    52,    53,    54,    75,    16,    46,    47,
00680      105,    91,    22,    91,    21,    40,   123,   114,    97,    98,
00681       99,    55,    86,    73,   125,    92,    23,    92,   128,   129,
00682      124,   127,    28,    93,    94,    93,    94,    18,    41,    56,
00683      100,    49,    30,    57,    51,    52,    53,    54,    80,    51,
00684       52,    53,    54,   147,   148,   149,   116,   117,   101,   143,
00685      134,   135,    50,     1,    25,    95,     2,   104,    96,     3,
00686        4,   106,    26,     5,    31,   150,   136,   137,     6,    38,
00687        7,    85,    29,   138,   139,    57,    85,    32,    33,    43,
00688       57,    35,    36,   151,    93,    94,    37,   108,   109,   110,
00689      111,   124,   112,   113,    93,    94,   145,   146,   154,   155,
00690      132,   133,    34,    39,    48,    69,    71,    77,    74,    81,
00691       87,    88,   103,   115,   118,   119,    40,   141,   130,   142,
00692      131,   144,   152,   156,    70,   140,   107,    83,   126,     0,
00693        0,     0,     0,     0,     0,     0,   153
00694 };
00695 
00696 static const yytype_int16 yycheck[] =
00697 {
00698       48,     3,     0,     3,    14,    56,    22,     4,    55,    11,
00699        4,    11,     4,     5,     6,     7,    10,    25,     8,     9,
00700       71,    23,    17,    23,    13,    18,    42,    75,     5,     6,
00701        7,    23,    57,    43,    85,    37,     4,    37,    89,    90,
00702       42,    88,    40,    45,    46,    45,    46,    44,    41,    41,
00703       27,    14,    13,    45,     4,     5,     6,     7,    49,     4,
00704        5,     6,     7,     5,     6,     7,    42,    43,    45,   117,
00705       95,    96,    35,     9,    25,    44,    12,    27,    47,    15,
00706       16,    72,    25,    19,    43,    27,     6,     7,    24,     4,
00707       26,    41,    16,    42,    43,    45,    41,    21,    22,     4,
00708       45,    25,    26,    45,    45,    46,    30,    28,    29,    30,
00709       31,    42,    33,    34,    45,    46,    38,    39,     6,     7,
00710       93,    94,    20,    14,    41,    41,    11,    10,     4,    36,
00711       22,    21,    42,     4,    35,     4,    18,    41,    27,    32,
00712       27,    36,     6,    42,    41,   103,    73,    56,    87,    -1,
00713       -1,    -1,    -1,    -1,    -1,    -1,   144
00714 };
00715 
00716 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
00717    symbol of state STATE-NUM.  */
00718 static const yytype_uint8 yystos[] =
00719 {
00720        0,     9,    12,    15,    16,    19,    24,    26,    49,    50,
00721       51,    52,    53,    54,    55,    56,    25,     4,    44,    59,
00722       60,    13,    17,     4,    61,    25,    25,     0,    40,    61,
00723       13,    43,    61,    61,    20,    61,    61,    61,     4,    14,
00724       18,    41,    62,     4,    64,    65,     8,     9,    41,    14,
00725       35,     4,     5,     6,     7,    23,    41,    45,    66,    67,
00726       68,    69,    70,    71,    72,    73,    74,    75,    76,    41,
00727       59,    11,    14,    43,     4,    10,    58,    10,    57,    58,
00728       66,    36,    69,    67,    71,    41,    73,    22,    21,     3,
00729       11,    23,    37,    45,    46,    44,    47,     5,     6,     7,
00730       27,    45,    63,    42,    27,    71,    66,    65,    28,    29,
00731       30,    31,    33,    34,    58,     4,    42,    43,    35,     4,
00732       77,    78,    79,    42,    42,    71,    68,    69,    71,    71,
00733       27,    27,    72,    72,    73,    73,     6,     7,    42,    43,
00734       62,    41,    32,    58,    36,    38,    39,     5,     6,     7,
00735       27,    45,     6,    77,     6,     7,    42
00736 };
00737 
00738 #define yyerrok         (yyerrstatus = 0)
00739 #define yyclearin       (yychar = YYEMPTY)
00740 #define YYEMPTY         (-2)
00741 #define YYEOF           0
00742 
00743 #define YYACCEPT        goto yyacceptlab
00744 #define YYABORT         goto yyabortlab
00745 #define YYERROR         goto yyerrorlab
00746 
00747 
00748 /* Like YYERROR except do call yyerror.  This remains here temporarily
00749    to ease the transition to the new meaning of YYERROR, for GCC.
00750    Once GCC version 2 has supplanted version 1, this can go.  */
00751 
00752 #define YYFAIL          goto yyerrlab
00753 
00754 #define YYRECOVERING()  (!!yyerrstatus)
00755 
00756 #define YYBACKUP(Token, Value)                                  \
00757 do                                                              \
00758   if (yychar == YYEMPTY && yylen == 1)                          \
00759     {                                                           \
00760       yychar = (Token);                                         \
00761       yylval = (Value);                                         \
00762       yytoken = YYTRANSLATE (yychar);                           \
00763       YYPOPSTACK (1);                                           \
00764       goto yybackup;                                            \
00765     }                                                           \
00766   else                                                          \
00767     {                                                           \
00768       yyerror (YY_("syntax error: cannot back up")); \
00769       YYERROR;                                                  \
00770     }                                                           \
00771 while (YYID (0))
00772 
00773 
00774 #define YYTERROR        1
00775 #define YYERRCODE       256
00776 
00777 
00778 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
00779    If N is 0, then set CURRENT to the empty location which ends
00780    the previous symbol: RHS[0] (always defined).  */
00781 
00782 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
00783 #ifndef YYLLOC_DEFAULT
00784 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
00785     do                                                                  \
00786       if (YYID (N))                                                    \
00787         {                                                               \
00788           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
00789           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
00790           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
00791           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
00792         }                                                               \
00793       else                                                              \
00794         {                                                               \
00795           (Current).first_line   = (Current).last_line   =              \
00796             YYRHSLOC (Rhs, 0).last_line;                                \
00797           (Current).first_column = (Current).last_column =              \
00798             YYRHSLOC (Rhs, 0).last_column;                              \
00799         }                                                               \
00800     while (YYID (0))
00801 #endif
00802 
00803 
00804 /* YY_LOCATION_PRINT -- Print the location on the stream.
00805    This macro was not mandated originally: define only if we know
00806    we won't break user code: when these are the locations we know.  */
00807 
00808 #ifndef YY_LOCATION_PRINT
00809 # if YYLTYPE_IS_TRIVIAL
00810 #  define YY_LOCATION_PRINT(File, Loc)                  \
00811      fprintf (File, "%d.%d-%d.%d",                      \
00812               (Loc).first_line, (Loc).first_column,     \
00813               (Loc).last_line,  (Loc).last_column)
00814 # else
00815 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
00816 # endif
00817 #endif
00818 
00819 
00820 /* YYLEX -- calling `yylex' with the right arguments.  */
00821 
00822 #ifdef YYLEX_PARAM
00823 # define YYLEX yylex (YYLEX_PARAM)
00824 #else
00825 # define YYLEX yylex ()
00826 #endif
00827 
00828 /* Enable debugging if requested.  */
00829 #if YYDEBUG
00830 
00831 # ifndef YYFPRINTF
00832 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
00833 #  define YYFPRINTF fprintf
00834 # endif
00835 
00836 # define YYDPRINTF(Args)                        \
00837 do {                                            \
00838   if (yydebug)                                  \
00839     YYFPRINTF Args;                             \
00840 } while (YYID (0))
00841 
00842 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
00843 do {                                                                      \
00844   if (yydebug)                                                            \
00845     {                                                                     \
00846       YYFPRINTF (stderr, "%s ", Title);                                   \
00847       yy_symbol_print (stderr,                                            \
00848                   Type, Value); \
00849       YYFPRINTF (stderr, "\n");                                           \
00850     }                                                                     \
00851 } while (YYID (0))
00852 
00853 
00854 /*--------------------------------.
00855 | Print this symbol on YYOUTPUT.  |
00856 `--------------------------------*/
00857 
00858 /*ARGSUSED*/
00859 #if (defined __STDC__ || defined __C99__FUNC__ \
00860      || defined __cplusplus || defined _MSC_VER)
00861 static void
00862 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
00863 #else
00864 static void
00865 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
00866     FILE *yyoutput;
00867     int yytype;
00868     YYSTYPE const * const yyvaluep;
00869 #endif
00870 {
00871   if (!yyvaluep)
00872     return;
00873 # ifdef YYPRINT
00874   if (yytype < YYNTOKENS)
00875     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
00876 # else
00877   YYUSE (yyoutput);
00878 # endif
00879   switch (yytype)
00880     {
00881       default:
00882         break;
00883     }
00884 }
00885 
00886 
00887 /*--------------------------------.
00888 | Print this symbol on YYOUTPUT.  |
00889 `--------------------------------*/
00890 
00891 #if (defined __STDC__ || defined __C99__FUNC__ \
00892      || defined __cplusplus || defined _MSC_VER)
00893 static void
00894 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
00895 #else
00896 static void
00897 yy_symbol_print (yyoutput, yytype, yyvaluep)
00898     FILE *yyoutput;
00899     int yytype;
00900     YYSTYPE const * const yyvaluep;
00901 #endif
00902 {
00903   if (yytype < YYNTOKENS)
00904     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
00905   else
00906     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
00907 
00908   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
00909   YYFPRINTF (yyoutput, ")");
00910 }
00911 
00912 /*------------------------------------------------------------------.
00913 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
00914 | TOP (included).                                                   |
00915 `------------------------------------------------------------------*/
00916 
00917 #if (defined __STDC__ || defined __C99__FUNC__ \
00918      || defined __cplusplus || defined _MSC_VER)
00919 static void
00920 yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
00921 #else
00922 static void
00923 yy_stack_print (bottom, top)
00924     yytype_int16 *bottom;
00925     yytype_int16 *top;
00926 #endif
00927 {
00928   YYFPRINTF (stderr, "Stack now");
00929   for (; bottom <= top; ++bottom)
00930     YYFPRINTF (stderr, " %d", *bottom);
00931   YYFPRINTF (stderr, "\n");
00932 }
00933 
00934 # define YY_STACK_PRINT(Bottom, Top)                            \
00935 do {                                                            \
00936   if (yydebug)                                                  \
00937     yy_stack_print ((Bottom), (Top));                           \
00938 } while (YYID (0))
00939 
00940 
00941 /*------------------------------------------------.
00942 | Report that the YYRULE is going to be reduced.  |
00943 `------------------------------------------------*/
00944 
00945 #if (defined __STDC__ || defined __C99__FUNC__ \
00946      || defined __cplusplus || defined _MSC_VER)
00947 static void
00948 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
00949 #else
00950 static void
00951 yy_reduce_print (yyvsp, yyrule)
00952     YYSTYPE *yyvsp;
00953     int yyrule;
00954 #endif
00955 {
00956   int yynrhs = yyr2[yyrule];
00957   int yyi;
00958   unsigned long int yylno = yyrline[yyrule];
00959   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
00960              yyrule - 1, yylno);
00961   /* The symbols being reduced.  */
00962   for (yyi = 0; yyi < yynrhs; yyi++)
00963     {
00964       fprintf (stderr, "   $%d = ", yyi + 1);
00965       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
00966                        &(yyvsp[(yyi + 1) - (yynrhs)])
00967                                        );
00968       fprintf (stderr, "\n");
00969     }
00970 }
00971 
00972 # define YY_REDUCE_PRINT(Rule)          \
00973 do {                                    \
00974   if (yydebug)                          \
00975     yy_reduce_print (yyvsp, Rule); \
00976 } while (YYID (0))
00977 
00978 /* Nonzero means print parse trace.  It is left uninitialized so that
00979    multiple parsers can coexist.  */
00980 int yydebug;
00981 #else /* !YYDEBUG */
00982 # define YYDPRINTF(Args)
00983 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
00984 # define YY_STACK_PRINT(Bottom, Top)
00985 # define YY_REDUCE_PRINT(Rule)
00986 #endif /* !YYDEBUG */
00987 
00988 
00989 /* YYINITDEPTH -- initial size of the parser's stacks.  */
00990 #ifndef YYINITDEPTH
00991 # define YYINITDEPTH 200
00992 #endif
00993 
00994 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
00995    if the built-in stack extension method is used).
00996 
00997    Do not make this value too large; the results are undefined if
00998    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
00999    evaluated with infinite-precision integer arithmetic.  */
01000 
01001 #ifndef YYMAXDEPTH
01002 # define YYMAXDEPTH 10000
01003 #endif
01004 
01005 
01006 
01007 #if YYERROR_VERBOSE
01008 
01009 # ifndef yystrlen
01010 #  if defined __GLIBC__ && defined _STRING_H
01011 #   define yystrlen strlen
01012 #  else
01013 /* Return the length of YYSTR.  */
01014 #if (defined __STDC__ || defined __C99__FUNC__ \
01015      || defined __cplusplus || defined _MSC_VER)
01016 static YYSIZE_T
01017 yystrlen (const char *yystr)
01018 #else
01019 static YYSIZE_T
01020 yystrlen (yystr)
01021     const char *yystr;
01022 #endif
01023 {
01024   YYSIZE_T yylen;
01025   for (yylen = 0; yystr[yylen]; yylen++)
01026     continue;
01027   return yylen;
01028 }
01029 #  endif
01030 # endif
01031 
01032 # ifndef yystpcpy
01033 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
01034 #   define yystpcpy stpcpy
01035 #  else
01036 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
01037    YYDEST.  */
01038 #if (defined __STDC__ || defined __C99__FUNC__ \
01039      || defined __cplusplus || defined _MSC_VER)
01040 static char *
01041 yystpcpy (char *yydest, const char *yysrc)
01042 #else
01043 static char *
01044 yystpcpy (yydest, yysrc)
01045     char *yydest;
01046     const char *yysrc;
01047 #endif
01048 {
01049   char *yyd = yydest;
01050   const char *yys = yysrc;
01051 
01052   while ((*yyd++ = *yys++) != '\0')
01053     continue;
01054 
01055   return yyd - 1;
01056 }
01057 #  endif
01058 # endif
01059 
01060 # ifndef yytnamerr
01061 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
01062    quotes and backslashes, so that it's suitable for yyerror.  The
01063    heuristic is that double-quoting is unnecessary unless the string
01064    contains an apostrophe, a comma, or backslash (other than
01065    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
01066    null, do not copy; instead, return the length of what the result
01067    would have been.  */
01068 static YYSIZE_T
01069 yytnamerr (char *yyres, const char *yystr)
01070 {
01071   if (*yystr == '"')
01072     {
01073       YYSIZE_T yyn = 0;
01074       char const *yyp = yystr;
01075 
01076       for (;;)
01077         switch (*++yyp)
01078           {
01079           case '\'':
01080           case ',':
01081             goto do_not_strip_quotes;
01082 
01083           case '\\':
01084             if (*++yyp != '\\')
01085               goto do_not_strip_quotes;
01086             /* Fall through.  */
01087           default:
01088             if (yyres)
01089               yyres[yyn] = *yyp;
01090             yyn++;
01091             break;
01092 
01093           case '"':
01094             if (yyres)
01095               yyres[yyn] = '\0';
01096             return yyn;
01097           }
01098     do_not_strip_quotes: ;
01099     }
01100 
01101   if (! yyres)
01102     return yystrlen (yystr);
01103 
01104   return yystpcpy (yyres, yystr) - yyres;
01105 }
01106 # endif
01107 
01108 /* Copy into YYRESULT an error message about the unexpected token
01109    YYCHAR while in state YYSTATE.  Return the number of bytes copied,
01110    including the terminating null byte.  If YYRESULT is null, do not
01111    copy anything; just return the number of bytes that would be
01112    copied.  As a special case, return 0 if an ordinary "syntax error"
01113    message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
01114    size calculation.  */
01115 static YYSIZE_T
01116 yysyntax_error (char *yyresult, int yystate, int yychar)
01117 {
01118   int yyn = yypact[yystate];
01119 
01120   if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
01121     return 0;
01122   else
01123     {
01124       int yytype = YYTRANSLATE (yychar);
01125       YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
01126       YYSIZE_T yysize = yysize0;
01127       YYSIZE_T yysize1;
01128       int yysize_overflow = 0;
01129       enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
01130       char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
01131       int yyx;
01132 
01133 # if 0
01134       /* This is so xgettext sees the translatable formats that are
01135          constructed on the fly.  */
01136       YY_("syntax error, unexpected %s");
01137       YY_("syntax error, unexpected %s, expecting %s");
01138       YY_("syntax error, unexpected %s, expecting %s or %s");
01139       YY_("syntax error, unexpected %s, expecting %s or %s or %s");
01140       YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
01141 # endif
01142       char *yyfmt;
01143       char const *yyf;
01144       static char const yyunexpected[] = "syntax error, unexpected %s";
01145       static char const yyexpecting[] = ", expecting %s";
01146       static char const yyor[] = " or %s";
01147       char yyformat[sizeof yyunexpected
01148                     + sizeof yyexpecting - 1
01149                     + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
01150                        * (sizeof yyor - 1))];
01151       char const *yyprefix = yyexpecting;
01152 
01153       /* Start YYX at -YYN if negative to avoid negative indexes in
01154          YYCHECK.  */
01155       int yyxbegin = yyn < 0 ? -yyn : 0;
01156 
01157       /* Stay within bounds of both yycheck and yytname.  */
01158       int yychecklim = YYLAST - yyn + 1;
01159       int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
01160       int yycount = 1;
01161 
01162       yyarg[0] = yytname[yytype];
01163       yyfmt = yystpcpy (yyformat, yyunexpected);
01164 
01165       for (yyx = yyxbegin; yyx < yyxend; ++yyx)
01166         if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
01167           {
01168             if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
01169               {
01170                 yycount = 1;
01171                 yysize = yysize0;
01172                 yyformat[sizeof yyunexpected - 1] = '\0';
01173                 break;
01174               }
01175             yyarg[yycount++] = yytname[yyx];
01176             yysize1 = yysize + yytnamerr (0, yytname[yyx]);
01177             yysize_overflow |= (yysize1 < yysize);
01178             yysize = yysize1;
01179             yyfmt = yystpcpy (yyfmt, yyprefix);
01180             yyprefix = yyor;
01181           }
01182 
01183       yyf = YY_(yyformat);
01184       yysize1 = yysize + yystrlen (yyf);
01185       yysize_overflow |= (yysize1 < yysize);
01186       yysize = yysize1;
01187 
01188       if (yysize_overflow)
01189         return YYSIZE_MAXIMUM;
01190 
01191       if (yyresult)
01192         {
01193           /* Avoid sprintf, as that infringes on the user's name space.
01194              Don't have undefined behavior even if the translation
01195              produced a string with the wrong number of "%s"s.  */
01196           char *yyp = yyresult;
01197           int yyi = 0;
01198           while ((*yyp = *yyf) != '\0')
01199             {
01200               if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
01201                 {
01202                   yyp += yytnamerr (yyp, yyarg[yyi++]);
01203                   yyf += 2;
01204                 }
01205               else
01206                 {
01207                   yyp++;
01208                   yyf++;
01209                 }
01210             }
01211         }
01212       return yysize;
01213     }
01214 }
01215 #endif /* YYERROR_VERBOSE */
01216 
01217 
01218 /*-----------------------------------------------.
01219 | Release the memory associated to this symbol.  |
01220 `-----------------------------------------------*/
01221 
01222 /*ARGSUSED*/
01223 #if (defined __STDC__ || defined __C99__FUNC__ \
01224      || defined __cplusplus || defined _MSC_VER)
01225 static void
01226 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
01227 #else
01228 static void
01229 yydestruct (yymsg, yytype, yyvaluep)
01230     const char *yymsg;
01231     int yytype;
01232     YYSTYPE *yyvaluep;
01233 #endif
01234 {
01235   YYUSE (yyvaluep);
01236 
01237   if (!yymsg)
01238     yymsg = "Deleting";
01239   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
01240 
01241   switch (yytype)
01242     {
01243 
01244       default:
01245         break;
01246     }
01247 }
01248 
01249 
01250 /* Prevent warnings from -Wmissing-prototypes.  */
01251 
01252 #ifdef YYPARSE_PARAM
01253 #if defined __STDC__ || defined __cplusplus
01254 int yyparse (void *YYPARSE_PARAM);
01255 #else
01256 int yyparse ();
01257 #endif
01258 #else /* ! YYPARSE_PARAM */
01259 #if defined __STDC__ || defined __cplusplus
01260 int yyparse (void);
01261 #else
01262 int yyparse ();
01263 #endif
01264 #endif /* ! YYPARSE_PARAM */
01265 
01266 
01267 
01268 /* The look-ahead symbol.  */
01269 int yychar;
01270 
01271 /* The semantic value of the look-ahead symbol.  */
01272 YYSTYPE yylval;
01273 
01274 /* Number of syntax errors so far.  */
01275 int yynerrs;
01276 
01277 
01278 
01279 /*----------.
01280 | yyparse.  |
01281 `----------*/
01282 
01283 #ifdef YYPARSE_PARAM
01284 #if (defined __STDC__ || defined __C99__FUNC__ \
01285      || defined __cplusplus || defined _MSC_VER)
01286 int
01287 yyparse (void *YYPARSE_PARAM)
01288 #else
01289 int
01290 yyparse (YYPARSE_PARAM)
01291     void *YYPARSE_PARAM;
01292 #endif
01293 #else /* ! YYPARSE_PARAM */
01294 #if (defined __STDC__ || defined __C99__FUNC__ \
01295      || defined __cplusplus || defined _MSC_VER)
01296 int
01297 yyparse (void)
01298 #else
01299 int
01300 yyparse ()
01301 
01302 #endif
01303 #endif
01304 {
01305   
01306   int yystate;
01307   int yyn;
01308   int yyresult;
01309   /* Number of tokens to shift before error messages enabled.  */
01310   int yyerrstatus;
01311   /* Look-ahead token as an internal (translated) token number.  */
01312   int yytoken = 0;
01313 #if YYERROR_VERBOSE
01314   /* Buffer for error messages, and its allocated size.  */
01315   char yymsgbuf[128];
01316   char *yymsg = yymsgbuf;
01317   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
01318 #endif
01319 
01320   /* Three stacks and their tools:
01321      `yyss': related to states,
01322      `yyvs': related to semantic values,
01323      `yyls': related to locations.
01324 
01325      Refer to the stacks thru separate pointers, to allow yyoverflow
01326      to reallocate them elsewhere.  */
01327 
01328   /* The state stack.  */
01329   yytype_int16 yyssa[YYINITDEPTH];
01330   yytype_int16 *yyss = yyssa;
01331   yytype_int16 *yyssp;
01332 
01333   /* The semantic value stack.  */
01334   YYSTYPE yyvsa[YYINITDEPTH];
01335   YYSTYPE *yyvs = yyvsa;
01336   YYSTYPE *yyvsp;
01337 
01338 
01339 
01340 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
01341 
01342   YYSIZE_T yystacksize = YYINITDEPTH;
01343 
01344   /* The variables used to return semantic value and location from the
01345      action routines.  */
01346   YYSTYPE yyval;
01347 
01348 
01349   /* The number of symbols on the RHS of the reduced rule.
01350      Keep to zero when no symbol should be popped.  */
01351   int yylen = 0;
01352 
01353   YYDPRINTF ((stderr, "Starting parse\n"));
01354 
01355   yystate = 0;
01356   yyerrstatus = 0;
01357   yynerrs = 0;
01358   yychar = YYEMPTY;             /* Cause a token to be read.  */
01359 
01360   /* Initialize stack pointers.
01361      Waste one element of value and location stack
01362      so that they stay on the same level as the state stack.
01363      The wasted elements are never initialized.  */
01364 
01365   yyssp = yyss;
01366   yyvsp = yyvs;
01367 
01368   goto yysetstate;
01369 
01370 /*------------------------------------------------------------.
01371 | yynewstate -- Push a new state, which is found in yystate.  |
01372 `------------------------------------------------------------*/
01373  yynewstate:
01374   /* In all cases, when you get here, the value and location stacks
01375      have just been pushed.  So pushing a state here evens the stacks.  */
01376   yyssp++;
01377 
01378  yysetstate:
01379   *yyssp = yystate;
01380 
01381   if (yyss + yystacksize - 1 <= yyssp)
01382     {
01383       /* Get the current used size of the three stacks, in elements.  */
01384       YYSIZE_T yysize = yyssp - yyss + 1;
01385 
01386 #ifdef yyoverflow
01387       {
01388         /* Give user a chance to reallocate the stack.  Use copies of
01389            these so that the &'s don't force the real ones into
01390            memory.  */
01391         YYSTYPE *yyvs1 = yyvs;
01392         yytype_int16 *yyss1 = yyss;
01393 
01394 
01395         /* Each stack pointer address is followed by the size of the
01396            data in use in that stack, in bytes.  This used to be a
01397            conditional around just the two extra args, but that might
01398            be undefined if yyoverflow is a macro.  */
01399         yyoverflow (YY_("memory exhausted"),
01400                     &yyss1, yysize * sizeof (*yyssp),
01401                     &yyvs1, yysize * sizeof (*yyvsp),
01402 
01403                     &yystacksize);
01404 
01405         yyss = yyss1;
01406         yyvs = yyvs1;
01407       }
01408 #else /* no yyoverflow */
01409 # ifndef YYSTACK_RELOCATE
01410       goto yyexhaustedlab;
01411 # else
01412       /* Extend the stack our own way.  */
01413       if (YYMAXDEPTH <= yystacksize)
01414         goto yyexhaustedlab;
01415       yystacksize *= 2;
01416       if (YYMAXDEPTH < yystacksize)
01417         yystacksize = YYMAXDEPTH;
01418 
01419       {
01420         yytype_int16 *yyss1 = yyss;
01421         union yyalloc *yyptr =
01422           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
01423         if (! yyptr)
01424           goto yyexhaustedlab;
01425         YYSTACK_RELOCATE (yyss);
01426         YYSTACK_RELOCATE (yyvs);
01427 
01428 #  undef YYSTACK_RELOCATE
01429         if (yyss1 != yyssa)
01430           YYSTACK_FREE (yyss1);
01431       }
01432 # endif
01433 #endif /* no yyoverflow */
01434 
01435       yyssp = yyss + yysize - 1;
01436       yyvsp = yyvs + yysize - 1;
01437 
01438 
01439       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
01440                   (unsigned long int) yystacksize));
01441 
01442       if (yyss + yystacksize - 1 <= yyssp)
01443         YYABORT;
01444     }
01445 
01446   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
01447 
01448   goto yybackup;
01449 
01450 /*-----------.
01451 | yybackup.  |
01452 `-----------*/
01453 yybackup:
01454 
01455   /* Do appropriate processing given the current state.  Read a
01456      look-ahead token if we need one and don't already have one.  */
01457 
01458   /* First try to decide what to do without reference to look-ahead token.  */
01459   yyn = yypact[yystate];
01460   if (yyn == YYPACT_NINF)
01461     goto yydefault;
01462 
01463   /* Not known => get a look-ahead token if don't already have one.  */
01464 
01465   /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
01466   if (yychar == YYEMPTY)
01467     {
01468       YYDPRINTF ((stderr, "Reading a token: "));
01469       yychar = YYLEX;
01470     }
01471 
01472   if (yychar <= YYEOF)
01473     {
01474       yychar = yytoken = YYEOF;
01475       YYDPRINTF ((stderr, "Now at end of input.\n"));
01476     }
01477   else
01478     {
01479       yytoken = YYTRANSLATE (yychar);
01480       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
01481     }
01482 
01483   /* If the proper action on seeing token YYTOKEN is to reduce or to
01484      detect an error, take that action.  */
01485   yyn += yytoken;
01486   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
01487     goto yydefault;
01488   yyn = yytable[yyn];
01489   if (yyn <= 0)
01490     {
01491       if (yyn == 0 || yyn == YYTABLE_NINF)
01492         goto yyerrlab;
01493       yyn = -yyn;
01494       goto yyreduce;
01495     }
01496 
01497   if (yyn == YYFINAL)
01498     YYACCEPT;
01499 
01500   /* Count tokens shifted since error; after three, turn off error
01501      status.  */
01502   if (yyerrstatus)
01503     yyerrstatus--;
01504 
01505   /* Shift the look-ahead token.  */
01506   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
01507 
01508   /* Discard the shifted token unless it is eof.  */
01509   if (yychar != YYEOF)
01510     yychar = YYEMPTY;
01511 
01512   yystate = yyn;
01513   *++yyvsp = yylval;
01514 
01515   goto yynewstate;
01516 
01517 
01518 /*-----------------------------------------------------------.
01519 | yydefault -- do the default action for the current state.  |
01520 `-----------------------------------------------------------*/
01521 yydefault:
01522   yyn = yydefact[yystate];
01523   if (yyn == 0)
01524     goto yyerrlab;
01525   goto yyreduce;
01526 
01527 
01528 /*-----------------------------.
01529 | yyreduce -- Do a reduction.  |
01530 `-----------------------------*/
01531 yyreduce:
01532   /* yyn is the number of a rule to reduce with.  */
01533   yylen = yyr2[yyn];
01534 
01535   /* If YYLEN is nonzero, implement the default value of the action:
01536      `$$ = $1'.
01537 
01538      Otherwise, the following line sets YYVAL to garbage.
01539      This behavior is undocumented and Bison
01540      users should not rely upon it.  Assigning to YYVAL
01541      unconditionally makes the parser a bit smaller, and it avoids a
01542      GCC warning that YYVAL may be used uninitialized.  */
01543   yyval = yyvsp[1-yylen];
01544 
01545 
01546   YY_REDUCE_PRINT (yyn);
01547   switch (yyn)
01548     {
01549         case 10:
01550 #line 108 "yac.y"
01551     { sqpCommand(SQLP_ADD_COLUMN); }
01552     break;
01553 
01554   case 11:
01555 #line 109 "yac.y"
01556     { sqpCommand(SQLP_ADD_COLUMN); }
01557     break;
01558 
01559   case 12:
01560 #line 110 "yac.y"
01561     { sqpCommand(SQLP_DROP_COLUMN); sqpColumn((yyvsp[(6) - (6)].strval));}
01562     break;
01563 
01564   case 13:
01565 #line 114 "yac.y"
01566     { sqpCommand(SQLP_CREATE); }
01567     break;
01568 
01569   case 14:
01570 #line 118 "yac.y"
01571     { sqpCommand(SQLP_DROP); }
01572     break;
01573 
01574   case 15:
01575 #line 122 "yac.y"
01576     { sqpCommand(SQLP_SELECT); }
01577     break;
01578 
01579   case 16:
01580 #line 123 "yac.y"
01581     { sqpCommand(SQLP_SELECT); }
01582     break;
01583 
01584   case 17:
01585 #line 124 "yac.y"
01586     { sqpCommand(SQLP_SELECT); }
01587     break;
01588 
01589   case 18:
01590 #line 125 "yac.y"
01591     { sqpCommand(SQLP_SELECT); }
01592     break;
01593 
01594   case 19:
01595 #line 129 "yac.y"
01596     { sqpCommand(SQLP_DELETE); }
01597     break;
01598 
01599   case 20:
01600 #line 130 "yac.y"
01601     { sqpCommand(SQLP_DELETE); }
01602     break;
01603 
01604   case 21:
01605 #line 134 "yac.y"
01606     { sqpCommand(SQLP_INSERT); }
01607     break;
01608 
01609   case 22:
01610 #line 135 "yac.y"
01611     { sqpCommand(SQLP_INSERT); }
01612     break;
01613 
01614   case 23:
01615 #line 139 "yac.y"
01616     { sqpCommand(SQLP_UPDATE); }
01617     break;
01618 
01619   case 24:
01620 #line 140 "yac.y"
01621     { sqpCommand(SQLP_UPDATE); }
01622     break;
01623 
01624   case 27:
01625 #line 150 "yac.y"
01626     { sqpColumnDef( (yyvsp[(1) - (5)].strval), SQLP_VARCHAR, (yyvsp[(4) - (5)].intval), 0 ); }
01627     break;
01628 
01629   case 28:
01630 #line 151 "yac.y"
01631     { sqpColumnDef( (yyvsp[(1) - (2)].strval), SQLP_INTEGER,  0, 0 ); }
01632     break;
01633 
01634   case 29:
01635 #line 152 "yac.y"
01636     { sqpColumnDef( (yyvsp[(1) - (2)].strval), SQLP_INTEGER,  0, 0 ); }
01637     break;
01638 
01639   case 30:
01640 #line 153 "yac.y"
01641     { sqpColumnDef( (yyvsp[(1) - (2)].strval), SQLP_DOUBLE,   0, 0 ); }
01642     break;
01643 
01644   case 31:
01645 #line 154 "yac.y"
01646     { sqpColumnDef( (yyvsp[(1) - (3)].strval), SQLP_DOUBLE,   0, 0 ); }
01647     break;
01648 
01649   case 32:
01650 #line 155 "yac.y"
01651     { sqpColumnDef( (yyvsp[(1) - (2)].strval), SQLP_DATE,     0, 0 ); }
01652     break;
01653 
01654   case 33:
01655 #line 156 "yac.y"
01656     { sqpColumnDef( (yyvsp[(1) - (2)].strval), SQLP_TIME,     0, 0 ); }
01657     break;
01658 
01659   case 36:
01660 #line 165 "yac.y"
01661     { sqpColumn( (yyvsp[(1) - (1)].strval) ); }
01662     break;
01663 
01664   case 37:
01665 #line 166 "yac.y"
01666     { sqpColumn( (yyvsp[(3) - (3)].strval) ); }
01667     break;
01668 
01669   case 38:
01670 #line 170 "yac.y"
01671     { sqpTable( (yyvsp[(1) - (1)].strval) ); }
01672     break;
01673 
01674   case 40:
01675 #line 178 "yac.y"
01676     { sqpValue( NULL,  0, 0.0, SQLP_NULL ); }
01677     break;
01678 
01679   case 41:
01680 #line 179 "yac.y"
01681     { sqpValue( (yyvsp[(1) - (1)].strval),    0, 0.0, SQLP_S ); }
01682     break;
01683 
01684   case 42:
01685 #line 180 "yac.y"
01686     { sqpValue( NULL, (yyvsp[(1) - (1)].intval), 0.0, SQLP_I ); }
01687     break;
01688 
01689   case 43:
01690 #line 181 "yac.y"
01691     { sqpValue( NULL, -(yyvsp[(2) - (2)].intval), 0.0, SQLP_I ); }
01692     break;
01693 
01694   case 44:
01695 #line 182 "yac.y"
01696     { sqpValue( NULL,  0,  (yyvsp[(1) - (1)].floatval), SQLP_D ); }
01697     break;
01698 
01699   case 45:
01700 #line 183 "yac.y"
01701     { sqpValue( NULL, 0, -(yyvsp[(2) - (2)].floatval), SQLP_D ); }
01702     break;
01703 
01704   case 46:
01705 #line 184 "yac.y"
01706     { sqpValue( NULL,  0, 0.0, SQLP_NULL ); }
01707     break;
01708 
01709   case 47:
01710 #line 185 "yac.y"
01711     { sqpValue( (yyvsp[(3) - (3)].strval),    0, 0.0, SQLP_S ); }
01712     break;
01713 
01714   case 48:
01715 #line 186 "yac.y"
01716     { sqpValue( NULL, (yyvsp[(3) - (3)].intval), 0.0, SQLP_I ); }
01717     break;
01718 
01719   case 49:
01720 #line 187 "yac.y"
01721     { sqpValue( NULL, -(yyvsp[(4) - (4)].intval), 0.0, SQLP_I ); }
01722     break;
01723 
01724   case 50:
01725 #line 188 "yac.y"
01726     { sqpValue( NULL,  0,  (yyvsp[(3) - (3)].floatval), SQLP_D ); }
01727     break;
01728 
01729   case 51:
01730 #line 189 "yac.y"
01731     { sqpValue( NULL, 0, -(yyvsp[(4) - (4)].floatval), SQLP_D ); }
01732     break;
01733 
01734   case 54:
01735 #line 198 "yac.y"
01736     { sqpAssignment( (yyvsp[(1) - (3)].strval), NULL,  0, 0.0, NULL, SQLP_NULL ); }
01737     break;
01738 
01739   case 55:
01740 #line 202 "yac.y"
01741     { sqpAssignment( (yyvsp[(1) - (3)].strval), NULL, 0, 0.0, (yyvsp[(3) - (3)].node), SQLP_EXPR ); }
01742     break;
01743 
01744   case 56:
01745 #line 206 "yac.y"
01746     { 
01747                     (yyval.node) = (yyvsp[(1) - (1)].node);
01748                     sqlpStmt->upperNodeptr = (yyval.node); 
01749                 }
01750     break;
01751 
01752   case 57:
01753 #line 213 "yac.y"
01754     { (yyval.node) = (yyvsp[(1) - (1)].node); }
01755     break;
01756 
01757   case 58:
01758 #line 214 "yac.y"
01759     { (yyval.node) = sqpNewExpressionNode (SQLP_OR, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
01760     break;
01761 
01762   case 59:
01763 #line 218 "yac.y"
01764     { (yyval.node) = (yyvsp[(1) - (1)].node); }
01765     break;
01766 
01767   case 60:
01768 #line 219 "yac.y"
01769     { (yyval.node) = sqpNewExpressionNode (SQLP_AND, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node)); }
01770     break;
01771 
01772   case 61:
01773 #line 223 "yac.y"
01774     { (yyval.node) = (yyvsp[(1) - (1)].node); }
01775     break;
01776 
01777   case 62:
01778 #line 224 "yac.y"
01779     { (yyval.node) = (yyvsp[(2) - (3)].node); }
01780     break;
01781 
01782   case 63:
01783 #line 225 "yac.y"
01784     { (yyval.node) = sqpNewExpressionNode ( SQLP_NOT, NULL, (yyvsp[(2) - (2)].node)); }
01785     break;
01786 
01787   case 64:
01788 #line 230 "yac.y"
01789     {
01790                     (yyval.node) = sqpNewExpressionNode ( SQLP_EQ, (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
01791                 }
01792     break;
01793 
01794   case 65:
01795 #line 233 "yac.y"
01796     {
01797                     (yyval.node) = sqpNewExpressionNode ( sqpOperatorCode((yyvsp[(2) - (3)].strval)), (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node));
01798                 }
01799     break;
01800 
01801   case 66:
01802 #line 236 "yac.y"
01803     {
01804                     (yyval.node) = sqpNewExpressionNode ( SQLP_ISNULL, NULL, (yyvsp[(1) - (3)].node));
01805                 }
01806     break;
01807 
01808   case 67:
01809 #line 239 "yac.y"
01810     {
01811                     (yyval.node) = sqpNewExpressionNode ( SQLP_NOTNULL, NULL, (yyvsp[(1) - (3)].node));
01812                 }
01813     break;
01814 
01815   case 68:
01816 #line 246 "yac.y"
01817     { (yyval.node) = (yyvsp[(1) - (1)].node); }
01818     break;
01819 
01820   case 69:
01821 #line 247 "yac.y"
01822     {
01823                     (yyval.node) = sqpNewExpressionNode ( sqpOperatorCode("+"), (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node) );
01824                 }
01825     break;
01826 
01827   case 70:
01828 #line 250 "yac.y"
01829     {
01830                     (yyval.node) = sqpNewExpressionNode ( sqpOperatorCode("-"), (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node) );
01831                 }
01832     break;
01833 
01834   case 71:
01835 #line 256 "yac.y"
01836     { (yyval.node) = (yyvsp[(1) - (1)].node); }
01837     break;
01838 
01839   case 72:
01840 #line 257 "yac.y"
01841     {
01842                     (yyval.node) = sqpNewExpressionNode ( sqpOperatorCode("*"), (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node) );
01843                 }
01844     break;
01845 
01846   case 73:
01847 #line 260 "yac.y"
01848     {
01849                     (yyval.node) = sqpNewExpressionNode ( sqpOperatorCode("/"), (yyvsp[(1) - (3)].node), (yyvsp[(3) - (3)].node) );
01850                 }
01851     break;
01852 
01853   case 74:
01854 #line 266 "yac.y"
01855     { (yyval.node) = (yyvsp[(1) - (1)].node); }
01856     break;
01857 
01858   case 75:
01859 #line 267 "yac.y"
01860     {
01861                     (yyval.node) = sqpNewExpressionNode ( sqpOperatorCode("-"), sqpNewValueNode ( NULL, 0, 0.0,  SQLP_I ), (yyvsp[(2) - (2)].node) );
01862                 }
01863     break;
01864 
01865   case 76:
01866 #line 273 "yac.y"
01867     { (yyval.node) = (yyvsp[(1) - (1)].node); }
01868     break;
01869 
01870   case 77:
01871 #line 274 "yac.y"
01872     { (yyval.node) = (yyvsp[(1) - (1)].node); }
01873     break;
01874 
01875   case 78:
01876 #line 275 "yac.y"
01877     { (yyval.node) = (yyvsp[(2) - (3)].node); }
01878     break;
01879 
01880   case 79:
01881 #line 280 "yac.y"
01882     { (yyval.node) = sqpNewValueNode (   (yyvsp[(1) - (1)].strval),  0, 0.0,  SQLP_S ); }
01883     break;
01884 
01885   case 80:
01886 #line 281 "yac.y"
01887     { (yyval.node) = sqpNewValueNode ( NULL, (yyvsp[(1) - (1)].intval), 0.0,  SQLP_I ); }
01888     break;
01889 
01890   case 81:
01891 #line 282 "yac.y"
01892     { (yyval.node) = sqpNewValueNode ( NULL,  0,  (yyvsp[(1) - (1)].floatval),  SQLP_D ); }
01893     break;
01894 
01895   case 82:
01896 #line 287 "yac.y"
01897     {(yyval.node) = sqpNewColumnNode (  (yyvsp[(1) - (1)].strval) );}
01898     break;
01899 
01900   case 85:
01901 #line 293 "yac.y"
01902     { sqpOrderColumn( (yyvsp[(1) - (1)].strval), SORT_ASC ); }
01903     break;
01904 
01905   case 86:
01906 #line 294 "yac.y"
01907     { sqpOrderColumn( (yyvsp[(1) - (2)].strval), SORT_ASC ); }
01908     break;
01909 
01910   case 87:
01911 #line 297 "yac.y"
01912     { sqpOrderColumn( (yyvsp[(1) - (2)].strval), SORT_DESC ); }
01913     break;
01914 
01915 
01916 /* Line 1267 of yacc.c.  */
01917 #line 1918 "y.tab.c"
01918       default: break;
01919     }
01920   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
01921 
01922   YYPOPSTACK (yylen);
01923   yylen = 0;
01924   YY_STACK_PRINT (yyss, yyssp);
01925 
01926   *++yyvsp = yyval;
01927 
01928 
01929   /* Now `shift' the result of the reduction.  Determine what state
01930      that goes to, based on the state we popped back to and the rule
01931      number reduced by.  */
01932 
01933   yyn = yyr1[yyn];
01934 
01935   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
01936   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
01937     yystate = yytable[yystate];
01938   else
01939     yystate = yydefgoto[yyn - YYNTOKENS];
01940 
01941   goto yynewstate;
01942 
01943 
01944 /*------------------------------------.
01945 | yyerrlab -- here on detecting error |
01946 `------------------------------------*/
01947 yyerrlab:
01948   /* If not already recovering from an error, report this error.  */
01949   if (!yyerrstatus)
01950     {
01951       ++yynerrs;
01952 #if ! YYERROR_VERBOSE
01953       yyerror (YY_("syntax error"));
01954 #else
01955       {
01956         YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
01957         if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
01958           {
01959             YYSIZE_T yyalloc = 2 * yysize;
01960             if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
01961               yyalloc = YYSTACK_ALLOC_MAXIMUM;
01962             if (yymsg != yymsgbuf)
01963               YYSTACK_FREE (yymsg);
01964             yymsg = (char *) YYSTACK_ALLOC (yyalloc);
01965             if (yymsg)
01966               yymsg_alloc = yyalloc;
01967             else
01968               {
01969                 yymsg = yymsgbuf;
01970                 yymsg_alloc = sizeof yymsgbuf;
01971               }
01972           }
01973 
01974         if (0 < yysize && yysize <= yymsg_alloc)
01975           {
01976             (void) yysyntax_error (yymsg, yystate, yychar);
01977             yyerror (yymsg);
01978           }
01979         else
01980           {
01981             yyerror (YY_("syntax error"));
01982             if (yysize != 0)
01983               goto yyexhaustedlab;
01984           }
01985       }
01986 #endif
01987     }
01988 
01989 
01990 
01991   if (yyerrstatus == 3)
01992     {
01993       /* If just tried and failed to reuse look-ahead token after an
01994          error, discard it.  */
01995 
01996       if (yychar <= YYEOF)
01997         {
01998           /* Return failure if at end of input.  */
01999           if (yychar == YYEOF)
02000             YYABORT;
02001         }
02002       else
02003         {
02004           yydestruct ("Error: discarding",
02005                       yytoken, &yylval);
02006           yychar = YYEMPTY;
02007         }
02008     }
02009 
02010   /* Else will try to reuse look-ahead token after shifting the error
02011      token.  */
02012   goto yyerrlab1;
02013 
02014 
02015 /*---------------------------------------------------.
02016 | yyerrorlab -- error raised explicitly by YYERROR.  |
02017 `---------------------------------------------------*/
02018 yyerrorlab:
02019 
02020   /* Pacify compilers like GCC when the user code never invokes
02021      YYERROR and the label yyerrorlab therefore never appears in user
02022      code.  */
02023   if (/*CONSTCOND*/ 0)
02024      goto yyerrorlab;
02025 
02026   /* Do not reclaim the symbols of the rule which action triggered
02027      this YYERROR.  */
02028   YYPOPSTACK (yylen);
02029   yylen = 0;
02030   YY_STACK_PRINT (yyss, yyssp);
02031   yystate = *yyssp;
02032   goto yyerrlab1;
02033 
02034 
02035 /*-------------------------------------------------------------.
02036 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
02037 `-------------------------------------------------------------*/
02038 yyerrlab1:
02039   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
02040 
02041   for (;;)
02042     {
02043       yyn = yypact[yystate];
02044       if (yyn != YYPACT_NINF)
02045         {
02046           yyn += YYTERROR;
02047           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
02048             {
02049               yyn = yytable[yyn];
02050               if (0 < yyn)
02051                 break;
02052             }
02053         }
02054 
02055       /* Pop the current state because it cannot handle the error token.  */
02056       if (yyssp == yyss)
02057         YYABORT;
02058 
02059 
02060       yydestruct ("Error: popping",
02061                   yystos[yystate], yyvsp);
02062       YYPOPSTACK (1);
02063       yystate = *yyssp;
02064       YY_STACK_PRINT (yyss, yyssp);
02065     }
02066 
02067   if (yyn == YYFINAL)
02068     YYACCEPT;
02069 
02070   *++yyvsp = yylval;
02071 
02072 
02073   /* Shift the error token.  */
02074   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
02075 
02076   yystate = yyn;
02077   goto yynewstate;
02078 
02079 
02080 /*-------------------------------------.
02081 | yyacceptlab -- YYACCEPT comes here.  |
02082 `-------------------------------------*/
02083 yyacceptlab:
02084   yyresult = 0;
02085   goto yyreturn;
02086 
02087 /*-----------------------------------.
02088 | yyabortlab -- YYABORT comes here.  |
02089 `-----------------------------------*/
02090 yyabortlab:
02091   yyresult = 1;
02092   goto yyreturn;
02093 
02094 #ifndef yyoverflow
02095 /*-------------------------------------------------.
02096 | yyexhaustedlab -- memory exhaustion comes here.  |
02097 `-------------------------------------------------*/
02098 yyexhaustedlab:
02099   yyerror (YY_("memory exhausted"));
02100   yyresult = 2;
02101   /* Fall through.  */
02102 #endif
02103 
02104 yyreturn:
02105   if (yychar != YYEOF && yychar != YYEMPTY)
02106      yydestruct ("Cleanup: discarding lookahead",
02107                  yytoken, &yylval);
02108   /* Do not reclaim the symbols of the rule which action triggered
02109      this YYABORT or YYACCEPT.  */
02110   YYPOPSTACK (yylen);
02111   YY_STACK_PRINT (yyss, yyssp);
02112   while (yyssp != yyss)
02113     {
02114       yydestruct ("Cleanup: popping",
02115                   yystos[*yyssp], yyvsp);
02116       YYPOPSTACK (1);
02117     }
02118 #ifndef yyoverflow
02119   if (yyss != yyssa)
02120     YYSTACK_FREE (yyss);
02121 #endif
02122 #if YYERROR_VERBOSE
02123   if (yymsg != yymsgbuf)
02124     YYSTACK_FREE (yymsg);
02125 #endif
02126   /* Make sure YYID is used.  */
02127   return YYID (yyresult);
02128 }
02129 
02130 
02131 #line 299 "yac.y"
02132 
02133 
02134 
02135 

Generated on Thu Jul 16 13:20:15 2009 for GRASS Programmer's Manual by  doxygen 1.5.6