/* A Bison parser, made by GNU Bison 2.0.  */

/* Skeleton parser for Yacc-like parsing with Bison,
   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 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



/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     SW_ATTRIBUTE_KEYWORD = 258,
     SW_EXT_KEYWORD = 259,
     SW_RPM_KEYWORD = 260,
     SW_OBJECT_KEYWORD = 261,
     SW_NEWLINE_STRING = 262,
     SW_OK_NEWLINE_STRING = 263,
     SW_TERM_NEWLINE_STRING = 264,
     SW_PATHNAME_CHARACTER_STRING = 265,
     SW_SHELL_TOKEN_STRING = 266,
     SW_WHITE_SPACE_STRING = 267,
     SW_OPTION_DELIM = 268,
     SW_EXT_WHITE_SPACE_STRING = 269,
     SW_OPTION = 270,
     SW_INDEX = 271,
     SW_INSTALLED = 272,
     SW_INFO = 273,
     SW_PSF = 274,
     SW_PSF_INCL = 275,
     SW_SWBISINFO = 276,
     SW_LEXER_EOF = 277,
     SW_LEXER_FATAL_ERROR = 278,
     SW_OK_HOST = 279,
     SW_OK_DISTRIBUTION = 280,
     SW_OK_INSTALLED_SOFTWARE = 281,
     SW_OK_BUNDLE = 282,
     SW_OK_PRODUCT = 283,
     SW_OK_SUBPRODUCT = 284,
     SW_OK_FILESET = 285,
     SW_OK_CONTROL_FILE = 286,
     SW_OK_FILE = 287,
     SW_OK_VENDOR = 288,
     SW_OK_MEDIA = 289,
     SW_AK_LAYOUT_VERSION = 290,
     SW_OK_CATEGORY = 291
   };
#endif
#define SW_ATTRIBUTE_KEYWORD 258
#define SW_EXT_KEYWORD 259
#define SW_RPM_KEYWORD 260
#define SW_OBJECT_KEYWORD 261
#define SW_NEWLINE_STRING 262
#define SW_OK_NEWLINE_STRING 263
#define SW_TERM_NEWLINE_STRING 264
#define SW_PATHNAME_CHARACTER_STRING 265
#define SW_SHELL_TOKEN_STRING 266
#define SW_WHITE_SPACE_STRING 267
#define SW_OPTION_DELIM 268
#define SW_EXT_WHITE_SPACE_STRING 269
#define SW_OPTION 270
#define SW_INDEX 271
#define SW_INSTALLED 272
#define SW_INFO 273
#define SW_PSF 274
#define SW_PSF_INCL 275
#define SW_SWBISINFO 276
#define SW_LEXER_EOF 277
#define SW_LEXER_FATAL_ERROR 278
#define SW_OK_HOST 279
#define SW_OK_DISTRIBUTION 280
#define SW_OK_INSTALLED_SOFTWARE 281
#define SW_OK_BUNDLE 282
#define SW_OK_PRODUCT 283
#define SW_OK_SUBPRODUCT 284
#define SW_OK_FILESET 285
#define SW_OK_CONTROL_FILE 286
#define SW_OK_FILE 287
#define SW_OK_VENDOR 288
#define SW_OK_MEDIA 289
#define SW_AK_LAYOUT_VERSION 290
#define SW_OK_CATEGORY 291




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


/*
swparse.y
*/

/*

 Copyright (C) 1998  James H. Lowe, Jr.  <jhlowe@acm.org>

*/

/*
 COPYING TERMS AND CONDITIONS:

 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.
*/

#include "swuser_config.h"
#include <stdio.h>
#include <stdlib.h>
#include "strob.h"
#include "swparse.h"


#define SWPARSE_ACMD_COPY 0
#define SWPARSE_ACMD_CAT 1
#define SWPARSE_ACMD_EMIT 2

#define SWPARSE_EMITTED_TYPE_ATT 'A'   /* attribute keyword */
#define SWPARSE_EMITTED_TYPE_EXT 'E'   /* extended keyword */
#define SWPARSE_EMITTED_TYPE_OBJ 'O'   /* object keyword */

#define SWPARSE_SWDEF_FILETYPE_INFO	0
#define SWPARSE_SWDEF_FILETYPE_INDEX	1
#define SWPARSE_SWDEF_FILETYPE_PSF	2

#define SWPARSE_LEVEL_IVAL_MIN		-9
#define SWPARSE_LEVEL_IVAL_MAX		9
#define SWPARSE_UNKNOWN_EXTRA		40

extern int yydebug; 
extern int swlex_yacc_feedback_fileset;
extern int swlex_yacc_feedback_file_object;
extern int swlex_yacc_feedback_controlfile_object;
extern int swlex_yacc_feedback_directory;
extern char swlex_filename[];
extern int swparse_outputfd;
extern int swparse_atlevel;
extern int swparse_form_flag;
extern int swparse_swdef_filetype;

static int did_see_vendor_misleading;
static int location;
static char swparse_keytype;
static char swparse_leading_whitespace[]="\x20\x20\x20\x2\x20\x2\x20\x2\x20\x2\x20\x2\x20\x2\x20\x20"
				"\x20\x20\x20\x2\x20\x2\x20\x2\x20\x2\x20\x2\x20\x2\x20\x20"
				"\x20\x20\x20\x2\x20\x2\x20\x2\x20\x2\x20\x2\x20\x2\x20\x20"
				"\x20\x20\x20\x2\x20\x2\x20\x2\x20\x2\x20\x2\x20\x2\x20\x20"
				"\x20\x20\x20\x2\x20\x2\x20\x2\x20\x2\x20\x2\x20\x2\x20\x20"
				"\x20\x20\x20\x2\x20\x2\x20\x2\x20\x2\x20\x2\x20\x2\x20\x20"
				"\x20\x20\x20\x2\x20\x2\x20\x2\x20\x2\x20\x2\x20\x2\x20\x20"
				"";
