/* A Bison parser, made by GNU Bison 1.875a.  */

/* Skeleton parser for Yacc-like parsing with Bison,
   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 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., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, 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.  */

/* Written by Richard Stallman by simplifying the original so called
   ``semantic'' parser.  */

/* All symbols defined below should begin with yy or YY, to avoid
   infringing on user name space.  This should be done even for local
   variables, as they might otherwise be expanded by user macros.
   There are some unavoidable exceptions within include files to
   define necessary library symbols; they are noted "INFRINGES ON
   USER NAME SPACE" below.  */

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

/* Skeleton name.  */
#define YYSKELETON_NAME "yacc.c"

/* Pure parsers.  */
#define YYPURE 0

/* Using locations.  */
#define YYLSP_NEEDED 0

/* If NAME_PREFIX is specified substitute the variables and functions
   names.  */
#define yyparse fconfparse
#define yylex   fconflex
#define yyerror fconferror
#define yylval  fconflval
#define yychar  fconfchar
#define yydebug fconfdebug
#define yynerrs fconfnerrs


/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     FIELD = 258,
     STRINGTYPE = 259,
     QDEFAULT = 260,
     MATCHING = 261,
     ENUM = 262,
     MULTIENUMTOK = 263,
     VALUES = 264,
     DEFAULT = 265,
     EXACT_REGEXP = 266,
     INEXACT_REGEXP = 267,
     ALL = 268,
     FORMAT = 269,
     ENUMSEPARATORSTOK = 270,
     MULTITEXTTYPE = 271,
     DATETYPE = 272,
     ENUM_IN_FILE = 273,
     MULTI_ENUM_IN_FILE = 274,
     PATHTOK = 275,
     FIELDSTOK = 276,
     KEYTOK = 277,
     QSTRING = 278,
     INTVAL = 279,
     TEXTSEARCH = 280,
     QUERYTOK = 281,
     FORMATTOK = 282,
     INDEXTOK = 283,
     SEPARATORTOK = 284,
     RESTRICTEDTOK = 285,
     NOSPACESTOK = 286,
     INTEGERTOK = 287,
     INPUTDEFAULTTOK = 288,
     BUILTINTOK = 289,
     ALLOWANYVALUETOK = 290,
     REQUIRETOK = 291,
     APPENDFIELDTOK = 292,
     SETFIELDTOK = 293,
     CHANGETOK = 294,
     DESCRIPTIONTOK = 295,
     INPUTTOK = 296,
     DATABASEINFOTOK = 297,
     DEBUGMODETOK = 298,
     KEEPRECTOK = 299,
     NOTIFYEXPTOK = 300,
     LIBEXECDIRTOK = 301,
     SUBMITTERACKTOK = 302,
     BUSINESSDAYTOK = 303,
     BUSINESSWEEKTOK = 304,
     CREATECATEGORYDIRSTOK = 305,
     FALSETOK = 306,
     TRUETOK = 307,
     MAILFORMATTOK = 308,
     TOADDRESSESTOK = 309,
     FROMADDRESSTOK = 310,
     REPLYTOTOK = 311,
     FIXEDTOK = 312,
     BODYTOK = 313,
     HEADERTOK = 314,
     AUDITTRAILFMTTOK = 315,
     ADDAUDITTRAILTOK = 316,
     REQUIRECHANGEREASONTOK = 317,
     READONLYTOK = 318,
     BINARYINDEXTOK = 319,
     RAWTOK = 320,
     BADTOK = 321,
     AUXFLAGSTOK = 322,
     PRLISTTOK = 323,
     MAXPRSTOK = 324,
     EDITONLYTOK = 325,
     VIRTUALFORMATTOK = 326,
     CATPERMSTOK = 327
   };
#endif
#define FIELD 258
#define STRINGTYPE 259
#define QDEFAULT 260
#define MATCHING 261
#define ENUM 262
#define MULTIENUMTOK 263
#define VALUES 264
#define DEFAULT 265
#define EXACT_REGEXP 266
#define INEXACT_REGEXP 267
#define ALL 268
#define FORMAT 269
#define ENUMSEPARATORSTOK 270
#define MULTITEXTTYPE 271
#define DATETYPE 272
#define ENUM_IN_FILE 273
#define MULTI_ENUM_IN_FILE 274
#define PATHTOK 275
#define FIELDSTOK 276
#define KEYTOK 277
#define QSTRING 278
#define INTVAL 279
#define TEXTSEARCH 280
#define QUERYTOK 281
#define FORMATTOK 282
#define INDEXTOK 283
#define SEPARATORTOK 284
#define RESTRICTEDTOK 285
#define NOSPACESTOK 286
#define INTEGERTOK 287
#define INPUTDEFAULTTOK 288
#define BUILTINTOK 289
#define ALLOWANYVALUETOK 290
#define REQUIRETOK 291
#define APPENDFIELDTOK 292
#define SETFIELDTOK 293
#define CHANGETOK 294
#define DESCRIPTIONTOK 295
#define INPUTTOK 296
#define DATABASEINFOTOK 297
#define DEBUGMODETOK 298
#define KEEPRECTOK 299
#define NOTIFYEXPTOK 300
#define LIBEXECDIRTOK 301
#define SUBMITTERACKTOK 302
#define BUSINESSDAYTOK 303
#define BUSINESSWEEKTOK 304
#define CREATECATEGORYDIRSTOK 305
#define FALSETOK 306
#define TRUETOK 307
#define MAILFORMATTOK 308
#define TOADDRESSESTOK 309
#define FROMADDRESSTOK 310
#define REPLYTOTOK 311
#define FIXEDTOK 312
#define BODYTOK 313
#define HEADERTOK 314
#define AUDITTRAILFMTTOK 315
#define ADDAUDITTRAILTOK 316
#define REQUIRECHANGEREASONTOK 317
#define READONLYTOK 318
#define BINARYINDEXTOK 319
#define RAWTOK 320
#define BADTOK 321
#define AUXFLAGSTOK 322
#define PRLISTTOK 323
#define MAXPRSTOK 324
#define EDITONLYTOK 325
#define VIRTUALFORMATTOK 326
#define CATPERMSTOK 327




/* Copy the first part of user declarations.  */
#line 1 "./fconfig.y"

#include "gnats.h"
#include "index.h"
#include "field.h"
  extern DatabaseInfo databaseBeingDefined;
  static FieldDef currField;
  static ChangeActions currChange;
  static FieldEdit *currEdit;
  static QueryFormat *qformat;
  static FieldList requiredFlds;
  static InputTemplate *inputTemplate;
  static MailMessageFormat mailFormat;
  IndexDesc indexEntry;
  static int badFile;
  struct qstring;

  extern char *takeQString (struct qstring *str);
  extern char *qStrVal (struct qstring *str);


/* Enabling traces.  */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif

/* Enabling verbose error messages.  */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif

#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 21 "./fconfig.y"
typedef union YYSTYPE {
  int intval;
  char *sval;
  struct qstring *qstr;
  AdmFieldDesc *adm_field_des;
  FieldList flist;
  StringList *stringlist;
  InputTemplate *inputlist;
  MailAddress *mailaddr;
  MailAddressList *mailaddrlist;
} YYSTYPE;
/* Line 191 of yacc.c.  */
#line 261 "fconfig.tab.c"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif



/* Copy the second part of user declarations.  */


/* Line 214 of yacc.c.  */
#line 273 "fconfig.tab.c"

#if ! defined (yyoverflow) || YYERROR_VERBOSE

/* The parser invokes alloca or malloc; define the necessary symbols.  */

# if YYSTACK_USE_ALLOCA
#  define YYSTACK_ALLOC alloca
# else
#  ifndef YYSTACK_USE_ALLOCA
#   if defined (alloca) || defined (_ALLOCA_H)
#    define YYSTACK_ALLOC alloca
#   else
#    ifdef __GNUC__
#     define YYSTACK_ALLOC __builtin_alloca
#    endif
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
   /* Pacify GCC's `empty if-body' warning. */
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# else
#  if defined (__STDC__) || defined (__cplusplus)
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#   define YYSIZE_T size_t
#  endif
#  define YYSTACK_ALLOC malloc
#  define YYSTACK_FREE free
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */


#if (! defined (yyoverflow) \
     && (! defined (__cplusplus) \
	 || (YYSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  short yyss;
  YYSTYPE yyvs;
  };

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
     ((N) * (sizeof (short) + sizeof (YYSTYPE))				\
      + YYSTACK_GAP_MAXIMUM)

/* Copy COUNT objects from FROM to TO.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if 1 < __GNUC__
#   define YYCOPY(To, From, Count) \
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
#  else
#   define YYCOPY(To, From, Count)		\
      do					\
	{					\
	  register YYSIZE_T yyi;		\
	  for (yyi = 0; yyi < (Count); yyi++)	\
	    (To)[yyi] = (From)[yyi];		\
	}					\
      while (0)
#  endif
# endif

/* Relocate STACK from its old location to the new one.  The
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
   elements in the stack, and YYPTR gives the new location of the
   stack.  Advance YYPTR to a properly aligned location for the next
   stack.  */
# define YYSTACK_RELOCATE(Stack)					\
    do									\
      {									\
	YYSIZE_T yynewbytes;						\
	YYCOPY (&yyptr->Stack, Stack, yysize);				\
	Stack = &yyptr->Stack;						\
	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
	yyptr += yynewbytes / sizeof (*yyptr);				\
      }									\
    while (0)

#endif

#if defined (__STDC__) || defined (__cplusplus)
   typedef signed char yysigned_char;
#else
   typedef short yysigned_char;
#endif

/* YYFINAL -- State number of the termination state. */
#define YYFINAL  8
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   395

/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS  77
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS  89
/* YYNRULES -- Number of rules. */
#define YYNRULES  198
/* YYNRULES -- Number of states. */
#define YYNSTATES  348

/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
#define YYUNDEFTOK  2
#define YYMAXUTOK   327

#define YYTRANSLATE(YYX) 						\
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
static const unsigned 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,
       2,     2,     2,     2,     2,    75,     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,    73,    76,    74,     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,    62,    63,    64,
      65,    66,    67,    68,    69,    70,    71,    72
};

