
/*  A Bison parser, made from msql_yacc.y
 by  GNU Bison version 1.25
  */

#define YYBISON 1  /* Identify Bison output.  */

#define	END_OF_INPUT	258
#define	GE	259
#define	LE	260
#define	NE	261
#define	EQ	262
#define	GT	263
#define	LT	264
#define	CREATE	265
#define	DROP	266
#define	INSERT	267
#define	DELETE	268
#define	SELECT	269
#define	UPDATE	270
#define	ALL	271
#define	DISTINCT	272
#define	AS	273
#define	WHERE	274
#define	ORDER	275
#define	FROM	276
#define	INTO	277
#define	TABLE	278
#define	BY	279
#define	ASC	280
#define	DESC	281
#define	LIKE	282
#define	RLIKE	283
#define	CLIKE	284
#define	AND	285
#define	OR	286
#define	VALUES	287
#define	SET	288
#define	NOT	289
#define	NULLSYM	290
#define	PRIMARY	291
#define	KEY	292
#define	INDEX	293
#define	UNIQUE	294
#define	ON	295
#define	IDENT	296
#define	SET_FUNCT	297
#define	SYS_VAR	298
#define	TEXT	299
#define	NUM	300
#define	REAL_NUM	301
#define	INT	302
#define	BOOL	303
#define	CHAR	304
#define	REAL	305
#define	LIMIT	306
#define	CREATE_TABLE	307
#define	CREATE_INDEX	308
#define	CREATE_SEQUENCE	309
#define	DROP_TABLE	310
#define	DROP_INDEX	311
#define	DROP_SEQUENCE	312
#define	SEQUENCE	313
#define	VALUE	314
#define	STEP	315
#define	AVL_INDEX	316

#line 22 "msql_yacc.y"

#include <stdio.h>
#include <sys/types.h>

#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <signal.h>
#include <netdb.h>

#include "msql_priv.h"
#include "msql.h"
#include "common/portability.h"

int	yylineno;
extern	int selectWildcard,
	selectDistinct,
	yytoklen;

ident_t	*msqlCreateIdent();
int	yylex();
void	yyerror();

#define myFree(x) Free(x,__FILE__,__LINE__)

#ifndef YYSTYPE
#define YYSTYPE int
#endif
#include <stdio.h>

#ifndef __cplusplus
#ifndef __STDC__
#ifndef const
#define const
#endif
#endif
#endif



#define	YYFINAL		198
#define	YYFLAG		-32768
#define	YYNTBASE	67

#define YYTRANSLATE(x) ((unsigned)(x) <= 316 ? yytranslate[x] : 117)

static const char yytranslate[] = {     0,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,    62,
    63,    65,     2,    64,     2,    66,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     1,     2,     3,     4,     5,
     6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
    16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
    26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
    36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
    46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
    56,    57,    58,    59,    60,    61
};

#if YYDEBUG != 0
static const short yyprhs[] = {     0,
     0,     1,     4,     6,     8,    10,    12,    14,    16,    19,
    20,    27,    28,    39,    45,    47,    51,    53,    54,    55,
    57,    58,    61,    62,    65,    67,    71,    76,    78,    80,
    85,    90,    91,    94,    95,    98,   106,   108,   111,   112,
   114,   116,   120,   122,   124,   126,   128,   130,   134,   138,
   144,   145,   147,   149,   150,   153,   159,   163,   167,   169,
   170,   175,   177,   179,   181,   183,   185,   187,   189,   191,
   193,   195,   197,   199,   201,   204,   207,   210,   211,   215,
   220,   223,   225,   227,   228,   229,   232,   235,   238,   243,
   247,   248,   258,   259,   263,   267,   269,   273,   275,   281,
   287,   291,   293,   295,   300,   302,   304,   306,   308,   310,
   312,   314,   316,   320,   322
};

static const short yyrhs[] = {    -1,
    68,     3,     0,    69,     0,    83,     0,   102,     0,   104,
     0,   109,     0,   112,     0,    10,    70,     0,     0,    23,
    41,    62,    71,    78,    63,     0,     0,    74,    75,    38,
    41,    40,    41,    72,    62,    73,    63,     0,    58,    40,
    41,    76,    77,     0,    41,     0,    73,    64,    41,     0,
    39,     0,     0,     0,    61,     0,     0,    60,    45,     0,
     0,    59,    45,     0,    79,     0,    78,    64,    79,     0,
   115,    80,    81,    82,     0,    47,     0,    50,     0,    49,
    62,    45,    63,     0,    44,    62,    45,    63,     0,     0,
    34,    35,     0,     0,    36,    37,     0,    14,    84,    21,
    89,    91,    98,   101,     0,    85,     0,    86,    87,     0,
     0,    16,     0,    17,     0,    87,    64,    88,     0,    88,
     0,    65,     0,   115,     0,   116,     0,    41,     0,    41,
    90,    41,     0,    89,    64,    41,     0,    89,    64,    41,
    90,    41,     0,     0,    18,     0,     7,     0,     0,    19,
    92,     0,    92,    96,    95,    97,   114,     0,    92,    96,
    93,     0,    95,    97,   114,     0,    93,     0,     0,    62,
    94,    92,    63,     0,   115,     0,   116,     0,    30,     0,
    31,     0,     7,     0,     6,     0,     9,     0,     5,     0,
     8,     0,     4,     0,    27,     0,    28,     0,    29,     0,
    34,    27,     0,    34,    28,     0,    34,    29,     0,     0,
    20,    24,    99,     0,    99,    64,   115,   100,     0,   115,
   100,     0,    25,     0,    26,     0,     0,     0,    51,   113,
     0,    11,   103,     0,    23,    41,     0,    38,    41,    21,
    41,     0,    58,    21,    41,     0,     0,    12,    22,    41,
   106,   105,    32,    62,   108,    63,     0,     0,    62,   107,
    63,     0,   107,    64,   115,     0,   115,     0,   108,    64,
   113,     0,   113,     0,    15,    41,    33,   110,    91,     0,
   110,    64,   115,     7,   113,     0,   115,     7,   111,     0,
   113,     0,   116,     0,    13,    21,    41,    91,     0,    44,
     0,    45,     0,    46,     0,    35,     0,   113,     0,   115,
     0,   116,     0,    41,     0,    41,    66,    41,     0,    43,
     0,    41,    66,    43,     0
};

