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

/* Skeleton parser for Yacc-like parsing with Bison,
   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 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 ConfigParser_parse
#define yylex   ConfigParser_lex
#define yyerror ConfigParser_error
#define yylval  ConfigParser_lval
#define yychar  ConfigParser_char
#define yydebug ConfigParser_debug
#define yynerrs ConfigParser_nerrs


/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     PRTOKEN_VISUAL = 258,
     PRTOKEN_SET_SIMPLE = 259,
     PRTOKEN_VISUAL_ID = 260,
     PRTOKEN_BUFFER_SIZE = 261,
     PRTOKEN_LEVEL = 262,
     PRTOKEN_RGBA = 263,
     PRTOKEN_DOUBLEBUFFER = 264,
     PRTOKEN_STEREO = 265,
     PRTOKEN_AUX_BUFFERS = 266,
     PRTOKEN_RED_SIZE = 267,
     PRTOKEN_GREEN_SIZE = 268,
     PRTOKEN_BLUE_SIZE = 269,
     PRTOKEN_ALPHA_SIZE = 270,
     PRTOKEN_DEPTH_SIZE = 271,
     PRTOKEN_STENCIL_SIZE = 272,
     PRTOKEN_ACCUM_RED_SIZE = 273,
     PRTOKEN_ACCUM_GREEN_SIZE = 274,
     PRTOKEN_ACCUM_BLUE_SIZE = 275,
     PRTOKEN_ACCUM_ALPHA_SIZE = 276,
     PRTOKEN_RENDER_SURFACE = 277,
     PRTOKEN_WINDOW_RECT = 278,
     PRTOKEN_INPUT_RECT = 279,
     PRTOKEN_HOSTNAME = 280,
     PRTOKEN_DISPLAY = 281,
     PRTOKEN_SCREEN = 282,
     PRTOKEN_BORDER = 283,
     PRTOKEN_DRAWABLE_TYPE = 284,
     PRTOKEN_WINDOW_TYPE = 285,
     PRTOKEN_PBUFFER_TYPE = 286,
     PRTOKEN_CAMERA_GROUP = 287,
     PRTOKEN_CAMERA = 288,
     PRTOKEN_PROJECTION_RECT = 289,
     PRTOKEN_LENS = 290,
     PRTOKEN_FRUSTUM = 291,
     PRTOKEN_PERSPECTIVE = 292,
     PRTOKEN_ORTHO = 293,
     PRTOKEN_OFFSET = 294,
     PRTOKEN_ROTATE = 295,
     PRTOKEN_TRANSLATE = 296,
     PRTOKEN_SCALE = 297,
     PRTOKEN_SHEAR = 298,
     PRTOKEN_CLEAR_COLOR = 299,
     PRTOKEN_INPUT_AREA = 300,
     PRTOKEN_ERROR = 301,
     PRTOKEN_INTEGER = 302,
     PRTOKEN_HEX_INTEGER = 303,
     PRTOKEN_FLOAT = 304,
     PRTOKEN_TRUE = 305,
     PRTOKEN_FALSE = 306,
     PRTOKEN_QUOTED_STRING = 307,
     PRTOKEN_STEREO_SYSTEM_COMMANDS = 308,
     PRTOKEN_CUSTOM_FULL_SCREEN_RECTANGLE = 309,
     PRTOKEN_METHOD = 310,
     PRTOKEN_PREMULTIPLY = 311,
     PRTOKEN_POSTMULTIPLY = 312,
     PRTOKEN_OVERRIDE_REDIRECT = 313,
     PRTOKEN_SHARELENS = 314,
     PRTOKEN_SHAREVIEW = 315,
     PRTOKEN_READ_DRAWABLE = 316,
     PRTOKEN_SET_RTT_MODE = 317,
     PRTOKEN_RTT_MODE_NONE = 318,
     PRTOKEN_RTT_MODE_RGB = 319,
     PRTOKEN_RTT_MODE_RGBA = 320
   };
#endif
#define PRTOKEN_VISUAL 258
#define PRTOKEN_SET_SIMPLE 259
#define PRTOKEN_VISUAL_ID 260
#define PRTOKEN_BUFFER_SIZE 261
#define PRTOKEN_LEVEL 262
#define PRTOKEN_RGBA 263
#define PRTOKEN_DOUBLEBUFFER 264
#define PRTOKEN_STEREO 265
#define PRTOKEN_AUX_BUFFERS 266
#define PRTOKEN_RED_SIZE 267
#define PRTOKEN_GREEN_SIZE 268
#define PRTOKEN_BLUE_SIZE 269
#define PRTOKEN_ALPHA_SIZE 270
#define PRTOKEN_DEPTH_SIZE 271
#define PRTOKEN_STENCIL_SIZE 272
#define PRTOKEN_ACCUM_RED_SIZE 273
#define PRTOKEN_ACCUM_GREEN_SIZE 274
#define PRTOKEN_ACCUM_BLUE_SIZE 275
#define PRTOKEN_ACCUM_ALPHA_SIZE 276
#define PRTOKEN_RENDER_SURFACE 277
#define PRTOKEN_WINDOW_RECT 278
#define PRTOKEN_INPUT_RECT 279
#define PRTOKEN_HOSTNAME 280
#define PRTOKEN_DISPLAY 281
#define PRTOKEN_SCREEN 282
#define PRTOKEN_BORDER 283
#define PRTOKEN_DRAWABLE_TYPE 284
#define PRTOKEN_WINDOW_TYPE 285
#define PRTOKEN_PBUFFER_TYPE 286
#define PRTOKEN_CAMERA_GROUP 287
#define PRTOKEN_CAMERA 288
#define PRTOKEN_PROJECTION_RECT 289
#define PRTOKEN_LENS 290
#define PRTOKEN_FRUSTUM 291
#define PRTOKEN_PERSPECTIVE 292
#define PRTOKEN_ORTHO 293
#define PRTOKEN_OFFSET 294
#define PRTOKEN_ROTATE 295
#define PRTOKEN_TRANSLATE 296
#define PRTOKEN_SCALE 297
#define PRTOKEN_SHEAR 298
#define PRTOKEN_CLEAR_COLOR 299
#define PRTOKEN_INPUT_AREA 300
#define PRTOKEN_ERROR 301
#define PRTOKEN_INTEGER 302
#define PRTOKEN_HEX_INTEGER 303
#define PRTOKEN_FLOAT 304
#define PRTOKEN_TRUE 305
#define PRTOKEN_FALSE 306
#define PRTOKEN_QUOTED_STRING 307
#define PRTOKEN_STEREO_SYSTEM_COMMANDS 308
#define PRTOKEN_CUSTOM_FULL_SCREEN_RECTANGLE 309
#define PRTOKEN_METHOD 310
#define PRTOKEN_PREMULTIPLY 311
#define PRTOKEN_POSTMULTIPLY 312
#define PRTOKEN_OVERRIDE_REDIRECT 313
#define PRTOKEN_SHARELENS 314
#define PRTOKEN_SHAREVIEW 315
#define PRTOKEN_READ_DRAWABLE 316
#define PRTOKEN_SET_RTT_MODE 317
#define PRTOKEN_RTT_MODE_NONE 318
#define PRTOKEN_RTT_MODE_RGB 319
#define PRTOKEN_RTT_MODE_RGBA 320




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



#ifndef WIN32
#include <unistd.h>
#include <sys/wait.h>
#include <stdlib.h>
#include <fcntl.h>
#endif

#ifdef WIN32
#define PRODUCER_AVOID_CPP 1
#endif

#include <stdio.h>
#include <fstream>
#include <string>

#include "FlexLexer.h"

#include <Producer/CameraConfig>


using namespace std;
using namespace Producer;

static void ConfigParser_error( const char * );
static CameraConfig *cfg = 0L;
static std::string fileName = "(stdin)";

static yyFlexLexer *flexer = 0L;

static int yylex()
{
    if( flexer == 0L )
        fprintf( stderr, "Internal error!\n" );
    return flexer->yylex();
}



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

typedef union YYSTYPE {
    char * string;
    int    integer;
    float  real;
    bool boolean;
} YYSTYPE;
/* Line 191 of yacc.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.  */