static char *swws;

static int level_push(char ** sw);
static int level_pop(char ** sw);
static STROB * tmp_strob;
static int swparse_strob_ptr_len;
char * swparse_strob_ptr;
int swparse_construct_attribute ( STROB * strb, int output_fd, char * src, int cmd, int level, char s_keytype, int offset );
int swparse_write_attribute_obj ( int outputfd, char * key, int level, int offset);
int swparse_print_filename (char * buf, int len, char * filetype, char * ws_level_string, char * swlex_filename, int form_flag);
static int swparse_i_emit(STROB * strb, int output_fd, char * src, int cmd, int level, char s_keytype, int offset);
static int swparse_i_emit_object_keyword(int outputfd, char * key, int level, int offset);
static int swparse_i_emit_filename (char * buf, int buflen, char * filetype, char * ws_level_string, char * swlex_filename, int form_flag);



/* 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 90 "swparse.y"
typedef union YYSTYPE {
	STROB * strb;
} YYSTYPE;
/* Line 190 of yacc.c.  */
#line 241 "y.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 213 of yacc.c.  */
#line 253 "y.tab.c"

#if ! defined (yyoverflow) || YYERROR_VERBOSE

# ifndef YYFREE
#  define YYFREE free
# endif
# ifndef YYMALLOC
#  define YYMALLOC malloc
# endif

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

# ifdef YYSTACK_USE_ALLOCA
#  if YYSTACK_USE_ALLOCA
#   ifdef __GNUC__
#    define YYSTACK_ALLOC __builtin_alloca
#   else
#    define YYSTACK_ALLOC alloca
#   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 YYMALLOC
#  define YYSTACK_FREE YYFREE
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */


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

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  short int 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 int) + sizeof (YYSTYPE))			\
      + YYSTACK_GAP_MAXIMUM)

/* Copy COUNT objects from FROM to TO.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if defined (__GNUC__) && 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 int yysigned_char;
#endif

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

/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS  38
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS  120
/* YYNRULES -- Number of rules. */
#define YYNRULES  160
/* YYNRULES -- Number of states. */
#define YYNSTATES  281

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

#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,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
      37,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     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
};

#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
   YYRHS.  */
static const unsigned short int yyprhs[] =
{
       0,     0,     3,     8,    13,    18,    23,    28,    33,    34,
      35,    37,    39,    41,    43,    45,    47,    49,    51,    55,
      59,    62,    66,    67,    71,    73,    75,    77,    79,    80,
      81,    84,    86,    89,    91,    92,    94,    96,    98,   100,
     103,   106,   107,   110,   112,   114,   115,   117,   120,   122,
     123,   125,   128,   130,   132,   134,   136,   138,   140,   142,
     144,   146,   153,   160,   165,   167,   168,   174,   175,   177,
     180,   182,   186,   190,   192,   193,   194,   195,   196,   197,
     200,   202,   203,   204,   205,   206,   207,   217,   220,   222,
     224,   226,   228,   229,   231,   234,   236,   240,   242,   244,
     248,   251,   253,   255,   257,   259,   260,   262,   266,   270,
     274,   278,   282,   286,   290,   294,   298,   302,   306,   310,
     311,   317,   318,   319,   327,   333,   339,   345,   350,   351,
     352,   360,   366,   367,   368,   376,   382,   383,   384,   393,
     394,   396,   397,   398,   406,   411,   413,   415,   416,   418,
     421,   423,   428,   433,   438,   440,   442,   444,   448,   451,
     453
};

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