#endif

#if YYDEBUG != 0
static const short yyrline[] = { 0,
   138,   139,   146,   147,   148,   149,   150,   151,   160,   164,
   170,   171,   178,   179,   188,   197,   208,   212,   219,   223,
   230,   234,   240,   244,   252,   253,   258,   276,   278,   280,
   285,   293,   297,   304,   308,   322,   329,   337,   340,   342,
   344,   348,   349,   350,   360,   364,   394,   399,   405,   410,
   418,   419,   420,   423,   424,   428,   430,   432,   434,   438,
   442,   446,   448,   452,   454,   458,   460,   462,   464,   466,
   468,   470,   472,   474,   476,   478,   480,   485,   486,   489,
   491,   495,   497,   499,   503,   505,   514,   518,   524,   531,
   544,   552,   556,   564,   571,   575,   583,   587,   599,   607,
   610,   616,   618,   626,   639,   645,   650,   655,   661,   665,
   669,   676,   686,   699,   709
};
#endif


#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)

static const char * const yytname[] = {   "$","error","$undefined.","END_OF_INPUT",
"GE","LE","NE","EQ","GT","LT","CREATE","DROP","INSERT","DELETE","SELECT","UPDATE",
"ALL","DISTINCT","AS","WHERE","ORDER","FROM","INTO","TABLE","BY","ASC","DESC",
"LIKE","RLIKE","CLIKE","AND","OR","VALUES","SET","NOT","NULLSYM","PRIMARY","KEY",
"INDEX","UNIQUE","ON","IDENT","SET_FUNCT","SYS_VAR","TEXT","NUM","REAL_NUM",
"INT","BOOL","CHAR","REAL","LIMIT","CREATE_TABLE","CREATE_INDEX","CREATE_SEQUENCE",
"DROP_TABLE","DROP_INDEX","DROP_SEQUENCE","SEQUENCE","VALUE","STEP","AVL_INDEX",
"'('","')'","','","'*'","'.'","query","verb_clause","create","create_types",
"@1","@2","index_list","opt_unique","opt_index_type","opt_seq_step","opt_seq_val",
"field_list","field_list_item","type","opt_nullspec","opt_keyspec","select",
"select_data","select_fields","dist_qual","item_list","select_item","table_list",
"table_alias","where_clause","cond_list","sub_cond","@3","cond_field","cond_cont",
"cond_op","order_clause","order_list","order_dir","limit_clause","drop","drop_types",
"insert","@4","opt_field_spec","fields","values","update","update_list","update_value",
"delete","literal","cond_literal","qual_ident","qual_sysvar", NULL
};
#endif

static const short yyr1[] = {     0,
    67,    67,    68,    68,    68,    68,    68,    68,    69,    71,
    70,    72,    70,    70,    73,    73,    74,    74,    75,    75,
    76,    76,    77,    77,    78,    78,    79,    80,    80,    80,
    80,    81,    81,    82,    82,    83,    84,    85,    86,    86,
    86,    87,    87,    87,    88,    88,    89,    89,    89,    89,
    90,    90,    90,    91,    91,    92,    92,    92,    92,    94,
    93,    95,    95,    96,    96,    97,    97,    97,    97,    97,
    97,    97,    97,    97,    97,    97,    97,    98,    98,    99,
    99,   100,   100,   100,   101,   101,   102,   103,   103,   103,
   105,   104,   106,   106,   107,   107,   108,   108,   109,   110,
   110,   111,   111,   112,   113,   113,   113,   113,   114,   114,
   114,   115,   115,   116,   116
};

static const short yyr2[] = {     0,
     0,     2,     1,     1,     1,     1,     1,     1,     2,     0,
     6,     0,    10,     5,     1,     3,     1,     0,     0,     1,
     0,     2,     0,     2,     1,     3,     4,     1,     1,     4,
     4,     0,     2,     0,     2,     7,     1,     2,     0,     1,
     1,     3,     1,     1,     1,     1,     1,     3,     3,     5,
     0,     1,     1,     0,     2,     5,     3,     3,     1,     0,
     4,     1,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     2,     2,     2,     0,     3,     4,
     2,     1,     1,     0,     0,     2,     2,     2,     4,     3,
     0,     9,     0,     3,     3,     1,     3,     1,     5,     5,
     3,     1,     1,     4,     1,     1,     1,     1,     1,     1,
     1,     1,     3,     1,     3
};

static const short yydefact[] = {     1,
    18,     0,     0,     0,    39,     0,     0,     3,     4,     5,
     6,     7,     8,     0,    17,     0,     9,    19,     0,     0,
     0,    87,     0,     0,    40,    41,     0,    37,     0,     0,
     2,     0,     0,    20,     0,    88,     0,     0,    93,    54,
     0,   112,   114,    44,    38,    43,    45,    46,     0,    10,
    21,     0,     0,    90,     0,    91,     0,   104,    47,    54,
     0,     0,   112,    54,     0,     0,     0,    23,     0,    89,
     0,    96,     0,    60,    55,    59,     0,    62,    63,    53,
    52,     0,     0,    78,   113,   115,    42,     0,     0,    99,
     0,     0,    25,     0,    22,     0,    14,     0,    94,     0,
     0,     0,    64,    65,     0,    71,    69,    67,    66,    70,
    68,    72,    73,    74,     0,     0,    48,    49,     0,    85,
     0,   108,     0,   105,   106,   107,   101,   102,   103,    11,
     0,     0,    28,     0,    29,    32,    24,    12,    95,     0,
     0,    57,     0,    75,    76,    77,   109,    58,   110,   111,
     0,     0,     0,    36,     0,     0,    26,     0,     0,     0,
    34,     0,     0,    98,    61,     0,    50,    79,    84,    86,
   100,     0,     0,    33,     0,    27,     0,    92,     0,    56,
     0,    82,    83,    81,    31,    30,    35,    15,     0,    97,
    84,    13,     0,    80,    16,     0,     0,     0
};