#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
   YYRHS.  */
static const unsigned short yyprhs[] =
{
       0,     0,     3,     5,     7,    16,    21,    26,    27,    29,
      31,    34,    37,    40,    43,    46,    49,    54,    59,    62,
      65,    67,    69,    71,    72,    74,    77,    82,    87,    90,
      92,    95,    97,    99,   101,   103,   106,   108,   110,   113,
     115,   118,   121,   123,   129,   135,   137,   140,   145,   150,
     155,   160,   165,   170,   171,   174,   178,   182,   186,   188,
     189,   191,   194,   199,   204,   207,   210,   212,   215,   217,
     219,   222,   224,   230,   235,   237,   239,   240,   242,   244,
     247,   248,   252,   256,   257,   261,   264,   266,   269,   271,
     274,   276,   279,   284,   289,   291,   293,   296,   298,   301,
     304,   311,   316,   318,   320,   322,   325,   327,   330,   333,
     336,   338,   341,   343,   346,   349,   351,   353,   355,   358,
     360,   363,   365,   370,   372,   374,   377,   378,   380,   382,
     385,   390,   395,   398,   401,   404,   407,   409,   412,   415,
     416,   418,   420,   423,   428,   433,   435,   438,   440,   445,
     450,   452,   454,   456,   459,   462,   467,   472,   474,   476,
     479,   482,   485,   490,   495,   498,   499,   504,   509,   511,
     514,   519,   524,   526,   529,   531,   534,   539,   544,   547,
     549,   552,   554,   556,   561,   566,   571,   574,   577,   581,
     585,   587,   589,   592,   595,   597,   599,   603,   605
};

/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const short yyrhs[] =
{
      78,     0,    -1,    79,    -1,    81,    -1,    80,    85,   128,
     165,   152,    96,   140,   146,    -1,    42,    73,    82,    74,
      -1,    42,    73,    81,    74,    -1,    -1,     1,    -1,    83,
      -1,    82,    83,    -1,    43,    84,    -1,    44,    84,    -1,
      45,    84,    -1,    46,    23,    -1,    47,    84,    -1,    48,
      24,    75,    24,    -1,    49,    24,    75,    24,    -1,    50,
      84,    -1,    72,    23,    -1,    51,    -1,    52,    -1,    86,
      -1,    -1,    87,    -1,    86,    87,    -1,    88,    73,    89,
      74,    -1,    88,    73,    81,    74,    -1,     3,    23,    -1,
      90,    -1,    89,    90,    -1,    92,    -1,   126,    -1,   125,
      -1,    91,    -1,    71,   159,    -1,    93,    -1,    95,    -1,
      16,   110,    -1,    17,    -1,    32,   110,    -1,    68,   111,
      -1,     4,    -1,     4,     6,    73,    94,    74,    -1,     4,
       6,    73,    81,    74,    -1,    23,    -1,    94,    23,    -1,
       7,    73,   113,    74,    -1,    18,    73,   118,    74,    -1,
      19,    73,   120,    74,    -1,     8,    73,   114,    74,    -1,
       7,    73,    81,    74,    -1,    18,    73,    81,    74,    -1,
      -1,    96,    97,    -1,    99,   101,    74,    -1,    99,   101,
      74,    -1,    39,   100,    73,    -1,    23,    -1,    -1,   102,
      -1,   101,   102,    -1,    36,    73,   103,    74,    -1,    36,
      73,    81,    74,    -1,    38,   105,    -1,    37,   105,    -1,
      61,    -1,    60,   159,    -1,    62,    -1,   104,    -1,   103,
     104,    -1,    23,    -1,   106,    73,   107,   108,    74,    -1,
     106,    73,    81,    74,    -1,    23,    -1,    23,    -1,    -1,
     109,    -1,    23,    -1,   109,    23,    -1,    -1,    73,   122,
      74,    -1,    73,    81,    74,    -1,    -1,    73,   112,    74,
      -1,    69,    24,    -1,   116,    -1,   113,   116,    -1,   115,
      -1,   114,   115,    -1,   116,    -1,    15,    23,    -1,     9,
      73,   117,    74,    -1,     9,    73,    81,    74,    -1,   122,
      -1,    23,    -1,   117,    23,    -1,   119,    -1,   118,   119,
      -1,    20,    23,    -1,    21,    73,   123,    74,    22,    23,
      -1,    21,    73,    81,    74,    -1,   122,    -1,    35,    -1,
     121,    -1,   118,   121,    -1,   119,    -1,    15,    23,    -1,
      10,    23,    -1,    33,    23,    -1,   124,    -1,   123,   124,
      -1,    23,    -1,     5,    11,    -1,     5,    12,    -1,    25,
      -1,    30,    -1,    31,    -1,    34,    23,    -1,    98,    -1,
      40,    23,    -1,    63,    -1,    67,    73,   127,    74,    -1,
      70,    -1,    23,    -1,   127,    23,    -1,    -1,   129,    -1,
     130,    -1,   129,   130,    -1,   131,    73,   132,    74,    -1,
     131,    73,    81,    74,    -1,    26,    23,    -1,   133,   134,
      -1,   135,   133,    -1,    21,    13,    -1,   137,    -1,   136,
     137,    -1,   137,   136,    -1,    -1,   135,    -1,    65,    -1,
      27,    23,    -1,    21,    73,   138,    74,    -1,    21,    73,
      81,    74,    -1,   139,    -1,   138,   139,    -1,    23,    -1,
     141,    73,   142,    74,    -1,   141,    73,    81,    74,    -1,
      81,    -1,    28,    -1,   143,    -1,   142,   143,    -1,    20,
      23,    -1,    21,    73,   144,    74,    -1,    21,    73,    81,
      74,    -1,   145,    -1,   139,    -1,   144,   139,    -1,    29,
      23,    -1,    64,    84,    -1,    41,    73,   147,    74,    -1,
      41,    73,    81,    74,    -1,   150,   148,    -1,    -1,    36,
      73,   149,    74,    -1,    36,    73,    81,    74,    -1,   139,
      -1,   149,   139,    -1,    21,    73,   151,    74,    -1,    21,
      73,    81,    74,    -1,    23,    -1,   151,    23,    -1,   153,
      -1,   152,   153,    -1,   154,    73,   155,    74,    -1,   154,
      73,    81,    74,    -1,    53,    23,    -1,   156,    -1,   155,
     156,    -1,   157,    -1,   158,    -1,    54,    73,   161,    74,
      -1,    55,    73,   162,    74,    -1,    56,    73,   161,    74,
      -1,    58,   159,    -1,    59,   159,    -1,   160,   132,    74,
      -1,   160,    81,    74,    -1,    73,    -1,   162,    -1,   161,
     162,    -1,    57,    23,    -1,   163,    -1,   164,    -1,   163,
      76,   164,    -1,    23,    -1,    60,   159,    -1
};

/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
static const unsigned short yyrline[] =
{
       0,    62,    62,    63,    66,    69,    70,    71,    76,    78,
      79,    82,    85,    88,    91,    94,    97,   100,   103,   106,
     111,   112,   115,   116,   121,   122,   125,   128,   133,   148,
     149,   152,   153,   154,   155,   158,   164,   165,   166,   170,
     174,   178,   184,   187,   190,   193,   197,   203,   207,   212,
     217,   226,   227,   230,   231,   234,   240,   251,   260,   263,
     268,   269,   272,   273,   274,   278,   283,   286,   290,   295,
     296,   299,   307,   308,   311,   322,   327,   330,   334,   339,
     346,   347,   348,   351,   352,   355,   360,   361,   364,   365,
     368,   369,   374,   375,   376,   379,   383,   389,   390,   393,
     396,   423,   424,   425,   430,   431,   434,   435,   440,   443,
     448,   453,   460,   468,   471,   476,   479,   482,   485,   495,
     496,   499,   502,   505,   510,   514,   520,   521,   524,   525,
     528,   532,   538,   548,   549,   552,   553,   554,   555,   558,
     559,   562,   567,   572,   573,   576,   579,   585,   599,   603,
     607,   610,   615,   616,   619,   622,   623,   624,   627,   630,
     635,   638,   643,   644,   647,   652,   653,   656,   662,   665,
     671,   675,   680,   702,   729,   730,   733,   737,   743,   757,
     758,   761,   765,   769,   772,   775,   780,   783,   786,   787,
     793,   803,   808,   818,   823,   830,   833,   843,   849
};
#endif