#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  25
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   287

/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS  70
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS  42
/* YYNRULES -- Number of rules. */
#define YYNRULES  114
/* YYNRULES -- Number of states. */
#define YYNSTATES  254

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

#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,    69,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,    66,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,    67,     2,    68,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     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
};

#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,    10,    12,    14,    16,    18,
      20,    22,    28,    33,    35,    36,    38,    41,    42,    49,
      51,    54,    55,    59,    61,    68,    72,    76,    83,    85,
      87,    88,    94,    96,    99,   104,   111,   117,   123,   127,
     129,   131,   136,   138,   141,   142,   151,   162,   169,   178,
     187,   198,   203,   204,   211,   213,   216,   217,   221,   223,
     230,   237,   241,   245,   249,   253,   260,   264,   268,   272,
     276,   278,   280,   282,   284,   286,   287,   294,   295,   301,
     303,   307,   309,   312,   315,   318,   320,   322,   324,   327,
     330,   333,   336,   339,   342,   345,   348,   351,   354,   357,
     359,   362,   363,   369,   371,   374,   378,   380,   382,   384,
     386,   388,   390,   392,   394
};

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

/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
static const unsigned short yyrline[] =
{
       0,   136,   136,   139,   139,   142,   142,   142,   142,   142,
     142,   145,   151,   154,   157,   157,   157,   161,   160,   169,
     169,   172,   174,   178,   182,   186,   190,   194,   198,   199,
     203,   202,   212,   212,   216,   220,   224,   228,   232,   239,
     240,   243,   246,   246,   249,   251,   255,   259,   263,   267,
     271,   275,   282,   281,   292,   293,   296,   298,   302,   306,
     310,   314,   318,   322,   326,   330,   334,   338,   343,   347,
     354,   355,   359,   360,   361,   366,   365,   375,   374,   385,
     385,   388,   392,   397,   401,   406,   410,   414,   418,   422,
     427,   432,   436,   440,   444,   448,   452,   456,   460,   464,
     468,   475,   474,   480,   480,   484,   490,   494,   501,   507,
     513,   519,   526,   534,   534
};
#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", "PRTOKEN_VISUAL", "PRTOKEN_SET_SIMPLE", 
  "PRTOKEN_VISUAL_ID", "PRTOKEN_BUFFER_SIZE", "PRTOKEN_LEVEL", 
  "PRTOKEN_RGBA", "PRTOKEN_DOUBLEBUFFER", "PRTOKEN_STEREO", 
  "PRTOKEN_AUX_BUFFERS", "PRTOKEN_RED_SIZE", "PRTOKEN_GREEN_SIZE", 
  "PRTOKEN_BLUE_SIZE", "PRTOKEN_ALPHA_SIZE", "PRTOKEN_DEPTH_SIZE", 
  "PRTOKEN_STENCIL_SIZE", "PRTOKEN_ACCUM_RED_SIZE", 
  "PRTOKEN_ACCUM_GREEN_SIZE", "PRTOKEN_ACCUM_BLUE_SIZE", 
  "PRTOKEN_ACCUM_ALPHA_SIZE", "PRTOKEN_RENDER_SURFACE", 
  "PRTOKEN_WINDOW_RECT", "PRTOKEN_INPUT_RECT", "PRTOKEN_HOSTNAME", 
  "PRTOKEN_DISPLAY", "PRTOKEN_SCREEN", "PRTOKEN_BORDER", 
  "PRTOKEN_DRAWABLE_TYPE", "PRTOKEN_WINDOW_TYPE", "PRTOKEN_PBUFFER_TYPE", 
  "PRTOKEN_CAMERA_GROUP", "PRTOKEN_CAMERA", "PRTOKEN_PROJECTION_RECT", 
  "PRTOKEN_LENS", "PRTOKEN_FRUSTUM", "PRTOKEN_PERSPECTIVE", 
  "PRTOKEN_ORTHO", "PRTOKEN_OFFSET", "PRTOKEN_ROTATE", 
  "PRTOKEN_TRANSLATE", "PRTOKEN_SCALE", "PRTOKEN_SHEAR", 
  "PRTOKEN_CLEAR_COLOR", "PRTOKEN_INPUT_AREA", "PRTOKEN_ERROR", 
  "PRTOKEN_INTEGER", "PRTOKEN_HEX_INTEGER", "PRTOKEN_FLOAT", 
  "PRTOKEN_TRUE", "PRTOKEN_FALSE", "PRTOKEN_QUOTED_STRING", 
  "PRTOKEN_STEREO_SYSTEM_COMMANDS", 
  "PRTOKEN_CUSTOM_FULL_SCREEN_RECTANGLE", "PRTOKEN_METHOD", 
  "PRTOKEN_PREMULTIPLY", "PRTOKEN_POSTMULTIPLY", 
  "PRTOKEN_OVERRIDE_REDIRECT", "PRTOKEN_SHARELENS", "PRTOKEN_SHAREVIEW", 
  "PRTOKEN_READ_DRAWABLE", "PRTOKEN_SET_RTT_MODE", 
  "PRTOKEN_RTT_MODE_NONE", "PRTOKEN_RTT_MODE_RGB", 
  "PRTOKEN_RTT_MODE_RGBA", "';'", "'{'", "'}'", "','", "$accept", 
  "config", "entries", "entry", "stereo_param", "camera_group", 
  "camera_group_attributes", "cameras", "camera", "@1", 
  "camera_attributes", "camera_attribute", "camera_offset", "@2", 
  "camera_offset_attributes", "camera_offset_attribute", 
  "offset_multiply_method", "lens", "lens_attributes", "lens_attribute", 
  "render_surface", "@3", "render_surface_attributes", 
  "render_surface_attribute", "drawableType", "rtt_mode", "visual", "@4", 
  "@5", "visual_attributes", "visual_attribute", "input_area", "@6", 
  "input_area_entries", "input_area_entry", "real", "floatparam", 
  "intparam", "name", "string", "hex_integer", "bool", 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,    59,   123,   125,    44
};
# endif