static const short yydefgoto[] = {   196,
     7,     8,    17,    66,   162,   189,    18,    35,    68,    97,
    92,    93,   136,   161,   176,     9,    27,    28,    29,    45,
    46,    60,    82,    58,    75,    76,   102,    77,   105,   116,
   120,   168,   184,   154,    10,    22,    11,    73,    56,    71,
   163,    12,    64,   127,    13,   147,   148,    78,    79
};

static const short yypact[] = {    93,
   -18,   -14,   -10,    -6,    22,    -9,    16,-32768,-32768,-32768,
-32768,-32768,-32768,     9,-32768,   -17,-32768,   -19,    17,    38,
    60,-32768,    51,    70,-32768,-32768,    65,-32768,   -35,    56,
-32768,    39,    73,-32768,    77,-32768,    95,    76,    57,    99,
    79,    55,-32768,-32768,    58,-32768,-32768,-32768,    83,-32768,
    66,    86,    87,-32768,    83,-32768,   -27,-32768,     0,   -16,
   -12,    37,    59,   -15,   122,    83,    85,    72,    92,-32768,
    -2,-32768,   101,-32768,    53,-32768,    48,-32768,-32768,-32768,
-32768,    94,    98,   114,-32768,-32768,-32768,   100,    83,-32768,
    24,    34,-32768,   -22,-32768,    91,-32768,   102,-32768,    83,
    78,   -27,-32768,-32768,   -27,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,    45,    50,-32768,     0,   118,    96,
   137,-32768,    80,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
    83,    88,-32768,    89,-32768,   111,-32768,-32768,-32768,     1,
   -20,-32768,    48,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
   107,    83,     1,-32768,     1,   106,-32768,   108,   109,   120,
   121,    97,    36,-32768,-32768,    50,-32768,   103,    84,-32768,
-32768,   105,   110,-32768,   119,-32768,   117,-32768,     1,-32768,
    83,-32768,-32768,-32768,-32768,-32768,-32768,-32768,    49,-32768,
    84,-32768,   123,-32768,-32768,   160,   161,-32768
};

static const short yypgoto[] = {-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,    31,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
   104,-32768,    47,   -47,    61,    64,-32768,    67,-32768,    27,
-32768,-32768,   -13,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,   -89,     5,   -29,   -28
};


#define	YYLAST		178


static const short yytable[] = {    47,
    48,   128,    57,    57,    14,    42,    80,    43,    19,   103,
   104,    23,    84,    42,    24,    43,    90,    81,    31,    65,
    15,   132,    33,    20,   133,    72,   134,   135,    85,    44,
    86,    30,    47,    48,    74,   122,    94,    25,    26,    16,
   -51,    34,   165,    21,   124,   125,   126,    83,    89,    32,
   164,   106,   107,   108,   109,   110,   111,    36,   122,   121,
    99,   100,   129,   170,   123,   171,    43,   124,   125,   126,
   139,   144,   145,   146,   112,   113,   114,    42,    37,    43,
    38,   115,   103,   104,   122,    41,   149,   150,    49,   190,
    42,    39,    43,   124,   125,   126,   130,   131,   178,   179,
    50,    94,     1,     2,     3,     4,     5,     6,   182,   183,
    40,   192,   193,    51,    52,    53,    54,    57,    55,    59,
    61,    62,   169,    63,    88,    67,    69,    70,    91,    95,
    96,    98,   101,   119,   117,   137,   149,   150,   118,   140,
    85,   152,   138,   155,   160,   156,   153,   167,    86,   158,
   159,   191,   172,   173,   174,   187,   175,   188,   177,   197,
   198,   157,   141,   195,   151,    87,   181,   185,   142,   166,
   180,   143,   186,     0,     0,     0,     0,   194
};

static const short yycheck[] = {    29,
    29,    91,    19,    19,    23,    41,     7,    43,    23,    30,
    31,    22,    60,    41,    21,    43,    64,    18,     3,    49,
    39,    44,    40,    38,    47,    55,    49,    50,    41,    65,
    43,    41,    62,    62,    62,    35,    66,    16,    17,    58,
    41,    61,    63,    58,    44,    45,    46,    64,    64,    41,
   140,     4,     5,     6,     7,     8,     9,    41,    35,    89,
    63,    64,    91,   153,    41,   155,    43,    44,    45,    46,
   100,    27,    28,    29,    27,    28,    29,    41,    41,    43,
    21,    34,    30,    31,    35,    21,   116,   116,    33,   179,
    41,    41,    43,    44,    45,    46,    63,    64,    63,    64,
    62,   131,    10,    11,    12,    13,    14,    15,    25,    26,
    41,    63,    64,    41,    38,    21,    41,    19,    62,    41,
    66,    64,   152,    41,    66,    60,    41,    41,     7,    45,
    59,    40,    32,    20,    41,    45,   166,   166,    41,    62,
    41,    24,    41,     7,    34,    66,    51,    41,    43,    62,
    62,   181,    45,    45,    35,    37,    36,    41,    62,     0,
     0,   131,   102,    41,   118,    62,    64,    63,   105,   143,
   166,   105,    63,    -1,    -1,    -1,    -1,   191
};
/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
#line 3 "/ade/share/bison.simple"

/* Skeleton output parser for bison,
   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */

/* As a special exception, when this file is copied by Bison into a
   Bison output file, you may use that output file without restriction.
   This special exception was added by the Free Software Foundation
   in version 1.24 of Bison.  */

#ifndef alloca
#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* not GNU C.  */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#include <alloca.h>
#else /* not sparc */
#if defined (MSDOS) && !defined (__TURBOC__)
#include <malloc.h>
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
#include <malloc.h>
 #pragma alloca