#if YYDEBUG || YYERROR_VERBOSE
/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
  "$end", "error", "$undefined", "FIELD", "STRINGTYPE", "QDEFAULT", 
  "MATCHING", "ENUM", "MULTIENUMTOK", "VALUES", "DEFAULT", "EXACT_REGEXP", 
  "INEXACT_REGEXP", "ALL", "FORMAT", "ENUMSEPARATORSTOK", "MULTITEXTTYPE", 
  "DATETYPE", "ENUM_IN_FILE", "MULTI_ENUM_IN_FILE", "PATHTOK", 
  "FIELDSTOK", "KEYTOK", "QSTRING", "INTVAL", "TEXTSEARCH", "QUERYTOK", 
  "FORMATTOK", "INDEXTOK", "SEPARATORTOK", "RESTRICTEDTOK", "NOSPACESTOK", 
  "INTEGERTOK", "INPUTDEFAULTTOK", "BUILTINTOK", "ALLOWANYVALUETOK", 
  "REQUIRETOK", "APPENDFIELDTOK", "SETFIELDTOK", "CHANGETOK", 
  "DESCRIPTIONTOK", "INPUTTOK", "DATABASEINFOTOK", "DEBUGMODETOK", 
  "KEEPRECTOK", "NOTIFYEXPTOK", "LIBEXECDIRTOK", "SUBMITTERACKTOK", 
  "BUSINESSDAYTOK", "BUSINESSWEEKTOK", "CREATECATEGORYDIRSTOK", 
  "FALSETOK", "TRUETOK", "MAILFORMATTOK", "TOADDRESSESTOK", 
  "FROMADDRESSTOK", "REPLYTOTOK", "FIXEDTOK", "BODYTOK", "HEADERTOK", 
  "AUDITTRAILFMTTOK", "ADDAUDITTRAILTOK", "REQUIRECHANGEREASONTOK", 
  "READONLYTOK", "BINARYINDEXTOK", "RAWTOK", "BADTOK", "AUXFLAGSTOK", 
  "PRLISTTOK", "MAXPRSTOK", "EDITONLYTOK", "VIRTUALFORMATTOK", 
  "CATPERMSTOK", "'{'", "'}'", "'-'", "'|'", "$accept", "config", 
  "configEnts", "databaseInfo", "parseError", "databaseInfoList", 
  "databaseInfoEnt", "booleanVal", "fieldDecStmt", "fieldDecList", 
  "fieldDec", "startFieldDec", "fieldDataList", "fieldData", 
  "virtualFieldFormat", "fieldDataType", "stringType", "regexpList", 
  "enumType", "globalChangeEnts", "globalChangeEnt", "changeClause", 
  "changeHeader", "optChangeExpr", "changeOpts", "changeOpt", 
  "reqFieldNameList", "reqFieldNameEnt", "fieldEditOpts", "fieldEditName", 
  "fieldEditFormat", "optFieldEditFieldList", "fieldEditFieldList", 
  "optSimple", "prListOpts", "prListOptList", "enumcontents", 
  "multienumcontents", "multiEnumItem", "enumItem", "enumValueList", 
  "enumFileContents", "enumFileItem", "multiEnumFileContents", 
  "multiEnumFileItem", "defaultFieldVal", "enumFieldList", 
  "enumFieldMember", "queryDefault", "miscOptions", "auxFlagsList", 
  "optQueryList", "queryList", "query", "queryBegin", "queryFmt", 
  "queryFieldDesc", "optQueryOpts", "queryOpts", "queryPrintf", 
  "queryfields", "queryFieldsList", "FieldListMember", "indexDescription", 
  "indexheader", "indexlist", "indexEnt", "indexFieldList", "indexSep", 
  "inputDescription", "inputEnt", "requiredFields", "requiredFieldsList", 
  "inputFields", "inputFieldsList", "mailFormatList", "mailFormat", 
  "mailFormatHeader", "mailFormatBody", "mailFormatEnt", "bodyFormat", 
  "headerFormat", "plainFormat", "plainFormatHeader", "mailAddressList", 
  "mailAddress", "mailAddressTries", "MailAddressMember", "auditTrailFmt", 0
};
#endif

# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
   token YYLEX-NUM.  */
static const unsigned short yytoknum[] =
{
       0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
     265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
     275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
     285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
     295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
     305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
     315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
     325,   326,   327,   123,   125,    45,   124
};
# endif

/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
static const unsigned char yyr1[] =
{
       0,    77,    78,    78,    79,    80,    80,    80,    81,    82,
      82,    83,    83,    83,    83,    83,    83,    83,    83,    83,
      84,    84,    85,    85,    86,    86,    87,    87,    88,    89,
      89,    90,    90,    90,    90,    91,    92,    92,    92,    92,
      92,    92,    93,    93,    93,    94,    94,    95,    95,    95,
      95,    95,    95,    96,    96,    97,    98,    99,   100,   100,
     101,   101,   102,   102,   102,   102,   102,   102,   102,   103,
     103,   104,   105,   105,   106,   107,   108,   108,   109,   109,
     110,   110,   110,   111,   111,   112,   113,   113,   114,   114,
     115,   115,   116,   116,   116,   117,   117,   118,   118,   119,
     119,   119,   119,   119,   120,   120,   121,   121,   122,   122,
     123,   123,   124,   125,   125,   126,   126,   126,   126,   126,
     126,   126,   126,   126,   127,   127,   128,   128,   129,   129,
     130,   130,   131,   132,   132,   133,   133,   133,   133,   134,
     134,   135,   136,   137,   137,   138,   138,   139,   140,   140,
     140,   141,   142,   142,   143,   143,   143,   143,   144,   144,
     145,   145,   146,   146,   147,   148,   148,   148,   149,   149,
     150,   150,   151,   151,   152,   152,   153,   153,   154,   155,
     155,   156,   156,   156,   156,   156,   157,   158,   159,   159,
     160,   161,   161,   162,   162,   163,   163,   164,   165
};

/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
static const unsigned char yyr2[] =
{
       0,     2,     1,     1,     8,     4,     4,     0,     1,     1,
       2,     2,     2,     2,     2,     2,     4,     4,     2,     2,
       1,     1,     1,     0,     1,     2,     4,     4,     2,     1,
       2,     1,     1,     1,     1,     2,     1,     1,     2,     1,
       2,     2,     1,     5,     5,     1,     2,     4,     4,     4,
       4,     4,     4,     0,     2,     3,     3,     3,     1,     0,
       1,     2,     4,     4,     2,     2,     1,     2,     1,     1,
       2,     1,     5,     4,     1,     1,     0,     1,     1,     2,
       0,     3,     3,     0,     3,     2,     1,     2,     1,     2,
       1,     2,     4,     4,     1,     1,     2,     1,     2,     2,
       6,     4,     1,     1,     1,     2,     1,     2,     2,     2,
       1,     2,     1,     2,     2,     1,     1,     1,     2,     1,
       2,     1,     4,     1,     1,     2,     0,     1,     1,     2,
       4,     4,     2,     2,     2,     2,     1,     2,     2,     0,
       1,     1,     2,     4,     4,     1,     2,     1,     4,     4,
       1,     1,     1,     2,     2,     4,     4,     1,     1,     2,
       2,     2,     4,     4,     2,     0,     4,     4,     1,     2,
       4,     4,     1,     2,     1,     2,     4,     4,     2,     1,
       2,     1,     1,     4,     4,     4,     2,     2,     3,     3,
       1,     1,     2,     2,     1,     1,     3,     1,     2
};

/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
   means the default is an error.  */
static const unsigned char yydefact[] =
{
       0,     8,     0,     0,     2,    23,     3,     0,     1,     0,
     126,    22,    24,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     9,    28,     0,     0,   127,
     128,     0,    25,     0,    20,    21,    11,    12,    13,    14,
      15,     0,     0,    18,    19,     6,     5,    10,   132,     0,
       0,   129,     0,    42,     0,     0,     0,    80,    39,     0,
       0,   115,   116,   117,    80,     0,    59,     0,   121,     0,
      83,   123,     0,     0,     0,    29,    34,    31,    36,    37,
     119,     0,    33,    32,     0,     0,   190,   198,     0,     0,
      53,   174,     0,     0,     0,   141,     0,     0,   139,     0,
       0,   136,     0,   113,   114,     0,     0,     0,    38,     0,
       0,    40,   118,    58,     0,   120,     0,     0,    41,    35,
      27,    26,    30,     0,     0,     0,     0,    66,    68,     0,
      60,    16,    17,     0,     0,   178,     0,   175,     0,   135,
       0,   142,   131,   130,   133,   140,   134,     0,   137,   138,
       0,     0,     0,     0,     0,     0,    86,    94,     0,     0,
      88,    90,     0,     0,     0,     0,   103,     0,     0,    97,
     102,     0,     0,    97,     0,   104,    57,   124,     0,     0,
       0,     0,    74,    65,     0,    64,    67,    56,    61,   189,
     188,   151,   150,    54,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,   179,   181,   182,   147,     0,     0,
     145,    45,     0,     0,     0,   108,   109,    51,    47,    87,
      91,    50,    89,    82,    81,    99,     0,    52,    48,    98,
     107,    98,   105,    49,   125,   122,    85,    84,    71,     0,
       0,    69,     0,     0,     0,     4,     0,     0,     0,     0,
     186,   187,   177,   176,   180,   144,   143,   146,    44,    46,
      43,    95,     0,     0,   112,     0,     0,   110,    63,    62,
      70,    75,     0,    76,    55,     0,     0,     0,     0,     0,
       0,     0,   152,   157,   197,     0,     0,   191,   194,   195,
       0,     0,    93,    96,    92,   101,     0,   111,    73,    78,
       0,    77,     0,     0,     0,   165,   154,     0,   160,   161,
     149,   148,   153,   193,   183,   192,     0,   184,   185,     0,
      72,    79,     0,   163,   162,     0,   164,     0,   158,     0,
     196,   100,   172,     0,     0,     0,   156,   155,   159,   171,
     173,   170,     0,   168,     0,   167,   166,   169
};