/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
static const unsigned char yyr1[] =
{
       0,    70,    71,    72,    72,    73,    73,    73,    73,    73,
      73,    74,    75,    76,    77,    77,    77,    79,    78,    80,
      80,    81,    81,    81,    81,    81,    81,    81,    81,    81,
      83,    82,    84,    84,    85,    85,    85,    85,    85,    86,
      86,    87,    88,    88,    89,    89,    89,    89,    89,    89,
      89,    89,    91,    90,    92,    92,    93,    93,    93,    93,
      93,    93,    93,    93,    93,    93,    93,    93,    93,    93,
      94,    94,    95,    95,    95,    97,    96,    98,    96,    99,
      99,   100,   100,   100,   100,   100,   100,   100,   100,   100,
     100,   100,   100,   100,   100,   100,   100,   100,   100,   100,
     100,   102,   101,   103,   103,   104,   105,   105,   106,   107,
     108,   109,   110,   111,   111
};

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

/* YYDEFGOTO[NTERM-NUM]. */
static const short yydefgoto[] =
{
      -1,     7,     8,     9,    10,    11,    30,    31,    12,    33,
     108,   109,   110,   173,   192,   193,   209,   111,   171,   172,
      13,    29,    98,    99,   131,   138,    14,    28,    17,    55,
      56,    15,    22,    64,    65,   144,   122,    57,    18,    36,
      68,   128
};

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
#define YYPACT_NINF -103
static const short yypact[] =
{
      58,   -42,   -42,   -51,   -42,  -103,   -19,    31,    58,  -103,
    -103,  -103,  -103,  -103,  -103,  -103,  -103,   -32,  -103,  -103,
      35,  -103,    20,  -103,    13,  -103,  -103,   240,    38,    43,
      30,    35,  -103,    48,    80,  -103,    13,  -103,    69,   -19,
     -19,  -103,  -103,  -103,   -19,   -19,   -19,   -19,   -19,   -19,
     -19,   -19,   -19,   -19,   -19,   -11,  -103,   -19,   240,    46,
    -103,  -103,   178,   -42,   -14,  -103,    52,  -103,  -103,  -103,
    -103,  -103,  -103,  -103,  -103,  -103,  -103,  -103,  -103,  -103,
    -103,  -103,  -103,   240,  -103,    24,   -42,   -19,    74,   -42,
     -19,   -19,    32,    64,   -19,    32,   -42,    14,    -2,  -103,
    -103,   -42,    15,    57,    60,    15,    32,    32,   175,  -103,
    -103,  -103,  -103,    59,  -103,  -103,  -103,  -103,  -103,    67,
     -19,  -103,    74,    71,    88,    94,  -103,  -103,   103,  -103,
    -103,   104,   -19,   106,   108,  -103,  -103,  -103,   109,  -103,
    -103,   110,  -103,  -103,    15,   121,  -103,    15,   111,   112,
    -103,  -103,  -103,  -103,   -19,    74,  -103,  -103,  -103,  -103,
    -103,   -19,  -103,  -103,  -103,  -103,    15,    15,    15,    15,
      15,   -31,  -103,    98,    15,  -103,  -103,   -19,    74,   -19,
      15,    15,    15,    15,    15,  -103,  -103,    15,    15,    15,
      15,    56,    79,  -103,    15,   116,   120,   122,   127,    15,
      15,    15,   128,    15,    15,    15,    15,  -103,  -103,   129,
    -103,  -103,   135,  -103,  -103,  -103,  -103,    15,    15,    15,
    -103,    15,    15,    15,   136,  -103,  -103,    15,   -34,    15,
      15,   138,   140,  -103,    15,  -103,    15,    15,   141,  -103,
    -103,   -30,   149,    50,  -103,  -103,    15,  -103,  -103,    15,
     150,   152,  -103,  -103
};