/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
static const unsigned short int yyrline[] =
{
       0,   142,   142,   143,   144,   145,   146,   147,   150,   157,
     163,   173,   182,   192,   202,   212,   217,   220,   223,   228,
     233,   237,   242,   242,   247,   250,   253,   256,   259,   264,
     269,   270,   273,   274,   277,   278,   282,   283,   284,   287,
     291,   295,   296,   299,   300,   303,   304,   307,   308,   311,
     312,   315,   316,   319,   320,   321,   322,   325,   326,   327,
     328,   331,   338,   349,   354,   360,   358,   364,   365,   368,
     369,   372,   373,   374,   377,   380,   383,   386,   390,   390,
     398,   402,   403,   404,   406,   408,   402,   419,   420,   423,
     425,   429,   432,   433,   436,   437,   440,   441,   452,   455,
     460,   461,   464,   465,   466,   474,   475,   481,   483,   486,
     489,   492,   495,   498,   501,   504,   507,   510,   513,   516,
     527,   534,   536,   533,   552,   558,   564,   570,   577,   579,
     576,   584,   590,   592,   589,   597,   605,   607,   603,   612,
     613,   619,   621,   618,   630,   634,   648,   651,   652,   655,
     656,   660,   688,   697,   708,   722,   737,   738,   739,   742,
     748
};
#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", "SW_ATTRIBUTE_KEYWORD", "SW_EXT_KEYWORD",
  "SW_RPM_KEYWORD", "SW_OBJECT_KEYWORD", "SW_NEWLINE_STRING",
  "SW_OK_NEWLINE_STRING", "SW_TERM_NEWLINE_STRING",
  "SW_PATHNAME_CHARACTER_STRING", "SW_SHELL_TOKEN_STRING",
  "SW_WHITE_SPACE_STRING", "SW_OPTION_DELIM", "SW_EXT_WHITE_SPACE_STRING",
  "SW_OPTION", "SW_INDEX", "SW_INSTALLED", "SW_INFO", "SW_PSF",
  "SW_PSF_INCL", "SW_SWBISINFO", "SW_LEXER_EOF", "SW_LEXER_FATAL_ERROR",
  "SW_OK_HOST", "SW_OK_DISTRIBUTION", "SW_OK_INSTALLED_SOFTWARE",
  "SW_OK_BUNDLE", "SW_OK_PRODUCT", "SW_OK_SUBPRODUCT", "SW_OK_FILESET",
  "SW_OK_CONTROL_FILE", "SW_OK_FILE", "SW_OK_VENDOR", "SW_OK_MEDIA",
  "SW_AK_LAYOUT_VERSION", "SW_OK_CATEGORY", "'<'", "$accept",
  "software_definition_file", "sw_INIT_y", "sw_QUIT_y", "sw_INFO_tree",
  "sw_INSTALLED_tree", "sw_INDEX_tree", "sw_PSF_tree", "sw_PSF_tree_incl",
  "sw_OPTION_tree", "sw_OPTION_file", "sw_INFO_file", "sw_INDEX_file",
  "sw_INSTALLED_file", "sw_PSF_file", "sw_PSF_file_i", "sw_PSF_file_incl",
  "@1", "option_contents", "info_contents", "option_content_items",
  "info_content_items", "level_push", "level_pop", "option_lines", "files",
  "option_items", "file_items", "soc_definition_index",
  "soc_installed_software", "host_definition_i", "soc_definition_index_ii",
  "soc_contents_psf", "soc_contents_psf_a", "soc_contents_index",
  "soc_contents_index_a", "soc_content_items_index",
  "soc_content_items_psf", "distribution_definition_index",
  "installed_software_definition_index", "distribution_definition_psf",
  "fileset_specification_index", "fileset_specification_psf", "@2",
  "fileset_contents_psf", "fileset_contents_psf_a",
  "fileset_content_items_psf", "fileset_psf_ctrlfile_on",
  "fileset_psf_ctrlfile_off", "fileset_psf_object_on",
  "fileset_psf_object_off", "filesets_psf", "@3", "products_psf",
  "product_specification_psf", "@4", "@5", "@6", "@7", "@8",
  "product_contents_psf", "product_content_items_psf",
  "product_control_files_psf", "product_control_files_psf_a",
  "product_control_files_psf_n", "product_control_file_items_psf",
  "products_index", "product_specification_index",
  "product_contents_index", "product_content_items_index", "media",
  "kwo_control_file", "kwo_file", "kwo_fileset", "kwo_host",
  "kwo_distribution", "kwo_installed_software", "kwo_bundle",
  "kwo_category", "kwo_product", "kwo_subproduct", "kwo_vendor",
  "kwo_media", "kwo_common_action", "host_normal", "vendor_normal", "@9",
  "@10", "bundle_normal", "category_normal", "subproduct_normal",
  "product_normal", "control_file_normal", "@11", "@12",
  "file_psf_boot_incl", "file_normal", "@13", "@14", "media_normal",
  "distribution_normal_psf", "@15", "@16", "layout_version_definition_o",
  "fileset_normal", "@17", "@18", "layout_version_definition",
  "layout_version_keyword", "file_extended_any", "attribute_value_list",
  "attribute_value_list_n", "attribute_definition", "option_definition",
  "extended_definition", "attribute_keyword", "extended_keyword",
  "attribute_value", "single_value", "pathname", 0
};
#endif

# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
   token YYLEX-NUM.  */
static const unsigned short int 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,    60
};
# endif

/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
static const unsigned char yyr1[] =
{
       0,    38,    39,    39,    39,    39,    39,    39,    40,    41,
      42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
      52,    53,    55,    54,    56,    57,    58,    59,    60,    61,
      62,    62,    63,    63,    64,    64,    65,    65,    65,    66,
      67,    68,    68,    69,    69,    70,    70,    71,    71,    72,
      72,    73,    73,    74,    74,    74,    74,    75,    75,    75,
      75,    76,    77,    78,    79,    81,    80,    82,    82,    83,
      83,    84,    84,    84,    85,    86,    87,    88,    90,    89,
      91,    93,    94,    95,    96,    97,    92,    98,    98,    99,
      99,   100,   101,   101,   102,   102,   103,   103,   104,   105,
     106,   106,   107,   107,   107,   108,   108,   109,   110,   111,
     112,   113,   114,   115,   116,   117,   118,   119,   120,   121,
     122,   124,   125,   123,   126,   127,   128,   129,   131,   132,
     130,   133,   135,   136,   134,   137,   139,   140,   138,   141,
     141,   143,   144,   142,   145,   146,   147,   148,   148,   149,
     149,   150,   151,   152,   153,   154,   155,   155,   155,   156,
     157
};

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

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