/* YYDEFGOTO[NTERM-NUM]. */
static const short yydefgoto[] =
{
      -1,     3,     4,     5,     6,    24,    25,    36,    10,    11,
      12,    13,    74,    75,    76,    77,    78,   213,    79,   136,
     193,    80,    81,   114,   129,   130,   240,   241,   183,   184,
     273,   300,   301,   108,   118,   180,   155,   159,   160,   161,
     263,   168,   169,   174,   175,   157,   266,   267,    82,    83,
     178,    28,    29,    30,    31,    97,    98,   144,    99,   100,
     101,   209,   210,   195,   196,   281,   282,   329,   283,   245,
     304,   326,   344,   305,   334,    90,    91,    92,   203,   204,
     205,   206,    87,    88,   286,   287,   288,   289,    50
};

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
#define YYPACT_NINF -204
static const short yypact[] =
{
      65,  -204,   -52,    27,  -204,    20,  -204,     4,  -204,     9,
      14,    20,  -204,   -43,   206,   206,   206,    11,   206,    18,
      70,   206,    21,    22,   197,  -204,  -204,   138,    52,    14,
    -204,    46,  -204,   141,  -204,  -204,  -204,  -204,  -204,  -204,
    -204,   101,   124,  -204,  -204,  -204,  -204,  -204,  -204,    92,
     110,  -204,    38,   187,   158,   130,   145,   150,  -204,   159,
     186,  -204,  -204,  -204,   150,   247,   250,   251,  -204,   202,
     203,  -204,    92,   204,    53,  -204,  -204,  -204,  -204,  -204,
    -204,   192,  -204,  -204,   253,   256,  -204,  -204,    38,   258,
     110,  -204,   210,     7,   261,  -204,   211,   212,   222,    -2,
     267,   262,   217,  -204,  -204,   215,   246,   200,  -204,   167,
     216,  -204,  -204,  -204,   218,  -204,   269,   224,  -204,  -204,
    -204,  -204,  -204,   221,   272,   272,    92,  -204,  -204,   153,
    -204,  -204,  -204,   223,   225,  -204,   166,  -204,    96,  -204,
      23,  -204,  -204,  -204,  -204,  -204,  -204,   228,  -204,  -204,
     107,   229,   273,   275,   230,     3,  -204,  -204,   280,     0,
    -204,  -204,   231,   232,   284,   235,  -204,   236,     8,  -204,
    -204,   286,   216,   238,   239,  -204,  -204,  -204,    12,   287,
     240,   121,  -204,  -204,   243,  -204,  -204,  -204,  -204,  -204,
    -204,  -204,  -204,  -204,   192,   276,   245,   248,   252,   254,
      92,    92,   255,   208,  -204,  -204,  -204,  -204,   257,    40,
    -204,  -204,   259,    41,   183,  -204,  -204,  -204,  -204,  -204,
    -204,  -204,  -204,  -204,  -204,  -204,   194,  -204,  -204,  -204,
    -204,   238,  -204,  -204,  -204,  -204,  -204,  -204,  -204,   260,
      82,  -204,   237,   160,   263,  -204,    89,    44,    44,    44,
    -204,  -204,  -204,  -204,  -204,  -204,  -204,  -204,  -204,  -204,
    -204,  -204,   264,    88,  -204,   265,    90,  -204,  -204,  -204,
    -204,  -204,   266,   296,  -204,    10,   297,   268,   299,   206,
     270,   118,  -204,  -204,  -204,   300,    -1,  -204,   271,  -204,
     274,    32,  -204,  -204,  -204,  -204,   302,  -204,  -204,  -204,
     277,   303,   279,   281,   282,   294,  -204,    23,  -204,  -204,
    -204,  -204,  -204,  -204,  -204,  -204,   309,  -204,  -204,   312,
    -204,  -204,   249,  -204,  -204,   285,  -204,   283,  -204,   105,
    -204,  -204,  -204,   288,   111,    23,  -204,  -204,  -204,  -204,
    -204,  -204,   289,  -204,   112,  -204,  -204,  -204
};

/* YYPGOTO[NTERM-NUM].  */
static const short yypgoto[] =
{
    -204,  -204,  -204,  -204,    -7,  -204,   313,   -14,  -204,  -204,
     331,  -204,  -204,   290,  -204,  -204,  -204,  -204,  -204,  -204,
    -204,  -204,   207,  -204,   151,  -126,  -204,   106,   234,  -204,
    -204,  -204,  -204,   301,  -204,  -204,  -204,  -204,   190,   -67,
    -204,   244,   -73,  -204,   178,   -93,  -204,    87,  -204,  -204,
    -204,  -204,  -204,   332,  -204,   278,   291,  -204,   293,   292,
     295,  -204,  -203,  -204,  -204,  -204,    79,  -204,  -204,  -204,
    -204,  -204,  -204,  -204,  -204,  -204,   298,  -204,  -204,   164,
    -204,  -204,   -64,  -204,   119,  -108,  -204,    54,  -204
};

/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
   positive, shift that token.  If negative, reduce the rule which
   number is the opposite.  If zero, do what YYDEFACT says.
   If YYTABLE_NINF, syntax error.  */
#define YYTABLE_NINF -107
static const short yytable[] =
{
      23,    37,    38,   188,    40,     1,   257,    43,   119,   151,
     152,     1,   151,   152,   163,   158,   170,   170,   152,    93,
     139,     7,   284,     9,     1,    94,    73,     8,   164,   165,
      33,   302,    26,   153,    39,   234,   153,   173,   156,     1,
      27,   153,    41,   166,    44,    96,   207,    14,    15,    16,
      17,    18,    19,    20,    21,   284,   285,    53,    54,    93,
      55,    56,   186,   207,   259,    94,     1,   284,    -7,    57,
      58,    59,    60,   314,   221,   170,    22,   218,    61,   170,
     140,   133,   228,    62,    63,    64,   235,    65,   219,   285,
       1,    -7,    66,    67,    42,   229,    45,     1,   154,   231,
     162,   285,   167,    95,   328,   238,   318,     2,     1,   276,
     277,   293,    49,   264,   256,   260,    68,   188,   278,    52,
      69,    70,     1,    71,    72,    -7,   338,   121,   207,   192,
     211,   202,   343,   208,   340,   207,   250,   251,   276,   277,
     290,   347,     1,   212,   238,    53,    54,   278,    55,    56,
     197,   198,   199,   279,   200,   201,   269,    57,    58,    59,
      60,    48,   294,    89,   296,    86,    61,     1,     1,   103,
     104,    62,    63,    64,   239,    65,    84,   152,   315,   337,
      66,    67,   279,   315,     1,   341,   346,   164,   165,   123,
     124,   125,   311,   102,   191,     1,   123,   124,   125,    85,
     153,     1,   166,   105,    68,    66,   261,   262,    69,    70,
     152,    71,    72,   126,   127,   128,     1,   264,   106,   265,
     126,   127,   128,   107,   151,   152,   152,   187,   123,   124,
     125,   171,   109,   153,   274,   272,   164,   165,     1,   280,
      14,    15,    16,    17,    18,    19,    20,    21,   153,   153,
       1,   166,   126,   127,   128,   151,   152,    34,    35,   110,
     271,   158,   197,   198,   199,   309,   200,   201,   303,    22,
     112,    46,   332,   113,   115,   116,   117,   131,   120,   153,
     132,   135,   253,   138,   141,   142,   143,    95,   147,    94,
     150,   176,   177,   179,   181,   182,   215,   189,   216,   190,
     327,   140,   214,   220,   217,   223,   224,   225,   226,   230,
     227,   236,  -106,   233,   237,   333,   242,   244,   246,   299,
     306,   247,   308,   313,   319,   248,   321,   249,   342,   252,
     325,   255,   284,   258,   268,   331,   275,    47,   292,   295,
     298,   307,    32,   194,   310,   243,   270,   316,   317,   222,
     232,   320,   322,   297,   172,   323,   324,   336,   335,   185,
     312,    51,   339,   345,   122,   111,   134,   254,   291,     0,
     330,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,   137,     0,
     146,   145,     0,   149,     0,   148
};

static const short yycheck[] =
{
       7,    15,    16,   129,    18,     1,   209,    21,    72,     9,
      10,     1,     9,    10,   107,    15,   109,   110,    10,    21,
      13,    73,    23,     3,     1,    27,    33,     0,    20,    21,
      73,    21,    23,    33,    23,    23,    33,   110,   105,     1,
      26,    33,    24,    35,    23,    52,    23,    43,    44,    45,
      46,    47,    48,    49,    50,    23,    57,     4,     5,    21,
       7,     8,   126,    23,    23,    27,     1,    23,     3,    16,
      17,    18,    19,    74,    74,   168,    72,    74,    25,   172,
      73,    88,    74,    30,    31,    32,    74,    34,   155,    57,
       1,    26,    39,    40,    24,   168,    74,     1,   105,   172,
     107,    57,   109,    65,   307,    23,    74,    42,     1,    20,
      21,    23,    60,    23,    74,    74,    63,   243,    29,    73,
      67,    68,     1,    70,    71,    60,   329,    74,    23,   136,
      23,   138,   335,   140,    23,    23,   200,   201,    20,    21,
     248,   344,     1,   150,    23,     4,     5,    29,     7,     8,
      54,    55,    56,    64,    58,    59,    74,    16,    17,    18,
      19,    23,    74,    53,    74,    73,    25,     1,     1,    11,
      12,    30,    31,    32,   181,    34,    75,    10,   286,    74,
      39,    40,    64,   291,     1,    74,    74,    20,    21,    36,
      37,    38,    74,     6,    28,     1,    36,    37,    38,    75,
      33,     1,    35,    73,    63,    39,    23,   214,    67,    68,
      10,    70,    71,    60,    61,    62,     1,    23,    73,   226,
      60,    61,    62,    73,     9,    10,    10,    74,    36,    37,
      38,    15,    73,    33,    74,   242,    20,    21,     1,   246,
      43,    44,    45,    46,    47,    48,    49,    50,    33,    33,
       1,    35,    60,    61,    62,     9,    10,    51,    52,    73,
      23,    15,    54,    55,    56,   279,    58,    59,   275,    72,
      23,    74,    23,    23,    23,    73,    73,    24,    74,    33,
      24,    23,    74,    73,    23,    74,    74,    65,    21,    27,
      73,    73,    23,    69,    73,    23,    23,    74,    23,    74,
     307,    73,    73,    23,    74,    74,    74,    23,    73,    23,
      74,    24,    74,    74,    74,   322,    73,    41,    73,    23,
      23,    73,    23,    23,    22,    73,    23,    73,   335,    74,
      36,    74,    23,    74,    74,    23,    73,    24,    74,    74,
      74,    73,    11,   136,    74,   194,   240,    76,    74,   159,
     172,    74,    73,   266,   110,    74,    74,    74,    73,   125,
     281,    29,    74,    74,    74,    64,    88,   203,   249,    -1,
     316,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    90,    -1,
      99,    98,    -1,   101,    -1,   100
};

/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
   symbol of state STATE-NUM.  */