#else /* not MSDOS, __TURBOC__, or _AIX */
#ifdef __hpux
#ifdef __cplusplus
extern "C" {
void *alloca (unsigned int);
};
#else /* not __cplusplus */
void *alloca ();
#endif /* not __cplusplus */
#endif /* __hpux */
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc.  */
#endif /* not GNU C.  */
#endif /* alloca not defined.  */

/* This is the parser code that is written into each bison parser
  when the %semantic_parser declaration is not specified in the grammar.
  It was written by Richard Stallman by simplifying the hairy parser
  used when %semantic_parser is specified.  */

/* Note: there must be only one dollar sign in this file.
   It is replaced by the list of actions, each action
   as one case of the switch.  */

#define yyerrok		(yyerrstatus = 0)
#define yyclearin	(yychar = YYEMPTY)
#define YYEMPTY		-2
#define YYEOF		0
#define YYACCEPT	return(0)
#define YYABORT 	return(1)
#define YYERROR		goto yyerrlab1
/* Like YYERROR except do call yyerror.
   This remains here temporarily to ease the
   transition to the new meaning of YYERROR, for GCC.
   Once GCC version 2 has supplanted version 1, this can go.  */
#define YYFAIL		goto yyerrlab
#define YYRECOVERING()  (!!yyerrstatus)
#define YYBACKUP(token, value) \
do								\
  if (yychar == YYEMPTY && yylen == 1)				\
    { yychar = (token), yylval = (value);			\
      yychar1 = YYTRANSLATE (yychar);				\
      YYPOPSTACK;						\
      goto yybackup;						\
    }								\
  else								\
    { yyerror ("syntax error: cannot back up"); YYERROR; }	\
while (0)

#define YYTERROR	1
#define YYERRCODE	256

#ifndef YYPURE
#define YYLEX		yylex()
#endif

#ifdef YYPURE
#ifdef YYLSP_NEEDED
#ifdef YYLEX_PARAM
#define YYLEX		yylex(&yylval, &yylloc, YYLEX_PARAM)
#else
#define YYLEX		yylex(&yylval, &yylloc)
#endif
#else /* not YYLSP_NEEDED */
#ifdef YYLEX_PARAM
#define YYLEX		yylex(&yylval, YYLEX_PARAM)
#else
#define YYLEX		yylex(&yylval)
#endif
#endif /* not YYLSP_NEEDED */
#endif

/* If nonreentrant, generate the variables here */

#ifndef YYPURE

int	yychar;			/*  the lookahead symbol		*/
YYSTYPE	yylval;			/*  the semantic value of the		*/
				/*  lookahead symbol			*/

#ifdef YYLSP_NEEDED
YYLTYPE yylloc;			/*  location data for the lookahead	*/
				/*  symbol				*/
#endif

int yynerrs;			/*  number of parse errors so far       */
#endif  /* not YYPURE */

#if YYDEBUG != 0
int yydebug;			/*  nonzero means print parse trace	*/
/* Since this is uninitialized, it does not stop multiple parsers
   from coexisting.  */
#endif

/*  YYINITDEPTH indicates the initial size of the parser's stacks	*/

#ifndef	YYINITDEPTH
#define YYINITDEPTH 200
#endif

/*  YYMAXDEPTH is the maximum size the stacks can grow to
    (effective only if the built-in stack extension method is used).  */

#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif

/* Prevent warning if -Wstrict-prototypes.  */
#ifdef __GNUC__
int yyparse (void);
#endif

#if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
#define __yy_memcpy(TO,FROM,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
#else				/* not GNU C or C++ */
#ifndef __cplusplus

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__yy_memcpy (to, from, count)
     char *to;
     char *from;
     int count;
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#else /* __cplusplus */

/* This is the most reliable way to avoid incompatibilities
   in available built-in functions on various systems.  */
static void
__yy_memcpy (char *to, char *from, int count)
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
    *t++ = *f++;
}

#endif
#endif

#line 196 "/ade/share/bison.simple"

/* The user can define YYPARSE_PARAM as the name of an argument to be passed
   into yyparse.  The argument should have type void *.
   It should actually point to an object.
   Grammar actions can access the variable by casting it
   to the proper pointer type.  */

#ifdef YYPARSE_PARAM
#ifdef __cplusplus
#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
#define YYPARSE_PARAM_DECL
#else /* not __cplusplus */
#define YYPARSE_PARAM_ARG YYPARSE_PARAM
#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
#endif /* not __cplusplus */
#else /* not YYPARSE_PARAM */
#define YYPARSE_PARAM_ARG
#define YYPARSE_PARAM_DECL
#endif /* not YYPARSE_PARAM */

int
yyparse(YYPARSE_PARAM_ARG)
     YYPARSE_PARAM_DECL
{
  register int yystate;
  register int yyn;
  register short *yyssp;
  register YYSTYPE *yyvsp;
  int yyerrstatus;	/*  number of tokens to shift before error messages enabled */
  int yychar1 = 0;		/*  lookahead token as an internal (translated) token number */

  short	yyssa[YYINITDEPTH];	/*  the state stack			*/
  YYSTYPE yyvsa[YYINITDEPTH];	/*  the semantic value stack		*/

  short *yyss = yyssa;		/*  refer to the stacks thru separate pointers */
  YYSTYPE *yyvs = yyvsa;	/*  to allow yyoverflow to reallocate them elsewhere */

#ifdef YYLSP_NEEDED
  YYLTYPE yylsa[YYINITDEPTH];	/*  the location stack			*/
  YYLTYPE *yyls = yylsa;
  YYLTYPE *yylsp;

#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
#else
#define YYPOPSTACK   (yyvsp--, yyssp--)
#endif

  int yystacksize = YYINITDEPTH;

#ifdef YYPURE
  int yychar;
  YYSTYPE yylval;
  int yynerrs;
#ifdef YYLSP_NEEDED
  YYLTYPE yylloc;
#endif
#endif

  YYSTYPE yyval;		/*  the variable used to return		*/
				/*  semantic values from the action	*/
				/*  routines				*/

  int yylen;

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Starting parse\n");
#endif

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY;		/* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */

  yyssp = yyss - 1;
  yyvsp = yyvs;
#ifdef YYLSP_NEEDED
  yylsp = yyls;
#endif

/* Push a new state, which is found in  yystate  .  */
/* In all cases, when you get here, the value and location stacks
   have just been pushed. so pushing a state here evens the stacks.  */
yynewstate:

  *++yyssp = yystate;

  if (yyssp >= yyss + yystacksize - 1)
    {
      /* Give user a chance to reallocate the stack */
      /* Use copies of these so that the &'s don't force the real ones into memory. */
      YYSTYPE *yyvs1 = yyvs;
      short *yyss1 = yyss;
#ifdef YYLSP_NEEDED
      YYLTYPE *yyls1 = yyls;
#endif

      /* Get the current used size of the three stacks, in elements.  */
      int size = yyssp - yyss + 1;

#ifdef yyoverflow
      /* Each stack pointer address is followed by the size of
	 the data in use in that stack, in bytes.  */
#ifdef YYLSP_NEEDED
      /* This used to be a conditional around just the two extra args,
	 but that might be undefined if yyoverflow is a macro.  */
      yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
		 &yyls1, size * sizeof (*yylsp),
		 &yystacksize);
#else
      yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
		 &yystacksize);