/* YYPGOTO[NTERM-NUM].  */
static const short yypgoto[] =
{
    -103,  -103,  -103,   179,  -103,  -103,  -103,  -103,   -17,  -103,
    -103,    27,  -103,  -103,  -103,    28,  -103,  -103,  -103,    53,
     -53,  -103,  -103,   123,  -103,  -103,   -48,  -103,  -103,   165,
     142,  -103,  -103,  -103,   162,   -38,  -102,    -6,     0,   191,
    -103,   -77
};

/* 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 -1
static const unsigned char yytable[] =
{
      24,    86,    19,    32,    21,   167,   168,   169,    63,   112,
      16,   100,   170,   142,    61,   143,    20,   142,   133,   143,
     155,    87,    88,    89,    90,    91,    92,    93,    23,   148,
     149,    25,   235,    69,    70,    27,   245,   185,    71,    72,
      73,    74,    75,    76,    77,    78,    79,    80,    81,    86,
     100,    84,    94,   178,   114,   112,    95,    82,    83,    96,
      97,     1,   142,   113,   143,    35,   139,   147,     4,    87,
      88,    89,    90,    91,    92,    93,   196,   135,   136,   137,
       2,   120,   126,   127,   124,   125,   119,    34,   132,   123,
       3,     4,   118,    83,   129,   130,   134,   142,    60,   143,
      94,   141,    63,     5,    95,    58,   166,    96,    97,   174,
      59,     6,   207,   208,   154,    62,   248,    67,   116,   187,
     188,   189,   190,   121,   145,   152,   161,   146,   180,   181,
     182,   183,   184,   153,   191,   151,   194,   156,   187,   188,
     189,   190,   198,   199,   200,   201,   202,   210,   177,   203,
     204,   205,   206,   191,   157,   179,   212,   167,   168,   169,
     158,   217,   218,   219,   170,   221,   222,   223,   224,   159,
     160,   195,   162,   197,   163,   164,   165,   175,   176,   227,
     228,   229,   213,   230,   231,   232,   214,    26,   215,   234,
     236,   237,   238,   216,   220,   225,   241,   101,   242,   243,
     101,   226,   233,   246,   239,   249,   240,   244,   250,   102,
     103,   251,   102,   103,   104,   247,   252,   104,   253,   105,
     211,   140,   105,    85,   186,   117,   115,    66,     0,     0,
       0,     0,     0,     0,   106,   107,     0,   106,   107,     0,
       0,     0,     0,   150,    37,    38,    39,    40,    41,    42,
      43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
      53,    54,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
       0,     0,     0,     0,     0,     0,     0,    23
};

static const short yycheck[] =
{
       6,     3,     2,    20,     4,    36,    37,    38,    22,    62,
      52,    59,    43,    47,    31,    49,    67,    47,    95,    49,
     122,    23,    24,    25,    26,    27,    28,    29,    47,   106,
     107,     0,    66,    39,    40,    67,    66,    68,    44,    45,
      46,    47,    48,    49,    50,    51,    52,    53,    54,     3,
      98,    57,    54,   155,    68,   108,    58,    68,    69,    61,
      62,     3,    47,    63,    49,    52,    68,   105,    33,    23,
      24,    25,    26,    27,    28,    29,   178,    63,    64,    65,
      22,    87,    50,    51,    90,    91,    86,    67,    94,    89,
      32,    33,    68,    69,    30,    31,    96,    47,    68,    49,
      54,   101,    22,    45,    58,    67,   144,    61,    62,   147,
      67,    53,    56,    57,   120,    67,    66,    48,    66,    40,
      41,    42,    43,    49,    67,    66,   132,    67,   166,   167,
     168,   169,   170,    66,    55,   108,   174,    66,    40,    41,
      42,    43,   180,   181,   182,   183,   184,    68,   154,   187,
     188,   189,   190,    55,    66,   161,   194,    36,    37,    38,
      66,   199,   200,   201,    43,   203,   204,   205,   206,    66,
      66,   177,    66,   179,    66,    66,    66,    66,    66,   217,
     218,   219,    66,   221,   222,   223,    66,     8,    66,   227,
     228,   229,   230,    66,    66,    66,   234,    22,   236,   237,
      22,    66,    66,   241,    66,   243,    66,    66,   246,    34,
      35,   249,    34,    35,    39,    66,    66,    39,    66,    44,
     192,    98,    44,    58,   171,    83,    64,    36,    -1,    -1,
      -1,    -1,    -1,    -1,    59,    60,    -1,    59,    60,    -1,
      -1,    -1,    -1,    68,     4,     5,     6,     7,     8,     9,
      10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
      20,    21,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,    -1,    -1,    47
};

/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
   symbol of state STATE-NUM.  */