static const unsigned char yystos[] =
{
       0,     1,    42,    78,    79,    80,    81,    73,     0,     3,
      85,    86,    87,    88,    43,    44,    45,    46,    47,    48,
      49,    50,    72,    81,    82,    83,    23,    26,   128,   129,
     130,   131,    87,    73,    51,    52,    84,    84,    84,    23,
      84,    24,    24,    84,    23,    74,    74,    83,    23,    60,
     165,   130,    73,     4,     5,     7,     8,    16,    17,    18,
      19,    25,    30,    31,    32,    34,    39,    40,    63,    67,
      68,    70,    71,    81,    89,    90,    91,    92,    93,    95,
      98,    99,   125,   126,    75,    75,    73,   159,   160,    53,
     152,   153,   154,    21,    27,    65,    81,   132,   133,   135,
     136,   137,     6,    11,    12,    73,    73,    73,   110,    73,
      73,   110,    23,    23,   100,    23,    73,    73,   111,   159,
      74,    74,    90,    36,    37,    38,    60,    61,    62,   101,
     102,    24,    24,    81,   132,    23,    96,   153,    73,    13,
      73,    23,    74,    74,   134,   135,   133,    21,   137,   136,
      73,     9,    10,    33,    81,   113,   116,   122,    15,   114,
     115,   116,    81,   122,    20,    21,    35,    81,   118,   119,
     122,    15,   118,   119,   120,   121,    73,    23,   127,    69,
     112,    73,    23,   105,   106,   105,   159,    74,   102,    74,
      74,    28,    81,    97,    99,   140,   141,    54,    55,    56,
      58,    59,    81,   155,   156,   157,   158,    23,    81,   138,
     139,    23,    81,    94,    73,    23,    23,    74,    74,   116,
      23,    74,   115,    74,    74,    23,    73,    74,    74,   119,
      23,   119,   121,    74,    23,    74,    24,    74,    23,    81,
     103,   104,    73,   101,    41,   146,    73,    73,    73,    73,
     159,   159,    74,    74,   156,    74,    74,   139,    74,    23,
      74,    23,    81,   117,    23,    81,   123,   124,    74,    74,
     104,    23,    81,   107,    74,    73,    20,    21,    29,    64,
      81,   142,   143,   145,    23,    57,   161,   162,   163,   164,
     162,   161,    74,    23,    74,    74,    74,   124,    74,    23,
     108,   109,    21,    81,   147,   150,    23,    73,    23,    84,
      74,    74,   143,    23,    74,   162,    76,    74,    74,    22,
      74,    23,    73,    74,    74,    36,   148,    81,   139,   144,
     164,    23,    23,    81,   151,    73,    74,    74,   139,    74,
      23,    74,    81,   139,   149,    74,    74,   139
};

#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
# define YYSIZE_T __SIZE_TYPE__
#endif
#if ! defined (YYSIZE_T) && defined (size_t)
# define YYSIZE_T size_t
#endif
#if ! defined (YYSIZE_T)
# if defined (__STDC__) || defined (__cplusplus)
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# endif
#endif
#if ! defined (YYSIZE_T)
# define YYSIZE_T unsigned int
#endif

#define yyerrok		(yyerrstatus = 0)
#define yyclearin	(yychar = YYEMPTY)
#define YYEMPTY		(-2)
#define YYEOF		0

#define YYACCEPT	goto yyacceptlab
#define YYABORT		goto yyabortlab
#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);						\
      yytoken = YYTRANSLATE (yychar);				\
      YYPOPSTACK;						\
      goto yybackup;						\
    }								\
  else								\
    { 								\
      yyerror ("syntax error: cannot back up");\
      YYERROR;							\
    }								\
while (0)

#define YYTERROR	1
#define YYERRCODE	256

/* YYLLOC_DEFAULT -- Compute the default location (before the actions
   are run).  */

#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N)         \
  Current.first_line   = Rhs[1].first_line;      \
  Current.first_column = Rhs[1].first_column;    \
  Current.last_line    = Rhs[N].last_line;       \
  Current.last_column  = Rhs[N].last_column;
#endif

/* YYLEX -- calling `yylex' with the right arguments.  */

#ifdef YYLEX_PARAM
# define YYLEX yylex (YYLEX_PARAM)
#else
# define YYLEX yylex ()
#endif

/* Enable debugging if requested.  */
#if YYDEBUG

# ifndef YYFPRINTF
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
#  define YYFPRINTF fprintf
# endif

# define YYDPRINTF(Args)			\
do {						\
  if (yydebug)					\
    YYFPRINTF Args;				\
} while (0)

# define YYDSYMPRINT(Args)			\
do {						\
  if (yydebug)					\
    yysymprint Args;				\
} while (0)

# define YYDSYMPRINTF(Title, Token, Value, Location)		\
do {								\
  if (yydebug)							\
    {								\
      YYFPRINTF (stderr, "%s ", Title);				\
      yysymprint (stderr, 					\
                  Token, Value);	\
      YYFPRINTF (stderr, "\n");					\
    }								\
} while (0)

/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (cinluded).                                                   |
`------------------------------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yy_stack_print (short *bottom, short *top)
#else
static void
yy_stack_print (bottom, top)
    short *bottom;
    short *top;
#endif
{
  YYFPRINTF (stderr, "Stack now");
  for (/* Nothing. */; bottom <= top; ++bottom)
    YYFPRINTF (stderr, " %d", *bottom);
  YYFPRINTF (stderr, "\n");
}

# define YY_STACK_PRINT(Bottom, Top)				\
do {								\
  if (yydebug)							\
    yy_stack_print ((Bottom), (Top));				\
} while (0)


/*------------------------------------------------.
| Report that the YYRULE is going to be reduced.  |
`------------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yy_reduce_print (int yyrule)
#else
static void
yy_reduce_print (yyrule)
    int yyrule;
#endif
{
  int yyi;
  unsigned int yylineno = yyrline[yyrule];
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
             yyrule - 1, yylineno);
  /* Print the symbols being reduced, and their result.  */
  for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
    YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
  YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
}

# define YY_REDUCE_PRINT(Rule)		\
do {					\
  if (yydebug)				\
    yy_reduce_print (Rule);		\
} while (0)

/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
# define YYDSYMPRINT(Args)
# define YYDSYMPRINTF(Title, Token, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */


/* YYINITDEPTH -- initial size of the parser's stacks.  */
#ifndef	YYINITDEPTH
# define YYINITDEPTH 200
#endif

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

   Do not make this value too large; the results are undefined if
   SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
   evaluated with infinite-precision integer arithmetic.  */

#if YYMAXDEPTH == 0
# undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif



#if YYERROR_VERBOSE

# ifndef yystrlen
#  if defined (__GLIBC__) && defined (_STRING_H)
#   define yystrlen strlen
#  else
/* Return the length of YYSTR.  */
static YYSIZE_T
#   if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
#   else
yystrlen (yystr)
     const char *yystr;
#   endif
{
  register const char *yys = yystr;

  while (*yys++ != '\0')
    continue;

  return yys - yystr - 1;
}
#  endif
# endif

# ifndef yystpcpy
#  if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
#   define yystpcpy stpcpy
#  else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
   YYDEST.  */
static char *
#   if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
#   else
yystpcpy (yydest, yysrc)
     char *yydest;
     const char *yysrc;
#   endif
{
  register char *yyd = yydest;
  register const char *yys = yysrc;

  while ((*yyd++ = *yys++) != '\0')
    continue;

  return yyd - 1;
}
#  endif
# endif

#endif /* !YYERROR_VERBOSE */



#if YYDEBUG
/*--------------------------------.
| Print this symbol on YYOUTPUT.  |
`--------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
#else
static void
yysymprint (yyoutput, yytype, yyvaluep)
    FILE *yyoutput;
    int yytype;
    YYSTYPE *yyvaluep;
#endif
{
  /* Pacify ``unused variable'' warnings.  */
  (void) yyvaluep;

  if (yytype < YYNTOKENS)
    {
      YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
# ifdef YYPRINT
      YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# endif
    }
  else
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);

  switch (yytype)
    {
      default:
        break;
    }
  YYFPRINTF (yyoutput, ")");
}

#endif /* ! YYDEBUG */
/*-----------------------------------------------.
| Release the memory associated to this symbol.  |
`-----------------------------------------------*/

#if defined (__STDC__) || defined (__cplusplus)
static void
yydestruct (int yytype, YYSTYPE *yyvaluep)
#else
static void
yydestruct (yytype, yyvaluep)
    int yytype;
    YYSTYPE *yyvaluep;
#endif
{
  /* Pacify ``unused variable'' warnings.  */
  (void) yyvaluep;

  switch (yytype)
    {

      default:
        break;
    }
}


/* Prevent warnings from -Wmissing-prototypes.  */

#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM);
# else
int yyparse ();
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
int yyparse (void);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */



/* The lookahead symbol.  */
int yychar;

/* The semantic value of the lookahead symbol.  */
YYSTYPE yylval;

/* Number of syntax errors so far.  */
int yynerrs;



/*----------.
| yyparse.  |
`----------*/

#ifdef YYPARSE_PARAM
# if defined (__STDC__) || defined (__cplusplus)
int yyparse (void *YYPARSE_PARAM)
# else
int yyparse (YYPARSE_PARAM)
  void *YYPARSE_PARAM;
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
int
yyparse (void)
#else
int
yyparse ()