#endif

      yyss = yyss1; yyvs = yyvs1;
#ifdef YYLSP_NEEDED
      yyls = yyls1;
#endif
#else /* no yyoverflow */
      /* Extend the stack our own way.  */
      if (yystacksize >= YYMAXDEPTH)
	{
	  yyerror("parser stack overflow");
	  return 2;
	}
      yystacksize *= 2;
      if (yystacksize > YYMAXDEPTH)
	yystacksize = YYMAXDEPTH;
      yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
      __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp));
      yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
      __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
      yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
      __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp));
#endif
#endif /* no yyoverflow */

      yyssp = yyss + size - 1;
      yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
      yylsp = yyls + size - 1;
#endif

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Stack size increased to %d\n", yystacksize);
#endif

      if (yyssp >= yyss + yystacksize - 1)
	YYABORT;
    }

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Entering state %d\n", yystate);
#endif

  goto yybackup;
 yybackup:

/* Do appropriate processing given the current state.  */
/* Read a lookahead token if we need one and don't already have one.  */
/* yyresume: */

  /* First try to decide what to do without reference to lookahead token.  */

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* yychar is either YYEMPTY or YYEOF
     or a valid token in external form.  */

  if (yychar == YYEMPTY)
    {
#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Reading a token: ");
#endif
      yychar = YYLEX;
    }

  /* Convert token to internal form (in yychar1) for indexing tables with */

  if (yychar <= 0)		/* This means end of input. */
    {
      yychar1 = 0;
      yychar = YYEOF;		/* Don't call YYLEX any more */

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Now at end of input.\n");
#endif
    }
  else
    {
      yychar1 = YYTRANSLATE(yychar);

#if YYDEBUG != 0
      if (yydebug)
	{
	  fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
	  /* Give the individual parser a way to print the precise meaning
	     of a token, for further debugging info.  */
#ifdef YYPRINT
	  YYPRINT (stderr, yychar, yylval);
#endif
	  fprintf (stderr, ")\n");
	}
#endif
    }

  yyn += yychar1;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
    goto yydefault;

  yyn = yytable[yyn];

  /* yyn is what to do for this token type in this state.
     Negative => reduce, -yyn is rule number.
     Positive => shift, yyn is new state.
       New state is final state => don't bother to shift,
       just return success.
     0, or most negative number => error.  */

  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrlab;

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif

  /* Discard the token being shifted unless it is eof.  */
  if (yychar != YYEOF)
    yychar = YYEMPTY;

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  /* count tokens shifted since error; after three, turn off error status.  */
  if (yyerrstatus) yyerrstatus--;

  yystate = yyn;
  goto yynewstate;

/* Do the default action for the current state.  */
yydefault:

  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;

/* Do a reduction.  yyn is the number of a rule to reduce with.  */
yyreduce:
  yylen = yyr2[yyn];
  if (yylen > 0)
    yyval = yyvsp[1-yylen]; /* implement default value of the action */

#if YYDEBUG != 0
  if (yydebug)
    {
      int i;

      fprintf (stderr, "Reducing via rule %d (line %d), ",
	       yyn, yyrline[yyn]);

      /* Print the symbols being reduced, and their result.  */
      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
	fprintf (stderr, "%s ", yytname[yyrhs[i]]);
      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
    }