static const unsigned char yystos[] =
{
       0,     3,    22,    32,    33,    45,    53,    71,    72,    73,
      74,    75,    78,    90,    96,   101,    52,    98,   108,   108,
      67,   108,   102,    47,   107,     0,    73,    67,    97,    91,
      76,    77,    78,    79,    67,    52,   109,     4,     5,     6,
       7,     8,     9,    10,    11,    12,    13,    14,    15,    16,
      17,    18,    19,    20,    21,    99,   100,   107,    67,    67,
      68,    78,    67,    22,   103,   104,   109,    48,   110,   107,
     107,   107,   107,   107,   107,   107,   107,   107,   107,   107,
     107,   107,    68,    69,   107,    99,     3,    23,    24,    25,
      26,    27,    28,    29,    54,    58,    61,    62,    92,    93,
      96,    22,    34,    35,    39,    44,    59,    60,    80,    81,
      82,    87,    90,   108,    68,   104,    66,   100,    68,   108,
     107,    49,   106,   108,   107,   107,    50,    51,   111,    30,
      31,    94,   107,   111,   108,    63,    64,    65,    95,    68,
      93,   108,    47,    49,   105,    67,    67,   105,   111,   111,
      68,    81,    66,    66,   107,   106,    66,    66,    66,    66,
      66,   107,    66,    66,    66,    66,   105,    36,    37,    38,
      43,    88,    89,    83,   105,    66,    66,   107,   106,   107,
     105,   105,   105,   105,   105,    68,    89,    40,    41,    42,
      43,    55,    84,    85,   105,   107,   106,   107,   105,   105,
     105,   105,   105,   105,   105,   105,   105,    56,    57,    86,
      68,    85,   105,    66,    66,    66,    66,   105,   105,   105,
      66,   105,   105,   105,   105,    66,    66,   105,   105,   105,
     105,   105,   105,    66,   105,    66,   105,   105,   105,    66,
      66,   105,   105,   105,    66,    66,   105,    66,    66,   105,
     105,   105,    66,    66
};