/* YYDEFGOTO[NTERM-NUM]. */
static const short int yydefgoto[] =
{
      -1,     1,     2,    54,    10,    11,    12,    13,    14,    15,
      45,    19,    37,    32,    40,    99,    42,    43,    46,    20,
      47,    21,    56,   121,    48,    22,    49,    23,    38,    33,
      34,    94,    64,    65,    83,    84,    85,    66,    95,    77,
     100,   139,   270,   279,   153,   154,   155,   156,   224,   157,
     225,   261,   262,    67,    68,    69,   123,   169,   250,   272,
     263,   264,   229,   230,   231,   232,    86,    87,   140,   141,
     194,    24,    25,   142,    35,    97,    78,    70,    71,    88,
     143,    72,   195,   109,    36,    73,   172,   236,    74,    75,
     145,    92,    26,   111,   202,   105,    27,   112,   203,   196,
     102,   219,   258,   175,   146,   216,   255,   176,   177,   158,
     129,   130,   131,    50,    29,   132,    30,   115,   116,   164
};

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
#define YYPACT_NINF -232
static const short int yypact[] =
{
    -232,    27,   104,  -232,  -232,  -232,  -232,  -232,  -232,  -232,
       8,     5,     5,     5,  -232,    35,  -232,    23,    42,  -232,
    -232,  -232,     8,  -232,  -232,  -232,  -232,  -232,  -232,  -232,
      47,    58,  -232,    60,    43,  -232,  -232,  -232,    67,    32,
    -232,    46,  -232,    49,  -232,  -232,  -232,  -232,    35,  -232,
    -232,    62,  -232,  -232,  -232,  -232,  -232,  -232,    15,  -232,
    -232,    78,    81,    82,  -232,    60,  -232,  -232,  -232,  -232,
    -232,  -232,  -232,  -232,  -232,  -232,    83,  -232,  -232,    35,
    -232,  -232,    91,  -232,    67,  -232,  -232,  -232,  -232,  -232,
    -232,  -232,     4,    93,  -232,  -232,  -232,  -232,  -232,  -232,
    -232,  -232,  -232,  -232,    94,    10,  -232,  -232,    15,  -232,
    -232,    35,    35,  -232,    11,    97,  -232,  -232,  -232,  -232,
    -232,  -232,  -232,  -232,    35,    35,  -232,  -232,    70,    98,
      35,  -232,   103,  -232,  -232,  -232,    35,   108,   120,  -232,
       4,  -232,  -232,  -232,  -232,  -232,  -232,  -232,    70,    60,
      70,    72,  -232,  -232,    10,  -232,    99,   100,  -232,   122,
    -232,  -232,  -232,   121,  -232,  -232,  -232,  -232,  -232,   105,
     125,   126,    35,  -232,  -232,    35,  -232,   124,  -232,  -232,
      15,  -232,   128,  -232,  -232,  -232,  -232,  -232,    35,  -232,
      35,  -232,  -232,   130,  -232,  -232,  -232,   131,  -232,  -232,
    -232,  -232,   132,   134,  -232,    18,  -232,  -232,  -232,   135,
      15,  -232,   140,  -232,  -232,  -232,    35,   141,   142,    35,
    -232,  -232,    35,  -232,  -232,  -232,  -232,  -232,    99,  -232,
    -232,    18,  -232,  -232,  -232,  -232,   143,    72,   146,  -232,
    -232,  -232,    72,  -232,  -232,   145,  -232,  -232,  -232,  -232,
     110,  -232,  -232,  -232,  -232,   147,  -232,  -232,   148,  -232,
    -232,  -232,   129,     6,  -232,  -232,  -232,  -232,  -232,  -232,
    -232,  -232,  -232,  -232,  -232,  -232,    10,  -232,  -232,  -232,
    -232
};

/* YYPGOTO[NTERM-NUM].  */
static const short int yypgoto[] =
{
    -232,  -232,  -232,    28,  -232,  -232,  -232,  -232,  -232,  -232,
    -232,  -232,  -232,  -232,  -232,  -232,  -232,  -232,  -232,  -232,
    -232,  -232,   -25,   -81,  -232,  -232,   107,   136,  -232,  -232,
      31,  -232,    12,  -232,  -232,  -232,    79,   101,  -232,   123,
    -232,  -232,  -232,  -232,  -112,  -232,    13,  -175,   -84,  -232,
    -232,  -232,  -232,  -232,  -232,  -232,  -232,  -232,  -232,  -232,
    -232,   -95,  -232,  -232,  -232,   -62,  -232,  -232,  -232,    33,
    -217,  -232,  -232,  -232,  -232,   133,  -232,  -232,  -232,  -232,
    -232,  -232,  -232,   -35,  -232,   -30,  -232,  -232,   -33,   -29,
    -231,     3,  -150,  -232,  -232,  -232,    19,  -232,  -232,  -232,
    -232,  -232,  -232,    25,   -85,  -232,  -232,    34,  -232,    -9,
    -108,  -232,    50,  -232,  -232,     0,  -232,  -101,  -232,    16
};