#endif


  switch (yyn) {

case 2:
#line 140 "msql_yacc.y"
{	
			msqlProcessQuery();
			msqlClean();
		;
    break;}
case 10:
#line 165 "msql_yacc.y"
{
			command = CREATE_TABLE;
			msqlAddTable(yyvsp[-1],NULL);
			myFree(yyvsp[-1]);
		;
    break;}
case 12:
#line 172 "msql_yacc.y"
{
			command = CREATE_INDEX;
			msqlAddIndex(yyvsp[-2], yyvsp[0], (int)yyvsp[-5], (int)yyvsp[-4]);
			myFree(yyvsp[-2]);
			myFree(yyvsp[0]);
		;
    break;}
case 14:
#line 180 "msql_yacc.y"
{
			command = CREATE_SEQUENCE;
			msqlAddSequence(yyvsp[-2], (int)yyvsp[-1], (int)yyvsp[0]);
			myFree(yyvsp[-2]);
		;
    break;}
case 15:
#line 189 "msql_yacc.y"
{
			if(msqlAddField(msqlCreateIdent(NULL,yyvsp[0]),(int)NULL,0,0,0)<0)
			{
				msqlClean();
				return(-1);
			}
			myFree(yyvsp[0]);
		;
    break;}
case 16:
#line 198 "msql_yacc.y"
{
			if(msqlAddField(msqlCreateIdent(NULL,yyvsp[0]),(int)NULL,0,0,0)<0)
			{
				msqlClean();
				return(-1);
			}
			myFree(yyvsp[0]);
		;
    break;}
case 17:
#line 209 "msql_yacc.y"
{
			yyval = (YYSTYPE) 1;
		;
    break;}
case 18:
#line 213 "msql_yacc.y"
{
			yyval = 0;
		;
    break;}
case 19:
#line 220 "msql_yacc.y"
{
			yyval = (YYSTYPE) IDX_AVL;
		;
    break;}
case 20:
#line 224 "msql_yacc.y"
{
			yyval = (YYSTYPE) IDX_AVL;
		;
    break;}
case 21:
#line 231 "msql_yacc.y"
{
			yyval = (YYSTYPE) 1;
		;
    break;}
case 22:
#line 235 "msql_yacc.y"
{
			yyval = (YYSTYPE) atoi(yyvsp[0]);
		;
    break;}
case 23:
#line 241 "msql_yacc.y"
{
			yyval = (YYSTYPE) 1;
		;
    break;}
case 24:
#line 245 "msql_yacc.y"
{
			yyval = (YYSTYPE) atoi(yyvsp[0]);
		;
    break;}
case 27:
#line 259 "msql_yacc.y"
{ 
			if(msqlAddField((ident_t *)yyvsp[-3],(int)yyvsp[-2],arrayLen,
				notnullflag,keyflag)<0)
			{
				msqlClean();
				return(-1);
			}
			if (arrayLen)
			{
				(void)myFree(arrayLen);
			}
			arrayLen = 0;
		;
    break;}
case 28:
#line 277 "msql_yacc.y"
{ 	yyval = (YYSTYPE) INT_TYPE; ;
    break;}
case 29:
#line 279 "msql_yacc.y"
{ 	yyval = (YYSTYPE) REAL_TYPE; ;
    break;}
case 30:
#line 281 "msql_yacc.y"
{ 
			arrayLen = yyvsp[-1]; 
		 	yyval = (YYSTYPE) CHAR_TYPE; 
		;
    break;}
case 31:
#line 286 "msql_yacc.y"
{ 
			arrayLen = yyvsp[-1]; 
		 	yyval = (YYSTYPE) TEXT_TYPE; 
		;
    break;}
case 32:
#line 294 "msql_yacc.y"
{
			notnullflag = 0;
		;
    break;}
case 33:
#line 298 "msql_yacc.y"
{
			notnullflag = 1;
		;
    break;}
case 34:
#line 305 "msql_yacc.y"
{
			keyflag = 0;
		;
    break;}
case 35:
#line 309 "msql_yacc.y"
{
			keyflag = 1;
		;
    break;}
case 36:
#line 323 "msql_yacc.y"
{
			command = SELECT;
		;
    break;}
case 39:
#line 341 "msql_yacc.y"
{ selectDistinct = 0; ;
    break;}
case 40:
#line 343 "msql_yacc.y"
{ selectDistinct = 0; ;
    break;}
case 41:
#line 345 "msql_yacc.y"
{ selectDistinct = 1; ;
    break;}
case 44:
#line 351 "msql_yacc.y"
{
			ident_t	*tmp;

			tmp = msqlCreateIdent(NULL,"*");
			msqlAddField((ident_t *)tmp,0,0,0,0);
			selectWildcard = 1;
		;
    break;}
case 45:
#line 361 "msql_yacc.y"
{
			msqlAddField((ident_t *)yyvsp[0],0,0,0,0);
		;
    break;}
case 46:
#line 365 "msql_yacc.y"
{
			msqlAddField((ident_t *)yyvsp[0],0,0,0,0);
		;
    break;}
case 47:
#line 395 "msql_yacc.y"
{
			msqlAddTable(yyvsp[0],NULL);
			myFree(yyvsp[0]);
		;
    break;}
case 48:
#line 400 "msql_yacc.y"
{
			msqlAddTable(yyvsp[-2], yyvsp[0]);
			myFree(yyvsp[-2]);
			myFree(yyvsp[0]);
		;
    break;}
case 49:
#line 406 "msql_yacc.y"
{
			msqlAddTable(yyvsp[0],NULL);
			myFree(yyvsp[0]);
		;
    break;}
case 50:
#line 411 "msql_yacc.y"
{
			msqlAddTable(yyvsp[-2], yyvsp[0]);
			myFree(yyvsp[-2]);
			myFree(yyvsp[0]);
		;
    break;}
case 56:
#line 429 "msql_yacc.y"
{ msqlAddCond((ident_t *)yyvsp[-2],(int)yyvsp[-1],(val_t *)yyvsp[0],(int)yyvsp[-3]); ;
    break;}
case 57:
#line 431 "msql_yacc.y"
{ msqlAddSubCond((int)yyvsp[-1]); ;
    break;}
case 58:
#line 433 "msql_yacc.y"
{ msqlAddCond((ident_t *)yyvsp[-2],(int)yyvsp[-1],(val_t *)yyvsp[0],NO_BOOL); ;
    break;}
case 59:
#line 435 "msql_yacc.y"
{ msqlAddSubCond(NO_BOOL); ;
    break;}
case 60:
#line 439 "msql_yacc.y"
{
			msqlPushCond();
		;
    break;}
case 62:
#line 447 "msql_yacc.y"
{ yyval = yyvsp[0]; ;
    break;}
case 63:
#line 449 "msql_yacc.y"
{ yyval = yyvsp[0]; ;
    break;}
case 64:
#line 453 "msql_yacc.y"
{ yyval = (char *)AND_BOOL; ;
    break;}
case 65:
#line 455 "msql_yacc.y"
{ yyval = (char *)OR_BOOL; ;
    break;}
case 66:
#line 459 "msql_yacc.y"
{ yyval = (char *)EQ_OP; ;
    break;}
case 67:
#line 461 "msql_yacc.y"
{ yyval = (char *)NE_OP; ;
    break;}
case 68:
#line 463 "msql_yacc.y"
{ yyval = (char *)LT_OP; ;
    break;}
case 69:
#line 465 "msql_yacc.y"
{ yyval = (char *)LE_OP; ;
    break;}
case 70:
#line 467 "msql_yacc.y"
{ yyval = (char *)GT_OP; ;
    break;}
case 71:
#line 469 "msql_yacc.y"
{ yyval = (char *)GE_OP; ;
    break;}
case 72:
#line 471 "msql_yacc.y"
{ yyval = (char *)LIKE_OP; ;
    break;}
case 73:
#line 473 "msql_yacc.y"
{ yyval = (char *)RLIKE_OP; ;
    break;}
case 74:
#line 475 "msql_yacc.y"
{ yyval = (char *)CLIKE_OP; ;
    break;}
case 75:
#line 477 "msql_yacc.y"
{ yyval = (char *)NOT_LIKE_OP; ;
    break;}
case 76:
#line 479 "msql_yacc.y"
{ yyval = (char *)NOT_RLIKE_OP; ;
    break;}
case 77:
#line 481 "msql_yacc.y"
{ yyval = (char *)NOT_CLIKE_OP; ;
    break;}
case 80:
#line 490 "msql_yacc.y"
{ msqlAddOrder((ident_t *)yyvsp[-1],(int) yyvsp[0]); ;
    break;}
case 81:
#line 492 "msql_yacc.y"
{ msqlAddOrder((ident_t *)yyvsp[-1],(int) yyvsp[0]); ;
    break;}
case 82:
#line 496 "msql_yacc.y"
{ yyval = (char *) ASC; ;
    break;}
case 83:
#line 498 "msql_yacc.y"
{ yyval = (char *) DESC; ;
    break;}
case 84:
#line 500 "msql_yacc.y"
{ yyval = (char *) ASC; ;
    break;}
case 85:
#line 504 "msql_yacc.y"
{ msqlSelectLimit = 0; ;
    break;}
case 86:
#line 506 "msql_yacc.y"
{ msqlSetSelectLimit((val_t *)yyvsp[0]); ;
    break;}
case 88:
#line 519 "msql_yacc.y"
{
			command = DROP_TABLE;
			msqlAddTable(yyvsp[0],NULL);
			myFree(yyvsp[0]);
		;
    break;}
case 89:
#line 525 "msql_yacc.y"
{
			command = DROP_INDEX;
			msqlAddIndex(yyvsp[-2], yyvsp[0], 0, 0);
			myFree(yyvsp[-2]);
			myFree(yyvsp[0]);
		;
    break;}
case 90:
#line 532 "msql_yacc.y"
{
			command = DROP_SEQUENCE;
			msqlAddSequence(yyvsp[0],0,0);
			myFree(yyvsp[0]);
		;
    break;}
case 91:
#line 545 "msql_yacc.y"
{
			command = INSERT;
			msqlAddTable(yyvsp[-1],NULL);
			if (yyvsp[0])
				expandTableFields(yyvsp[-1]);
			myFree(yyvsp[-1]);
		;
    break;}
case 93:
#line 557 "msql_yacc.y"
{
			ident_t	*tmp;

			tmp = msqlCreateIdent(NULL,"*");
			msqlAddField((ident_t *)tmp,0,0,0,0);
			yyval = (char *) 1;
		;
    break;}
case 94:
#line 565 "msql_yacc.y"
{
			yyval = (char *) 0;
		;
    break;}
case 95:
#line 572 "msql_yacc.y"
{ 
			msqlAddField((ident_t *)yyvsp[0],0,0,0,0);
		;
    break;}
case 96:
#line 576 "msql_yacc.y"
{ 
			msqlAddField((ident_t *)yyvsp[0],0,0,0,0); 
		;
    break;}
case 97:
#line 584 "msql_yacc.y"
{ 
			msqlAddFieldValue((val_t *)yyvsp[0]);
		 ;
    break;}
case 98:
#line 588 "msql_yacc.y"
{ 
			msqlAddFieldValue((val_t *)yyvsp[0]); 
		;
    break;}
case 99:
#line 600 "msql_yacc.y"
{
			command = UPDATE;
			msqlAddTable((char *)yyvsp[-3],NULL);
			myFree(yyvsp[-3]);
		;
    break;}
case 100:
#line 608 "msql_yacc.y"
{ msqlAddField((ident_t *)yyvsp[-2],0,0,0,0);
		  msqlAddFieldValue((val_t *)yyvsp[0]); ;
    break;}
case 101:
#line 611 "msql_yacc.y"
{ msqlAddField((ident_t *)yyvsp[-2],0,0,0,0);
		  msqlAddFieldValue((val_t *) yyvsp[0]); ;
    break;}
case 102:
#line 617 "msql_yacc.y"
{ yyval = yyvsp[0]; ;
    break;}
case 103:
#line 619 "msql_yacc.y"
{ yyval = yyvsp[0]; ;
    break;}
case 104:
#line 627 "msql_yacc.y"
{
			command = DELETE;
			msqlAddTable(yyvsp[-1],NULL);
			myFree(yyvsp[-1]);
		;
    break;}
case 105:
#line 640 "msql_yacc.y"
{
			yyval = (char *)msqlCreateValue((u_char*)yyvsp[0],CHAR_TYPE,
				yytoklen);
			(void)myFree(yyvsp[0]);
		;
    break;}
case 106:
#line 646 "msql_yacc.y"
{
			yyval = (char *)msqlCreateValue((u_char*)yyvsp[0],INT_TYPE,0);
			(void)myFree(yyvsp[0]);
		;
    break;}
case 107:
#line 651 "msql_yacc.y"
{
			yyval = (char *)msqlCreateValue((u_char*)yyvsp[0],REAL_TYPE,0);
			(void)myFree(yyvsp[0]);
		;
    break;}
case 108:
#line 656 "msql_yacc.y"
{
			yyval = (char *)msqlCreateValue((u_char*)"null",NULL_TYPE,0);
		;
    break;}
case 109:
#line 662 "msql_yacc.y"
{
			yyval = yyvsp[0];
		;
    break;}
case 110:
#line 666 "msql_yacc.y"
{
			yyval = (char *)msqlCreateValue((u_char *)yyvsp[0],IDENT_TYPE,0);
		;
    break;}
case 111:
#line 670 "msql_yacc.y"
{
			yyval = (char *)msqlCreateValue((u_char *)yyvsp[0],SYSVAR_TYPE,0);
		;
    break;}
case 112:
#line 677 "msql_yacc.y"
{ 
			yyval = (char *)msqlCreateIdent(NULL,yyvsp[0]); 
			(void)myFree(yyvsp[0]);
			if (yyval == NULL)
			{
				msqlClean();
				return(-1);
			}
		;
    break;}
case 113:
#line 687 "msql_yacc.y"
{ 
			yyval = (char *)msqlCreateIdent(yyvsp[-2],yyvsp[0]); 
			(void)myFree(yyvsp[-2]);
			(void)myFree(yyvsp[0]);
			if (yyval == NULL)
			{
				msqlClean();
				return(-1);
			}
		;
    break;}
case 114:
#line 700 "msql_yacc.y"
{ 
			yyval = (char *)msqlCreateIdent(NULL,yyvsp[0]); 
			(void)myFree(yyvsp[0]);
			if (yyval == NULL)
			{
				msqlClean();
				return(-1);
			}
		;
    break;}
case 115:
#line 710 "msql_yacc.y"
{ 
			yyval = (char *)msqlCreateIdent(yyvsp[-2],yyvsp[0]); 
			(void)myFree(yyvsp[-2]);
			(void)myFree(yyvsp[0]);
			if (yyval == NULL)
			{
				msqlClean();
				return(-1);
			}
		;
    break;}
}
   /* the action file gets copied in in place of this dollarsign */