#endif
#endif
{
  
  register int yystate;
  register int yyn;
  int yyresult;
  /* Number of tokens to shift before error messages enabled.  */
  int yyerrstatus;
  /* Lookahead token as an internal (translated) token number.  */
  int yytoken = 0;

  /* Three stacks and their tools:
     `yyss': related to states,
     `yyvs': related to semantic values,
     `yyls': related to locations.

     Refer to the stacks thru separate pointers, to allow yyoverflow
     to reallocate them elsewhere.  */

  /* The state stack.  */
  short	yyssa[YYINITDEPTH];
  short *yyss = yyssa;
  register short *yyssp;

  /* The semantic value stack.  */
  YYSTYPE yyvsa[YYINITDEPTH];
  YYSTYPE *yyvs = yyvsa;
  register YYSTYPE *yyvsp;



#define YYPOPSTACK   (yyvsp--, yyssp--)

  YYSIZE_T yystacksize = YYINITDEPTH;

  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;


  /* When reducing, the number of symbols on the RHS of the reduced
     rule.  */
  int yylen;

  YYDPRINTF ((stderr, "Starting parse\n"));

  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;
  yyvsp = yyvs;

  goto yysetstate;

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

 yysetstate:
  *yyssp = yystate;

  if (yyss + yystacksize - 1 <= yyssp)
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYSIZE_T yysize = yyssp - yyss + 1;

#ifdef yyoverflow
      {
	/* 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;


	/* Each stack pointer address is followed by the size of the
	   data in use in that stack, in bytes.  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, yysize * sizeof (*yyssp),
		    &yyvs1, yysize * sizeof (*yyvsp),

		    &yystacksize);

	yyss = yyss1;
	yyvs = yyvs1;
      }
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
      goto yyoverflowlab;
# else
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
	goto yyoverflowlab;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
	yystacksize = YYMAXDEPTH;

      {
	short *yyss1 = yyss;
	union yyalloc *yyptr =
	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
	if (! yyptr)
	  goto yyoverflowlab;
	YYSTACK_RELOCATE (yyss);
	YYSTACK_RELOCATE (yyvs);

#  undef YYSTACK_RELOCATE
	if (yyss1 != yyssa)
	  YYSTACK_FREE (yyss1);
      }
# endif
#endif /* no yyoverflow */

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;


      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
		  (unsigned long int) yystacksize));

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

  YYDPRINTF ((stderr, "Entering state %d\n", yystate));

  goto yybackup;

/*-----------.
| 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 == YYPACT_NINF)
    goto yydefault;

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

  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token: "));
      yychar = YYLEX;
    }

  if (yychar <= YYEOF)
    {
      yychar = yytoken = YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else
    {
      yytoken = YYTRANSLATE (yychar);
      YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
    }

  /* If the proper action on seeing token YYTOKEN is to reduce or to
     detect an error, take that action.  */
  yyn += yytoken;
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    goto yydefault;
  yyn = yytable[yyn];
  if (yyn <= 0)
    {
      if (yyn == 0 || yyn == YYTABLE_NINF)
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Shift the lookahead token.  */
  YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));

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

  *++yyvsp = yylval;


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

  yystate = yyn;
  goto yynewstate;


/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
  goto yyreduce;