/* 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 -82
static const short int yytable[] =
{
      57,    28,   134,   160,   161,    90,   199,   159,    89,    91,
      79,    80,    16,    28,    16,    51,   170,   171,   110,   265,
     253,   162,    16,   163,   117,   257,   113,     3,   182,    31,
     228,    52,   265,   137,   138,   137,   -78,    62,    44,    17,
      18,   -74,   -76,    39,    41,   124,   125,   126,    51,   -74,
      53,    90,   114,   128,    89,    91,   228,    93,    76,   185,
      60,    58,   144,   136,   208,    81,    59,   209,    98,    76,
     103,    93,   148,   106,   108,   149,   150,   151,   249,   212,
     217,   104,   218,   166,   167,   168,   118,    61,   -81,   119,
     120,   127,   173,    62,    61,    82,    63,   211,   181,   133,
      62,   147,   152,    63,   165,   174,   193,   178,   240,   238,
     144,   243,   189,   221,   245,   180,   183,   187,   188,     4,
       5,     6,     7,     8,     9,   234,   235,   197,   184,   201,
      17,   162,    18,    82,   206,   207,   210,   213,   220,   137,
     223,   226,   246,   227,   237,   247,   248,   239,   214,   215,
     241,   242,   252,   254,   259,   107,   267,   268,    55,   138,
     256,   191,    96,   135,   278,   260,   122,   198,   273,   251,
     222,   266,   205,   186,   101,   192,   200,   271,   269,   204,
     179,     0,   190,     0,     0,   244,   274,   275,     0,     0,
       0,   277,     0,     0,     0,     0,   233,     0,   280,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,   233,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,   276
};

static const short int yycheck[] =
{
      25,    10,    83,   111,   112,    38,   156,   108,    38,    38,
      35,    36,     4,    22,     4,    15,   124,   125,    53,   250,
     237,    10,     4,    12,    59,   242,    11,     0,   136,    24,
     205,     8,   263,    29,    30,    29,    30,    33,     3,    31,
      32,    31,    32,    12,    13,    70,    71,    72,    48,    31,
       8,    84,    37,    78,    84,    84,   231,    25,    26,   140,
      32,    14,    92,    88,   172,    37,     8,   175,    40,    26,
      42,    25,    97,    45,    12,   100,   101,   102,   228,   180,
     188,    32,   190,   118,   119,   120,     8,    27,    28,     8,
       8,     8,   127,    33,    27,    28,    36,   178,   133,     8,
      33,     8,     8,    36,     7,    35,    34,     9,   216,   210,
     140,   219,   147,   194,   222,    12,     8,   142,   143,    15,
      16,    17,    18,    19,    20,   206,   207,   152,     8,     7,
      31,    10,    32,    28,     9,     9,    12,     9,     8,    29,
       9,     9,   223,     9,     9,   226,   227,     7,   183,   184,
       9,     9,     9,     7,     9,    48,     9,     9,    22,    30,
     241,   149,    39,    84,   276,   249,    65,   154,   263,   231,
     195,   252,   169,   140,    41,   150,   157,   262,   259,   163,
     130,    -1,   148,    -1,    -1,   220,   267,   268,    -1,    -1,
      -1,   272,    -1,    -1,    -1,    -1,   205,    -1,   279,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,   231,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,   271
};

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

#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 yyerrorlab


/* 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 -- Set CURRENT to span from RHS[1] to RHS[N].
   If N is 0, then set CURRENT to the empty location which ends
   the previous symbol: RHS[0] (always defined).  */

#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N)				\
    do									\
      if (N)								\
	{								\
	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
	}								\
      else								\
	{								\
	  (Current).first_line   = (Current).last_line   =		\
	    YYRHSLOC (Rhs, 0).last_line;				\
	  (Current).first_column = (Current).last_column =		\
	    YYRHSLOC (Rhs, 0).last_column;				\
	}								\
    while (0)
#endif


/* YY_LOCATION_PRINT -- Print the location on the stream.
   This macro was not mandated originally: define only if we know
   we won't break user code: when these are the locations we know.  */

#ifndef YY_LOCATION_PRINT
# if YYLTYPE_IS_TRIVIAL
#  define YY_LOCATION_PRINT(File, Loc)			\
     fprintf (File, "%d.%d-%d.%d",			\
              (Loc).first_line, (Loc).first_column,	\
              (Loc).last_line,  (Loc).last_column)
# else
#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
#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 YY_SYMBOL_PRINT(Title, Type, Value, Location)		\
do {								\
  if (yydebug)							\
    {								\
      YYFPRINTF (stderr, "%s ", Title);				\
      yysymprint (stderr, 					\
                  Type, Value);	\
      YYFPRINTF (stderr, "\n");					\
    }								\
} while (0)

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

#if defined (__STDC__) || defined (__cplusplus)
static void
yy_stack_print (short int *bottom, short int *top)
#else
static void
yy_stack_print (bottom, top)
    short int *bottom;
    short int *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 yylno = yyrline[yyrule];
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
             yyrule - 1, yylno);
  /* 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 YY_SYMBOL_PRINT(Title, Type, 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.  */

#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]);
  else
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);


# ifdef YYPRINT
  if (yytype < YYNTOKENS)
    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# endif
  switch (yytype)
    {
      default:
        break;
    }
  YYFPRINTF (yyoutput, ")");
}

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

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

  if (!yymsg)
    yymsg = "Deleting";
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);

  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 look-ahead symbol.  */
int yychar;

/* The semantic value of the look-ahead 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;
  /* Look-ahead 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 int yyssa[YYINITDEPTH];
  short int *yyss = yyssa;
  register short int *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;


  yyvsp[0] = yylval;

  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 int *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 int *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 look-ahead token if we need one and don't already have one.  */