#line 498 "/ade/share/bison.simple"

  yyvsp -= yylen;
  yyssp -= yylen;
#ifdef YYLSP_NEEDED
  yylsp -= yylen;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

  *++yyvsp = yyval;

#ifdef YYLSP_NEEDED
  yylsp++;
  if (yylen == 0)
    {
      yylsp->first_line = yylloc.first_line;
      yylsp->first_column = yylloc.first_column;
      yylsp->last_line = (yylsp-1)->last_line;
      yylsp->last_column = (yylsp-1)->last_column;
      yylsp->text = 0;
    }
  else
    {
      yylsp->last_line = (yylsp+yylen-1)->last_line;
      yylsp->last_column = (yylsp+yylen-1)->last_column;
    }
#endif

  /* Now "shift" the result of the reduction.
     Determine what state that goes to,
     based on the state we popped back to
     and the rule number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTBASE];

  goto yynewstate;

yyerrlab:   /* here on detecting error */

  if (! yyerrstatus)
    /* If not already recovering from an error, report this error.  */
    {
      ++yynerrs;

#ifdef YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (yyn > YYFLAG && yyn < YYLAST)
	{
	  int size = 0;
	  char *msg;
	  int x, count;

	  count = 0;
	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
	  for (x = (yyn < 0 ? -yyn : 0);
	       x < (sizeof(yytname) / sizeof(char *)); x++)
	    if (yycheck[x + yyn] == x)
	      size += strlen(yytname[x]) + 15, count++;
	  msg = (char *) malloc(size + 15);
	  if (msg != 0)
	    {
	      strcpy(msg, "parse error");

	      if (count < 5)
		{
		  count = 0;
		  for (x = (yyn < 0 ? -yyn : 0);
		       x < (sizeof(yytname) / sizeof(char *)); x++)
		    if (yycheck[x + yyn] == x)
		      {
			strcat(msg, count == 0 ? ", expecting `" : " or `");
			strcat(msg, yytname[x]);
			strcat(msg, "'");
			count++;
		      }
		}
	      yyerror(msg);
	      free(msg);
	    }
	  else
	    yyerror ("parse error; also virtual memory exceeded");
	}
      else
#endif /* YYERROR_VERBOSE */
	yyerror("parse error");
    }

  goto yyerrlab1;