/*-----------------------------.
| yyreduce -- Do a reduction.  |
`-----------------------------*/
yyreduce:
  /* yyn is the number of a rule to reduce with.  */
  yylen = yyr2[yyn];

  /* If YYLEN is nonzero, implement the default value of the action:
     `$$ = $1'.

     Otherwise, the following line sets YYVAL to garbage.
     This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];


  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
        case 7:
#line 71 "./fconfig.y"
    {
		    fconferror ("Missing/bad database info section");
		}
    break;

  case 8:
#line 76 "./fconfig.y"
    { badFile = 1; }
    break;

  case 11:
#line 82 "./fconfig.y"
    { 
		    setDebugMode (databaseBeingDefined, yyvsp[0].intval);
		}
    break;

  case 12:
#line 85 "./fconfig.y"
    {
		    setKeepReceivedHeaders (databaseBeingDefined, yyvsp[0].intval);
		}
    break;

  case 13:
#line 88 "./fconfig.y"
    {
		    setNotifyExpire (databaseBeingDefined, yyvsp[0].intval);
		}
    break;

  case 14:
#line 91 "./fconfig.y"
    {
		    setBinDir (databaseBeingDefined, qStrVal (yyvsp[0].qstr)); 
		}
    break;

  case 15:
#line 94 "./fconfig.y"
    {
		    setSubmitterAck (databaseBeingDefined, yyvsp[0].intval); 
		}
    break;

  case 16:
#line 97 "./fconfig.y"
    {
		  setBusinessDay (databaseBeingDefined, yyvsp[-2].intval, yyvsp[0].intval);
		}
    break;

  case 17:
#line 100 "./fconfig.y"
    {
		    setBusinessWeek(databaseBeingDefined,yyvsp[-2].intval, yyvsp[0].intval);
		}
    break;

  case 18:
#line 103 "./fconfig.y"
    {
		    setCreateCategoryDirs (databaseBeingDefined, yyvsp[0].intval);
		}
    break;

  case 19:
#line 106 "./fconfig.y"
    {
		    setCategoryDirPerms (databaseBeingDefined, qStrVal (yyvsp[0].qstr));
		}
    break;

  case 20:
#line 111 "./fconfig.y"
    { yyval.intval = 0; }
    break;

  case 21:
#line 112 "./fconfig.y"
    { yyval.intval = 1; }
    break;

  case 23:
#line 116 "./fconfig.y"
    {
		    fconferror ("Missing/bad field declarations");
		}
    break;

  case 26:
#line 125 "./fconfig.y"
    {
		    currField = NULL;
		}
    break;

  case 27:
#line 128 "./fconfig.y"
    {
		    currField = NULL;
		}
    break;

  case 28:
#line 133 "./fconfig.y"
    {
		    char *fname = takeQString (yyvsp[0].qstr);
		    currField = newFieldDef (databaseBeingDefined, fname);
		    if (currField == NULL)
		      {
			char *msg;
			asprintf (&msg, "Duplicate field definition for %s\n",
				  fname);
			fconferror (msg);
			free (msg);
		      }
		    currField->default_value = NULL;
		}
    break;

  case 35:
#line 158 "./fconfig.y"
    {
		    currField->virtualFormat = qformat;
		    qformat = NULL;
		}
    break;

  case 38:
#line 166 "./fconfig.y"
    {
		    currField->datatype = MultiText;
		    currField->defaultSearchType = NilSearch;
		}
    break;

  case 39:
#line 170 "./fconfig.y"
    {
		  currField->datatype = Date;
		  currField->defaultSearchType = LessThan;
		}
    break;

  case 40:
#line 174 "./fconfig.y"
    {
		    currField->datatype = Integer;
		    currField->defaultSearchType = NilSearch;
		}
    break;

  case 41:
#line 178 "./fconfig.y"
    {
		    currField->datatype = PRListType;
		    currField->defaultSearchType = RegCmp;
		}
    break;

  case 42:
#line 184 "./fconfig.y"
    {
		    currField->datatype = Text;
		}
    break;

  case 43:
#line 187 "./fconfig.y"
    {
		    currField->datatype = TextWithRegex;
		}
    break;

  case 45:
#line 193 "./fconfig.y"
    {
		    yyval.stringlist = new_string_list_ent (takeQString (yyvsp[0].qstr), NULL);
		    currField->regex = yyval.stringlist;
		}
    break;

  case 46:
#line 197 "./fconfig.y"
    {
		    yyvsp[-1].stringlist->next = new_string_list_ent (takeQString (yyvsp[0].qstr), NULL);
		    yyval.stringlist = yyvsp[-1].stringlist->next;
		}
    break;

  case 47:
#line 203 "./fconfig.y"
    {
		    currField->datatype = Enum;
		    currField->defaultSearchType = RegCmp;
		}
    break;

  case 48:
#line 207 "./fconfig.y"
    {
		    currField->datatype = Enum;
		    currField->defaultSearchType = RegCmp;
		    initAdmField (currField);
		}
    break;

  case 49:
#line 212 "./fconfig.y"
    {
		    currField->datatype = MultiEnum;
		    currField->defaultSearchType = RegCmp;
		    initAdmField (currField);
		}
    break;

  case 50:
#line 217 "./fconfig.y"
    {
		   currField->datatype = MultiEnum;
		   currField->defaultSearchType = RegCmp;
		   if (currField->multiEnumSeparator == NULL)
		     {
		       currField->multiEnumSeparator
			 = xstrdup (DEFAULT_MULTIENUM_SEPARATOR);
		     }
		}
    break;

  case 55:
#line 234 "./fconfig.y"
    {
		    addGlobalChangeActions (databaseBeingDefined, currChange);
		    currChange = NULL;
		}
    break;

  case 56:
#line 240 "./fconfig.y"
    {
		    ChangeActions *p = &(currField->changeActions);
		    while (*p != NULL)
		      {
			p = &((*p)->next);
		      }
		    *p = currChange;
		    currChange = NULL;
		}
    break;

  case 57:
#line 251 "./fconfig.y"
    {
		    currChange = newChangeAction (databaseBeingDefined, yyvsp[-1].sval);
		    if (yyvsp[-1].sval != NULL) 
		      {
			free (yyvsp[-1].sval);
		      }
		}
    break;

  case 58:
#line 260 "./fconfig.y"
    {
		    yyval.sval = takeQString (yyvsp[0].qstr);
		}
    break;

  case 59:
#line 263 "./fconfig.y"
    {
		    yyval.sval = NULL;
		}
    break;

  case 64:
#line 274 "./fconfig.y"
    {
		    currChange->edits = currEdit;
		    currEdit = NULL;
		}
    break;

  case 65:
#line 278 "./fconfig.y"
    {
		    currEdit->append = 1;
		    currChange->edits = currEdit;
		    currEdit = NULL;
		}
    break;

  case 66:
#line 283 "./fconfig.y"
    {
		    currChange->addAuditTrail = 1;
		}
    break;

  case 67:
#line 286 "./fconfig.y"
    {
		    currChange->auditTrailFormat = qformat;
		    qformat = NULL;
		}
    break;

  case 68:
#line 290 "./fconfig.y"
    {
		    currChange->requireChangeReason = 1;
		}
    break;

  case 71:
#line 299 "./fconfig.y"
    {
		    FieldList foo 
		      = newFieldListEnt (databaseBeingDefined, qStrVal (yyvsp[0].qstr),
					 currChange->requiredFields);
		    currChange->requiredFields = foo;
		}
    break;

  case 74:
#line 311 "./fconfig.y"
    {
		    currEdit = (FieldEdit *) xmalloc (sizeof (FieldEdit));
		    currEdit->expr = NULL;
		    currEdit->fieldToEditName = takeQString (yyvsp[0].qstr);
		    currEdit->append = 0;
		    currEdit->textFormat = NULL;
		    currEdit->fieldsForFormat = NULL;
		    currEdit->next = NULL;
		}
    break;

  case 75:
#line 322 "./fconfig.y"
    {
		    currEdit->textFormat = takeQString (yyvsp[0].qstr);
		}
    break;

  case 76:
#line 327 "./fconfig.y"
    {
		    currEdit->fieldsForFormat = NULL;
		}
    break;

  case 77:
#line 330 "./fconfig.y"
    {
		}
    break;

  case 78:
#line 334 "./fconfig.y"
    {
		    yyval.flist = newFieldListEnt (databaseBeingDefined, qStrVal (yyvsp[0].qstr),
					  NULL);
		    currEdit->fieldsForFormat = yyval.flist;
		}
    break;

  case 79:
#line 339 "./fconfig.y"
    {
		    yyval.flist = newFieldListEnt (databaseBeingDefined, qStrVal (yyvsp[0].qstr),
					  NULL);
		    yyvsp[-1].flist->next = yyval.flist;
		}
    break;

  case 85:
#line 355 "./fconfig.y"
    {
		    currField->maxPrsPerLine = yyvsp[0].intval;
		}
    break;

  case 91:
#line 369 "./fconfig.y"
    {
		   currField->multiEnumSeparator = takeQString (yyvsp[0].qstr);
		}
    break;

  case 95:
#line 379 "./fconfig.y"
    {
		    yyval.stringlist = new_string_list_ent (takeQString (yyvsp[0].qstr), NULL);
		    currField->enumValues = yyval.stringlist;
		}
    break;

  case 96:
#line 383 "./fconfig.y"
    {
		    yyvsp[-1].stringlist->next = new_string_list_ent (takeQString (yyvsp[0].qstr), NULL);
		    yyval.stringlist = yyvsp[-1].stringlist->next;
		}
    break;

  case 99:
#line 393 "./fconfig.y"
    {
		    currField->adm_db_name = takeQString (yyvsp[0].qstr);
		}
    break;

  case 100:
#line 396 "./fconfig.y"
    {
		    AdmFieldDesc *p;
		    int which = 0;

		    for (p = currField->adm_field_des; p != NULL; p = p->next)
		      {
			if (strcmp (p->name, qStrVal (yyvsp[0].qstr)) == 0)
			  {
			    break;
			  }
			which++;
		      }

		    if (p != NULL)
		      {
			currField->key_field = which;
		      }
		    else
		      {
			char *msg;

			asprintf (&msg, "Invalid adm subfield %s\n",
				  qStrVal (yyvsp[0].qstr));
			fconferror (msg);
			free (msg);
		      }
		}
    break;

  case 103:
#line 425 "./fconfig.y"
    {
		    currField->allow_any_value = 1;
		}
    break;

  case 107:
#line 435 "./fconfig.y"
    {
		   currField->multiEnumSeparator = takeQString (yyvsp[0].qstr);
		}
    break;

  case 108:
#line 440 "./fconfig.y"
    {
		    currField->default_value = takeQString (yyvsp[0].qstr);
		}
    break;

  case 109:
#line 443 "./fconfig.y"
    {
		    currField->input_default_value = takeQString (yyvsp[0].qstr);
		}
    break;

  case 110:
#line 448 "./fconfig.y"
    {
		    currField->adm_db_fields = 1;
		    currField->adm_field_des = yyvsp[0].adm_field_des;
		    yyval.adm_field_des = yyvsp[0].adm_field_des;
		}
    break;

  case 111:
#line 453 "./fconfig.y"
    {
		    yyvsp[-1].adm_field_des->next = yyvsp[0].adm_field_des;
		    yyval.adm_field_des = yyvsp[0].adm_field_des;
		    currField->adm_db_fields++;
		}
    break;

  case 112:
#line 460 "./fconfig.y"
    {
		    yyval.adm_field_des = (AdmFieldDesc *) 
		      xmalloc (sizeof (AdmFieldDesc));
		    yyval.adm_field_des->name = takeQString (yyvsp[0].qstr);
		    yyval.adm_field_des->next = NULL;
		}
    break;

  case 113:
#line 468 "./fconfig.y"
    {
		    currField->defaultSearchType = RegCmp;
		}
    break;

  case 114:
#line 471 "./fconfig.y"
    {
		    currField->defaultSearchType = RegFind;
		}
    break;

  case 115:
#line 476 "./fconfig.y"
    {
		    currField->textsearch = 1;
		}
    break;

  case 116:
#line 479 "./fconfig.y"
    {
		    currField->restricted = 1;
		}
    break;

  case 117:
#line 482 "./fconfig.y"
    {
		     currField->nospaces = 1;
		}
    break;

  case 118:
#line 485 "./fconfig.y"
    {
		    if (setBuiltinField (currField, qStrVal (yyvsp[0].qstr)) != 0)
		      {
			char *msg;
			asprintf (&msg, "Invalid builtin fieldname %s",
				  qStrVal (yyvsp[0].qstr));
			fconferror (msg);
			free (msg);
		      }
		}
    break;

  case 120:
#line 496 "./fconfig.y"
    {
		    currField->description = takeQString (yyvsp[0].qstr);
		}
    break;

  case 121:
#line 499 "./fconfig.y"
    {
		    currField->readonly = 1;
		}
    break;

  case 122:
#line 502 "./fconfig.y"
    {
		    currField->auxFlags = yyvsp[-1].stringlist;
		}
    break;

  case 123:
#line 505 "./fconfig.y"
    {
		    currField->editonly = 1;
		}
    break;

  case 124:
#line 510 "./fconfig.y"
    {
		    yyval.stringlist = new_string_list_ent (takeQString (yyvsp[0].qstr), NULL);
		    currField->auxFlags = yyval.stringlist;
		}
    break;

  case 125:
#line 514 "./fconfig.y"
    {
		    yyvsp[-1].stringlist->next = new_string_list_ent (takeQString (yyvsp[0].qstr), NULL);
		    yyval.stringlist = yyvsp[-1].stringlist->next;
		}
    break;

  case 130:
#line 528 "./fconfig.y"
    {
		    addQueryFormat (databaseBeingDefined, qformat);
		    qformat = NULL;
		}
    break;

  case 131:
#line 532 "./fconfig.y"
    {
		    freeQueryFormat (qformat);
		    qformat = NULL;
		}
    break;

  case 132:
#line 538 "./fconfig.y"
    {
		    qformat = (QueryFormat *) xmalloc (sizeof (QueryFormat));
		    qformat->name = takeQString (yyvsp[0].qstr);
		    qformat->printf = NULL;
		    qformat->separator = NULL;
		    qformat->fields = NULL;
		    qformat->next = NULL;
		}
    break;

  case 141:
#line 562 "./fconfig.y"
    {
		    qformat->rawQuery = 1;
		}
    break;

  case 142:
#line 567 "./fconfig.y"
    {
		    qformat->printf = takeQString (yyvsp[0].qstr);
		}
    break;

  case 145:
#line 576 "./fconfig.y"
    {
		    qformat->fields = yyvsp[0].flist;
		}
    break;

  case 146:
#line 579 "./fconfig.y"
    {
		    yyvsp[-1].flist->next = yyvsp[0].flist;
		    yyval.flist = yyvsp[0].flist;
		}
    break;

  case 147:
#line 585 "./fconfig.y"
    {
		    yyval.flist = newFieldListEnt (databaseBeingDefined, qStrVal (yyvsp[0].qstr),
					  NULL);
		    if (parseComplexFieldIndex (yyval.flist->ent) != 0)
		      {
			char *msg;

			asprintf (&msg, "Field %s is invalid\n", qStrVal (yyvsp[0].qstr));
			fconferror (msg);
			free (msg);
		      }
		}
    break;

  case 148:
#line 599 "./fconfig.y"
    {
		    setIndexDesc (databaseBeingDefined, indexEntry);
		    indexEntry = NULL;
		}
    break;

  case 149:
#line 603 "./fconfig.y"
    {
		    freeIndexDesc (indexEntry);
		    indexEntry = NULL;
		}
    break;

  case 151:
#line 610 "./fconfig.y"
    {
		    indexEntry = newIndexDesc (databaseBeingDefined);
		}
    break;

  case 154:
#line 619 "./fconfig.y"
    {
		    setIndexDescPath (indexEntry, qStrVal (yyvsp[0].qstr));
		}
    break;

  case 158:
#line 627 "./fconfig.y"
    {
		    addFieldToIndex (indexEntry, yyvsp[0].flist);
		}
    break;

  case 159:
#line 630 "./fconfig.y"
    {
		    addFieldToIndex (indexEntry, yyvsp[0].flist);
		}
    break;

  case 160:
#line 635 "./fconfig.y"
    {
		    setIndexDescSeparator (indexEntry, takeQString (yyvsp[0].qstr));
		}
    break;

  case 161:
#line 638 "./fconfig.y"
    {
		    setIndexDescBinary (indexEntry, yyvsp[0].intval);
		}
    break;

  case 164:
#line 647 "./fconfig.y"
    {
		    setInputTemplate (databaseBeingDefined, yyvsp[-1].inputlist);
		}
    break;

  case 166:
#line 653 "./fconfig.y"
    {
		    setRequiredInputFields (databaseBeingDefined, requiredFlds);
                }
    break;

  case 167:
#line 656 "./fconfig.y"
    {
                    freeFieldList (requiredFlds);
                    requiredFlds = NULL;
                }
    break;

  case 168:
#line 662 "./fconfig.y"
    {
		    requiredFlds = yyvsp[0].flist;
                }
    break;

  case 169:
#line 665 "./fconfig.y"
    {
                    yyvsp[-1].flist->next = yyvsp[0].flist;
                    yyval.flist = yyvsp[0].flist;
                }
    break;

  case 170:
#line 671 "./fconfig.y"
    {
		    yyval.inputlist = inputTemplate;
		    inputTemplate = NULL;
		}
    break;

  case 171:
#line 675 "./fconfig.y"
    {
		    yyval.inputlist = NULL;
		}
    break;

  case 172:
#line 680 "./fconfig.y"
    {
		     yyval.inputlist = (InputTemplate *) 
		       xmalloc (sizeof (InputTemplate));
		     yyval.inputlist->index = find_field_index (databaseBeingDefined,
						   qStrVal (yyvsp[0].qstr));
		     if (yyval.inputlist->index == InvalidFieldIndex)
		       {
			 char *msg;

			 asprintf (&msg, "Field %s is invalid\n",
				   qStrVal (yyvsp[0].qstr));
			 fconferror (msg);
			 free (yyval.inputlist);
			 free (msg);
			 inputTemplate = NULL;
		       }
		     else
		       {
			 inputTemplate = yyval.inputlist;
			 yyval.inputlist->next = NULL;
		       }
		}
    break;

  case 173:
#line 702 "./fconfig.y"
    {
		     yyval.inputlist = (InputTemplate *)
		       xmalloc (sizeof (InputTemplate));
		     yyval.inputlist->index = find_field_index (databaseBeingDefined,
						   qStrVal (yyvsp[0].qstr));
		     if (yyval.inputlist->index == InvalidFieldIndex)
		       {
			 char *msg;

			 asprintf (&msg, "Field %s is invalid\n",
				   qStrVal (yyvsp[0].qstr));
			 fconferror (msg);
			 free (msg);
			 free (yyval.inputlist);
		       }
		     else
		       {
			 yyval.inputlist->next = NULL;
			 yyvsp[-1].inputlist->next = yyval.inputlist;
			 if (inputTemplate == NULL)
			   {
			     inputTemplate = yyval.inputlist;
			   }
		       }
		}
    break;

  case 176:
#line 733 "./fconfig.y"
    {
		    addMessageFormat (databaseBeingDefined, mailFormat);
		    mailFormat = NULL;
		}
    break;

  case 177:
#line 737 "./fconfig.y"
    {
		    freeMessageFormat (mailFormat);
		    mailFormat = NULL;
		}
    break;

  case 178:
#line 743 "./fconfig.y"
    {
  		    mailFormat 
		      = (MailMessageFormat)
		      xmalloc (sizeof (struct mail_message_format));
		    mailFormat->name = takeQString (yyvsp[0].qstr);
		    mailFormat->toAddresses = NULL;
		    mailFormat->fromAddress = NULL;
		    mailFormat->replyTo = NULL;
		    mailFormat->body = NULL;
		    mailFormat->header = NULL;
		    mailFormat->next = NULL;
		}
    break;

  case 181:
#line 761 "./fconfig.y"
    {
		    mailFormat->body = qformat;
		    qformat = NULL;
		}
    break;

  case 182:
#line 765 "./fconfig.y"
    {
		    mailFormat->header = qformat;
		    qformat = NULL;
		}
    break;

  case 183:
#line 769 "./fconfig.y"
    {
		    mailFormat->toAddresses = yyvsp[-1].mailaddrlist;
		}
    break;

  case 184:
#line 772 "./fconfig.y"
    {
		    mailFormat->fromAddress = yyvsp[-1].mailaddr;
		}
    break;

  case 185:
#line 775 "./fconfig.y"
    {
		  mailFormat->replyTo = yyvsp[-1].mailaddrlist;
		}
    break;

  case 189:
#line 787 "./fconfig.y"
    {
		    freeQueryFormat (qformat);
		    qformat = NULL;
		}
    break;

  case 190:
#line 793 "./fconfig.y"
    {
		    qformat = (QueryFormat *) xmalloc (sizeof (QueryFormat));
		    qformat->name = NULL;
		    qformat->printf = NULL;
		    qformat->separator = NULL;
		    qformat->fields = NULL;
		    qformat->next = NULL;
		}
    break;

  case 191:
#line 803 "./fconfig.y"
    {
		   yyval.mailaddrlist = (MailAddressList *) xmalloc (sizeof (MailAddressList));
		   yyval.mailaddrlist->address = yyvsp[0].mailaddr;
		   yyval.mailaddrlist->next = NULL;
		}
    break;

  case 192:
#line 808 "./fconfig.y"
    {
		   MailAddressList *lp = yyval.mailaddrlist;
		   while (lp->next != NULL) { lp = lp->next; }
		   lp->next =
		     (MailAddressList *) xmalloc (sizeof (MailAddressList));
		   lp->next->address = yyvsp[0].mailaddr;
		   lp->next->next = NULL;
		}
    break;

  case 193:
#line 818 "./fconfig.y"
    {
		    yyval.mailaddr = (MailAddress *) xmalloc (sizeof (MailAddress));
		    yyval.mailaddr->fixedAddress = takeQString (yyvsp[0].qstr);
		    yyval.mailaddr->addresses = NULL;
		}
    break;

  case 194:
#line 823 "./fconfig.y"
    {
		    yyval.mailaddr = (MailAddress *) xmalloc (sizeof (MailAddress));
		    yyval.mailaddr->fixedAddress = NULL;
		    yyval.mailaddr->addresses = yyvsp[0].flist;
		}
    break;

  case 195:
#line 830 "./fconfig.y"
    {
		    yyval.flist = yyvsp[0].flist;
		}
    break;

  case 196:
#line 833 "./fconfig.y"
    {
		    FieldList p = yyval.flist;
		    while (p->next != NULL) 
		      {
			p = p->next;
		      }
		    p->next = yyvsp[0].flist;
		}
    break;

  case 197:
#line 843 "./fconfig.y"
    {
		    yyval.flist = newFieldListEnt (databaseBeingDefined, qStrVal (yyvsp[0].qstr),
					  NULL);
		}
    break;

  case 198:
#line 849 "./fconfig.y"
    {
		    setAuditTrailFormat (databaseBeingDefined, qformat);
		}
    break;


    }

/* Line 999 of yacc.c.  */
#line 2512 "fconfig.tab.c"

  yyvsp -= yylen;
  yyssp -= yylen;


  YY_STACK_PRINT (yyss, yyssp);

  *++yyvsp = yyval;


  /* 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 - YYNTOKENS] + *yyssp;
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTOKENS];

  goto yynewstate;


/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
#if YYERROR_VERBOSE
      yyn = yypact[yystate];

      if (YYPACT_NINF < yyn && yyn < YYLAST)
	{
	  YYSIZE_T yysize = 0;
	  int yytype = YYTRANSLATE (yychar);
	  char *yymsg;
	  int yyx, yycount;

	  yycount = 0;
	  /* Start YYX at -YYN if negative to avoid negative indexes in
	     YYCHECK.  */
	  for (yyx = yyn < 0 ? -yyn : 0;
	       yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
	    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
	      yysize += yystrlen (yytname[yyx]) + 15, yycount++;
	  yysize += yystrlen ("syntax error, unexpected ") + 1;
	  yysize += yystrlen (yytname[yytype]);
	  yymsg = (char *) YYSTACK_ALLOC (yysize);
	  if (yymsg != 0)
	    {
	      char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
	      yyp = yystpcpy (yyp, yytname[yytype]);

	      if (yycount < 5)
		{
		  yycount = 0;
		  for (yyx = yyn < 0 ? -yyn : 0;
		       yyx < (int) (sizeof (yytname) / sizeof (char *));
		       yyx++)
		    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
		      {
			const char *yyq = ! yycount ? ", expecting " : " or ";
			yyp = yystpcpy (yyp, yyq);
			yyp = yystpcpy (yyp, yytname[yyx]);
			yycount++;
		      }
		}
	      yyerror (yymsg);
	      YYSTACK_FREE (yymsg);
	    }
	  else
	    yyerror ("syntax error; also virtual memory exhausted");
	}
      else