/* yyresume: */

  /* First try to decide what to do without reference to look-ahead token.  */

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

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

  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead 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);
      YY_SYMBOL_PRINT ("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 look-ahead token.  */
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);

  /* 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 8:
#line 150 "swparse.y"
    { 
                               if (swparse_atlevel < SWPARSE_LEVEL_IVAL_MIN || swparse_atlevel > SWPARSE_LEVEL_IVAL_MAX) exit(1);
                               swws = &(swparse_leading_whitespace[0]) + (strlen(swparse_leading_whitespace) - swparse_atlevel) ;
			       tmp_strob = strob_open (8); 
			  }
    break;

  case 9:
#line 157 "swparse.y"
    {
				strob_close (tmp_strob);
			  }
    break;

  case 10:
#line 163 "swparse.y"
    {
                                     swparse_strob_ptr_len = strlen(swlex_filename) + SWPARSE_UNKNOWN_EXTRA + swparse_atlevel;
                                     strob_setlen(tmp_strob, swparse_strob_ptr_len);
				     swparse_strob_ptr=strob_str(tmp_strob);
				     swparse_i_emit_filename(swparse_strob_ptr, swparse_strob_ptr_len, "INFO", swws, swlex_filename, swparse_form_flag); 
				     level_push (&swws);
				     swparse_swdef_filetype = SWPARSE_SWDEF_FILETYPE_INFO;
				  }
    break;

  case 11:
#line 173 "swparse.y"
    { 
                                     swparse_strob_ptr_len = strlen(swlex_filename) + SWPARSE_UNKNOWN_EXTRA + swparse_atlevel;
                                     strob_setlen(tmp_strob, swparse_strob_ptr_len);
				     swparse_strob_ptr=strob_str(tmp_strob);
				     swparse_i_emit_filename(swparse_strob_ptr, swparse_strob_ptr_len, "INSTALLED", swws, swlex_filename, swparse_form_flag); 
				     level_push (&swws);
				     swparse_swdef_filetype = SWPARSE_SWDEF_FILETYPE_INSTALLED;
				   }
    break;

  case 12:
#line 182 "swparse.y"
    { 
                                     swparse_strob_ptr_len = strlen(swlex_filename) + SWPARSE_UNKNOWN_EXTRA + swparse_atlevel;
                                     strob_setlen(tmp_strob, swparse_strob_ptr_len);
				     swparse_strob_ptr=strob_str(tmp_strob);
				     swparse_i_emit_filename(swparse_strob_ptr, swparse_strob_ptr_len, "INDEX", swws, swlex_filename, swparse_form_flag); 
				     level_push (&swws);
				     swparse_swdef_filetype = SWPARSE_SWDEF_FILETYPE_INDEX;
				   }
    break;

  case 13:
#line 192 "swparse.y"
    { 
                                     swparse_strob_ptr_len = strlen(swlex_filename) + SWPARSE_UNKNOWN_EXTRA + swparse_atlevel;
                                     strob_setlen(tmp_strob, swparse_strob_ptr_len);
				     swparse_strob_ptr=strob_str(tmp_strob);
				     swparse_i_emit_filename(swparse_strob_ptr, swparse_strob_ptr_len, "PSF", swws, swlex_filename, swparse_form_flag); 
				     level_push (&swws); 
				     swparse_swdef_filetype = SWPARSE_SWDEF_FILETYPE_PSF;
				 }
    break;

  case 14:
#line 202 "swparse.y"
    {
                                     swparse_strob_ptr_len = strlen(swlex_filename) + SWPARSE_UNKNOWN_EXTRA + swparse_atlevel;
                                     strob_setlen(tmp_strob, swparse_strob_ptr_len);
				     swparse_strob_ptr=strob_str(tmp_strob);
				     swparse_i_emit_filename(swparse_strob_ptr, swparse_strob_ptr_len, "PSF", swws, swlex_filename, swparse_form_flag); 
				     level_push (&swws); 
				     swparse_swdef_filetype = SWPARSE_SWDEF_FILETYPE_PSF;
				 }
    break;

  case 15:
#line 212 "swparse.y"
    {
				     level_push (&swws);
				}
    break;

  case 22:
#line 242 "swparse.y"
    {swlex_yacc_feedback_fileset=1;}
    break;

  case 28:
#line 259 "swparse.y"
    {
                               level_push ( &swws );
			  }
    break;

  case 29:
#line 264 "swparse.y"
    {
                               level_pop ( &swws );
			  }
    break;

  case 65:
#line 360 "swparse.y"
    { swlex_yacc_feedback_fileset=0;}
    break;

  case 74:
#line 377 "swparse.y"
    {swlex_yacc_feedback_controlfile_object=1;}
    break;

  case 75:
#line 380 "swparse.y"
    {swlex_yacc_feedback_controlfile_object=0;}
    break;

  case 76:
#line 383 "swparse.y"
    {swlex_yacc_feedback_file_object=1;}
    break;

  case 77:
#line 386 "swparse.y"
    {swlex_yacc_feedback_file_object=0;}
    break;

  case 78:
#line 390 "swparse.y"
    {swlex_yacc_feedback_fileset=1;}
    break;

  case 81:
#line 402 "swparse.y"
    {swlex_yacc_feedback_fileset=1;}
    break;

  case 82:
#line 403 "swparse.y"
    {swlex_yacc_feedback_directory=1;}
    break;

  case 83:
#line 404 "swparse.y"
    {location = SWPARSE_ILOC_PRODUCT; }
    break;

  case 84:
#line 406 "swparse.y"
    { swlex_yacc_feedback_fileset=0; swlex_yacc_feedback_directory=0; }
    break;

  case 85:
#line 408 "swparse.y"
    {location = SWPARSE_ILOC_OFF; }
    break;

  case 107:
#line 481 "swparse.y"
    { ; }
    break;

  case 108:
#line 483 "swparse.y"
    { ; }
    break;

  case 109:
#line 486 "swparse.y"
    { ; }
    break;

  case 110:
#line 489 "swparse.y"
    { ; }
    break;

  case 111:
#line 492 "swparse.y"
    { ; }
    break;

  case 112:
#line 495 "swparse.y"
    { ; }
    break;

  case 113:
#line 498 "swparse.y"
    { ; }
    break;

  case 114:
#line 501 "swparse.y"
    { ; }
    break;

  case 115:
#line 504 "swparse.y"
    { ; }
    break;

  case 116:
#line 507 "swparse.y"
    { ; }
    break;

  case 117:
#line 510 "swparse.y"
    { ; }
    break;

  case 118:
#line 513 "swparse.y"
    { ; }
    break;

  case 119:
#line 516 "swparse.y"
    {
                        swparse_i_emit_object_keyword(swparse_outputfd, strob_str ((yyvsp[-1].strb)), strlen(swws), swparse_form_flag);
		        strob_strcpy (tmp_strob, "");
                      }
    break;

  case 121:
#line 534 "swparse.y"
    { did_see_vendor_misleading = 0; }
    break;

  case 122:
#line 536 "swparse.y"
    { if (did_see_vendor_misleading == 0 &&  swparse_swdef_filetype == SWPARSE_SWDEF_FILETYPE_PSF)
				{
					;
					/* FIXME: maybe enable this warning conditionally based on ./configure options 
					fprintf(stderr,
						"swpackage: Warning: Because the object keyword \"vendor\" is misleading, add the\n"
						"swpackage: following attribute to the vendor object in the PSF (this is only a warning):\n"
						"swpackage:        the_term_vendor_is_misleading \"true\" # One of: true, false\n"
						);
					*/
				}
			   ; }
    break;

  case 128:
#line 577 "swparse.y"
    {location = SWPARSE_ILOC_CONTROL_FILE; }
    break;

  case 129:
#line 579 "swparse.y"
    {location = SWPARSE_ILOC_OFF; }
    break;

  case 131:
#line 586 "swparse.y"
    { ; }
    break;

  case 132:
#line 590 "swparse.y"
    {location = SWPARSE_ILOC_FILE; }
    break;

  case 133:
#line 592 "swparse.y"
    {location = SWPARSE_ILOC_OFF; }
    break;

  case 136:
#line 605 "swparse.y"
    {location = SWPARSE_ILOC_DISTRIBUTION; }
    break;

  case 137:
#line 607 "swparse.y"
    {location = SWPARSE_ILOC_OFF; }
    break;

  case 141:
#line 619 "swparse.y"
    {location = SWPARSE_ILOC_FILESET; }
    break;

  case 142:
#line 621 "swparse.y"
    {location = SWPARSE_ILOC_OFF; }
    break;

  case 144:
#line 630 "swparse.y"
    { 
					swparse_i_emit(tmp_strob, swparse_outputfd, NULL, SWPARSE_ACMD_EMIT, strlen(swws), swparse_keytype, swparse_form_flag);
                                                                                                                  }
    break;

  case 145:
#line 634 "swparse.y"
    {
						 swparse_construct_attribute
						     (tmp_strob, swparse_outputfd, "", SWPARSE_ACMD_COPY, strlen(swws), 
						     swparse_keytype,swparse_form_flag);
					         swparse_construct_attribute 
						     (tmp_strob, swparse_outputfd, strob_str((yyvsp[0].strb)), SWPARSE_ACMD_CAT, 
						     strlen(swws), swparse_keytype, swparse_form_flag);
					         swparse_construct_attribute
						     (tmp_strob, swparse_outputfd, " ", SWPARSE_ACMD_CAT, 
						      strlen(swws), swparse_keytype, swparse_form_flag);
						 swparse_keytype=SWPARSE_EMITTED_TYPE_ATT;
					       }
    break;

  case 151:
#line 661 "swparse.y"
    {
								        /* write out the attribute */	
									if (strstr(strob_str(tmp_strob), "the_term_vendor_is_misleading")) {
			  							did_see_vendor_misleading = 1;
									}	
									if (
										((swparse_form_flag & SWPARSE_FORM_POLICY_POSIX_IGNORES)) &&
										swparse_ignore_attribute
											(
												swparse_swdef_filetype,
												location,
												strob_str(tmp_strob)
											) == 1
									) {
										/*
										* Ignore attribute as specified in the Std.
										*/
										;
									} else {
										swparse_i_emit
										   (tmp_strob, swparse_outputfd, NULL, 
										   SWPARSE_ACMD_EMIT, strlen(swws), swparse_keytype, 
										   swparse_form_flag);
							      		}
							      }
    break;

  case 152:
#line 689 "swparse.y"
    {
									swparse_i_emit
									   (tmp_strob, swparse_outputfd, NULL, 
									   SWPARSE_ACMD_EMIT, strlen(swws), swparse_keytype, 
									   swparse_form_flag);
							      }
    break;

  case 153:
#line 698 "swparse.y"
    {
								        /* write out the attribute */	
									swparse_i_emit
									   (tmp_strob, swparse_outputfd, NULL, 
									   SWPARSE_ACMD_EMIT, strlen(swws), swparse_keytype, 
									   swparse_form_flag);
							       }
    break;

  case 154:
#line 708 "swparse.y"
    {
						 swparse_construct_attribute
						    (tmp_strob, swparse_outputfd, "", SWPARSE_ACMD_COPY, 
						    strlen(swws), swparse_keytype, swparse_form_flag);
					         swparse_construct_attribute
						    (tmp_strob, swparse_outputfd, strob_str((yyvsp[0].strb)), SWPARSE_ACMD_CAT, 
						    strlen(swws), swparse_keytype,swparse_form_flag);
					         swparse_construct_attribute
						    (tmp_strob, swparse_outputfd, " ", SWPARSE_ACMD_CAT, 
						    strlen(swws), swparse_keytype, swparse_form_flag);
						 swparse_keytype=SWPARSE_EMITTED_TYPE_ATT;
					       }
    break;

  case 155:
#line 722 "swparse.y"
    {
						swparse_construct_attribute
						    (tmp_strob, swparse_outputfd, "", SWPARSE_ACMD_COPY, 
						    strlen(swws), swparse_keytype,swparse_form_flag);
					        swparse_construct_attribute(tmp_strob, swparse_outputfd, 
						    strob_str((yyvsp[0].strb)), SWPARSE_ACMD_CAT, strlen(swws), 
						    swparse_keytype, swparse_form_flag);
					        swparse_construct_attribute
						    (tmp_strob, swparse_outputfd, " ", SWPARSE_ACMD_CAT, 
						    strlen(swws), swparse_keytype, swparse_form_flag);
						swparse_keytype=SWPARSE_EMITTED_TYPE_EXT;
					     
					 }
    break;

  case 156:
#line 737 "swparse.y"
    { ; }
    break;

  case 159:
#line 742 "swparse.y"
    {
					             swparse_construct_attribute
						        (tmp_strob, swparse_outputfd, strob_str((yyvsp[0].strb)), SWPARSE_ACMD_CAT, 
							strlen(swws), swparse_keytype, swparse_form_flag);
						  }
    break;

  case 160:
#line 748 "swparse.y"
    {
					                   swparse_construct_attribute
							      (tmp_strob, swparse_outputfd, "<", SWPARSE_ACMD_CAT, 
							      strlen(swws), swparse_keytype, swparse_form_flag);
					                   swparse_construct_attribute
							      (tmp_strob, swparse_outputfd, strob_str((yyvsp[0].strb)), SWPARSE_ACMD_CAT, 
							      strlen(swws), swparse_keytype, swparse_form_flag);
						         }
    break;


    }

/* Line 1037 of yacc.c.  */
#line 1885 "y.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);
	  const char* yyprefix;
	  char *yymsg;
	  int yyx;

	  /* Start YYX at -YYN if negative to avoid negative indexes in
	     YYCHECK.  */
	  int yyxbegin = yyn < 0 ? -yyn : 0;

	  /* Stay within bounds of both yycheck and yytname.  */
	  int yychecklim = YYLAST - yyn;
	  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
	  int yycount = 0;

	  yyprefix = ", expecting ";
	  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
	    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
	      {
		yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
		yycount += 1;
		if (yycount == 5)
		  {
		    yysize = 0;
		    break;
		  }
	      }
	  yysize += (sizeof ("syntax error, unexpected ")
		     + 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)
		{
		  yyprefix = ", expecting ";
		  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
		    if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
		      {
			yyp = yystpcpy (yyp, yyprefix);
			yyp = yystpcpy (yyp, yytname[yyx]);
			yyprefix = " or ";
		      }
		}
	      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 look-ahead token after an
	 error, discard it.  */

      if (yychar <= YYEOF)
        {
          /* If at end of input, pop the error token,
	     then the rest of the stack, then return failure.  */
	  if (yychar == YYEOF)
	     for (;;)
	       {

		 YYPOPSTACK;
		 if (yyssp == yyss)
		   YYABORT;
		 yydestruct ("Error: popping",
                             yystos[*yyssp], yyvsp);
	       }
        }
      else
	{
	  yydestruct ("Error: discarding", yytoken, &yylval);
	  yychar = YYEMPTY;
	}
    }

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


/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR.  |
`---------------------------------------------------*/
yyerrorlab:

#ifdef __GNUC__
  /* Pacify GCC when the user code never invokes YYERROR and the label
     yyerrorlab therefore never appears in user code.  */
  if (0)
     goto yyerrorlab;
#endif

yyvsp -= yylen;
  yyssp -= yylen;
  yystate = *yyssp;
  goto yyerrlab1;


/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
`-------------------------------------------------------------*/
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;


      yydestruct ("Error: popping", yystos[yystate], yyvsp);
      YYPOPSTACK;
      yystate = *yyssp;
      YY_STACK_PRINT (yyss, yyssp);
    }

  if (yyn == YYFINAL)
    YYACCEPT;

  *++yyvsp = yylval;


  /* Shift the error token. */
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);

  yystate = yyn;
  goto yynewstate;


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

/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yydestruct ("Error: discarding lookahead",
              yytoken, &yylval);
  yychar = YYEMPTY;
  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;
}


#line 757 "swparse.y"


static
int
level_push ( char ** sw ) {
  (*sw)--;
  return 0;
}

static
int
level_pop ( char ** sw ) {
  if ( (*sw) == '\0' ) { 
       fprintf (stderr, "swparse.y: pop error\n");
       return -1;
  }
  (*sw)++;
  return 0;
}

static
int 
swparse_i_emit(STROB * strb, int output_fd, char * src, int cmd, int level, char s_keytype, int form_flag)
{
	return swparse_construct_attribute(strb, output_fd, src, cmd, level, s_keytype, form_flag);
}

static int 
swparse_i_emit_object_keyword(int outputfd, char * key, int level, int form_flag)
{
	return swparse_write_attribute_obj(outputfd, key, level, form_flag);
}

static 
int 
swparse_i_emit_filename (char * buf, int len, char * filetype, char * ws_level_string, char * swlex_filename, int form_flag)
{
	if ((form_flag & SWPARSE_FORM_INDENT) == 0)
		return swparse_print_filename(buf, len, filetype, ws_level_string, swlex_filename, form_flag);
	else
		return 0;
}