#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 11:

    {
           cfg->addStereoSystemCommand( yyvsp[-3].integer, yyvsp[-2].string, yyvsp[-1].string );
        ;}
    break;

  case 17:

    {
	    cfg->beginCamera( yyvsp[0].string );
	 ;}
    break;

  case 18:

    {
	    cfg->endCamera();
	 ;}
    break;

  case 22:

    {
	    cfg->setCameraRenderSurface( yyvsp[-1].string );
	;}
    break;

  case 23:

    {
	    cfg->setCameraRenderSurface();
	;}
    break;

  case 24:

    {
	    cfg->setCameraProjectionRectangle( yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real );
	;}
    break;

  case 25:

    {
	    cfg->setCameraShareLens( yyvsp[-1].boolean );
	;}
    break;

  case 26:

    {
        cfg->setCameraShareView( yyvsp[-1].boolean );
    ;}
    break;

  case 27:

    {
        cfg->setCameraClearColor( yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real );
    ;}
    break;

  case 30:

    {
	    cfg->beginCameraOffset();
	;}
    break;

  case 31:

    {
	    cfg->endCameraOffset();
	;}
    break;

  case 34:

    {
	    cfg->shearCameraOffset( yyvsp[-2].real, yyvsp[-1].real );
	  ;}
    break;

  case 35:

    {
	    cfg->rotateCameraOffset( yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real );
	  ;}
    break;

  case 36:

    {
	    cfg->translateCameraOffset( yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real );
	  ;}
    break;

  case 37:

    {
	    cfg->scaleCameraOffset( yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real );
	  ;}
    break;

  case 38:

    {
	    cfg->setCameraOffsetMultiplyMethod( (Producer::Camera::Offset::MultiplyMethod)yyvsp[-1].integer );
	  ;}
    break;

  case 39:

    { yyval.integer = Producer::Camera::Offset::PreMultiply; ;}
    break;

  case 40:

    { yyval.integer = Producer::Camera::Offset::PostMultiply; ;}
    break;

  case 45:

    {
	      cfg->setCameraOrtho( yyvsp[-6].real, yyvsp[-5].real, yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real );
	  ;}
    break;

  case 46:

    {
	      cfg->setCameraOrtho( yyvsp[-8].real, yyvsp[-7].real, yyvsp[-6].real, yyvsp[-5].real, yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real );
	  ;}
    break;

  case 47:

    {
	      cfg->setCameraPerspective( yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real );
	  ;}
    break;

  case 48:

    {
	      cfg->setCameraPerspective( yyvsp[-6].real, yyvsp[-5].real, yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real );
	  ;}
    break;

  case 49:

    {
	      cfg->setCameraFrustum( yyvsp[-6].real, yyvsp[-5].real, yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real );
	  ;}
    break;

  case 50:

    {
	      cfg->setCameraFrustum( yyvsp[-8].real, yyvsp[-7].real, yyvsp[-6].real, yyvsp[-5].real, yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real );
	  ;}
    break;

  case 51:

    {
	      cfg->setCameraLensShear( yyvsp[-2].real, yyvsp[-1].real );
	  ;}
    break;

  case 52:

    {
	     cfg->beginRenderSurface( yyvsp[0].string );
	 ;}
    break;

  case 53:

    {
	     cfg->endRenderSurface();
	 ;}
    break;

  case 57:

    {
	    cfg->setRenderSurfaceVisualChooser( yyvsp[-1].string );
	;}
    break;

  case 58:

    {
	    cfg->setRenderSurfaceVisualChooser();
	;}
    break;

  case 59:

    {
	    cfg->setRenderSurfaceWindowRectangle( yyvsp[-4].integer, yyvsp[-3].integer, yyvsp[-2].integer, yyvsp[-1].integer );
	;}
    break;

  case 60:

    {
        cfg->setRenderSurfaceInputRectangle( yyvsp[-4].real, yyvsp[-3].real, yyvsp[-2].real, yyvsp[-1].real );
    ;}
    break;

  case 61:

    {
	    cfg->setRenderSurfaceHostName( std::string(yyvsp[-1].string) );
	;}
    break;

  case 62:

    {
	    cfg->setRenderSurfaceDisplayNum( yyvsp[-1].integer );
	;}
    break;

  case 63:

    {
	    cfg->setRenderSurfaceScreen( yyvsp[-1].integer );
	;}
    break;

  case 64:

    {    
	    cfg->setRenderSurfaceBorder( yyvsp[-1].boolean );
	;}
    break;

  case 65:

    {
        cfg->setRenderSurfaceCustomFullScreenRectangle( yyvsp[-4].integer, yyvsp[-3].integer, yyvsp[-2].integer, yyvsp[-1].integer );
    ;}
    break;

  case 66:

    {
        cfg->setRenderSurfaceOverrideRedirect( yyvsp[-1].boolean );
    ;}
    break;

  case 67:

    {
        Producer::RenderSurface::DrawableType drawableType = (RenderSurface::DrawableType)yyvsp[-1].integer;
        cfg->setRenderSurfaceDrawableType( drawableType );
    ;}
    break;

  case 68:

    {
        cfg->setRenderSurfaceReadDrawable( yyvsp[-1].string );
    ;}
    break;

  case 69:

    {
        cfg->setRenderSurfaceRenderToTextureMode( (Producer::RenderSurface::RenderToTextureMode)yyvsp[-1].integer );
    ;}
    break;

  case 70:

    { yyval.integer =  RenderSurface::DrawableType_Window; ;}
    break;

  case 71:

    { yyval.integer =  RenderSurface::DrawableType_PBuffer; ;}
    break;

  case 72:

    { yyval.integer = RenderSurface::RenderToTextureMode_None; ;}
    break;

  case 73:

    { yyval.integer = RenderSurface::RenderToRGBTexture; ;}
    break;

  case 74:

    { yyval.integer = RenderSurface::RenderToRGBATexture; ;}
    break;

  case 75:

    {
	     cfg->beginVisual( yyvsp[0].string );
	 ;}
    break;

  case 76:

    {
	     cfg->endVisual();
	 ;}
    break;

  case 77:

    {
	     cfg->beginVisual();
	 ;}
    break;

  case 78:

    {
	     cfg->endVisual();
	 ;}
    break;

  case 81:

    {
	      cfg->setVisualSimpleConfiguration();
	  ;}
    break;

  case 82:

    {
	      cfg->setVisualByID( yyvsp[0].integer );
	  ;}
    break;

  case 83:

    {
	      cfg->addVisualAttribute( VisualChooser::BufferSize, yyvsp[0].integer );
	  ;}
    break;

  case 84:

    {
	      cfg->addVisualAttribute( VisualChooser::Level, yyvsp[0].integer );
	  ;}
    break;

  case 85:

    {
	      cfg->addVisualAttribute( VisualChooser::RGBA );
	  ;}
    break;

  case 86:

    {
	      cfg->addVisualAttribute( VisualChooser::DoubleBuffer );
	  ;}
    break;

  case 87:

    {
	      cfg->addVisualAttribute( VisualChooser::Stereo );
	  ;}
    break;

  case 88:

    {
	      cfg->addVisualAttribute( VisualChooser::AuxBuffers, yyvsp[0].integer );
	  ;}
    break;

  case 89:

    {
	      cfg->addVisualAttribute( VisualChooser::RedSize, yyvsp[0].integer );
	  ;}
    break;

  case 90:

    {
	      cfg->addVisualAttribute( VisualChooser::GreenSize, yyvsp[0].integer );
	  ;}
    break;

  case 91:

    {
	      cfg->addVisualAttribute( VisualChooser::BlueSize, yyvsp[0].integer );
	  ;}
    break;

  case 92:

    {
	      cfg->addVisualAttribute( VisualChooser::AlphaSize, yyvsp[0].integer );
	  ;}
    break;

  case 93:

    {
	      cfg->addVisualAttribute( VisualChooser::DepthSize, yyvsp[0].integer );
	  ;}
    break;

  case 94:

    {
	      cfg->addVisualAttribute( VisualChooser::StencilSize, yyvsp[0].integer );
	  ;}
    break;

  case 95:

    {
	      cfg->addVisualAttribute( VisualChooser::AccumRedSize, yyvsp[0].integer );
	  ;}
    break;

  case 96:

    {
	      cfg->addVisualAttribute( VisualChooser::AccumGreenSize, yyvsp[0].integer );
	  ;}
    break;

  case 97:

    {
	      cfg->addVisualAttribute( VisualChooser::AccumBlueSize, yyvsp[0].integer );
	  ;}
    break;

  case 98:

    {
	      cfg->addVisualAttribute( VisualChooser::AccumAlphaSize, yyvsp[0].integer );
	  ;}
    break;

  case 99:

    {
	      cfg->addVisualExtendedAttribute( yyvsp[0].integer );
	  ;}
    break;

  case 100:

    {
	      cfg->addVisualExtendedAttribute( yyvsp[-1].integer, yyvsp[0].integer );
	  ;}
    break;

  case 101:

    { cfg->beginInputArea(); ;}
    break;

  case 102:

    { cfg->endInputArea(); ;}
    break;

  case 105:

    {
			cfg->addInputAreaEntry( yyvsp[-1].string );
		;}
    break;

  case 106:

    {
	    yyval.real = atof(flexer->YYText());
	;}
    break;

  case 107:

    {
	    yyval.real = atof(flexer->YYText());
	;}
    break;

  case 108:

    {
	    yyval.real = atof(flexer->YYText());
	;}
    break;

  case 109:

    {
	    yyval.integer = atoi( flexer->YYText() );
	;}
    break;

  case 110:

    {
	    yyval.string = strdup( flexer->YYText() );
	;}
    break;

  case 111:

    {
	    yyval.string = strdup( flexer->YYText() );
	;}
    break;

  case 112:

    {
	    int n;
	    sscanf( flexer->YYText(), "0x%x", &n );
	    yyval.integer = n;
	;}
    break;

  case 113:

    { yyval.boolean = true;;}
    break;

  case 114:

    { yyval.boolean = false; ;}
    break;


    }