#endif /* YYERROR_VERBOSE */
	yyerror ("syntax error");
    }



  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)
        {
	  /* Pop the error token.  */
          YYPOPSTACK;
	  /* Pop the rest of the stack.  */
	  while (yyss < yyssp)
	    {
	      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
	      yydestruct (yystos[*yyssp], yyvsp);
	      YYPOPSTACK;
	    }
	  YYABORT;
        }

      YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
      yydestruct (yytoken, &yylval);
      yychar = YYEMPTY;

    }

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


/*----------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action.  |
`----------------------------------------------------*/
yyerrlab1:
  yyerrstatus = 3;	/* Each real token shifted decrements this.  */

  for (;;)
    {
      yyn = yypact[yystate];
      if (yyn != YYPACT_NINF)
	{
	  yyn += YYTERROR;
	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
	    {
	      yyn = yytable[yyn];
	      if (0 < yyn)
		break;
	    }
	}

      /* Pop the current state because it cannot handle the error token.  */
      if (yyssp == yyss)
	YYABORT;

      YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
      yydestruct (yystos[yystate], yyvsp);
      yyvsp--;
      yystate = *--yyssp;

      YY_STACK_PRINT (yyss, yyssp);
    }

  if (yyn == YYFINAL)
    YYACCEPT;

  YYDPRINTF ((stderr, "Shifting error token, "));

  *++yyvsp = yylval;


  yystate = yyn;
  goto yynewstate;


/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturn;

/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturn;

#ifndef yyoverflow
/*----------------------------------------------.
| yyoverflowlab -- parser overflow comes here.  |
`----------------------------------------------*/
yyoverflowlab:
  yyerror ("parser stack overflow");
  yyresult = 2;
  /* Fall through.  */
#endif

yyreturn:
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif
  return yyresult;
}