yyerrlab1:   /* here on error raised explicitly by an action */

  if (yyerrstatus == 3)
    {
      /* if just tried and failed to reuse lookahead token after an error, discard it.  */

      /* return failure if at end of input */
      if (yychar == YYEOF)
	YYABORT;

#if YYDEBUG != 0
      if (yydebug)
	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif

      yychar = YYEMPTY;
    }

  /* Else will try to reuse lookahead token
     after shifting the error token.  */

  yyerrstatus = 3;		/* Each real token shifted decrements this */

  goto yyerrhandle;

yyerrdefault:  /* current state does not do anything special for the error token. */

#if 0
  /* This is wrong; only states that explicitly want error tokens
     should shift them.  */
  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
  if (yyn) goto yydefault;
#endif

yyerrpop:   /* pop the current state because it cannot handle the error token */

  if (yyssp == yyss) YYABORT;
  yyvsp--;
  yystate = *--yyssp;
#ifdef YYLSP_NEEDED
  yylsp--;
#endif

#if YYDEBUG != 0
  if (yydebug)
    {
      short *ssp1 = yyss - 1;
      fprintf (stderr, "Error: state stack now");
      while (ssp1 != yyssp)
	fprintf (stderr, " %d", *++ssp1);
      fprintf (stderr, "\n");
    }
#endif

yyerrhandle:

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
    goto yyerrdefault;

  yyn += YYTERROR;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
    goto yyerrdefault;

  yyn = yytable[yyn];
  if (yyn < 0)
    {
      if (yyn == YYFLAG)
	goto yyerrpop;
      yyn = -yyn;
      goto yyreduce;
    }
  else if (yyn == 0)
    goto yyerrpop;

  if (yyn == YYFINAL)
    YYACCEPT;

#if YYDEBUG != 0
  if (yydebug)
    fprintf(stderr, "Shifting error token, ");
#endif

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  yystate = yyn;
  goto yynewstate;
}
#line 720 "msql_yacc.y"