/* Line 991 of yacc.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 yyerrlab2;


/*----------------------------------------------------.
| yyerrlab1 -- error raised explicitly by an action.  |
`----------------------------------------------------*/
yyerrlab1:

  /* Suppress GCC warning that yyerrlab1 is unused when no action
     invokes YYERROR.  */
#if defined (__GNUC_MINOR__) && 2093 <= (__GNUC__ * 1000 + __GNUC_MINOR__) \
    && !defined __cplusplus
  __attribute__ ((__unused__))
#endif


  goto yyerrlab2;


/*---------------------------------------------------------------.
| yyerrlab2 -- pop states until the error token can be shifted.  |
`---------------------------------------------------------------*/
yyerrlab2:
  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;
}





static void yyerror( const char *errmsg )
{
    fprintf( stderr, 
    	"CameraConfig::parseFile(\"%s\") : %s - Line %d at or before \"%s\"\n",
		fileName.c_str(),
		errmsg, 
        flexer->lineno(),
        flexer->YYText() );
}

bool CameraConfig::parseFile( const std::string &file )
{
    fileName.clear();

    fileName = findFile(file);

    if( fileName.empty() )
    {
        fprintf( stderr, "CameraConfig::parseFile() - Can't find file \"%s\".\n", file.c_str() );
        return false;
    }

#if defined (PRODUCER_AVOID_CPP)

    std::ifstream ifs(fileName.c_str());
    flexer = new yyFlexLexer(&ifs);
    cfg = this;
    bool retval = true;
    if( ConfigParser_parse() )
        retval = false;
    ifs.close();
    delete flexer;
    return retval;

#else

    int pd[2];
    bool retval = true;
    pipe( pd );

    flexer = new yyFlexLexer;
    if( fork() == 0 )
    {
        // we don't want to read from the pipe in the child, so close it.
        close( pd[0] );
        close( 1 );
        dup( pd[1] );

        char *cpp_path =
#if defined(__APPLE__)
                "/usr/bin/cpp";
#else
                "/lib/cpp";
#endif

        /* This was here to allow reading a config file from stdin.
         * This has never been directly supported, so commenting out.
        if( fileName.empty() )
            execlp( cpp_path, "cpp",  "-P", 0L );
        else
        */
            execlp( cpp_path, "cpp",  "-P", fileName.c_str(), 0L );
                                                                                                                     
        // This should not execute unless an error happens
        perror( "execlp" );
    }
    else
    {
        close( pd[1]);
        close( 0 );
        dup( pd[0] );

        cfg = this;

        retval = ConfigParser_parse();
                                                                                                                     
        // Wait on child process to finish
        int stat;
        wait( &stat );
    }
    return retval;
#endif
}


