open_toontown_panda3d/panda/src/egg/parser.cxx.prebuilt

5061 lines
191 KiB
Plaintext

/* A Bison parser, made by GNU Bison 3.7.2. */
/* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
especially those whose name start with YY_ or yy_. They are
private implementation details that can be changed or removed. */
/* 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
/* Bison version. */
#define YYBISON_VERSION "3.7.2"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
/* Pure parsers. */
#define YYPURE 2
/* Push parsers. */
#define YYPUSH 0
/* Pull parsers. */
#define YYPULL 1
/* Substitute the variable and function names. */
#define yyparse eggyyparse
#define yylex eggyylex
#define yyerror eggyyerror
#define yydebug eggyydebug
#define yynerrs eggyynerrs
/* First part of user prologue. */
#line 12 "panda/src/egg/parser.yxx"
#include "pandabase.h"
#include "config_egg.h"
#include "parserDefs.h"
#include "lexerDefs.h"
#include "eggObject.h"
#include "eggGroup.h"
#include "eggVertex.h"
#include "eggVertexPool.h"
#include "eggVertexUV.h"
#include "eggVertexAux.h"
#include "eggPolygon.h"
#include "eggCompositePrimitive.h"
#include "eggTriangleFan.h"
#include "eggTriangleStrip.h"
#include "eggPatch.h"
#include "eggPoint.h"
#include "eggLine.h"
#include "eggNurbsSurface.h"
#include "eggNurbsCurve.h"
#include "eggTable.h"
#include "eggSAnimData.h"
#include "eggXfmSAnim.h"
#include "eggXfmAnimData.h"
#include "eggTexture.h"
#include "eggMaterial.h"
#include "eggComment.h"
#include "eggCoordinateSystem.h"
#include "eggExternalReference.h"
#include "eggData.h"
#include "eggAnimPreload.h"
#include "eggTransform.h"
#include "pt_EggTexture.h"
#include "pt_EggMaterial.h"
#include "string_utils.h"
#include "filename.h"
#include "luse.h"
#include "lmatrix.h"
#include "coordinateSystem.h"
#include "pvector.h"
#include "dcast.h"
#include "thread.h"
// Because our token type contains objects of type string, which
// require correct copy construction (and not simply memcpying), we
// cannot use bison's built-in auto-stack-grow feature. As an easy
// solution, we ensure here that we have enough yacc stack to start
// with, and that it doesn't ever try to grow.
#define YYINITDEPTH 1000
#define YYMAXDEPTH 1000
using std::ostringstream;
using std::string;
typedef pvector< PT(EggObject)> EggStack;
typedef pmap<std::string, PT(EggVertexPool)> VertexPools;
typedef pmap<std::string, PT_EggTexture> Textures;
typedef pmap<std::string, PT_EggMaterial> Materials;
typedef pmap<std::string, PT(EggGroup)> Groups;
struct EggParserState {
// We need a stack of EggObject pointers. Each time we encounter a
// nested EggObject of some kind, we'll allocate a new one of these
// and push it onto the stack. At any given time, the top of the
// stack is the EggObject we are currently scanning.
EggStack stack;
// This is used just when parsing a <Transform> or <DefaultPose> entry.
EggTransform *top_transform;
// There's one "top-level" egg node, which is where we should parent
// things (e.g. implicit state.textures) encountered in the egg file that
// don't have an explicit place in the tree. If this is NULL, such
// things won't be parented anywhere.
EggGroupNode *top_node;
// We need a table mapping vertex pool names to vertex pools.
VertexPools vertex_pools;
// And another one mapping texture names to state.textures.
Textures textures;
// And again for material names to state.materials.
Materials materials;
// Group names to state.groups.
Groups groups;
// We need to be able to save the index number requested for a vertex
// temporarily.
int vertex_index;
};
static int eggyyparse(EggParserState &state, yyscan_t scanner);
////////////////////////////////////////////////////////////////////
// Defining the interface to the parser.
////////////////////////////////////////////////////////////////////
bool
egg_parse(EggLexerState &lexer_state, EggObject *tos, EggGroupNode *top_node) {
yyscan_t scanner = nullptr;
eggyylex_init_extra(&lexer_state, &scanner);
EggParserState state;
state.stack.push_back(tos);
state.top_node = top_node;
eggyyparse(state, scanner);
// Check for undefined vertex pools.
VertexPools::const_iterator vpi;
for (vpi = state.vertex_pools.begin(); vpi != state.vertex_pools.end(); ++vpi) {
EggVertexPool *pool = (*vpi).second;
if (pool->has_forward_vertices()) {
if (!pool->has_defined_vertices()) {
eggyyerror(nullptr, scanner, "Undefined vertex pool " + pool->get_name());
} else {
eggyyerror(nullptr, scanner, "Undefined vertices in pool " + pool->get_name());
egg_cat.error(false)
<< "Undefined vertex index numbers:";
EggVertexPool::const_iterator vi;
for (vi = pool->begin(); vi != pool->end(); ++vi) {
EggVertex *vertex = (*vi);
if (vertex->is_forward_reference()) {
egg_cat.error(false)
<< " " << vertex->get_index();
}
}
egg_cat.error(false)
<< "\n";
}
}
}
eggyylex_destroy(scanner);
return lexer_state._error_count == 0;
}
////////////////////////////////////////////////////////////////////
// Internal support functions.
////////////////////////////////////////////////////////////////////
void
eggyyerror(YYLTYPE *loc, EggParserState &state, yyscan_t scanner, const std::string &msg) {
eggyyerror(loc, scanner, msg);
}
void
eggyywarning(YYLTYPE *loc, EggParserState &state, yyscan_t scanner, const string &msg) {
eggyywarning(loc, scanner, msg);
}
#line 234 "built/tmp/parser.yxx.c"
# ifndef YY_CAST
# ifdef __cplusplus
# define YY_CAST(Type, Val) static_cast<Type> (Val)
# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
# else
# define YY_CAST(Type, Val) ((Type) (Val))
# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
# endif
# endif
# ifndef YY_NULLPTR
# if defined __cplusplus
# if 201103L <= __cplusplus
# define YY_NULLPTR nullptr
# else
# define YY_NULLPTR 0
# endif
# else
# define YY_NULLPTR ((void*)0)
# endif
# endif
#include "parser.yxx.h"
/* Symbol kind. */
enum yysymbol_kind_t
{
YYSYMBOL_YYEMPTY = -2,
YYSYMBOL_YYEOF = 0, /* "end of file" */
YYSYMBOL_YYerror = 1, /* error */
YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
YYSYMBOL_EGG_NUMBER = 3, /* EGG_NUMBER */
YYSYMBOL_EGG_ULONG = 4, /* EGG_ULONG */
YYSYMBOL_EGG_STRING = 5, /* EGG_STRING */
YYSYMBOL_ANIMPRELOAD = 6, /* ANIMPRELOAD */
YYSYMBOL_BEZIERCURVE = 7, /* BEZIERCURVE */
YYSYMBOL_BFACE = 8, /* BFACE */
YYSYMBOL_BILLBOARD = 9, /* BILLBOARD */
YYSYMBOL_BILLBOARDCENTER = 10, /* BILLBOARDCENTER */
YYSYMBOL_BINORMAL = 11, /* BINORMAL */
YYSYMBOL_BUNDLE = 12, /* BUNDLE */
YYSYMBOL_CLOSED = 13, /* CLOSED */
YYSYMBOL_COLLIDE = 14, /* COLLIDE */
YYSYMBOL_COMMENT = 15, /* COMMENT */
YYSYMBOL_COMPONENT = 16, /* COMPONENT */
YYSYMBOL_COORDSYSTEM = 17, /* COORDSYSTEM */
YYSYMBOL_CV = 18, /* CV */
YYSYMBOL_DART = 19, /* DART */
YYSYMBOL_DNORMAL = 20, /* DNORMAL */
YYSYMBOL_DRGBA = 21, /* DRGBA */
YYSYMBOL_DUV = 22, /* DUV */
YYSYMBOL_DXYZ = 23, /* DXYZ */
YYSYMBOL_DCS = 24, /* DCS */
YYSYMBOL_DISTANCE = 25, /* DISTANCE */
YYSYMBOL_DTREF = 26, /* DTREF */
YYSYMBOL_DYNAMICVERTEXPOOL = 27, /* DYNAMICVERTEXPOOL */
YYSYMBOL_EXTERNAL_FILE = 28, /* EXTERNAL_FILE */
YYSYMBOL_GROUP = 29, /* GROUP */
YYSYMBOL_DEFAULTPOSE = 30, /* DEFAULTPOSE */
YYSYMBOL_JOINT = 31, /* JOINT */
YYSYMBOL_KNOTS = 32, /* KNOTS */
YYSYMBOL_INCLUDE = 33, /* INCLUDE */
YYSYMBOL_INSTANCE = 34, /* INSTANCE */
YYSYMBOL_LINE = 35, /* LINE */
YYSYMBOL_LOOP = 36, /* LOOP */
YYSYMBOL_MATERIAL = 37, /* MATERIAL */
YYSYMBOL_MATRIX3 = 38, /* MATRIX3 */
YYSYMBOL_MATRIX4 = 39, /* MATRIX4 */
YYSYMBOL_MODEL = 40, /* MODEL */
YYSYMBOL_MREF = 41, /* MREF */
YYSYMBOL_NORMAL = 42, /* NORMAL */
YYSYMBOL_NURBSCURVE = 43, /* NURBSCURVE */
YYSYMBOL_NURBSSURFACE = 44, /* NURBSSURFACE */
YYSYMBOL_OBJECTTYPE = 45, /* OBJECTTYPE */
YYSYMBOL_ORDER = 46, /* ORDER */
YYSYMBOL_OUTTANGENT = 47, /* OUTTANGENT */
YYSYMBOL_PATCH = 48, /* PATCH */
YYSYMBOL_POINTLIGHT = 49, /* POINTLIGHT */
YYSYMBOL_POLYGON = 50, /* POLYGON */
YYSYMBOL_REF = 51, /* REF */
YYSYMBOL_RGBA = 52, /* RGBA */
YYSYMBOL_ROTATE = 53, /* ROTATE */
YYSYMBOL_ROTX = 54, /* ROTX */
YYSYMBOL_ROTY = 55, /* ROTY */
YYSYMBOL_ROTZ = 56, /* ROTZ */
YYSYMBOL_SANIM = 57, /* SANIM */
YYSYMBOL_SCALAR = 58, /* SCALAR */
YYSYMBOL_SCALE = 59, /* SCALE */
YYSYMBOL_SEQUENCE = 60, /* SEQUENCE */
YYSYMBOL_SHADING = 61, /* SHADING */
YYSYMBOL_SWITCH = 62, /* SWITCH */
YYSYMBOL_SWITCHCONDITION = 63, /* SWITCHCONDITION */
YYSYMBOL_TABLE = 64, /* TABLE */
YYSYMBOL_TABLE_V = 65, /* TABLE_V */
YYSYMBOL_TAG = 66, /* TAG */
YYSYMBOL_TANGENT = 67, /* TANGENT */
YYSYMBOL_TEXLIST = 68, /* TEXLIST */
YYSYMBOL_TEXTURE = 69, /* TEXTURE */
YYSYMBOL_TLENGTHS = 70, /* TLENGTHS */
YYSYMBOL_TRANSFORM = 71, /* TRANSFORM */
YYSYMBOL_TRANSLATE = 72, /* TRANSLATE */
YYSYMBOL_TREF = 73, /* TREF */
YYSYMBOL_TRIANGLEFAN = 74, /* TRIANGLEFAN */
YYSYMBOL_TRIANGLESTRIP = 75, /* TRIANGLESTRIP */
YYSYMBOL_TRIM = 76, /* TRIM */
YYSYMBOL_TXT = 77, /* TXT */
YYSYMBOL_UKNOTS = 78, /* UKNOTS */
YYSYMBOL_UV = 79, /* UV */
YYSYMBOL_AUX = 80, /* AUX */
YYSYMBOL_VKNOTS = 81, /* VKNOTS */
YYSYMBOL_VERTEX = 82, /* VERTEX */
YYSYMBOL_VERTEXANIM = 83, /* VERTEXANIM */
YYSYMBOL_VERTEXPOOL = 84, /* VERTEXPOOL */
YYSYMBOL_VERTEXREF = 85, /* VERTEXREF */
YYSYMBOL_XFMANIM = 86, /* XFMANIM */
YYSYMBOL_XFMSANIM = 87, /* XFMSANIM */
YYSYMBOL_START_EGG = 88, /* START_EGG */
YYSYMBOL_START_GROUP_BODY = 89, /* START_GROUP_BODY */
YYSYMBOL_START_TEXTURE_BODY = 90, /* START_TEXTURE_BODY */
YYSYMBOL_START_PRIMITIVE_BODY = 91, /* START_PRIMITIVE_BODY */
YYSYMBOL_92_ = 92, /* '{' */
YYSYMBOL_93_ = 93, /* '}' */
YYSYMBOL_YYACCEPT = 94, /* $accept */
YYSYMBOL_grammar = 95, /* grammar */
YYSYMBOL_egg = 96, /* egg */
YYSYMBOL_node = 97, /* node */
YYSYMBOL_coordsystem = 98, /* coordsystem */
YYSYMBOL_comment = 99, /* comment */
YYSYMBOL_texture = 100, /* texture */
YYSYMBOL_101_1 = 101, /* $@1 */
YYSYMBOL_texture_body = 102, /* texture_body */
YYSYMBOL_material = 103, /* material */
YYSYMBOL_104_2 = 104, /* $@2 */
YYSYMBOL_material_body = 105, /* material_body */
YYSYMBOL_external_reference = 106, /* external_reference */
YYSYMBOL_vertex_pool = 107, /* vertex_pool */
YYSYMBOL_108_3 = 108, /* $@3 */
YYSYMBOL_vertex_pool_body = 109, /* vertex_pool_body */
YYSYMBOL_vertex = 110, /* vertex */
YYSYMBOL_111_4 = 111, /* $@4 */
YYSYMBOL_112_5 = 112, /* $@5 */
YYSYMBOL_vertex_body = 113, /* vertex_body */
YYSYMBOL_114_6 = 114, /* $@6 */
YYSYMBOL_115_7 = 115, /* $@7 */
YYSYMBOL_vertex_uv_body = 116, /* vertex_uv_body */
YYSYMBOL_vertex_aux_body = 117, /* vertex_aux_body */
YYSYMBOL_vertex_normal_body = 118, /* vertex_normal_body */
YYSYMBOL_vertex_color_body = 119, /* vertex_color_body */
YYSYMBOL_group = 120, /* group */
YYSYMBOL_121_8 = 121, /* $@8 */
YYSYMBOL_joint = 122, /* joint */
YYSYMBOL_123_9 = 123, /* $@9 */
YYSYMBOL_instance = 124, /* instance */
YYSYMBOL_125_10 = 125, /* $@10 */
YYSYMBOL_group_body = 126, /* group_body */
YYSYMBOL_cs_type = 127, /* cs_type */
YYSYMBOL_collide_flags = 128, /* collide_flags */
YYSYMBOL_transform = 129, /* transform */
YYSYMBOL_130_11 = 130, /* $@11 */
YYSYMBOL_default_pose = 131, /* default_pose */
YYSYMBOL_132_12 = 132, /* $@12 */
YYSYMBOL_transform_body = 133, /* transform_body */
YYSYMBOL_translate2d = 134, /* translate2d */
YYSYMBOL_translate3d = 135, /* translate3d */
YYSYMBOL_rotate2d = 136, /* rotate2d */
YYSYMBOL_rotx = 137, /* rotx */
YYSYMBOL_roty = 138, /* roty */
YYSYMBOL_rotz = 139, /* rotz */
YYSYMBOL_rotate3d = 140, /* rotate3d */
YYSYMBOL_scale2d = 141, /* scale2d */
YYSYMBOL_scale3d = 142, /* scale3d */
YYSYMBOL_uniform_scale = 143, /* uniform_scale */
YYSYMBOL_matrix3 = 144, /* matrix3 */
YYSYMBOL_matrix3_body = 145, /* matrix3_body */
YYSYMBOL_matrix4 = 146, /* matrix4 */
YYSYMBOL_matrix4_body = 147, /* matrix4_body */
YYSYMBOL_group_vertex_ref = 148, /* group_vertex_ref */
YYSYMBOL_group_vertex_membership = 149, /* group_vertex_membership */
YYSYMBOL_switchcondition = 150, /* switchcondition */
YYSYMBOL_switchcondition_body = 151, /* switchcondition_body */
YYSYMBOL_polygon = 152, /* polygon */
YYSYMBOL_153_13 = 153, /* $@13 */
YYSYMBOL_trianglefan = 154, /* trianglefan */
YYSYMBOL_155_14 = 155, /* $@14 */
YYSYMBOL_trianglestrip = 156, /* trianglestrip */
YYSYMBOL_157_15 = 157, /* $@15 */
YYSYMBOL_patch = 158, /* patch */
YYSYMBOL_159_16 = 159, /* $@16 */
YYSYMBOL_point_light = 160, /* point_light */
YYSYMBOL_161_17 = 161, /* $@17 */
YYSYMBOL_line = 162, /* line */
YYSYMBOL_163_18 = 163, /* $@18 */
YYSYMBOL_nurbs_surface = 164, /* nurbs_surface */
YYSYMBOL_165_19 = 165, /* $@19 */
YYSYMBOL_nurbs_curve = 166, /* nurbs_curve */
YYSYMBOL_167_20 = 167, /* $@20 */
YYSYMBOL_primitive_component_body = 168, /* primitive_component_body */
YYSYMBOL_primitive_body = 169, /* primitive_body */
YYSYMBOL_170_21 = 170, /* $@21 */
YYSYMBOL_nurbs_surface_body = 171, /* nurbs_surface_body */
YYSYMBOL_nurbs_curve_body = 172, /* nurbs_curve_body */
YYSYMBOL_primitive_tref_body = 173, /* primitive_tref_body */
YYSYMBOL_primitive_texture_body = 174, /* primitive_texture_body */
YYSYMBOL_primitive_material_body = 175, /* primitive_material_body */
YYSYMBOL_primitive_normal_body = 176, /* primitive_normal_body */
YYSYMBOL_primitive_color_body = 177, /* primitive_color_body */
YYSYMBOL_primitive_bface_body = 178, /* primitive_bface_body */
YYSYMBOL_primitive_vertex_ref = 179, /* primitive_vertex_ref */
YYSYMBOL_nurbs_surface_order_body = 180, /* nurbs_surface_order_body */
YYSYMBOL_nurbs_surface_uknots_body = 181, /* nurbs_surface_uknots_body */
YYSYMBOL_nurbs_surface_vknots_body = 182, /* nurbs_surface_vknots_body */
YYSYMBOL_nurbs_surface_trim_body = 183, /* nurbs_surface_trim_body */
YYSYMBOL_nurbs_surface_trim_loop_body = 184, /* nurbs_surface_trim_loop_body */
YYSYMBOL_nurbs_curve_order_body = 185, /* nurbs_curve_order_body */
YYSYMBOL_nurbs_curve_knots_body = 186, /* nurbs_curve_knots_body */
YYSYMBOL_table = 187, /* table */
YYSYMBOL_188_22 = 188, /* $@22 */
YYSYMBOL_bundle = 189, /* bundle */
YYSYMBOL_190_23 = 190, /* $@23 */
YYSYMBOL_table_body = 191, /* table_body */
YYSYMBOL_sanim = 192, /* sanim */
YYSYMBOL_193_24 = 193, /* $@24 */
YYSYMBOL_sanim_body = 194, /* sanim_body */
YYSYMBOL_xfmanim = 195, /* xfmanim */
YYSYMBOL_196_25 = 196, /* $@25 */
YYSYMBOL_xfmanim_body = 197, /* xfmanim_body */
YYSYMBOL_xfm_s_anim = 198, /* xfm_s_anim */
YYSYMBOL_199_26 = 199, /* $@26 */
YYSYMBOL_xfm_s_anim_body = 200, /* xfm_s_anim_body */
YYSYMBOL_anim_preload = 201, /* anim_preload */
YYSYMBOL_202_27 = 202, /* $@27 */
YYSYMBOL_anim_preload_body = 203, /* anim_preload_body */
YYSYMBOL_integer_list = 204, /* integer_list */
YYSYMBOL_real_list = 205, /* real_list */
YYSYMBOL_texture_name = 206, /* texture_name */
YYSYMBOL_material_name = 207, /* material_name */
YYSYMBOL_vertex_pool_name = 208, /* vertex_pool_name */
YYSYMBOL_group_name = 209, /* group_name */
YYSYMBOL_required_name = 210, /* required_name */
YYSYMBOL_optional_name = 211, /* optional_name */
YYSYMBOL_required_string = 212, /* required_string */
YYSYMBOL_optional_string = 213, /* optional_string */
YYSYMBOL_string = 214, /* string */
YYSYMBOL_repeated_string = 215, /* repeated_string */
YYSYMBOL_repeated_string_body = 216, /* repeated_string_body */
YYSYMBOL_real = 217, /* real */
YYSYMBOL_real_or_string = 218, /* real_or_string */
YYSYMBOL_integer = 219, /* integer */
YYSYMBOL_empty = 220 /* empty */
};
typedef enum yysymbol_kind_t yysymbol_kind_t;
#ifdef short
# undef short
#endif
/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
<limits.h> and (if available) <stdint.h> are included
so that the code can choose integer types of a good width. */
#ifndef __PTRDIFF_MAX__
# include <limits.h> /* INFRINGES ON USER NAME SPACE */
# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
# define YY_STDINT_H
# endif
#endif
/* Narrow types that promote to a signed type and that can represent a
signed or unsigned integer of at least N bits. In tables they can
save space and decrease cache pressure. Promoting to a signed type
helps avoid bugs in integer arithmetic. */
#ifdef __INT_LEAST8_MAX__
typedef __INT_LEAST8_TYPE__ yytype_int8;
#elif defined YY_STDINT_H
typedef int_least8_t yytype_int8;
#else
typedef signed char yytype_int8;
#endif
#ifdef __INT_LEAST16_MAX__
typedef __INT_LEAST16_TYPE__ yytype_int16;
#elif defined YY_STDINT_H
typedef int_least16_t yytype_int16;
#else
typedef short yytype_int16;
#endif
#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
typedef __UINT_LEAST8_TYPE__ yytype_uint8;
#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
&& UINT_LEAST8_MAX <= INT_MAX)
typedef uint_least8_t yytype_uint8;
#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
typedef unsigned char yytype_uint8;
#else
typedef short yytype_uint8;
#endif
#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
typedef __UINT_LEAST16_TYPE__ yytype_uint16;
#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
&& UINT_LEAST16_MAX <= INT_MAX)
typedef uint_least16_t yytype_uint16;
#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
typedef unsigned short yytype_uint16;
#else
typedef int yytype_uint16;
#endif
#ifndef YYPTRDIFF_T
# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
# define YYPTRDIFF_T __PTRDIFF_TYPE__
# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
# elif defined PTRDIFF_MAX
# ifndef ptrdiff_t
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# endif
# define YYPTRDIFF_T ptrdiff_t
# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
# else
# define YYPTRDIFF_T long
# define YYPTRDIFF_MAXIMUM LONG_MAX
# endif
#endif
#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
# define YYSIZE_T unsigned
# endif
#endif
#define YYSIZE_MAXIMUM \
YY_CAST (YYPTRDIFF_T, \
(YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
? YYPTRDIFF_MAXIMUM \
: YY_CAST (YYSIZE_T, -1)))
#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
/* Stored state numbers (used for stacks). */
typedef yytype_int16 yy_state_t;
/* State numbers in computations. */
typedef int yy_state_fast_t;
#ifndef YY_
# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
# endif
# endif
# ifndef YY_
# define YY_(Msgid) Msgid
# endif
#endif
#ifndef YY_ATTRIBUTE_PURE
# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
# else
# define YY_ATTRIBUTE_PURE
# endif
#endif
#ifndef YY_ATTRIBUTE_UNUSED
# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
# else
# define YY_ATTRIBUTE_UNUSED
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(E) ((void) (E))
#else
# define YYUSE(E) /* empty */
#endif
#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
/* Suppress an incorrect diagnostic about yylval being uninitialized. */
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
_Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
_Pragma ("GCC diagnostic pop")
#else
# define YY_INITIAL_VALUE(Value) Value
#endif
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
#endif
#ifndef YY_INITIAL_VALUE
# define YY_INITIAL_VALUE(Value) /* Nothing. */
#endif
#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
# define YY_IGNORE_USELESS_CAST_BEGIN \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
# define YY_IGNORE_USELESS_CAST_END \
_Pragma ("GCC diagnostic pop")
#endif
#ifndef YY_IGNORE_USELESS_CAST_BEGIN
# define YY_IGNORE_USELESS_CAST_BEGIN
# define YY_IGNORE_USELESS_CAST_END
#endif
#define YY_ASSERT(E) ((void) (0 && (E)))
#if !defined yyoverflow
/* 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
# elif defined __BUILTIN_VA_ARG_INCR
# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
# elif defined _AIX
# define YYSTACK_ALLOC __alloca
# elif defined _MSC_VER
# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
# endif
# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
/* Pacify GCC's 'empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
to allow for a few compiler-allocated temporary stack slots. */
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
# endif
# else
# define YYSTACK_ALLOC YYMALLOC
# define YYSTACK_FREE YYFREE
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
# if (defined __cplusplus && ! defined EXIT_SUCCESS \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
# if ! defined malloc && ! defined EXIT_SUCCESS
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
# if ! defined free && ! defined EXIT_SUCCESS
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# endif
#endif /* !defined yyoverflow */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
|| (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
&& defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
yy_state_t yyss_alloc;
YYSTYPE yyvs_alloc;
YYLTYPE yyls_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE) \
+ YYSIZEOF (YYLTYPE)) \
+ 2 * YYSTACK_GAP_MAXIMUM)
# define YYCOPY_NEEDED 1
/* 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_alloc, Stack) \
do \
{ \
YYPTRDIFF_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / YYSIZEOF (*yyptr); \
} \
while (0)
#endif
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from SRC to DST. The source and destination do
not overlap. */
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(Dst, Src, Count) \
__builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
# else
# define YYCOPY(Dst, Src, Count) \
do \
{ \
YYPTRDIFF_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
while (0)
# endif
# endif
#endif /* !YYCOPY_NEEDED */
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 14
/* YYLAST -- Last index in YYTABLE. */
#define YYLAST 1388
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 94
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 127
/* YYNRULES -- Number of rules. */
#define YYNRULES 278
/* YYNSTATES -- Number of states. */
#define YYNSTATES 765
/* YYMAXUTOK -- Last valid token kind. */
#define YYMAXUTOK 346
/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
as returned by yylex, with out-of-bounds checking. */
#define YYTRANSLATE(YYX) \
(0 <= (YYX) && (YYX) <= YYMAXUTOK \
? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
: YYSYMBOL_YYUNDEF)
/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
as returned by yylex. */
static const yytype_int8 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,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 92, 2, 93, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
85, 86, 87, 88, 89, 90, 91
};
#if YYDEBUG
/* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
static const yytype_int16 yyrline[] =
{
0, 245, 245, 246, 247, 248, 259, 260, 276, 277,
278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
288, 289, 290, 291, 292, 293, 294, 305, 328, 343,
342, 370, 371, 726, 738, 737, 764, 765, 886, 893,
914, 913, 953, 954, 966, 965, 977, 976, 1022, 1026,
1030, 1034, 1039, 1038, 1054, 1053, 1068, 1069, 1070, 1078,
1097, 1101, 1105, 1113, 1121, 1129, 1137, 1145, 1153, 1170,
1171, 1185, 1189, 1197, 1215, 1219, 1227, 1246, 1245, 1271,
1270, 1292, 1291, 1316, 1317, 1465, 1477, 1482, 1489, 1495,
1508, 1515, 1528, 1534, 1540, 1546, 1551, 1557, 1558, 1559,
1560, 1561, 1570, 1584, 1614, 1615, 1638, 1637, 1654, 1653,
1674, 1675, 1676, 1677, 1678, 1679, 1680, 1681, 1682, 1683,
1684, 1685, 1686, 1690, 1697, 1704, 1711, 1718, 1725, 1732,
1739, 1746, 1753, 1760, 1764, 1765, 1777, 1781, 1782, 1804,
1837, 1841, 1866, 1878, 1883, 1901, 1900, 1920, 1919, 1939,
1938, 1958, 1957, 1977, 1976, 1996, 1995, 2015, 2014, 2034,
2033, 2053, 2054, 2055, 2066, 2068, 2067, 2088, 2089, 2090,
2091, 2092, 2093, 2094, 2095, 2170, 2171, 2172, 2173, 2174,
2175, 2176, 2177, 2178, 2179, 2180, 2181, 2187, 2188, 2254,
2255, 2256, 2257, 2258, 2259, 2260, 2261, 2262, 2263, 2264,
2335, 2352, 2392, 2409, 2413, 2421, 2439, 2443, 2451, 2469,
2485, 2516, 2534, 2554, 2574, 2579, 2590, 2596, 2615, 2631,
2653, 2652, 2676, 2675, 2696, 2697, 2701, 2705, 2709, 2713,
2729, 2728, 2749, 2750, 2762, 2777, 2776, 2797, 2798, 2815,
2830, 2829, 2850, 2851, 2866, 2882, 2881, 2902, 2903, 2927,
2931, 2945, 2949, 2963, 2984, 3005, 3030, 3051, 3056, 3068,
3080, 3085, 3096, 3100, 3114, 3118, 3122, 3135, 3139, 3155,
3159, 3173, 3174, 3189, 3195, 3201, 3218, 3226, 3232
};
#endif
/** Accessing symbol of state STATE. */
#define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
#if YYDEBUG || 0
/* The user-facing name of the symbol whose (internal) number is
YYSYMBOL. No bounds checking. */
static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
"\"end of file\"", "error", "\"invalid token\"", "EGG_NUMBER",
"EGG_ULONG", "EGG_STRING", "ANIMPRELOAD", "BEZIERCURVE", "BFACE",
"BILLBOARD", "BILLBOARDCENTER", "BINORMAL", "BUNDLE", "CLOSED",
"COLLIDE", "COMMENT", "COMPONENT", "COORDSYSTEM", "CV", "DART",
"DNORMAL", "DRGBA", "DUV", "DXYZ", "DCS", "DISTANCE", "DTREF",
"DYNAMICVERTEXPOOL", "EXTERNAL_FILE", "GROUP", "DEFAULTPOSE", "JOINT",
"KNOTS", "INCLUDE", "INSTANCE", "LINE", "LOOP", "MATERIAL", "MATRIX3",
"MATRIX4", "MODEL", "MREF", "NORMAL", "NURBSCURVE", "NURBSSURFACE",
"OBJECTTYPE", "ORDER", "OUTTANGENT", "PATCH", "POINTLIGHT", "POLYGON",
"REF", "RGBA", "ROTATE", "ROTX", "ROTY", "ROTZ", "SANIM", "SCALAR",
"SCALE", "SEQUENCE", "SHADING", "SWITCH", "SWITCHCONDITION", "TABLE",
"TABLE_V", "TAG", "TANGENT", "TEXLIST", "TEXTURE", "TLENGTHS",
"TRANSFORM", "TRANSLATE", "TREF", "TRIANGLEFAN", "TRIANGLESTRIP", "TRIM",
"TXT", "UKNOTS", "UV", "AUX", "VKNOTS", "VERTEX", "VERTEXANIM",
"VERTEXPOOL", "VERTEXREF", "XFMANIM", "XFMSANIM", "START_EGG",
"START_GROUP_BODY", "START_TEXTURE_BODY", "START_PRIMITIVE_BODY", "'{'",
"'}'", "$accept", "grammar", "egg", "node", "coordsystem", "comment",
"texture", "$@1", "texture_body", "material", "$@2", "material_body",
"external_reference", "vertex_pool", "$@3", "vertex_pool_body", "vertex",
"$@4", "$@5", "vertex_body", "$@6", "$@7", "vertex_uv_body",
"vertex_aux_body", "vertex_normal_body", "vertex_color_body", "group",
"$@8", "joint", "$@9", "instance", "$@10", "group_body", "cs_type",
"collide_flags", "transform", "$@11", "default_pose", "$@12",
"transform_body", "translate2d", "translate3d", "rotate2d", "rotx",
"roty", "rotz", "rotate3d", "scale2d", "scale3d", "uniform_scale",
"matrix3", "matrix3_body", "matrix4", "matrix4_body", "group_vertex_ref",
"group_vertex_membership", "switchcondition", "switchcondition_body",
"polygon", "$@13", "trianglefan", "$@14", "trianglestrip", "$@15",
"patch", "$@16", "point_light", "$@17", "line", "$@18", "nurbs_surface",
"$@19", "nurbs_curve", "$@20", "primitive_component_body",
"primitive_body", "$@21", "nurbs_surface_body", "nurbs_curve_body",
"primitive_tref_body", "primitive_texture_body",
"primitive_material_body", "primitive_normal_body",
"primitive_color_body", "primitive_bface_body", "primitive_vertex_ref",
"nurbs_surface_order_body", "nurbs_surface_uknots_body",
"nurbs_surface_vknots_body", "nurbs_surface_trim_body",
"nurbs_surface_trim_loop_body", "nurbs_curve_order_body",
"nurbs_curve_knots_body", "table", "$@22", "bundle", "$@23",
"table_body", "sanim", "$@24", "sanim_body", "xfmanim", "$@25",
"xfmanim_body", "xfm_s_anim", "$@26", "xfm_s_anim_body", "anim_preload",
"$@27", "anim_preload_body", "integer_list", "real_list", "texture_name",
"material_name", "vertex_pool_name", "group_name", "required_name",
"optional_name", "required_string", "optional_string", "string",
"repeated_string", "repeated_string_body", "real", "real_or_string",
"integer", "empty", YY_NULLPTR
};
static const char *
yysymbol_name (yysymbol_kind_t yysymbol)
{
return yytname[yysymbol];
}
#endif
#ifdef YYPRINT
/* YYTOKNUM[NUM] -- (External) token number corresponding to the
(internal) symbol number NUM (which must be that of a token). */
static const yytype_int16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
305, 306, 307, 308, 309, 310, 311, 312, 313, 314,
315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
345, 346, 123, 125
};
#endif
#define YYPACT_NINF (-430)
#define yypact_value_is_default(Yyn) \
((Yyn) == YYPACT_NINF)
#define YYTABLE_NINF (-1)
#define yytable_value_is_error(Yyn) \
0
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
static const yytype_int16 yypact[] =
{
211, -430, -430, -430, -430, 14, 1060, -430, 1206, -430,
141, -430, 495, -430, -430, -430, -430, -430, 329, 329,
-55, 329, 329, 329, 329, 329, 329, 329, 329, 329,
329, 329, 329, 329, 329, 329, 329, -430, -430, -430,
-430, -430, -430, -430, -430, -430, -430, -430, -430, -430,
-430, -430, -430, -430, -430, -430, -430, 70, 10, 22,
329, 68, 114, -430, 119, 125, 134, 329, 150, 152,
329, 164, -430, 169, -430, -430, -430, -430, -430, 329,
-430, 172, 185, 174, 175, 180, 329, 182, 191, 192,
-430, -430, -430, -430, -430, 203, 329, 215, -430, -430,
-430, -430, 220, -430, -430, -430, -430, -430, -430, -430,
-430, 226, -430, -430, -430, 329, 329, 255, 228, 347,
374, 230, 185, 329, 329, 235, 185, 99, 236, 185,
243, -430, 244, 185, -430, -430, 247, 329, 255, 255,
249, 329, 329, -430, 253, 329, 57, -430, -430, 329,
261, 273, 274, 279, -430, 283, 290, 300, 303, 313,
323, 329, 326, 331, 333, 334, 184, -430, -430, 255,
329, 188, 210, 251, 254, -430, 262, 287, 328, -430,
385, 335, 337, 338, 329, 345, -430, 185, -430, 385,
346, -430, -430, 348, -430, -430, 29, 255, 23, 255,
385, 349, -430, 352, -430, -430, 131, -430, -430, 353,
329, -430, -430, 356, -430, -430, -430, -430, -430, -430,
-430, -430, -430, -430, -430, -430, -430, -430, -430, 329,
-430, 255, -430, -430, -430, -430, -430, -430, 381, -430,
-430, -430, -430, -430, -430, -430, 361, -430, 255, -430,
362, -430, 441, 170, -430, -430, 365, -430, -430, -430,
69, -430, 255, 73, -430, 255, 366, -430, -430, 369,
74, -430, -430, -430, -430, 789, 983, 1133, 221, 140,
-430, 145, -430, 167, -430, 288, 375, 435, 189, -430,
-430, 827, 864, 75, -430, 376, 378, 4, -430, 380,
383, 386, 389, 391, 393, 396, 397, -430, -430, -430,
-430, -430, -430, -430, -430, -430, -430, -430, -430, -430,
-430, 255, -430, -430, 398, 329, -430, 59, -430, 329,
399, -430, 329, 400, 255, -430, 329, 329, -430, -430,
-430, -430, -430, 329, -430, 406, 407, 409, 414, 418,
420, 329, 425, 426, -430, -430, 427, 429, 434, 437,
438, 329, 439, 440, 443, 446, 447, -430, -430, -430,
-430, -430, -430, 329, 329, 329, 329, -430, -430, -430,
-430, -430, -430, 123, -430, -430, 185, -430, -430, -430,
-430, -430, -430, 255, 255, 255, 255, 255, 255, 255,
255, 76, 329, 448, 449, 450, -430, 255, 255, 255,
255, -430, 451, -430, 453, 454, 185, -430, 329, 255,
185, 255, 456, 329, 329, 185, 329, 255, 185, 255,
457, 329, 329, -430, -430, -430, -430, -430, -430, -430,
-430, 458, -430, 459, 255, -430, 461, 255, -430, 7,
462, 463, 469, 44, 255, 471, 80, 472, 385, 255,
255, 255, 255, 255, 255, 476, 385, 385, 477, 478,
255, -430, 479, 32, 480, -430, 86, 385, 483, 485,
488, 490, 43, 491, 185, 92, 385, 492, 493, 53,
-430, 494, 255, 497, 255, 499, 500, 501, 506, 255,
508, -430, 255, -430, 255, -430, 255, -430, -430, -430,
-430, 47, 52, 255, 512, 513, 514, 55, 97, 255,
255, 255, 255, -430, 515, 516, -430, -430, -430, -430,
-430, -430, -430, 518, -430, -430, -430, -430, -430, -430,
-430, -430, 519, -430, -430, 522, -430, -430, -430, -430,
-430, -430, -430, 263, 255, 255, 255, 255, 255, -430,
523, -430, 524, 255, 255, -430, -430, -430, -430, 525,
526, 255, 255, -430, -430, -430, -430, -430, 223, 157,
-430, 162, -430, 138, -430, 79, 528, 531, 329, 329,
-430, 255, 269, 255, 255, 533, -430, -430, 255, 255,
-430, -430, 536, 537, 61, -430, -430, 329, 532, -430,
329, 540, -430, 329, -430, -430, 329, 541, 255, 255,
542, 543, 255, -430, 255, 255, -430, 544, 255, -430,
-430, -430, -430, 546, -430, 547, -430, 548, 255, 255,
83, 255, 100, 255, -430, -430, -430, 255, 255, 550,
552, 385, 54, 385, 56, 385, 255, 255, 82, -430,
255, 88, -430, 255, 255, 255, 255, 255, -430, 554,
555, -430, 556, -430, 560, 255, 255, 329, 564, -430,
329, 565, 255, 77, 255, 568, 255, 255, 255, -430,
-430, -430, -430, 569, 571, 255, 255, 255, 255, -430,
566, 91, 573, -430, 255, -430, 255, -430, 255, -430,
-430, 255, 255, 255, 255, 255, 329, 580, 255, -430,
255, 255, 255, 255, 255, 255, 255, 255, 255, 255,
-430, 255, 584, 587, 255, 255, 255, 255, 255, 255,
255, -430, -430, 588, 589, 593, 58, 63, 66, 255,
-430, -430, -430, -430, 595, -430, 599, -430, 600, 255,
-430, -430, -430, 255, -430
};
/* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
Performed when YYTABLE does not specify something else to do. Zero
means the default is an error. */
static const yytype_int16 yydefact[] =
{
0, 278, 278, 278, 278, 0, 2, 6, 3, 83,
4, 31, 5, 164, 1, 264, 265, 266, 278, 278,
0, 278, 278, 278, 278, 278, 278, 278, 278, 278,
278, 278, 278, 278, 278, 278, 278, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 0, 0, 0,
278, 0, 0, 108, 0, 0, 0, 278, 0, 0,
278, 0, 106, 0, 102, 97, 98, 99, 100, 278,
33, 0, 0, 0, 0, 0, 278, 0, 0, 0,
170, 245, 259, 263, 262, 0, 278, 0, 77, 79,
81, 155, 0, 258, 257, 159, 157, 151, 153, 145,
220, 0, 147, 149, 40, 278, 0, 0, 0, 0,
0, 0, 0, 278, 278, 0, 0, 0, 0, 0,
0, 278, 0, 0, 276, 277, 0, 278, 0, 0,
0, 278, 278, 278, 0, 278, 0, 261, 260, 278,
0, 0, 0, 0, 34, 0, 0, 0, 0, 0,
0, 278, 0, 0, 0, 0, 0, 271, 272, 0,
0, 0, 0, 0, 0, 278, 0, 0, 0, 256,
0, 0, 0, 0, 278, 0, 278, 278, 249, 0,
0, 209, 165, 0, 202, 254, 0, 0, 0, 0,
0, 0, 201, 0, 200, 253, 0, 278, 269, 0,
268, 267, 27, 0, 278, 278, 278, 278, 278, 278,
278, 278, 278, 278, 278, 29, 278, 278, 278, 278,
85, 0, 278, 103, 91, 90, 89, 88, 0, 110,
94, 93, 101, 273, 274, 275, 0, 92, 0, 142,
0, 96, 0, 0, 250, 140, 0, 173, 278, 169,
0, 171, 0, 0, 172, 0, 0, 168, 167, 0,
0, 247, 28, 270, 38, 0, 0, 0, 0, 0,
36, 0, 189, 0, 175, 0, 0, 0, 0, 224,
278, 0, 0, 0, 42, 0, 0, 0, 104, 0,
0, 0, 0, 0, 0, 0, 0, 109, 111, 112,
113, 114, 115, 116, 117, 118, 119, 120, 121, 122,
84, 0, 95, 107, 0, 278, 32, 0, 161, 0,
0, 203, 0, 0, 0, 174, 278, 278, 246, 78,
80, 82, 156, 278, 35, 0, 0, 0, 0, 0,
0, 278, 0, 0, 160, 193, 0, 0, 0, 0,
0, 278, 0, 0, 0, 0, 0, 158, 186, 179,
152, 154, 146, 278, 278, 278, 278, 221, 225, 226,
227, 228, 229, 0, 148, 150, 44, 41, 43, 39,
86, 87, 105, 278, 278, 0, 0, 0, 0, 0,
0, 0, 278, 0, 0, 0, 166, 0, 0, 0,
0, 206, 0, 255, 0, 0, 0, 278, 278, 0,
0, 0, 0, 278, 278, 0, 278, 0, 0, 0,
0, 278, 278, 278, 278, 278, 222, 230, 235, 240,
30, 0, 46, 0, 0, 134, 0, 0, 137, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
219, 251, 0, 0, 0, 218, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
214, 0, 212, 0, 213, 0, 0, 0, 0, 0,
0, 133, 0, 136, 0, 125, 0, 126, 127, 128,
132, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 210, 0, 0, 196, 198, 252, 192,
194, 197, 195, 0, 191, 190, 182, 178, 180, 183,
211, 181, 0, 177, 176, 0, 187, 184, 185, 278,
278, 278, 278, 0, 48, 0, 0, 0, 0, 130,
0, 123, 0, 0, 0, 139, 141, 162, 163, 0,
0, 0, 0, 248, 37, 199, 188, 278, 0, 0,
232, 0, 237, 0, 242, 0, 0, 0, 278, 278,
45, 49, 0, 0, 0, 0, 131, 124, 0, 0,
205, 204, 0, 0, 0, 216, 223, 278, 0, 231,
278, 0, 236, 278, 241, 244, 0, 0, 0, 0,
0, 0, 50, 47, 0, 0, 129, 0, 0, 208,
207, 215, 217, 0, 278, 0, 278, 0, 0, 0,
0, 0, 0, 0, 52, 54, 51, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 56,
0, 0, 57, 0, 0, 69, 0, 0, 143, 0,
0, 234, 0, 239, 0, 0, 0, 0, 0, 71,
0, 0, 0, 0, 0, 0, 0, 0, 0, 144,
233, 238, 243, 0, 0, 0, 0, 0, 0, 74,
0, 0, 0, 53, 60, 55, 0, 135, 0, 59,
58, 0, 0, 0, 0, 0, 0, 0, 0, 61,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
70, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 73, 72, 0, 0, 0, 0, 0, 0, 0,
76, 75, 64, 67, 0, 65, 0, 62, 0, 0,
68, 66, 63, 0, 138
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
-430, -430, -430, 160, -430, -430, -430, -430, -106, -430,
-430, -430, -430, -430, -430, -430, -430, -430, -430, -242,
-430, -430, -430, -430, -430, -430, -430, -430, -430, -430,
-430, -430, 193, -430, -430, -9, -430, -430, -430, 341,
-430, -430, -430, -430, -430, -430, -430, -430, -430, -430,
-430, -430, -430, -430, -430, -430, -430, -430, -430, -430,
-430, -430, -430, -430, -430, -430, -430, -430, -430, -430,
-430, -430, -279, -430, -430, 137, -430, -430, -430, -200,
-184, -177, -296, -291, -297, -154, -430, -430, -430, -430,
-430, -430, -430, -285, -430, -430, -430, -76, -50, -430,
-430, -430, -430, -430, -430, -430, -430, -430, -430, -430,
408, -429, -430, -430, 213, -430, 252, 11, -96, -430,
-6, 359, -430, 3, -169, -14, 752
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
-1, 5, 6, 74, 38, 39, 40, 290, 10, 41,
218, 279, 42, 43, 164, 293, 388, 441, 500, 553,
664, 665, 683, 685, 640, 642, 44, 150, 45, 151,
46, 152, 8, 232, 297, 75, 130, 76, 121, 238,
308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
318, 443, 319, 446, 77, 253, 78, 183, 47, 159,
48, 162, 49, 163, 50, 157, 51, 158, 52, 153,
53, 156, 54, 155, 327, 12, 258, 283, 281, 203,
201, 193, 196, 198, 190, 90, 483, 491, 493, 489,
604, 474, 469, 55, 160, 379, 495, 288, 380, 496,
579, 381, 497, 581, 382, 498, 583, 56, 144, 270,
187, 470, 204, 194, 412, 178, 195, 91, 146, 92,
103, 209, 210, 528, 246, 191, 104
};
/* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule whose
number is the opposite. If YYTABLE_NINF, syntax error. */
static const yytype_int16 yytable[] =
{
57, 80, 57, 378, 368, 492, 494, 15, 16, 17,
167, 168, 93, 93, 14, 93, 93, 93, 93, 93,
256, 93, 93, 93, 93, 93, 93, 177, 93, 93,
95, 266, 97, 98, 99, 100, 101, 96, 105, 106,
107, 108, 109, 110, 263, 112, 113, 167, 168, 260,
167, 168, 260, 213, 93, 167, 168, 167, 168, 167,
168, 167, 168, 260, 93, 225, 167, 168, 136, 167,
168, 118, 15, 16, 17, 260, 15, 16, 17, 167,
168, 128, 15, 16, 17, 15, 16, 17, 700, 545,
147, 15, 16, 17, 15, 16, 17, 391, 115, 701,
505, 404, 116, 658, 27, 172, 174, 263, 176, 93,
166, 405, 181, 263, 117, 185, 264, 147, 263, 468,
169, 661, 261, 473, 182, 530, 165, 355, 480, 369,
476, 482, 337, 295, 134, 135, 538, 510, 485, 208,
559, 197, 199, 147, 702, 561, 546, 671, 567, 673,
212, 753, 406, 345, 631, 147, 755, 386, 455, 757,
119, 329, 514, 517, 233, 332, 37, 338, 387, 518,
703, 616, 231, 254, 677, 356, 659, 346, 208, 532,
680, 79, 269, 716, 383, 541, 347, 348, 134, 135,
568, 349, 254, 662, 72, 374, 613, 350, 343, 79,
262, 373, 265, 351, 273, 652, 120, 654, 357, 358,
27, 122, 72, 359, 352, 607, 440, 123, 353, 360,
610, 324, 608, 147, 479, 361, 124, 611, 325, 81,
89, 614, 488, 344, 296, 373, 362, 82, 354, 478,
363, 472, 126, 364, 127, 365, 374, 487, 366, 481,
609, 321, 89, 32, 330, 612, 129, 333, 167, 168,
367, 131, 83, 84, 133, 331, 137, 138, 334, 57,
57, 57, 139, 85, 141, 375, 376, 230, 102, 86,
374, 234, 377, 142, 143, 111, 585, 32, 114, 516,
87, 392, 585, 378, 88, 145, 81, 524, 525, 1,
2, 3, 4, 235, 82, 586, 89, 149, 533, 375,
376, 586, 154, 592, 342, 587, 606, 542, 161, 125,
170, 587, 175, 407, 401, 632, 409, 180, 184, 83,
84, 132, 15, 16, 17, 186, 189, 411, 140, 192,
85, 200, 588, 589, 236, 207, 86, 237, 588, 589,
134, 135, 171, 214, 278, 240, 590, 87, 285, 286,
287, 88, 623, 291, 292, 215, 216, 93, 93, 93,
93, 217, 442, 89, 80, 219, 179, 134, 135, 173,
241, 370, 220, 81, 436, 437, 438, 439, 243, 244,
245, 82, 221, 202, 205, 222, 444, 447, 449, 450,
451, 452, 453, 454, 456, 223, 475, 275, 276, 277,
461, 462, 463, 464, 484, 224, 83, 84, 226, 299,
300, 242, 197, 227, 199, 228, 229, 85, 247, 248,
197, 249, 199, 86, 301, 302, 303, 304, 251, 257,
305, 259, 267, 81, 87, 268, 272, 502, 88, 274,
504, 82, 506, 306, 320, 322, 511, 512, 326, 335,
89, 336, 197, 199, 519, 520, 521, 522, 371, 389,
540, 390, 393, 578, 307, 394, 83, 84, 395, 299,
300, 396, 670, 397, 672, 398, 674, 85, 399, 400,
402, 408, 410, 86, 301, 302, 303, 304, 416, 417,
305, 418, 554, 81, 87, 556, 419, 557, 88, 558,
420, 82, 421, 306, 560, 562, 563, 423, 424, 425,
89, 426, 569, 570, 571, 572, 427, 252, 372, 428,
429, 431, 432, 615, 323, 433, 83, 84, 434, 435,
458, 459, 460, 250, 465, 466, 467, 85, 477, 486,
499, 206, 501, 86, 503, 507, 508, 591, 554, 593,
594, 595, 509, 513, 87, 515, 598, 599, 88, 523,
526, 527, 529, 531, 602, 603, 534, 403, 535, 617,
89, 536, 93, 537, 539, 543, 544, 547, 413, 414,
548, 549, 550, 551, 622, 415, 624, 625, 552, 620,
555, 627, 628, 422, 564, 0, 565, 566, 573, 574,
638, 575, 576, 430, 577, 457, 596, 597, 600, 601,
618, 641, 643, 619, 634, 646, 626, 647, 648, 629,
630, 650, 636, 639, 644, 645, 0, 649, 651, 653,
655, 656, 657, 668, 660, 669, 663, 689, 690, 691,
666, 667, 678, 692, 413, 681, 696, 698, 715, 675,
676, 705, 709, 679, 710, 718, 682, 684, 686, 687,
688, 695, 728, 0, 697, 202, 205, 741, 693, 694,
742, 750, 751, 202, 205, 699, 752, 704, 760, 706,
707, 708, 761, 762, 0, 717, 0, 0, 711, 712,
713, 714, 0, 0, 0, 0, 0, 719, 0, 720,
727, 721, 0, 0, 722, 723, 724, 725, 726, 0,
0, 729, 0, 730, 731, 732, 733, 734, 735, 736,
737, 738, 739, 0, 740, 0, 0, 743, 744, 745,
746, 747, 748, 749, 0, 0, 0, 0, 0, 754,
756, 758, 759, 7, 9, 11, 13, 0, 0, 0,
0, 0, 763, 0, 0, 0, 764, 0, 0, 0,
94, 94, 0, 94, 94, 94, 94, 94, 0, 94,
94, 94, 94, 94, 94, 0, 94, 94, 0, 0,
0, 0, 15, 16, 17, 18, 0, 0, 58, 59,
0, 0, 0, 60, 19, 0, 20, 0, 61, 0,
0, 0, 94, 62, 0, 0, 0, 21, 22, 63,
23, 0, 94, 24, 25, 0, 26, 0, 0, 64,
0, 0, 27, 28, 65, 81, 0, 29, 30, 31,
66, 621, 0, 82, 0, 0, 0, 67, 148, 0,
0, 68, 69, 32, 0, 70, 0, 71, 33, 633,
72, 0, 635, 34, 35, 637, 0, 94, 83, 84,
0, 0, 81, 36, 73, 148, 0, 0, 0, 85,
82, 0, 339, 188, 0, 86, 0, 0, 0, 0,
0, 0, 0, 0, 0, 188, 87, 211, 0, 0,
88, 148, 0, 0, 0, 83, 84, 0, 0, 0,
0, 0, 89, 148, 0, 0, 85, 0, 0, 0,
384, 0, 86, 0, 0, 0, 0, 239, 0, 0,
0, 0, 0, 87, 0, 0, 211, 88, 239, 255,
0, 0, 0, 0, 0, 0, 0, 0, 0, 89,
0, 0, 0, 0, 0, 0, 0, 385, 0, 271,
0, 0, 0, 0, 0, 0, 9, 9, 9, 13,
280, 282, 284, 13, 13, 13, 289, 0, 13, 13,
294, 148, 0, 0, 298, 0, 15, 16, 17, 18,
0, 0, 58, 59, 0, 0, 0, 60, 19, 0,
20, 0, 61, 0, 0, 0, 0, 62, 0, 0,
328, 21, 22, 63, 23, 0, 0, 24, 25, 0,
26, 0, 0, 64, 0, 0, 27, 28, 65, 0,
0, 29, 30, 31, 66, 0, 0, 0, 0, 0,
0, 67, 11, 0, 0, 68, 69, 32, 0, 70,
0, 71, 33, 0, 72, 0, 0, 34, 35, 0,
0, 0, 0, 15, 16, 17, 18, 36, 73, 0,
0, 0, 0, 0, 0, 19, 340, 20, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 21, 22,
0, 23, 0, 0, 24, 25, 0, 26, 0, 0,
0, 0, 0, 27, 28, 0, 0, 0, 29, 30,
31, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 32, 94, 94, 94, 94, 33,
0, 0, 0, 0, 34, 35, 15, 16, 17, 18,
0, 0, 58, 59, 36, 445, 448, 60, 19, 0,
20, 0, 61, 0, 0, 0, 0, 62, 0, 0,
0, 21, 22, 63, 23, 0, 0, 24, 25, 471,
26, 0, 0, 64, 0, 0, 27, 28, 65, 0,
0, 29, 30, 31, 66, 490, 471, 471, 0, 0,
0, 67, 0, 0, 0, 68, 69, 32, 0, 70,
0, 71, 33, 0, 72, 0, 0, 34, 35, 15,
16, 17, 18, 0, 0, 58, 59, 36, 73, 0,
60, 19, 0, 20, 0, 61, 341, 0, 0, 0,
62, 0, 0, 0, 21, 22, 63, 23, 0, 0,
24, 25, 0, 26, 0, 0, 64, 0, 0, 27,
28, 65, 0, 0, 29, 30, 31, 66, 0, 0,
0, 0, 0, 0, 67, 0, 0, 0, 68, 69,
32, 0, 70, 0, 71, 33, 0, 72, 0, 0,
34, 35, 0, 0, 0, 0, 0, 0, 0, 0,
36, 73, 0, 0, 0, 0, 0, 0, 0, 0,
0, 289, 580, 582, 584, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 605,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
94, 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, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 471, 0, 471
};
static const yytype_int16 yycheck[] =
{
6, 10, 8, 288, 283, 434, 435, 3, 4, 5,
3, 4, 18, 19, 0, 21, 22, 23, 24, 25,
189, 27, 28, 29, 30, 31, 32, 123, 34, 35,
19, 200, 21, 22, 23, 24, 25, 92, 27, 28,
29, 30, 31, 32, 21, 34, 35, 3, 4, 20,
3, 4, 20, 149, 60, 3, 4, 3, 4, 3,
4, 3, 4, 20, 70, 161, 3, 4, 82, 3,
4, 60, 3, 4, 5, 20, 3, 4, 5, 3,
4, 70, 3, 4, 5, 3, 4, 5, 11, 36,
96, 3, 4, 5, 3, 4, 5, 93, 28, 22,
93, 42, 92, 20, 43, 119, 120, 21, 122, 115,
116, 52, 126, 21, 92, 129, 93, 123, 21, 416,
117, 21, 93, 419, 25, 93, 115, 281, 425, 283,
421, 427, 58, 229, 3, 4, 93, 93, 429, 145,
93, 138, 139, 149, 67, 93, 93, 93, 93, 93,
93, 93, 93, 8, 93, 161, 93, 82, 82, 93,
92, 92, 82, 459, 170, 92, 6, 93, 93, 460,
93, 92, 169, 187, 92, 8, 93, 32, 184, 93,
92, 58, 51, 92, 290, 93, 41, 42, 3, 4,
93, 46, 206, 93, 71, 57, 58, 52, 58, 58,
197, 12, 199, 58, 210, 634, 92, 636, 41, 42,
43, 92, 71, 46, 69, 58, 93, 92, 73, 52,
58, 51, 65, 229, 424, 58, 92, 65, 58, 8,
85, 93, 432, 93, 231, 12, 69, 16, 93, 423,
73, 418, 92, 76, 92, 78, 57, 431, 81, 426,
93, 248, 85, 64, 260, 93, 92, 263, 3, 4,
93, 92, 41, 42, 92, 262, 92, 92, 265, 275,
276, 277, 92, 52, 92, 86, 87, 93, 26, 58,
57, 93, 93, 92, 92, 33, 23, 64, 36, 458,
69, 297, 23, 578, 73, 92, 8, 466, 467, 88,
89, 90, 91, 93, 16, 42, 85, 92, 477, 86,
87, 42, 92, 555, 93, 52, 93, 486, 92, 67,
92, 52, 92, 329, 321, 604, 332, 92, 92, 41,
42, 79, 3, 4, 5, 92, 92, 334, 86, 92,
52, 92, 79, 80, 93, 92, 58, 93, 79, 80,
3, 4, 5, 92, 217, 93, 93, 69, 221, 222,
223, 73, 93, 226, 227, 92, 92, 373, 374, 375,
376, 92, 386, 85, 383, 92, 124, 3, 4, 5,
93, 93, 92, 8, 373, 374, 375, 376, 3, 4,
5, 16, 92, 141, 142, 92, 393, 394, 395, 396,
397, 398, 399, 400, 401, 92, 420, 214, 215, 216,
407, 408, 409, 410, 428, 92, 41, 42, 92, 38,
39, 93, 419, 92, 421, 92, 92, 52, 93, 92,
427, 93, 429, 58, 53, 54, 55, 56, 93, 93,
59, 93, 93, 8, 69, 93, 93, 444, 73, 93,
447, 16, 449, 72, 93, 93, 453, 454, 93, 93,
85, 92, 459, 460, 461, 462, 463, 464, 93, 93,
484, 93, 92, 549, 93, 92, 41, 42, 92, 38,
39, 92, 651, 92, 653, 92, 655, 52, 92, 92,
92, 92, 92, 58, 53, 54, 55, 56, 92, 92,
59, 92, 499, 8, 69, 502, 92, 504, 73, 506,
92, 16, 92, 72, 511, 512, 513, 92, 92, 92,
85, 92, 519, 520, 521, 522, 92, 186, 93, 92,
92, 92, 92, 583, 93, 92, 41, 42, 92, 92,
92, 92, 92, 184, 93, 92, 92, 52, 92, 92,
92, 143, 93, 58, 93, 93, 93, 554, 555, 556,
557, 558, 93, 92, 69, 93, 563, 564, 73, 93,
93, 93, 93, 93, 571, 572, 93, 325, 93, 585,
85, 93, 588, 93, 93, 93, 93, 93, 336, 337,
93, 92, 92, 92, 591, 343, 593, 594, 92, 588,
92, 598, 599, 351, 92, -1, 93, 93, 93, 93,
616, 93, 93, 361, 92, 402, 93, 93, 93, 93,
92, 618, 619, 92, 92, 622, 93, 624, 625, 93,
93, 628, 92, 92, 92, 92, -1, 93, 92, 92,
92, 638, 639, 93, 641, 93, 643, 93, 93, 93,
647, 648, 658, 93, 402, 661, 92, 92, 92, 656,
657, 93, 93, 660, 93, 92, 663, 664, 665, 666,
667, 677, 92, -1, 680, 423, 424, 93, 675, 676,
93, 93, 93, 431, 432, 682, 93, 684, 93, 686,
687, 688, 93, 93, -1, 701, -1, -1, 695, 696,
697, 698, -1, -1, -1, -1, -1, 704, -1, 706,
716, 708, -1, -1, 711, 712, 713, 714, 715, -1,
-1, 718, -1, 720, 721, 722, 723, 724, 725, 726,
727, 728, 729, -1, 731, -1, -1, 734, 735, 736,
737, 738, 739, 740, -1, -1, -1, -1, -1, 746,
747, 748, 749, 1, 2, 3, 4, -1, -1, -1,
-1, -1, 759, -1, -1, -1, 763, -1, -1, -1,
18, 19, -1, 21, 22, 23, 24, 25, -1, 27,
28, 29, 30, 31, 32, -1, 34, 35, -1, -1,
-1, -1, 3, 4, 5, 6, -1, -1, 9, 10,
-1, -1, -1, 14, 15, -1, 17, -1, 19, -1,
-1, -1, 60, 24, -1, -1, -1, 28, 29, 30,
31, -1, 70, 34, 35, -1, 37, -1, -1, 40,
-1, -1, 43, 44, 45, 8, -1, 48, 49, 50,
51, 589, -1, 16, -1, -1, -1, 58, 96, -1,
-1, 62, 63, 64, -1, 66, -1, 68, 69, 607,
71, -1, 610, 74, 75, 613, -1, 115, 41, 42,
-1, -1, 8, 84, 85, 123, -1, -1, -1, 52,
16, -1, 93, 131, -1, 58, -1, -1, -1, -1,
-1, -1, -1, -1, -1, 143, 69, 145, -1, -1,
73, 149, -1, -1, -1, 41, 42, -1, -1, -1,
-1, -1, 85, 161, -1, -1, 52, -1, -1, -1,
93, -1, 58, -1, -1, -1, -1, 175, -1, -1,
-1, -1, -1, 69, -1, -1, 184, 73, 186, 187,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 85,
-1, -1, -1, -1, -1, -1, -1, 93, -1, 207,
-1, -1, -1, -1, -1, -1, 214, 215, 216, 217,
218, 219, 220, 221, 222, 223, 224, -1, 226, 227,
228, 229, -1, -1, 232, -1, 3, 4, 5, 6,
-1, -1, 9, 10, -1, -1, -1, 14, 15, -1,
17, -1, 19, -1, -1, -1, -1, 24, -1, -1,
258, 28, 29, 30, 31, -1, -1, 34, 35, -1,
37, -1, -1, 40, -1, -1, 43, 44, 45, -1,
-1, 48, 49, 50, 51, -1, -1, -1, -1, -1,
-1, 58, 290, -1, -1, 62, 63, 64, -1, 66,
-1, 68, 69, -1, 71, -1, -1, 74, 75, -1,
-1, -1, -1, 3, 4, 5, 6, 84, 85, -1,
-1, -1, -1, -1, -1, 15, 93, 17, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 28, 29,
-1, 31, -1, -1, 34, 35, -1, 37, -1, -1,
-1, -1, -1, 43, 44, -1, -1, -1, 48, 49,
50, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, 64, 373, 374, 375, 376, 69,
-1, -1, -1, -1, 74, 75, 3, 4, 5, 6,
-1, -1, 9, 10, 84, 393, 394, 14, 15, -1,
17, -1, 19, -1, -1, -1, -1, 24, -1, -1,
-1, 28, 29, 30, 31, -1, -1, 34, 35, 417,
37, -1, -1, 40, -1, -1, 43, 44, 45, -1,
-1, 48, 49, 50, 51, 433, 434, 435, -1, -1,
-1, 58, -1, -1, -1, 62, 63, 64, -1, 66,
-1, 68, 69, -1, 71, -1, -1, 74, 75, 3,
4, 5, 6, -1, -1, 9, 10, 84, 85, -1,
14, 15, -1, 17, -1, 19, 93, -1, -1, -1,
24, -1, -1, -1, 28, 29, 30, 31, -1, -1,
34, 35, -1, 37, -1, -1, 40, -1, -1, 43,
44, 45, -1, -1, 48, 49, 50, 51, -1, -1,
-1, -1, -1, -1, 58, -1, -1, -1, 62, 63,
64, -1, 66, -1, 68, 69, -1, 71, -1, -1,
74, 75, -1, -1, -1, -1, -1, -1, -1, -1,
84, 85, -1, -1, -1, -1, -1, -1, -1, -1,
-1, 549, 550, 551, 552, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, 577,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
588, -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, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, 634, -1, 636
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
0, 88, 89, 90, 91, 95, 96, 220, 126, 220,
102, 220, 169, 220, 0, 3, 4, 5, 6, 15,
17, 28, 29, 31, 34, 35, 37, 43, 44, 48,
49, 50, 64, 69, 74, 75, 84, 97, 98, 99,
100, 103, 106, 107, 120, 122, 124, 152, 154, 156,
158, 160, 162, 164, 166, 187, 201, 214, 9, 10,
14, 19, 24, 30, 40, 45, 51, 58, 62, 63,
66, 68, 71, 85, 97, 129, 131, 148, 150, 58,
129, 8, 16, 41, 42, 52, 58, 69, 73, 85,
179, 211, 213, 214, 220, 211, 92, 211, 211, 211,
211, 211, 210, 214, 220, 211, 211, 211, 211, 211,
211, 210, 211, 211, 210, 28, 92, 92, 211, 92,
92, 132, 92, 92, 92, 210, 92, 92, 211, 92,
130, 92, 210, 92, 3, 4, 219, 92, 92, 92,
210, 92, 92, 92, 202, 92, 212, 214, 220, 92,
121, 123, 125, 163, 92, 167, 165, 159, 161, 153,
188, 92, 155, 157, 108, 211, 214, 3, 4, 217,
92, 5, 219, 5, 219, 92, 219, 212, 209, 210,
92, 219, 25, 151, 92, 219, 92, 204, 220, 92,
178, 219, 92, 175, 207, 210, 176, 217, 177, 217,
92, 174, 210, 173, 206, 210, 204, 92, 214, 215,
216, 220, 93, 212, 92, 92, 92, 92, 104, 92,
92, 92, 92, 92, 92, 212, 92, 92, 92, 92,
93, 217, 127, 214, 93, 93, 93, 93, 133, 220,
93, 93, 93, 3, 4, 5, 218, 93, 92, 93,
215, 93, 133, 149, 219, 220, 218, 93, 170, 93,
20, 93, 217, 21, 93, 217, 218, 93, 93, 51,
203, 220, 93, 214, 93, 126, 126, 126, 169, 105,
220, 172, 220, 171, 220, 169, 169, 169, 191, 220,
101, 169, 169, 109, 220, 212, 217, 128, 220, 38,
39, 53, 54, 55, 56, 59, 72, 93, 134, 135,
136, 137, 138, 139, 140, 141, 142, 143, 144, 146,
93, 217, 93, 93, 51, 58, 93, 168, 220, 92,
214, 217, 92, 214, 217, 93, 92, 58, 93, 93,
93, 93, 93, 58, 93, 8, 32, 41, 42, 46,
52, 58, 69, 73, 93, 179, 8, 41, 42, 46,
52, 58, 69, 73, 76, 78, 81, 93, 166, 179,
93, 93, 93, 12, 57, 86, 87, 93, 187, 189,
192, 195, 198, 102, 93, 93, 82, 93, 110, 93,
93, 93, 214, 92, 92, 92, 92, 92, 92, 92,
92, 217, 92, 210, 42, 52, 93, 214, 92, 214,
92, 217, 208, 210, 210, 210, 92, 92, 92, 92,
92, 92, 210, 92, 92, 92, 92, 92, 92, 92,
210, 92, 92, 92, 92, 92, 211, 211, 211, 211,
93, 111, 219, 145, 217, 220, 147, 217, 220, 217,
217, 217, 217, 217, 217, 82, 217, 208, 92, 92,
92, 217, 217, 217, 217, 93, 92, 92, 178, 186,
205, 220, 175, 176, 185, 219, 177, 92, 174, 173,
178, 175, 176, 180, 219, 177, 92, 174, 173, 183,
220, 181, 205, 182, 205, 190, 193, 196, 199, 92,
112, 93, 217, 93, 217, 93, 217, 93, 93, 93,
93, 217, 217, 92, 82, 93, 218, 176, 177, 217,
217, 217, 217, 93, 218, 218, 93, 93, 217, 93,
93, 93, 93, 218, 93, 93, 93, 93, 93, 93,
219, 93, 218, 93, 93, 36, 93, 93, 93, 92,
92, 92, 92, 113, 217, 92, 217, 217, 217, 93,
217, 93, 217, 217, 92, 93, 93, 93, 93, 217,
217, 217, 217, 93, 93, 93, 93, 92, 191, 194,
220, 197, 220, 200, 220, 23, 42, 52, 79, 80,
93, 217, 113, 217, 217, 217, 93, 93, 217, 217,
93, 93, 217, 217, 184, 220, 93, 58, 65, 93,
58, 65, 93, 58, 93, 192, 92, 214, 92, 92,
211, 210, 217, 93, 217, 217, 93, 217, 217, 93,
93, 93, 166, 210, 92, 210, 92, 210, 214, 92,
118, 217, 119, 217, 92, 92, 217, 217, 217, 93,
217, 92, 205, 92, 205, 92, 217, 217, 20, 93,
217, 21, 93, 217, 114, 115, 217, 217, 93, 93,
218, 93, 218, 93, 218, 217, 217, 92, 214, 217,
92, 214, 217, 116, 217, 117, 217, 217, 217, 93,
93, 93, 93, 217, 217, 214, 92, 214, 92, 217,
11, 22, 67, 93, 217, 93, 217, 217, 217, 93,
93, 217, 217, 217, 217, 92, 92, 214, 92, 217,
217, 217, 217, 217, 217, 217, 217, 214, 92, 217,
217, 217, 217, 217, 217, 217, 217, 217, 217, 217,
217, 93, 93, 217, 217, 217, 217, 217, 217, 217,
93, 93, 93, 93, 217, 93, 217, 93, 217, 217,
93, 93, 93, 217, 217
};
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
0, 94, 95, 95, 95, 95, 96, 96, 97, 97,
97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
97, 97, 97, 97, 97, 97, 97, 98, 99, 101,
100, 102, 102, 102, 104, 103, 105, 105, 106, 106,
108, 107, 109, 109, 111, 110, 112, 110, 113, 113,
113, 113, 114, 113, 115, 113, 113, 113, 113, 113,
116, 116, 116, 116, 116, 116, 116, 116, 116, 117,
117, 118, 118, 118, 119, 119, 119, 121, 120, 123,
122, 125, 124, 126, 126, 126, 126, 126, 126, 126,
126, 126, 126, 126, 126, 126, 126, 126, 126, 126,
126, 126, 126, 127, 128, 128, 130, 129, 132, 131,
133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
133, 133, 133, 134, 135, 136, 137, 138, 139, 140,
141, 142, 143, 144, 145, 145, 146, 147, 147, 148,
149, 149, 150, 151, 151, 153, 152, 155, 154, 157,
156, 159, 158, 161, 160, 163, 162, 165, 164, 167,
166, 168, 168, 168, 169, 170, 169, 169, 169, 169,
169, 169, 169, 169, 169, 171, 171, 171, 171, 171,
171, 171, 171, 171, 171, 171, 171, 171, 171, 172,
172, 172, 172, 172, 172, 172, 172, 172, 172, 172,
173, 174, 175, 176, 176, 176, 177, 177, 177, 178,
179, 180, 181, 182, 183, 183, 184, 184, 185, 186,
188, 187, 190, 189, 191, 191, 191, 191, 191, 191,
193, 192, 194, 194, 194, 196, 195, 197, 197, 197,
199, 198, 200, 200, 200, 202, 201, 203, 203, 204,
204, 205, 205, 206, 207, 208, 209, 210, 210, 211,
212, 212, 213, 213, 214, 214, 214, 215, 215, 216,
216, 217, 217, 218, 218, 218, 219, 219, 220
};
/* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
static const yytype_int8 yyr2[] =
{
0, 2, 2, 2, 2, 2, 1, 2, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 4, 5, 0,
7, 1, 6, 2, 0, 6, 1, 6, 5, 6,
0, 6, 1, 2, 0, 5, 0, 6, 1, 2,
3, 4, 0, 7, 0, 7, 5, 5, 8, 8,
2, 3, 7, 8, 7, 7, 8, 7, 8, 0,
4, 3, 8, 8, 4, 9, 9, 0, 6, 0,
6, 0, 6, 1, 6, 5, 7, 7, 5, 5,
5, 5, 5, 5, 5, 6, 5, 2, 2, 2,
2, 5, 2, 1, 1, 2, 0, 5, 0, 5,
1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 5, 6, 4, 4, 4, 4, 7,
5, 6, 4, 4, 1, 9, 4, 1, 16, 9,
1, 6, 4, 11, 12, 0, 6, 0, 6, 0,
6, 0, 6, 0, 6, 0, 6, 0, 6, 0,
6, 1, 5, 5, 1, 0, 7, 5, 5, 5,
2, 5, 5, 5, 6, 1, 5, 5, 5, 2,
5, 5, 5, 5, 5, 5, 2, 5, 6, 1,
5, 5, 5, 2, 5, 5, 5, 5, 5, 6,
1, 1, 1, 3, 8, 8, 4, 9, 9, 1,
8, 2, 1, 1, 1, 5, 1, 2, 1, 1,
0, 6, 0, 6, 1, 2, 2, 2, 2, 2,
0, 6, 1, 6, 5, 0, 6, 1, 6, 5,
0, 6, 1, 6, 2, 0, 6, 1, 6, 1,
2, 1, 2, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
2, 1, 1, 1, 1, 1, 1, 1, 0
};
enum { YYENOMEM = -2 };
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
#define YYERROR goto yyerrorlab
#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (&yylloc, state, scanner, YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (0)
/* Backward compatibility with an undocumented macro.
Use YYerror or YYUNDEF. */
#define YYERRCODE YYUNDEF
/* 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). */
#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
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
/* 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)
/* 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 defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
/* Print *YYLOCP on YYO. Private, do not rely on its existence. */
YY_ATTRIBUTE_UNUSED
static int
yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp)
{
int res = 0;
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
if (0 <= yylocp->first_line)
{
res += YYFPRINTF (yyo, "%d", yylocp->first_line);
if (0 <= yylocp->first_column)
res += YYFPRINTF (yyo, ".%d", yylocp->first_column);
}
if (0 <= yylocp->last_line)
{
if (yylocp->first_line < yylocp->last_line)
{
res += YYFPRINTF (yyo, "-%d", yylocp->last_line);
if (0 <= end_col)
res += YYFPRINTF (yyo, ".%d", end_col);
}
else if (0 <= end_col && yylocp->first_column < end_col)
res += YYFPRINTF (yyo, "-%d", end_col);
}
return res;
}
# define YY_LOCATION_PRINT(File, Loc) \
yy_location_print_ (File, &(Loc))
# else
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
# endif /* !defined YY_LOCATION_PRINT */
# define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
do { \
if (yydebug) \
{ \
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
Kind, Value, Location, state, scanner); \
YYFPRINTF (stderr, "\n"); \
} \
} while (0)
/*-----------------------------------.
| Print this symbol's value on YYO. |
`-----------------------------------*/
static void
yy_symbol_value_print (FILE *yyo,
yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, EggParserState &state, yyscan_t scanner)
{
FILE *yyoutput = yyo;
YYUSE (yyoutput);
YYUSE (yylocationp);
YYUSE (state);
YYUSE (scanner);
if (!yyvaluep)
return;
# ifdef YYPRINT
if (yykind < YYNTOKENS)
YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
# endif
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YYUSE (yykind);
YY_IGNORE_MAYBE_UNINITIALIZED_END
}
/*---------------------------.
| Print this symbol on YYO. |
`---------------------------*/
static void
yy_symbol_print (FILE *yyo,
yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, EggParserState &state, yyscan_t scanner)
{
YYFPRINTF (yyo, "%s %s (",
yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
YY_LOCATION_PRINT (yyo, *yylocationp);
YYFPRINTF (yyo, ": ");
yy_symbol_value_print (yyo, yykind, yyvaluep, yylocationp, state, scanner);
YYFPRINTF (yyo, ")");
}
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included). |
`------------------------------------------------------------------*/
static void
yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
{
YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++)
{
int yybot = *yybottom;
YYFPRINTF (stderr, " %d", yybot);
}
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. |
`------------------------------------------------*/
static void
yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp,
int yyrule, EggParserState &state, yyscan_t scanner)
{
int yylno = yyrline[yyrule];
int yynrhs = yyr2[yyrule];
int yyi;
YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr,
YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
&yyvsp[(yyi + 1) - (yynrhs)],
&(yylsp[(yyi + 1) - (yynrhs)]), state, scanner);
YYFPRINTF (stderr, "\n");
}
}
# define YY_REDUCE_PRINT(Rule) \
do { \
if (yydebug) \
yy_reduce_print (yyssp, yyvsp, yylsp, Rule, state, scanner); \
} while (0)
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args) ((void) 0)
# define YY_SYMBOL_PRINT(Title, Kind, 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
YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
static void
yydestruct (const char *yymsg,
yysymbol_kind_t yykind, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, EggParserState &state, yyscan_t scanner)
{
YYUSE (yyvaluep);
YYUSE (yylocationp);
YYUSE (state);
YYUSE (scanner);
if (!yymsg)
yymsg = "Deleting";
YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YYUSE (yykind);
YY_IGNORE_MAYBE_UNINITIALIZED_END
}
/*----------.
| yyparse. |
`----------*/
int
yyparse (EggParserState &state, yyscan_t scanner)
{
/* Lookahead token kind. */
int yychar;
/* The semantic value of the lookahead symbol. */
/* Default value used for initialization, for pacifying older GCCs
or non-GCC compilers. */
YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
/* Location data for the lookahead symbol. */
static YYLTYPE yyloc_default
# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
= { 1, 1, 1, 1 }
# endif
;
YYLTYPE yylloc = yyloc_default;
/* Number of syntax errors so far. */
int yynerrs = 0;
yy_state_fast_t yystate = 0;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus = 0;
/* Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* Their size. */
YYPTRDIFF_T yystacksize = YYINITDEPTH;
/* The state stack: array, bottom, top. */
yy_state_t yyssa[YYINITDEPTH];
yy_state_t *yyss = yyssa;
yy_state_t *yyssp = yyss;
/* The semantic value stack: array, bottom, top. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
YYSTYPE *yyvsp = yyvs;
/* The location stack: array, bottom, top. */
YYLTYPE yylsa[YYINITDEPTH];
YYLTYPE *yyls = yylsa;
YYLTYPE *yylsp = yyls;
int yyn;
/* The return value of yyparse. */
int yyresult;
/* Lookahead symbol kind. */
yysymbol_kind_t yytoken = YYSYMBOL_YYEMPTY;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
YYLTYPE yyloc;
/* The locations where the error started and ended. */
YYLTYPE yyerror_range[3];
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
YYDPRINTF ((stderr, "Starting parse\n"));
yychar = YYEMPTY; /* Cause a token to be read. */
yylsp[0] = yylloc;
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 -- set current state (the top of the stack) to yystate. |
`--------------------------------------------------------------------*/
yysetstate:
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
YY_IGNORE_USELESS_CAST_BEGIN
*yyssp = YY_CAST (yy_state_t, yystate);
YY_IGNORE_USELESS_CAST_END
YY_STACK_PRINT (yyss, yyssp);
if (yyss + yystacksize - 1 <= yyssp)
#if !defined yyoverflow && !defined YYSTACK_RELOCATE
goto yyexhaustedlab;
#else
{
/* Get the current used size of the three stacks, in elements. */
YYPTRDIFF_T yysize = yyssp - yyss + 1;
# if defined 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. */
yy_state_t *yyss1 = yyss;
YYSTYPE *yyvs1 = yyvs;
YYLTYPE *yyls1 = yyls;
/* 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 (YY_("memory exhausted"),
&yyss1, yysize * YYSIZEOF (*yyssp),
&yyvs1, yysize * YYSIZEOF (*yyvsp),
&yyls1, yysize * YYSIZEOF (*yylsp),
&yystacksize);
yyss = yyss1;
yyvs = yyvs1;
yyls = yyls1;
}
# else /* defined YYSTACK_RELOCATE */
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
{
yy_state_t *yyss1 = yyss;
union yyalloc *yyptr =
YY_CAST (union yyalloc *,
YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
if (! yyptr)
goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss_alloc, yyss);
YYSTACK_RELOCATE (yyvs_alloc, yyvs);
YYSTACK_RELOCATE (yyls_alloc, yyls);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
}
# endif
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
yylsp = yyls + yysize - 1;
YY_IGNORE_USELESS_CAST_BEGIN
YYDPRINTF ((stderr, "Stack size increased to %ld\n",
YY_CAST (long, yystacksize)));
YY_IGNORE_USELESS_CAST_END
if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
}
#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
if (yystate == YYFINAL)
YYACCEPT;
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. */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yypact_value_is_default (yyn))
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
/* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token\n"));
yychar = yylex (&yylval, &yylloc, scanner);
}
if (yychar <= YYEOF)
{
yychar = YYEOF;
yytoken = YYSYMBOL_YYEOF;
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
else if (yychar == YYerror)
{
/* The scanner already issued an error message, process directly
to error recovery. But do not keep the error token as
lookahead, it is too special and may lead us to an endless
loop in error recovery. */
yychar = YYUNDEF;
yytoken = YYSYMBOL_YYerror;
yyerror_range[1] = yylloc;
goto yyerrlab1;
}
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 (yytable_value_is_error (yyn))
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
/* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
yystate = yyn;
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
*++yylsp = yylloc;
/* Discard the shifted token. */
yychar = YYEMPTY;
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];
/* Default location. */
YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
yyerror_range[1] = yyloc;
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
case 7: /* egg: egg node */
#line 261 "panda/src/egg/parser.yxx"
{
assert(!state.stack.empty());
DCAST(EggData, state.stack.back())->add_child(DCAST(EggNode, (yyvsp[0]._egg)));
}
#line 2205 "built/tmp/parser.yxx.c"
break;
case 27: /* coordsystem: COORDSYSTEM '{' required_string '}' */
#line 306 "panda/src/egg/parser.yxx"
{
string strval = (yyvsp[-1]._string);
EggCoordinateSystem *cs = new EggCoordinateSystem;
CoordinateSystem f = parse_coordinate_system_string(strval);
if (f == CS_invalid) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown coordinate system " + strval);
} else {
cs->set_value(f);
}
(yyval._egg) = cs;
}
#line 2222 "built/tmp/parser.yxx.c"
break;
case 28: /* comment: COMMENT optional_name '{' repeated_string '}' */
#line 329 "panda/src/egg/parser.yxx"
{
(yyval._egg) = new EggComment((yyvsp[-3]._string), (yyvsp[-1]._string));
}
#line 2230 "built/tmp/parser.yxx.c"
break;
case 29: /* $@1: %empty */
#line 343 "panda/src/egg/parser.yxx"
{
string tref_name = (yyvsp[-2]._string);
Filename filename = (yyvsp[0]._string);
EggTexture *texture = new EggTexture(tref_name, filename);
if (state.textures.find(tref_name) != state.textures.end()) {
eggyywarning(&(yylsp[-2]), scanner, "Duplicate texture name " + tref_name);
}
state.textures[tref_name] = texture;
state.stack.push_back(texture);
}
#line 2247 "built/tmp/parser.yxx.c"
break;
case 30: /* texture: TEXTURE required_name '{' required_string $@1 texture_body '}' */
#line 356 "panda/src/egg/parser.yxx"
{
(yyval._egg) = state.stack.back();
state.stack.pop_back();
}
#line 2256 "built/tmp/parser.yxx.c"
break;
case 32: /* texture_body: texture_body SCALAR required_name '{' real_or_string '}' */
#line 372 "panda/src/egg/parser.yxx"
{
EggTexture *texture = DCAST(EggTexture, state.stack.back());
string name = (yyvsp[-3]._string);
double value = (yyvsp[-1]._number);
string strval = (yyvsp[-1]._string);
if (cmp_nocase_uh(name, "type") == 0) {
EggTexture::TextureType tt = EggTexture::string_texture_type(strval);
if (tt == EggTexture::TT_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown texture texture_type " + strval);
} else {
texture->set_texture_type(tt);
}
} else if (cmp_nocase_uh(name, "format") == 0) {
EggTexture::Format f = EggTexture::string_format(strval);
if (f == EggTexture::F_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown texture format " + strval);
} else {
texture->set_format(f);
}
} else if (cmp_nocase_uh(name, "compression") == 0) {
EggTexture::CompressionMode w = EggTexture::string_compression_mode(strval);
if (w == EggTexture::CM_default) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown texture compression mode " + strval);
} else {
texture->set_compression_mode(w);
}
} else if (cmp_nocase_uh(name, "wrap") == 0) {
EggTexture::WrapMode w = EggTexture::string_wrap_mode(strval);
if (w == EggTexture::WM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown texture wrap mode " + strval);
} else {
texture->set_wrap_mode(w);
}
} else if (cmp_nocase_uh(name, "wrapu") == 0) {
EggTexture::WrapMode w = EggTexture::string_wrap_mode(strval);
if (w == EggTexture::WM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown texture wrap mode " + strval);
} else {
texture->set_wrap_u(w);
}
} else if (cmp_nocase_uh(name, "wrapv") == 0) {
EggTexture::WrapMode w = EggTexture::string_wrap_mode(strval);
if (w == EggTexture::WM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown texture wrap mode " + strval);
} else {
texture->set_wrap_v(w);
}
} else if (cmp_nocase_uh(name, "minfilter") == 0) {
EggTexture::FilterType f = EggTexture::string_filter_type(strval);
if (f == EggTexture::FT_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown texture filter type " + strval);
} else {
texture->set_minfilter(f);
}
} else if (cmp_nocase_uh(name, "magfilter") == 0) {
EggTexture::FilterType f = EggTexture::string_filter_type(strval);
if (f == EggTexture::FT_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown texture filter type " + strval);
} else {
texture->set_magfilter(f);
}
} else if (cmp_nocase_uh(name, "anisotropic_degree") == 0) {
texture->set_anisotropic_degree((int)value);
} else if (cmp_nocase_uh(name, "envtype") == 0) {
EggTexture::EnvType e = EggTexture::string_env_type(strval);
if (e == EggTexture::ET_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown texture env type " + strval);
} else {
texture->set_env_type(e);
}
} else if (cmp_nocase_uh(name, "combine-rgb") == 0) {
EggTexture::CombineMode cm = EggTexture::string_combine_mode(strval);
if (cm == EggTexture::CM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown combine mode " + strval);
} else {
texture->set_combine_mode(EggTexture::CC_rgb, cm);
}
} else if (cmp_nocase_uh(name, "combine-rgb-source0") == 0) {
EggTexture::CombineSource cs = EggTexture::string_combine_source(strval);
if (cs == EggTexture::CS_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown combine source " + strval);
} else {
texture->set_combine_source(EggTexture::CC_rgb, 0, cs);
}
} else if (cmp_nocase_uh(name, "combine-rgb-operand0") == 0) {
EggTexture::CombineOperand co = EggTexture::string_combine_operand(strval);
if (co == EggTexture::CO_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown combine operand " + strval);
} else {
texture->set_combine_operand(EggTexture::CC_rgb, 0, co);
}
} else if (cmp_nocase_uh(name, "combine-rgb-source1") == 0) {
EggTexture::CombineSource cs = EggTexture::string_combine_source(strval);
if (cs == EggTexture::CS_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown combine source " + strval);
} else {
texture->set_combine_source(EggTexture::CC_rgb, 1, cs);
}
} else if (cmp_nocase_uh(name, "combine-rgb-operand1") == 0) {
EggTexture::CombineOperand co = EggTexture::string_combine_operand(strval);
if (co == EggTexture::CO_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown combine operand " + strval);
} else {
texture->set_combine_operand(EggTexture::CC_rgb, 1, co);
}
} else if (cmp_nocase_uh(name, "combine-rgb-source2") == 0) {
EggTexture::CombineSource cs = EggTexture::string_combine_source(strval);
if (cs == EggTexture::CS_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown combine source " + strval);
} else {
texture->set_combine_source(EggTexture::CC_rgb, 2, cs);
}
} else if (cmp_nocase_uh(name, "combine-rgb-operand2") == 0) {
EggTexture::CombineOperand co = EggTexture::string_combine_operand(strval);
if (co == EggTexture::CO_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown combine operand " + strval);
} else {
texture->set_combine_operand(EggTexture::CC_rgb, 2, co);
}
} else if (cmp_nocase_uh(name, "combine-alpha") == 0) {
EggTexture::CombineMode cm = EggTexture::string_combine_mode(strval);
if (cm == EggTexture::CM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown combine mode " + strval);
} else {
texture->set_combine_mode(EggTexture::CC_alpha, cm);
}
} else if (cmp_nocase_uh(name, "combine-alpha-source0") == 0) {
EggTexture::CombineSource cs = EggTexture::string_combine_source(strval);
if (cs == EggTexture::CS_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown combine source " + strval);
} else {
texture->set_combine_source(EggTexture::CC_alpha, 0, cs);
}
} else if (cmp_nocase_uh(name, "combine-alpha-operand0") == 0) {
EggTexture::CombineOperand co = EggTexture::string_combine_operand(strval);
if (co == EggTexture::CO_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown combine operand " + strval);
} else {
texture->set_combine_operand(EggTexture::CC_alpha, 0, co);
}
} else if (cmp_nocase_uh(name, "combine-alpha-source1") == 0) {
EggTexture::CombineSource cs = EggTexture::string_combine_source(strval);
if (cs == EggTexture::CS_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown combine source " + strval);
} else {
texture->set_combine_source(EggTexture::CC_alpha, 1, cs);
}
} else if (cmp_nocase_uh(name, "combine-alpha-operand1") == 0) {
EggTexture::CombineOperand co = EggTexture::string_combine_operand(strval);
if (co == EggTexture::CO_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown combine operand " + strval);
} else {
texture->set_combine_operand(EggTexture::CC_alpha, 1, co);
}
} else if (cmp_nocase_uh(name, "combine-alpha-source2") == 0) {
EggTexture::CombineSource cs = EggTexture::string_combine_source(strval);
if (cs == EggTexture::CS_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown combine source " + strval);
} else {
texture->set_combine_source(EggTexture::CC_alpha, 2, cs);
}
} else if (cmp_nocase_uh(name, "combine-alpha-operand2") == 0) {
EggTexture::CombineOperand co = EggTexture::string_combine_operand(strval);
if (co == EggTexture::CO_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown combine operand " + strval);
} else {
texture->set_combine_operand(EggTexture::CC_alpha, 2, co);
}
} else if (cmp_nocase_uh(name, "saved_result") == 0) {
texture->set_saved_result(((int)value) != 0);
} else if (cmp_nocase_uh(name, "tex_gen") == 0) {
EggTexture::TexGen tex_gen = EggTexture::string_tex_gen(strval);
if (tex_gen == EggTexture::TG_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown tex-gen " + strval);
} else {
texture->set_tex_gen(tex_gen);
}
} else if (cmp_nocase_uh(name, "quality_level") == 0) {
EggTexture::QualityLevel quality_level = EggTexture::string_quality_level(strval);
if (quality_level == EggTexture::QL_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown quality-level " + strval);
} else {
texture->set_quality_level(quality_level);
}
} else if (cmp_nocase_uh(name, "stage_name") == 0) {
texture->set_stage_name(strval);
} else if (cmp_nocase_uh(name, "priority") == 0) {
texture->set_priority((int)value);
} else if (cmp_nocase_uh(name, "multiview") == 0) {
texture->set_multiview(((int)value) != 0);
} else if (cmp_nocase_uh(name, "num_views") == 0) {
int int_value = (int)value;
if (int_value < 1) {
eggyyerror(&(yylsp[-1]), scanner, "Invalid num-views value " + strval);
} else {
texture->set_num_views(int_value);
}
} else if (cmp_nocase_uh(name, "blendr") == 0) {
LColor color = texture->get_color();
color[0] = value;
texture->set_color(color);
} else if (cmp_nocase_uh(name, "blendg") == 0) {
LColor color = texture->get_color();
color[1] = value;
texture->set_color(color);
} else if (cmp_nocase_uh(name, "blendb") == 0) {
LColor color = texture->get_color();
color[2] = value;
texture->set_color(color);
} else if (cmp_nocase_uh(name, "blenda") == 0) {
LColor color = texture->get_color();
color[3] = value;
texture->set_color(color);
} else if (cmp_nocase_uh(name, "borderr") == 0) {
LColor border_color = texture->get_border_color();
border_color[0] = value;
texture->set_border_color(border_color);
} else if (cmp_nocase_uh(name, "borderg") == 0) {
LColor border_color = texture->get_border_color();
border_color[1] = value;
texture->set_border_color(border_color);
} else if (cmp_nocase_uh(name, "borderb") == 0) {
LColor border_color = texture->get_border_color();
border_color[2] = value;
texture->set_border_color(border_color);
} else if (cmp_nocase_uh(name, "bordera") == 0) {
LColor border_color = texture->get_border_color();
border_color[3] = value;
texture->set_border_color(border_color);
} else if (cmp_nocase_uh(name, "uv_name") == 0) {
texture->set_uv_name(strval);
} else if (cmp_nocase_uh(name, "rgb_scale") == 0) {
int int_value = (int)value;
if (int_value != 1 && int_value != 2 && int_value != 4) {
eggyyerror(&(yylsp[-1]), scanner, "Invalid rgb-scale value " + strval);
} else {
texture->set_rgb_scale(int_value);
}
} else if (cmp_nocase_uh(name, "alpha_scale") == 0) {
int int_value = (int)value;
if (int_value != 1 && int_value != 2 && int_value != 4) {
eggyyerror(&(yylsp[-1]), scanner, "Invalid alpha-scale value " + strval);
} else {
texture->set_alpha_scale(int_value);
}
} else if (cmp_nocase_uh(name, "alpha") == 0) {
EggRenderMode::AlphaMode a = EggRenderMode::string_alpha_mode(strval);
if (a == EggRenderMode::AM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown alpha mode " + strval);
} else {
texture->set_alpha_mode(a);
}
} else if (cmp_nocase_uh(name, "depth_write") == 0) {
EggRenderMode::DepthWriteMode m =
EggRenderMode::string_depth_write_mode(strval);
if (m == EggRenderMode::DWM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown depth-write mode " + strval);
} else {
texture->set_depth_write_mode(m);
}
} else if (cmp_nocase_uh(name, "depth_test") == 0) {
EggRenderMode::DepthTestMode m =
EggRenderMode::string_depth_test_mode(strval);
if (m == EggRenderMode::DTM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown depth-test mode " + strval);
} else {
texture->set_depth_test_mode(m);
}
} else if (cmp_nocase_uh(name, "visibility") == 0) {
EggRenderMode::VisibilityMode m =
EggRenderMode::string_visibility_mode(strval);
if (m == EggRenderMode::VM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown visibility mode " + strval);
} else {
texture->set_visibility_mode(m);
}
} else if (cmp_nocase_uh(name, "depth_offset") == 0) {
texture->set_depth_offset((int)value);
} else if (cmp_nocase_uh(name, "draw_order") == 0) {
texture->set_draw_order((int)value);
} else if (cmp_nocase_uh(name, "bin") == 0) {
texture->set_bin(strval);
} else if (cmp_nocase_uh(name, "alpha_file") == 0) {
texture->set_alpha_filename(strval);
} else if (cmp_nocase_uh(name, "alpha_file_channel") == 0) {
texture->set_alpha_file_channel((int)value);
} else if (cmp_nocase_uh(name, "read_mipmaps") == 0) {
texture->set_read_mipmaps(((int)value) != 0);
} else if (cmp_nocase_uh(name, "min_lod") == 0) {
texture->set_min_lod(value);
} else if (cmp_nocase_uh(name, "max_lod") == 0) {
texture->set_max_lod(value);
} else if (cmp_nocase_uh(name, "lod_bias") == 0) {
texture->set_lod_bias(value);
} else {
eggyywarning(&(yylsp[-4]), scanner, "Unsupported texture scalar: " + name);
}
}
#line 2615 "built/tmp/parser.yxx.c"
break;
case 34: /* $@2: %empty */
#line 738 "panda/src/egg/parser.yxx"
{
string mref_name = (yyvsp[-1]._string);
EggMaterial *material = new EggMaterial(mref_name);
if (state.materials.find(mref_name) != state.materials.end()) {
eggyywarning(&(yylsp[-1]), scanner, "Duplicate material name " + mref_name);
}
state.materials[mref_name] = material;
state.stack.push_back(material);
}
#line 2631 "built/tmp/parser.yxx.c"
break;
case 35: /* material: MATERIAL required_name '{' $@2 material_body '}' */
#line 750 "panda/src/egg/parser.yxx"
{
(yyval._egg) = state.stack.back();
state.stack.pop_back();
}
#line 2640 "built/tmp/parser.yxx.c"
break;
case 37: /* material_body: material_body SCALAR required_name '{' real_or_string '}' */
#line 766 "panda/src/egg/parser.yxx"
{
EggMaterial *material = DCAST(EggMaterial, state.stack.back());
string name = (yyvsp[-3]._string);
double value = (yyvsp[-1]._number);
if (cmp_nocase_uh(name, "baser") == 0) {
LColor base = material->get_base();
base[0] = value;
material->set_base(base);
} else if (cmp_nocase_uh(name, "baseg") == 0) {
LColor base = material->get_base();
base[1] = value;
material->set_base(base);
} else if (cmp_nocase_uh(name, "baseb") == 0) {
LColor base = material->get_base();
base[2] = value;
material->set_base(base);
} else if (cmp_nocase_uh(name, "basea") == 0) {
LColor base = material->get_base();
base[3] = value;
material->set_base(base);
} else if (cmp_nocase_uh(name, "diffr") == 0) {
LColor diff = material->get_diff();
diff[0] = value;
material->set_diff(diff);
} else if (cmp_nocase_uh(name, "diffg") == 0) {
LColor diff = material->get_diff();
diff[1] = value;
material->set_diff(diff);
} else if (cmp_nocase_uh(name, "diffb") == 0) {
LColor diff = material->get_diff();
diff[2] = value;
material->set_diff(diff);
} else if (cmp_nocase_uh(name, "diffa") == 0) {
LColor diff = material->get_diff();
diff[3] = value;
material->set_diff(diff);
} else if (cmp_nocase_uh(name, "ambr") == 0) {
LColor amb = material->get_amb();
amb[0] = value;
material->set_amb(amb);
} else if (cmp_nocase_uh(name, "ambg") == 0) {
LColor amb = material->get_amb();
amb[1] = value;
material->set_amb(amb);
} else if (cmp_nocase_uh(name, "ambb") == 0) {
LColor amb = material->get_amb();
amb[2] = value;
material->set_amb(amb);
} else if (cmp_nocase_uh(name, "amba") == 0) {
LColor amb = material->get_amb();
amb[3] = value;
material->set_amb(amb);
} else if (cmp_nocase_uh(name, "emitr") == 0) {
LColor emit = material->get_emit();
emit[0] = value;
material->set_emit(emit);
} else if (cmp_nocase_uh(name, "emitg") == 0) {
LColor emit = material->get_emit();
emit[1] = value;
material->set_emit(emit);
} else if (cmp_nocase_uh(name, "emitb") == 0) {
LColor emit = material->get_emit();
emit[2] = value;
material->set_emit(emit);
} else if (cmp_nocase_uh(name, "emita") == 0) {
LColor emit = material->get_emit();
emit[3] = value;
material->set_emit(emit);
} else if (cmp_nocase_uh(name, "specr") == 0) {
LColor spec = material->get_spec();
spec[0] = value;
material->set_spec(spec);
} else if (cmp_nocase_uh(name, "specg") == 0) {
LColor spec = material->get_spec();
spec[1] = value;
material->set_spec(spec);
} else if (cmp_nocase_uh(name, "specb") == 0) {
LColor spec = material->get_spec();
spec[2] = value;
material->set_spec(spec);
} else if (cmp_nocase_uh(name, "speca") == 0) {
LColor spec = material->get_spec();
spec[3] = value;
material->set_spec(spec);
} else if (cmp_nocase_uh(name, "shininess") == 0) {
material->set_shininess(value);
} else if (cmp_nocase_uh(name, "roughness") == 0) {
material->set_roughness(value);
} else if (cmp_nocase_uh(name, "metallic") == 0) {
material->set_metallic(value);
} else if (cmp_nocase_uh(name, "ior") == 0) {
material->set_ior(value);
} else if (cmp_nocase_uh(name, "local") == 0) {
material->set_local(value != 0.0);
} else {
eggyywarning(&(yylsp[-3]), scanner, "Unsupported material scalar: " + name);
}
}
#line 2754 "built/tmp/parser.yxx.c"
break;
case 38: /* external_reference: EXTERNAL_FILE optional_name '{' required_string '}' */
#line 887 "panda/src/egg/parser.yxx"
{
string node_name = (yyvsp[-3]._string);
Filename filename = (yyvsp[-1]._string);
EggExternalReference *ref = new EggExternalReference(node_name, filename);
(yyval._egg) = ref;
}
#line 2765 "built/tmp/parser.yxx.c"
break;
case 39: /* external_reference: string EXTERNAL_FILE optional_name '{' required_string '}' */
#line 894 "panda/src/egg/parser.yxx"
{
if (cmp_nocase_uh((yyvsp[-5]._string), "group") != 0) {
eggyyerror(&(yylsp[-5]), scanner, "keyword 'group' expected");
}
string node_name = (yyvsp[-3]._string);
Filename filename = (yyvsp[-1]._string);
EggExternalReference *ref = new EggExternalReference(node_name, filename);
(yyval._egg) = ref;
}
#line 2779 "built/tmp/parser.yxx.c"
break;
case 40: /* $@3: %empty */
#line 914 "panda/src/egg/parser.yxx"
{
string name = (yyvsp[0]._string);
EggVertexPool *pool = nullptr;
VertexPools::const_iterator vpi = state.vertex_pools.find(name);
if (vpi != state.vertex_pools.end()) {
pool = (*vpi).second;
if (pool->has_defined_vertices()) {
eggyywarning(&(yylsp[0]), scanner, "Duplicate vertex pool name " + name);
pool = new EggVertexPool(name);
// The egg syntax starts counting at 1 by convention.
pool->set_highest_index(0);
state.vertex_pools[name] = pool;
}
} else {
pool = new EggVertexPool(name);
// The egg syntax starts counting at 1 by convention.
pool->set_highest_index(0);
state.vertex_pools[name] = pool;
}
state.stack.push_back(pool);
}
#line 2807 "built/tmp/parser.yxx.c"
break;
case 41: /* vertex_pool: VERTEXPOOL required_name $@3 '{' vertex_pool_body '}' */
#line 938 "panda/src/egg/parser.yxx"
{
(yyval._egg) = state.stack.back();
state.stack.pop_back();
}
#line 2816 "built/tmp/parser.yxx.c"
break;
case 44: /* $@4: %empty */
#line 966 "panda/src/egg/parser.yxx"
{
state.stack.push_back(new EggVertex);
}
#line 2824 "built/tmp/parser.yxx.c"
break;
case 45: /* vertex: VERTEX $@4 '{' vertex_body '}' */
#line 970 "panda/src/egg/parser.yxx"
{
PT(EggVertex) vtx = DCAST(EggVertex, state.stack.back());
state.stack.pop_back();
DCAST(EggVertexPool, state.stack.back())->add_vertex(vtx);
}
#line 2835 "built/tmp/parser.yxx.c"
break;
case 46: /* $@5: %empty */
#line 977 "panda/src/egg/parser.yxx"
{
state.vertex_index = (int)(yyvsp[0]._number);
EggVertexPool *pool = DCAST(EggVertexPool, state.stack.back());
if (state.vertex_index < 0) {
ostringstream errmsg;
errmsg << "Ignoring invalid vertex index " << state.vertex_index
<< " in vertex pool " << pool->get_name() << std::ends;
eggyywarning(&(yylsp[0]), scanner, errmsg.str());
state.vertex_index = -1;
} else if (pool->has_vertex(state.vertex_index)) {
ostringstream errmsg;
errmsg << "Ignoring duplicate vertex index " << state.vertex_index
<< " in vertex pool " << pool->get_name() << std::ends;
eggyywarning(&(yylsp[0]), scanner, errmsg.str());
state.vertex_index = -1;
}
// Even if we didn't like the vertex index number, we still need to
// go ahead and parse the vertex. We just won't save it.
state.stack.push_back(new EggVertex);
}
#line 2864 "built/tmp/parser.yxx.c"
break;
case 47: /* vertex: VERTEX integer $@5 '{' vertex_body '}' */
#line 1002 "panda/src/egg/parser.yxx"
{
PT(EggVertex) vtx = DCAST(EggVertex, state.stack.back());
state.stack.pop_back();
EggVertexPool *pool = DCAST(EggVertexPool, state.stack.back());
if (state.vertex_index != -1) {
pool->add_vertex(vtx, state.vertex_index);
}
}
#line 2878 "built/tmp/parser.yxx.c"
break;
case 48: /* vertex_body: real */
#line 1023 "panda/src/egg/parser.yxx"
{
DCAST(EggVertex, state.stack.back())->set_pos((yyvsp[0]._number));
}
#line 2886 "built/tmp/parser.yxx.c"
break;
case 49: /* vertex_body: real real */
#line 1027 "panda/src/egg/parser.yxx"
{
DCAST(EggVertex, state.stack.back())->set_pos(LPoint2d((yyvsp[-1]._number), (yyvsp[0]._number)));
}
#line 2894 "built/tmp/parser.yxx.c"
break;
case 50: /* vertex_body: real real real */
#line 1031 "panda/src/egg/parser.yxx"
{
DCAST(EggVertex, state.stack.back())->set_pos(LPoint3d((yyvsp[-2]._number), (yyvsp[-1]._number), (yyvsp[0]._number)));
}
#line 2902 "built/tmp/parser.yxx.c"
break;
case 51: /* vertex_body: real real real real */
#line 1035 "panda/src/egg/parser.yxx"
{
DCAST(EggVertex, state.stack.back())->set_pos(LPoint4d((yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number), (yyvsp[0]._number)));
}
#line 2910 "built/tmp/parser.yxx.c"
break;
case 52: /* $@6: %empty */
#line 1039 "panda/src/egg/parser.yxx"
{
EggVertex *vertex = DCAST(EggVertex, state.stack.back());
EggVertexUV *uv = new EggVertexUV((yyvsp[-1]._string), LTexCoordd::zero());
state.stack.push_back(uv);
if (vertex->has_uv((yyvsp[-1]._string))) {
eggyywarning(&(yylsp[-1]), scanner, "Ignoring repeated UV name " + (yyvsp[-1]._string));
} else {
vertex->set_uv_obj(uv);
}
}
#line 2925 "built/tmp/parser.yxx.c"
break;
case 53: /* vertex_body: vertex_body UV optional_name '{' $@6 vertex_uv_body '}' */
#line 1050 "panda/src/egg/parser.yxx"
{
state.stack.pop_back();
}
#line 2933 "built/tmp/parser.yxx.c"
break;
case 54: /* $@7: %empty */
#line 1054 "panda/src/egg/parser.yxx"
{
EggVertex *vertex = DCAST(EggVertex, state.stack.back());
EggVertexAux *aux = new EggVertexAux((yyvsp[-1]._string), LVecBase4d::zero());
state.stack.push_back(aux);
if (vertex->has_aux((yyvsp[-1]._string))) {
eggyywarning(&(yylsp[-1]), scanner, "Ignoring repeated Aux name " + (yyvsp[-1]._string));
} else {
vertex->set_aux_obj(aux);
}
}
#line 2948 "built/tmp/parser.yxx.c"
break;
case 55: /* vertex_body: vertex_body AUX required_name '{' $@7 vertex_aux_body '}' */
#line 1065 "panda/src/egg/parser.yxx"
{
state.stack.pop_back();
}
#line 2956 "built/tmp/parser.yxx.c"
break;
case 58: /* vertex_body: vertex_body DXYZ string '{' real real real '}' */
#line 1071 "panda/src/egg/parser.yxx"
{
bool inserted = DCAST(EggVertex, state.stack.back())->_dxyzs.
insert(EggMorphVertex((yyvsp[-5]._string), LVector3d((yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)))).second;
if (!inserted) {
eggyywarning(&(yylsp[-5]), scanner, "Ignoring repeated morph name " + (yyvsp[-5]._string));
}
}
#line 2968 "built/tmp/parser.yxx.c"
break;
case 59: /* vertex_body: vertex_body DXYZ '{' string real real real '}' */
#line 1079 "panda/src/egg/parser.yxx"
{
bool inserted = DCAST(EggVertex, state.stack.back())->_dxyzs.
insert(EggMorphVertex((yyvsp[-4]._string), LVector3d((yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)))).second;
if (!inserted) {
eggyywarning(&(yylsp[-4]), scanner, "Ignoring repeated morph name " + (yyvsp[-4]._string));
}
}
#line 2980 "built/tmp/parser.yxx.c"
break;
case 60: /* vertex_uv_body: real real */
#line 1098 "panda/src/egg/parser.yxx"
{
DCAST(EggVertexUV, state.stack.back())->set_uv(LTexCoordd((yyvsp[-1]._number), (yyvsp[0]._number)));
}
#line 2988 "built/tmp/parser.yxx.c"
break;
case 61: /* vertex_uv_body: real real real */
#line 1102 "panda/src/egg/parser.yxx"
{
DCAST(EggVertexUV, state.stack.back())->set_uvw(LVecBase3d((yyvsp[-2]._number), (yyvsp[-1]._number), (yyvsp[0]._number)));
}
#line 2996 "built/tmp/parser.yxx.c"
break;
case 62: /* vertex_uv_body: vertex_uv_body TANGENT '{' real real real '}' */
#line 1106 "panda/src/egg/parser.yxx"
{
if (DCAST(EggVertexUV, state.stack.back())->has_tangent()) {
eggyywarning(&(yylsp[-5]), scanner, "Ignoring repeated tangent");
} else {
DCAST(EggVertexUV, state.stack.back())->set_tangent(LNormald((yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)));
}
}
#line 3008 "built/tmp/parser.yxx.c"
break;
case 63: /* vertex_uv_body: vertex_uv_body TANGENT '{' real real real real '}' */
#line 1114 "panda/src/egg/parser.yxx"
{
if (DCAST(EggVertexUV, state.stack.back())->has_tangent()) {
eggyywarning(&(yylsp[-6]), scanner, "Ignoring repeated tangent");
} else {
DCAST(EggVertexUV, state.stack.back())->set_tangent4(LVecBase4d((yyvsp[-4]._number), (yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)));
}
}
#line 3020 "built/tmp/parser.yxx.c"
break;
case 64: /* vertex_uv_body: vertex_uv_body BINORMAL '{' real real real '}' */
#line 1122 "panda/src/egg/parser.yxx"
{
if (DCAST(EggVertexUV, state.stack.back())->has_binormal()) {
eggyywarning(&(yylsp[-5]), scanner, "Ignoring repeated binormal");
} else {
DCAST(EggVertexUV, state.stack.back())->set_binormal(LNormald((yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)));
}
}
#line 3032 "built/tmp/parser.yxx.c"
break;
case 65: /* vertex_uv_body: vertex_uv_body DUV string '{' real real '}' */
#line 1130 "panda/src/egg/parser.yxx"
{
bool inserted = DCAST(EggVertexUV, state.stack.back())->_duvs.
insert(EggMorphTexCoord((yyvsp[-4]._string), LVector3d((yyvsp[-2]._number), (yyvsp[-1]._number), 0.0))).second;
if (!inserted) {
eggyywarning(&(yylsp[-4]), scanner, "Ignoring repeated morph name " + (yyvsp[-4]._string));
}
}
#line 3044 "built/tmp/parser.yxx.c"
break;
case 66: /* vertex_uv_body: vertex_uv_body DUV string '{' real real real '}' */
#line 1138 "panda/src/egg/parser.yxx"
{
bool inserted = DCAST(EggVertexUV, state.stack.back())->_duvs.
insert(EggMorphTexCoord((yyvsp[-5]._string), LVector3d((yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)))).second;
if (!inserted) {
eggyywarning(&(yylsp[-5]), scanner, "Ignoring repeated morph name " + (yyvsp[-5]._string));
}
}
#line 3056 "built/tmp/parser.yxx.c"
break;
case 67: /* vertex_uv_body: vertex_uv_body DUV '{' string real real '}' */
#line 1146 "panda/src/egg/parser.yxx"
{
bool inserted = DCAST(EggVertexUV, state.stack.back())->_duvs.
insert(EggMorphTexCoord((yyvsp[-3]._string), LVector3d((yyvsp[-2]._number), (yyvsp[-1]._number), 0.0))).second;
if (!inserted) {
eggyywarning(&(yylsp[-3]), scanner, "Ignoring repeated morph name " + (yyvsp[-3]._string));
}
}
#line 3068 "built/tmp/parser.yxx.c"
break;
case 68: /* vertex_uv_body: vertex_uv_body DUV '{' string real real real '}' */
#line 1154 "panda/src/egg/parser.yxx"
{
bool inserted = DCAST(EggVertexUV, state.stack.back())->_duvs.
insert(EggMorphTexCoord((yyvsp[-4]._string), LVector3d((yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)))).second;
if (!inserted) {
eggyywarning(&(yylsp[-4]), scanner, "Ignoring repeated morph name " + (yyvsp[-4]._string));
}
}
#line 3080 "built/tmp/parser.yxx.c"
break;
case 70: /* vertex_aux_body: real real real real */
#line 1172 "panda/src/egg/parser.yxx"
{
DCAST(EggVertexAux, state.stack.back())->set_aux(LVecBase4d((yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number), (yyvsp[0]._number)));
}
#line 3088 "built/tmp/parser.yxx.c"
break;
case 71: /* vertex_normal_body: real real real */
#line 1186 "panda/src/egg/parser.yxx"
{
DCAST(EggVertex, state.stack.back())->set_normal(LNormald((yyvsp[-2]._number), (yyvsp[-1]._number), (yyvsp[0]._number)));
}
#line 3096 "built/tmp/parser.yxx.c"
break;
case 72: /* vertex_normal_body: vertex_normal_body DNORMAL string '{' real real real '}' */
#line 1190 "panda/src/egg/parser.yxx"
{
bool inserted = DCAST(EggVertex, state.stack.back())->_dnormals.
insert(EggMorphNormal((yyvsp[-5]._string), LVector3d((yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)))).second;
if (!inserted) {
eggyywarning(&(yylsp[-5]), scanner, "Ignoring repeated morph name " + (yyvsp[-5]._string));
}
}
#line 3108 "built/tmp/parser.yxx.c"
break;
case 73: /* vertex_normal_body: vertex_normal_body DNORMAL '{' string real real real '}' */
#line 1198 "panda/src/egg/parser.yxx"
{
bool inserted = DCAST(EggVertex, state.stack.back())->_dnormals.
insert(EggMorphNormal((yyvsp[-4]._string), LVector3d((yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)))).second;
if (!inserted) {
eggyywarning(&(yylsp[-4]), scanner, "Ignoring repeated morph name " + (yyvsp[-4]._string));
}
}
#line 3120 "built/tmp/parser.yxx.c"
break;
case 74: /* vertex_color_body: real real real real */
#line 1216 "panda/src/egg/parser.yxx"
{
DCAST(EggVertex, state.stack.back())->set_color(LColor((yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number), (yyvsp[0]._number)));
}
#line 3128 "built/tmp/parser.yxx.c"
break;
case 75: /* vertex_color_body: vertex_color_body DRGBA string '{' real real real real '}' */
#line 1220 "panda/src/egg/parser.yxx"
{
bool inserted = DCAST(EggVertex, state.stack.back())->_drgbas.
insert(EggMorphColor((yyvsp[-6]._string), LVector4((yyvsp[-4]._number), (yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)))).second;
if (!inserted) {
eggyywarning(&(yylsp[-6]), scanner, "Ignoring repeated morph name " + (yyvsp[-6]._string));
}
}
#line 3140 "built/tmp/parser.yxx.c"
break;
case 76: /* vertex_color_body: vertex_color_body DRGBA '{' string real real real real '}' */
#line 1228 "panda/src/egg/parser.yxx"
{
bool inserted = DCAST(EggVertex, state.stack.back())->_drgbas.
insert(EggMorphColor((yyvsp[-5]._string), LVector4((yyvsp[-4]._number), (yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)))).second;
if (!inserted) {
eggyywarning(&(yylsp[-5]), scanner, "Ignoring repeated morph name " + (yyvsp[-5]._string));
}
}
#line 3152 "built/tmp/parser.yxx.c"
break;
case 77: /* $@8: %empty */
#line 1246 "panda/src/egg/parser.yxx"
{
EggGroup *group = new EggGroup((yyvsp[0]._string));
state.stack.push_back(group);
}
#line 3161 "built/tmp/parser.yxx.c"
break;
case 78: /* group: GROUP optional_name $@8 '{' group_body '}' */
#line 1251 "panda/src/egg/parser.yxx"
{
EggGroup *group = DCAST(EggGroup, state.stack.back());
(yyval._egg) = group;
state.stack.pop_back();
if (group->has_name()) {
state.groups[group->get_name()] = group;
}
Thread::consider_yield();
}
#line 3175 "built/tmp/parser.yxx.c"
break;
case 79: /* $@9: %empty */
#line 1271 "panda/src/egg/parser.yxx"
{
EggGroup *group = new EggGroup((yyvsp[0]._string));
group->set_group_type(EggGroup::GT_joint);
state.stack.push_back(group);
}
#line 3185 "built/tmp/parser.yxx.c"
break;
case 80: /* joint: JOINT optional_name $@9 '{' group_body '}' */
#line 1277 "panda/src/egg/parser.yxx"
{
(yyval._egg) = state.stack.back();
state.stack.pop_back();
}
#line 3194 "built/tmp/parser.yxx.c"
break;
case 81: /* $@10: %empty */
#line 1292 "panda/src/egg/parser.yxx"
{
EggGroup *group = new EggGroup((yyvsp[0]._string));
group->set_group_type(EggGroup::GT_instance);
state.stack.push_back(group);
}
#line 3204 "built/tmp/parser.yxx.c"
break;
case 82: /* instance: INSTANCE optional_name $@10 '{' group_body '}' */
#line 1298 "panda/src/egg/parser.yxx"
{
EggGroup *group = DCAST(EggGroup, state.stack.back());
(yyval._egg) = group;
state.stack.pop_back();
if (group->has_name()) {
state.groups[group->get_name()] = group;
}
}
#line 3217 "built/tmp/parser.yxx.c"
break;
case 84: /* group_body: group_body SCALAR required_name '{' real_or_string '}' */
#line 1318 "panda/src/egg/parser.yxx"
{
EggGroup *group = DCAST(EggGroup, state.stack.back());
string name = (yyvsp[-3]._string);
double value = (yyvsp[-1]._number);
unsigned long ulong_value = (yyvsp[-1]._ulong);
string strval = (yyvsp[-1]._string);
if (cmp_nocase_uh(name, "fps") == 0) {
group->set_switch_fps(value);
} else if (cmp_nocase_uh(name, "no_fog") == 0) {
group->set_nofog_flag(value != 0);
} else if (cmp_nocase_uh(name, "decal") == 0) {
group->set_decal_flag(value != 0);
} else if (cmp_nocase_uh(name, "direct") == 0) {
group->set_direct_flag(value != 0);
} else if (cmp_nocase_uh(name, "alpha") == 0) {
EggRenderMode::AlphaMode a = EggRenderMode::string_alpha_mode(strval);
if (a == EggRenderMode::AM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown alpha mode " + strval);
} else {
group->set_alpha_mode(a);
}
} else if (cmp_nocase_uh(name, "depth_write") == 0) {
EggRenderMode::DepthWriteMode m =
EggRenderMode::string_depth_write_mode(strval);
if (m == EggRenderMode::DWM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown depth-write mode " + strval);
} else {
group->set_depth_write_mode(m);
}
} else if (cmp_nocase_uh(name, "depth_test") == 0) {
EggRenderMode::DepthTestMode m =
EggRenderMode::string_depth_test_mode(strval);
if (m == EggRenderMode::DTM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown depth-test mode " + strval);
} else {
group->set_depth_test_mode(m);
}
} else if (cmp_nocase_uh(name, "visibility") == 0) {
EggRenderMode::VisibilityMode m =
EggRenderMode::string_visibility_mode(strval);
if (m == EggRenderMode::VM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown visibility mode " + strval);
} else {
group->set_visibility_mode(m);
}
} else if (cmp_nocase_uh(name, "depth_offset") == 0) {
group->set_depth_offset(ulong_value);
} else if (cmp_nocase_uh(name, "draw_order") == 0) {
group->set_draw_order(ulong_value);
} else if (cmp_nocase_uh(name, "bin") == 0) {
group->set_bin(strval);
} else if (cmp_nocase_uh(name, "collide_mask") == 0) {
group->set_collide_mask(group->get_collide_mask() | ulong_value);
} else if (cmp_nocase_uh(name, "from_collide_mask") == 0) {
group->set_from_collide_mask(group->get_from_collide_mask() | ulong_value);
} else if (cmp_nocase_uh(name, "into_collide_mask") == 0) {
group->set_into_collide_mask(group->get_into_collide_mask() | ulong_value);
} else if (cmp_nocase_uh(name, "portal") == 0) {
group->set_portal_flag(value != 0);
} else if (cmp_nocase_uh(name, "occluder") == 0) {
group->set_occluder_flag(value != 0);
} else if (cmp_nocase_uh(name, "polylight") == 0) {
group->set_polylight_flag(value != 0);
} else if (cmp_nocase_uh(name, "indexed") == 0) {
group->set_indexed_flag(value != 0);
} else if (cmp_nocase_uh(name, "scroll_u") == 0) {
group->set_scroll_u(value);
} else if (cmp_nocase_uh(name, "scroll_v") == 0) {
group->set_scroll_v(value);
} else if (cmp_nocase_uh(name, "scroll_w") == 0) {
group->set_scroll_w(value);
} else if (cmp_nocase_uh(name, "scroll_r") == 0) {
group->set_scroll_r(value);
} else if (cmp_nocase_uh(name, "blend") == 0) {
EggGroup::BlendMode blend_mode =
EggGroup::string_blend_mode(strval);
if (blend_mode == EggGroup::BM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown blend mode " + strval);
} else {
group->set_blend_mode(blend_mode);
}
} else if (cmp_nocase_uh(name, "blendop_a") == 0) {
EggGroup::BlendOperand blend_operand =
EggGroup::string_blend_operand(strval);
if (blend_operand == EggGroup::BO_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown blend operand " + strval);
} else {
group->set_blend_operand_a(blend_operand);
}
} else if (cmp_nocase_uh(name, "blendop_b") == 0) {
EggGroup::BlendOperand blend_operand =
EggGroup::string_blend_operand(strval);
if (blend_operand == EggGroup::BO_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown blend operand " + strval);
} else {
group->set_blend_operand_b(blend_operand);
}
} else if (cmp_nocase_uh(name, "blendr") == 0) {
LColor color = group->get_blend_color();
color[0] = value;
group->set_blend_color(color);
} else if (cmp_nocase_uh(name, "blendg") == 0) {
LColor color = group->get_blend_color();
color[1] = value;
group->set_blend_color(color);
} else if (cmp_nocase_uh(name, "blendb") == 0) {
LColor color = group->get_blend_color();
color[2] = value;
group->set_blend_color(color);
} else if (cmp_nocase_uh(name, "blenda") == 0) {
LColor color = group->get_blend_color();
color[3] = value;
group->set_blend_color(color);
} else {
eggyywarning(&(yylsp[-3]), scanner, "Unknown group scalar " + name);
}
}
#line 3369 "built/tmp/parser.yxx.c"
break;
case 85: /* group_body: group_body BILLBOARD '{' string '}' */
#line 1466 "panda/src/egg/parser.yxx"
{
EggGroup *group = DCAST(EggGroup, state.stack.back());
string strval = (yyvsp[-1]._string);
EggGroup::BillboardType f = EggGroup::string_billboard_type(strval);
if (f == EggGroup::BT_none) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown billboard type " + strval);
} else {
group->set_billboard_type(f);
}
}
#line 3385 "built/tmp/parser.yxx.c"
break;
case 86: /* group_body: group_body BILLBOARDCENTER '{' real real real '}' */
#line 1478 "panda/src/egg/parser.yxx"
{
EggGroup *group = DCAST(EggGroup, state.stack.back());
group->set_billboard_center(LPoint3d((yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)));
}
#line 3394 "built/tmp/parser.yxx.c"
break;
case 87: /* group_body: group_body COLLIDE optional_name '{' cs_type collide_flags '}' */
#line 1483 "panda/src/egg/parser.yxx"
{
EggGroup *group = DCAST(EggGroup, state.stack.back());
string name = (yyvsp[-4]._string);
group->set_collision_name(name);
}
#line 3405 "built/tmp/parser.yxx.c"
break;
case 88: /* group_body: group_body DCS '{' integer '}' */
#line 1490 "panda/src/egg/parser.yxx"
{
EggGroup *group = DCAST(EggGroup, state.stack.back());
int value = (int)(yyvsp[-1]._number);
group->set_dcs_type(value!=0 ? EggGroup::DC_default : EggGroup::DC_none);
}
#line 3415 "built/tmp/parser.yxx.c"
break;
case 89: /* group_body: group_body DCS '{' EGG_STRING '}' */
#line 1496 "panda/src/egg/parser.yxx"
{
// The special flavor of DCS, with { sync } or { nosync }.
EggGroup *group = DCAST(EggGroup, state.stack.back());
string strval = (yyvsp[-1]._string);
EggGroup::DCSType f = EggGroup::string_dcs_type(strval);
if (f == EggGroup::DC_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown DCS type " + strval);
} else {
group->set_dcs_type(f);
}
}
#line 3432 "built/tmp/parser.yxx.c"
break;
case 90: /* group_body: group_body DART '{' integer '}' */
#line 1509 "panda/src/egg/parser.yxx"
{
// The traditional flavor of DART, with { 0 } or { 1 }.
EggGroup *group = DCAST(EggGroup, state.stack.back());
int value = (int)(yyvsp[-1]._number);
group->set_dart_type(value!=0 ? EggGroup::DT_default : EggGroup::DT_none);
}
#line 3443 "built/tmp/parser.yxx.c"
break;
case 91: /* group_body: group_body DART '{' EGG_STRING '}' */
#line 1516 "panda/src/egg/parser.yxx"
{
// The special flavor of DART, with { sync } or { nosync }.
EggGroup *group = DCAST(EggGroup, state.stack.back());
string strval = (yyvsp[-1]._string);
EggGroup::DartType f = EggGroup::string_dart_type(strval);
if (f == EggGroup::DT_none) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown dart type " + strval);
} else {
group->set_dart_type(f);
}
}
#line 3460 "built/tmp/parser.yxx.c"
break;
case 92: /* group_body: group_body SWITCH '{' integer '}' */
#line 1529 "panda/src/egg/parser.yxx"
{
EggGroup *group = DCAST(EggGroup, state.stack.back());
int value = (int)(yyvsp[-1]._number);
group->set_switch_flag(value!=0);
}
#line 3470 "built/tmp/parser.yxx.c"
break;
case 93: /* group_body: group_body OBJECTTYPE '{' required_string '}' */
#line 1535 "panda/src/egg/parser.yxx"
{
EggGroup *group = DCAST(EggGroup, state.stack.back());
string type = (yyvsp[-1]._string);
group->add_object_type(type);
}
#line 3480 "built/tmp/parser.yxx.c"
break;
case 94: /* group_body: group_body MODEL '{' integer '}' */
#line 1541 "panda/src/egg/parser.yxx"
{
EggGroup *group = DCAST(EggGroup, state.stack.back());
int value = (int)(yyvsp[-1]._number);
group->set_model_flag(value!=0);
}
#line 3490 "built/tmp/parser.yxx.c"
break;
case 95: /* group_body: group_body TAG optional_name '{' repeated_string '}' */
#line 1547 "panda/src/egg/parser.yxx"
{
EggGroup *group = DCAST(EggGroup, state.stack.back());
group->set_tag((yyvsp[-3]._string), (yyvsp[-1]._string));
}
#line 3499 "built/tmp/parser.yxx.c"
break;
case 96: /* group_body: group_body TEXLIST '{' integer '}' */
#line 1552 "panda/src/egg/parser.yxx"
{
EggGroup *group = DCAST(EggGroup, state.stack.back());
int value = (int)(yyvsp[-1]._number);
group->set_texlist_flag(value!=0);
}
#line 3509 "built/tmp/parser.yxx.c"
break;
case 101: /* group_body: group_body REF '{' group_name '}' */
#line 1562 "panda/src/egg/parser.yxx"
{
EggGroup *group = DCAST(EggGroup, state.stack.back());
if (group->get_group_type() != EggGroup::GT_instance) {
eggyyerror(&(yylsp[-4]), scanner, "<Ref> valid only within <Instance>");
} else if ((yyvsp[-1]._egg) != nullptr) {
group->add_group_ref(DCAST(EggGroup, (yyvsp[-1]._egg)));
}
}
#line 3522 "built/tmp/parser.yxx.c"
break;
case 102: /* group_body: group_body node */
#line 1571 "panda/src/egg/parser.yxx"
{
DCAST(EggGroup, state.stack.back())->add_child(DCAST(EggNode, (yyvsp[0]._egg)));
}
#line 3530 "built/tmp/parser.yxx.c"
break;
case 103: /* cs_type: string */
#line 1585 "panda/src/egg/parser.yxx"
{
EggGroup *group = DCAST(EggGroup, state.stack.back());
string strval = (yyvsp[0]._string);
EggGroup::CollisionSolidType f = EggGroup::string_cs_type(strval);
if (f == EggGroup::CST_none) {
eggyywarning(&(yylsp[0]), scanner, "Unknown collision solid type " + strval);
} else {
if (f == EggGroup::CST_polyset && group->get_cs_type() != EggGroup::CST_none) {
// By convention, a CST_polyset doesn't replace any existing
// contradictory type, so ignore it if this happens. This
// allows the artist to place, for instance, <ObjectType> {
// sphere } and <ObjectType> { trigger } together.
} else {
group->set_cs_type(f);
}
}
}
#line 3554 "built/tmp/parser.yxx.c"
break;
case 105: /* collide_flags: collide_flags string */
#line 1616 "panda/src/egg/parser.yxx"
{
EggGroup *group = DCAST(EggGroup, state.stack.back());
string strval = (yyvsp[0]._string);
EggGroup::CollideFlags f = EggGroup::string_collide_flags(strval);
if (f == EggGroup::CF_none) {
eggyywarning(&(yylsp[0]), scanner, "Unknown collision flag " + strval);
} else {
group->set_collide_flags(group->get_collide_flags() | f);
}
}
#line 3570 "built/tmp/parser.yxx.c"
break;
case 106: /* $@11: %empty */
#line 1638 "panda/src/egg/parser.yxx"
{
state.top_transform = state.stack.back()->as_transform();
state.top_transform->clear_transform();
}
#line 3579 "built/tmp/parser.yxx.c"
break;
case 108: /* $@12: %empty */
#line 1654 "panda/src/egg/parser.yxx"
{
EggGroup *group = DCAST(EggGroup, state.stack.back());
if (group->get_group_type() != EggGroup::GT_joint) {
eggyywarning(&(yylsp[0]), scanner, "Unexpected <DefaultPose> outside of <Joint>");
}
state.top_transform = &group->modify_default_pose();
state.top_transform->clear_transform();
}
#line 3592 "built/tmp/parser.yxx.c"
break;
case 123: /* translate2d: TRANSLATE '{' real real '}' */
#line 1691 "panda/src/egg/parser.yxx"
{
state.top_transform->add_translate2d(LVector2d((yyvsp[-2]._number), (yyvsp[-1]._number)));
}
#line 3600 "built/tmp/parser.yxx.c"
break;
case 124: /* translate3d: TRANSLATE '{' real real real '}' */
#line 1698 "panda/src/egg/parser.yxx"
{
state.top_transform->add_translate3d(LVector3d((yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)));
}
#line 3608 "built/tmp/parser.yxx.c"
break;
case 125: /* rotate2d: ROTATE '{' real '}' */
#line 1705 "panda/src/egg/parser.yxx"
{
state.top_transform->add_rotate2d((yyvsp[-1]._number));
}
#line 3616 "built/tmp/parser.yxx.c"
break;
case 126: /* rotx: ROTX '{' real '}' */
#line 1712 "panda/src/egg/parser.yxx"
{
state.top_transform->add_rotx((yyvsp[-1]._number));
}
#line 3624 "built/tmp/parser.yxx.c"
break;
case 127: /* roty: ROTY '{' real '}' */
#line 1719 "panda/src/egg/parser.yxx"
{
state.top_transform->add_roty((yyvsp[-1]._number));
}
#line 3632 "built/tmp/parser.yxx.c"
break;
case 128: /* rotz: ROTZ '{' real '}' */
#line 1726 "panda/src/egg/parser.yxx"
{
state.top_transform->add_rotz((yyvsp[-1]._number));
}
#line 3640 "built/tmp/parser.yxx.c"
break;
case 129: /* rotate3d: ROTATE '{' real real real real '}' */
#line 1733 "panda/src/egg/parser.yxx"
{
state.top_transform->add_rotate3d((yyvsp[-4]._number), LVector3d((yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)));
}
#line 3648 "built/tmp/parser.yxx.c"
break;
case 130: /* scale2d: SCALE '{' real real '}' */
#line 1740 "panda/src/egg/parser.yxx"
{
state.top_transform->add_scale2d(LVecBase2d((yyvsp[-2]._number), (yyvsp[-1]._number)));
}
#line 3656 "built/tmp/parser.yxx.c"
break;
case 131: /* scale3d: SCALE '{' real real real '}' */
#line 1747 "panda/src/egg/parser.yxx"
{
state.top_transform->add_scale3d(LVecBase3d((yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)));
}
#line 3664 "built/tmp/parser.yxx.c"
break;
case 132: /* uniform_scale: SCALE '{' real '}' */
#line 1754 "panda/src/egg/parser.yxx"
{
state.top_transform->add_uniform_scale((yyvsp[-1]._number));
}
#line 3672 "built/tmp/parser.yxx.c"
break;
case 135: /* matrix3_body: real real real real real real real real real */
#line 1768 "panda/src/egg/parser.yxx"
{
state.top_transform->add_matrix3
(LMatrix3d((yyvsp[-8]._number), (yyvsp[-7]._number), (yyvsp[-6]._number),
(yyvsp[-5]._number), (yyvsp[-4]._number), (yyvsp[-3]._number),
(yyvsp[-2]._number), (yyvsp[-1]._number), (yyvsp[0]._number)));
}
#line 3683 "built/tmp/parser.yxx.c"
break;
case 138: /* matrix4_body: real real real real real real real real real real real real real real real real */
#line 1786 "panda/src/egg/parser.yxx"
{
state.top_transform->add_matrix4
(LMatrix4d((yyvsp[-15]._number), (yyvsp[-14]._number), (yyvsp[-13]._number), (yyvsp[-12]._number),
(yyvsp[-11]._number), (yyvsp[-10]._number), (yyvsp[-9]._number), (yyvsp[-8]._number),
(yyvsp[-7]._number), (yyvsp[-6]._number), (yyvsp[-5]._number), (yyvsp[-4]._number),
(yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number), (yyvsp[0]._number)));
}
#line 3695 "built/tmp/parser.yxx.c"
break;
case 139: /* group_vertex_ref: VERTEXREF '{' integer_list group_vertex_membership REF '{' vertex_pool_name '}' '}' */
#line 1805 "panda/src/egg/parser.yxx"
{
if ((yyvsp[-2]._egg) != nullptr) {
EggVertexPool *pool = DCAST(EggVertexPool, (yyvsp[-2]._egg));
EggGroup *group = DCAST(EggGroup, state.stack.back());
PTA_double nums = (yyvsp[-6]._number_list);
double membership = (yyvsp[-5]._number);
for (int i = 0; i < (int)nums.size(); i++) {
int index = (int)nums[i];
EggVertex *vertex = pool->get_forward_vertex(index);
if (vertex == nullptr) {
ostringstream errmsg;
errmsg << "No vertex " << index << " in pool " << pool->get_name()
<< std::ends;
eggyyerror(&(yylsp[-6]), scanner, errmsg.str());
} else {
group->ref_vertex(vertex, membership);
}
}
}
}
#line 3721 "built/tmp/parser.yxx.c"
break;
case 140: /* group_vertex_membership: empty */
#line 1838 "panda/src/egg/parser.yxx"
{
(yyval._number) = 1.0;
}
#line 3729 "built/tmp/parser.yxx.c"
break;
case 141: /* group_vertex_membership: group_vertex_membership SCALAR required_name '{' real_or_string '}' */
#line 1842 "panda/src/egg/parser.yxx"
{
string name = (yyvsp[-3]._string);
double value = (yyvsp[-1]._number);
double result = (yyvsp[-5]._number);
if (cmp_nocase_uh(name, "membership") == 0) {
result = value;
} else {
eggyywarning(&(yylsp[-3]), scanner, "Unknown group vertex scalar " + name);
}
(yyval._number) = result;
}
#line 3747 "built/tmp/parser.yxx.c"
break;
case 143: /* switchcondition_body: DISTANCE '{' real real VERTEX '{' real real real '}' '}' */
#line 1879 "panda/src/egg/parser.yxx"
{
EggGroup *group = DCAST(EggGroup, state.stack.back());
group->set_lod(EggSwitchConditionDistance((yyvsp[-8]._number), (yyvsp[-7]._number), LPoint3d((yyvsp[-4]._number), (yyvsp[-3]._number), (yyvsp[-2]._number))));
}
#line 3756 "built/tmp/parser.yxx.c"
break;
case 144: /* switchcondition_body: DISTANCE '{' real real real VERTEX '{' real real real '}' '}' */
#line 1884 "panda/src/egg/parser.yxx"
{
EggGroup *group = DCAST(EggGroup, state.stack.back());
group->set_lod(EggSwitchConditionDistance((yyvsp[-9]._number), (yyvsp[-8]._number), LPoint3d((yyvsp[-4]._number), (yyvsp[-3]._number), (yyvsp[-2]._number)), (yyvsp[-7]._number)));
}
#line 3765 "built/tmp/parser.yxx.c"
break;
case 145: /* $@13: %empty */
#line 1901 "panda/src/egg/parser.yxx"
{
state.stack.push_back(new EggPolygon((yyvsp[0]._string)));
}
#line 3773 "built/tmp/parser.yxx.c"
break;
case 146: /* polygon: POLYGON optional_name $@13 '{' primitive_body '}' */
#line 1905 "panda/src/egg/parser.yxx"
{
(yyval._egg) = state.stack.back();
state.stack.pop_back();
}
#line 3782 "built/tmp/parser.yxx.c"
break;
case 147: /* $@14: %empty */
#line 1920 "panda/src/egg/parser.yxx"
{
state.stack.push_back(new EggTriangleFan((yyvsp[0]._string)));
}
#line 3790 "built/tmp/parser.yxx.c"
break;
case 148: /* trianglefan: TRIANGLEFAN optional_name $@14 '{' primitive_body '}' */
#line 1924 "panda/src/egg/parser.yxx"
{
(yyval._egg) = state.stack.back();
state.stack.pop_back();
}
#line 3799 "built/tmp/parser.yxx.c"
break;
case 149: /* $@15: %empty */
#line 1939 "panda/src/egg/parser.yxx"
{
state.stack.push_back(new EggTriangleStrip((yyvsp[0]._string)));
}
#line 3807 "built/tmp/parser.yxx.c"
break;
case 150: /* trianglestrip: TRIANGLESTRIP optional_name $@15 '{' primitive_body '}' */
#line 1943 "panda/src/egg/parser.yxx"
{
(yyval._egg) = state.stack.back();
state.stack.pop_back();
}
#line 3816 "built/tmp/parser.yxx.c"
break;
case 151: /* $@16: %empty */
#line 1958 "panda/src/egg/parser.yxx"
{
state.stack.push_back(new EggPatch((yyvsp[0]._string)));
}
#line 3824 "built/tmp/parser.yxx.c"
break;
case 152: /* patch: PATCH optional_name $@16 '{' primitive_body '}' */
#line 1962 "panda/src/egg/parser.yxx"
{
(yyval._egg) = state.stack.back();
state.stack.pop_back();
}
#line 3833 "built/tmp/parser.yxx.c"
break;
case 153: /* $@17: %empty */
#line 1977 "panda/src/egg/parser.yxx"
{
state.stack.push_back(new EggPoint((yyvsp[0]._string)));
}
#line 3841 "built/tmp/parser.yxx.c"
break;
case 154: /* point_light: POINTLIGHT optional_name $@17 '{' primitive_body '}' */
#line 1981 "panda/src/egg/parser.yxx"
{
(yyval._egg) = state.stack.back();
state.stack.pop_back();
}
#line 3850 "built/tmp/parser.yxx.c"
break;
case 155: /* $@18: %empty */
#line 1996 "panda/src/egg/parser.yxx"
{
state.stack.push_back(new EggLine((yyvsp[0]._string)));
}
#line 3858 "built/tmp/parser.yxx.c"
break;
case 156: /* line: LINE optional_name $@18 '{' primitive_body '}' */
#line 2000 "panda/src/egg/parser.yxx"
{
(yyval._egg) = state.stack.back();
state.stack.pop_back();
}
#line 3867 "built/tmp/parser.yxx.c"
break;
case 157: /* $@19: %empty */
#line 2015 "panda/src/egg/parser.yxx"
{
state.stack.push_back(new EggNurbsSurface((yyvsp[0]._string)));
}
#line 3875 "built/tmp/parser.yxx.c"
break;
case 158: /* nurbs_surface: NURBSSURFACE optional_name $@19 '{' nurbs_surface_body '}' */
#line 2019 "panda/src/egg/parser.yxx"
{
(yyval._egg) = state.stack.back();
state.stack.pop_back();
}
#line 3884 "built/tmp/parser.yxx.c"
break;
case 159: /* $@20: %empty */
#line 2034 "panda/src/egg/parser.yxx"
{
state.stack.push_back(new EggNurbsCurve((yyvsp[0]._string)));
}
#line 3892 "built/tmp/parser.yxx.c"
break;
case 160: /* nurbs_curve: NURBSCURVE optional_name $@20 '{' nurbs_curve_body '}' */
#line 2038 "panda/src/egg/parser.yxx"
{
(yyval._egg) = state.stack.back();
state.stack.pop_back();
}
#line 3901 "built/tmp/parser.yxx.c"
break;
case 165: /* $@21: %empty */
#line 2068 "panda/src/egg/parser.yxx"
{
if (!state.stack.back()->is_of_type(EggCompositePrimitive::get_class_type())) {
eggyyerror(&(yylsp[-2]), scanner, "Not a composite primitive; components are not allowed here.");
} else {
PT(EggCompositePrimitive) comp = DCAST(EggCompositePrimitive, state.stack.back());
if ((yyvsp[-1]._number) < 0 || (yyvsp[-1]._number) >= comp->get_num_components()) {
eggyyerror(&(yylsp[-1]), scanner, "Invalid component number");
}
}
// We temporarily add an EggPolygon to the stack, just to receive
// the component attributes.
state.stack.push_back(new EggPolygon);
}
#line 3919 "built/tmp/parser.yxx.c"
break;
case 166: /* primitive_body: primitive_body COMPONENT integer '{' $@21 primitive_component_body '}' */
#line 2082 "panda/src/egg/parser.yxx"
{
PT(EggPrimitive) prim = DCAST(EggPrimitive, state.stack.back());
state.stack.pop_back();
PT(EggCompositePrimitive) comp = DCAST(EggCompositePrimitive, state.stack.back());
comp->set_component((int)(yyvsp[-4]._number), prim);
}
#line 3930 "built/tmp/parser.yxx.c"
break;
case 174: /* primitive_body: primitive_body SCALAR required_name '{' real_or_string '}' */
#line 2096 "panda/src/egg/parser.yxx"
{
EggPrimitive *primitive = DCAST(EggPrimitive, state.stack.back());
string name = (yyvsp[-3]._string);
double value = (yyvsp[-1]._number);
string strval = (yyvsp[-1]._string);
if (cmp_nocase_uh(name, "alpha") == 0) {
EggRenderMode::AlphaMode a = EggRenderMode::string_alpha_mode(strval);
if (a == EggRenderMode::AM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown alpha mode " + strval);
} else {
primitive->set_alpha_mode(a);
}
} else if (cmp_nocase_uh(name, "depth_write") == 0) {
EggRenderMode::DepthWriteMode m =
EggRenderMode::string_depth_write_mode(strval);
if (m == EggRenderMode::DWM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown depth-write mode " + strval);
} else {
primitive->set_depth_write_mode(m);
}
} else if (cmp_nocase_uh(name, "depth_test") == 0) {
EggRenderMode::DepthTestMode m =
EggRenderMode::string_depth_test_mode(strval);
if (m == EggRenderMode::DTM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown depth-test mode " + strval);
} else {
primitive->set_depth_test_mode(m);
}
} else if (cmp_nocase_uh(name, "visibility") == 0) {
EggRenderMode::VisibilityMode m =
EggRenderMode::string_visibility_mode(strval);
if (m == EggRenderMode::VM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown visibility mode " + strval);
} else {
primitive->set_visibility_mode(m);
}
} else if (cmp_nocase_uh(name, "depth_offset") == 0) {
primitive->set_depth_offset((int)value);
} else if (cmp_nocase_uh(name, "draw_order") == 0) {
primitive->set_draw_order((int)value);
} else if (cmp_nocase_uh(name, "bin") == 0) {
primitive->set_bin(strval);
} else if (cmp_nocase_uh(name, "thick") == 0) {
if (primitive->is_of_type(EggLine::get_class_type())) {
DCAST(EggLine, primitive)->set_thick(value);
} else if (primitive->is_of_type(EggPoint::get_class_type())) {
DCAST(EggPoint, primitive)->set_thick(value);
} else {
eggyywarning(&(yylsp[-1]), scanner, "scalar thick is only meaningful for points and lines.");
}
} else if (cmp_nocase_uh(name, "perspective") == 0) {
if (primitive->is_of_type(EggPoint::get_class_type())) {
DCAST(EggPoint, primitive)->set_perspective(value != 0);
} else {
eggyywarning(&(yylsp[-1]), scanner, "scalar perspective is only meaningful for points.");
}
} else {
eggyywarning(&(yylsp[-3]), scanner, "Unknown scalar " + name);
}
}
#line 3999 "built/tmp/parser.yxx.c"
break;
case 186: /* nurbs_surface_body: nurbs_surface_body nurbs_curve */
#line 2182 "panda/src/egg/parser.yxx"
{
EggNurbsCurve *curve = DCAST(EggNurbsCurve, (yyvsp[0]._egg));
EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, state.stack.back());
nurbs->_curves_on_surface.push_back(curve);
}
#line 4009 "built/tmp/parser.yxx.c"
break;
case 188: /* nurbs_surface_body: nurbs_surface_body SCALAR required_name '{' real_or_string '}' */
#line 2189 "panda/src/egg/parser.yxx"
{
EggNurbsSurface *primitive = DCAST(EggNurbsSurface, state.stack.back());
string name = (yyvsp[-3]._string);
double value = (yyvsp[-1]._number);
string strval = (yyvsp[-1]._string);
if (cmp_nocase_uh(name, "alpha") == 0) {
EggRenderMode::AlphaMode a = EggRenderMode::string_alpha_mode(strval);
if (a == EggRenderMode::AM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown alpha mode " + strval);
} else {
primitive->set_alpha_mode(a);
}
} else if (cmp_nocase_uh(name, "depth_write") == 0) {
EggRenderMode::DepthWriteMode m =
EggRenderMode::string_depth_write_mode(strval);
if (m == EggRenderMode::DWM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown depth-write mode " + strval);
} else {
primitive->set_depth_write_mode(m);
}
} else if (cmp_nocase_uh(name, "depth_test") == 0) {
EggRenderMode::DepthTestMode m =
EggRenderMode::string_depth_test_mode(strval);
if (m == EggRenderMode::DTM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown depth-test mode " + strval);
} else {
primitive->set_depth_test_mode(m);
}
} else if (cmp_nocase_uh(name, "visibility") == 0) {
EggRenderMode::VisibilityMode m =
EggRenderMode::string_visibility_mode(strval);
if (m == EggRenderMode::VM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown visibility mode " + strval);
} else {
primitive->set_visibility_mode(m);
}
} else if (cmp_nocase_uh(name, "depth_offset") == 0) {
primitive->set_depth_offset((int)value);
} else if (cmp_nocase_uh(name, "draw_order") == 0) {
primitive->set_draw_order((int)value);
} else if (cmp_nocase_uh(name, "bin") == 0) {
primitive->set_bin(strval);
} else if (cmp_nocase_uh(name, "u_subdiv") == 0) {
primitive->set_u_subdiv((int)value);
} else if (cmp_nocase_uh(name, "v_subdiv") == 0) {
primitive->set_v_subdiv((int)value);
} else {
eggyywarning(&(yylsp[-3]), scanner, "Unknown scalar " + name);
}
}
#line 4068 "built/tmp/parser.yxx.c"
break;
case 199: /* nurbs_curve_body: nurbs_curve_body SCALAR required_name '{' real_or_string '}' */
#line 2265 "panda/src/egg/parser.yxx"
{
EggNurbsCurve *primitive = DCAST(EggNurbsCurve, state.stack.back());
string name = (yyvsp[-3]._string);
double value = (yyvsp[-1]._number);
string strval = (yyvsp[-1]._string);
if (cmp_nocase_uh(name, "alpha") == 0) {
EggRenderMode::AlphaMode a = EggRenderMode::string_alpha_mode(strval);
if (a == EggRenderMode::AM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown alpha mode " + strval);
} else {
primitive->set_alpha_mode(a);
}
} else if (cmp_nocase_uh(name, "depth_write") == 0) {
EggRenderMode::DepthWriteMode m =
EggRenderMode::string_depth_write_mode(strval);
if (m == EggRenderMode::DWM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown depth-write mode " + strval);
} else {
primitive->set_depth_write_mode(m);
}
} else if (cmp_nocase_uh(name, "depth_test") == 0) {
EggRenderMode::DepthTestMode m =
EggRenderMode::string_depth_test_mode(strval);
if (m == EggRenderMode::DTM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown depth-test mode " + strval);
} else {
primitive->set_depth_test_mode(m);
}
} else if (cmp_nocase_uh(name, "visibility") == 0) {
EggRenderMode::VisibilityMode m =
EggRenderMode::string_visibility_mode(strval);
if (m == EggRenderMode::VM_unspecified) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown visibility mode " + strval);
} else {
primitive->set_visibility_mode(m);
}
} else if (cmp_nocase_uh(name, "depth_offset") == 0) {
primitive->set_depth_offset((int)value);
} else if (cmp_nocase_uh(name, "draw_order") == 0) {
primitive->set_draw_order((int)value);
} else if (cmp_nocase_uh(name, "bin") == 0) {
primitive->set_bin(strval);
} else if (cmp_nocase_uh(name, "subdiv") == 0) {
primitive->set_subdiv((int)value);
} else if (cmp_nocase_uh(name, "type") == 0) {
EggCurve::CurveType a = EggCurve::string_curve_type(strval);
if (a == EggCurve::CT_none) {
eggyywarning(&(yylsp[-1]), scanner, "Unknown curve type " + strval);
} else {
primitive->set_curve_type(a);
}
} else {
eggyywarning(&(yylsp[-3]), scanner, "Unknown scalar " + name);
}
}
#line 4133 "built/tmp/parser.yxx.c"
break;
case 200: /* primitive_tref_body: texture_name */
#line 2336 "panda/src/egg/parser.yxx"
{
if ((yyvsp[0]._egg) != nullptr) {
EggTexture *texture = DCAST(EggTexture, (yyvsp[0]._egg));
DCAST(EggPrimitive, state.stack.back())->add_texture(texture);
}
}
#line 4144 "built/tmp/parser.yxx.c"
break;
case 201: /* primitive_texture_body: required_name */
#line 2353 "panda/src/egg/parser.yxx"
{
EggTexture *texture = nullptr;
// Defining a texture on-the-fly.
Filename filename = (yyvsp[0]._string);
string tref_name = filename.get_basename();
Textures::iterator vpi = state.textures.find(tref_name);
if (vpi == state.textures.end()) {
// The texture was not yet defined. Define it.
texture = new EggTexture(tref_name, filename);
state.textures[tref_name] = texture;
if (state.top_node != nullptr) {
state.top_node->add_child(texture);
}
} else {
// The texture already existed. Use it.
texture = (*vpi).second;
if (filename != texture->get_filename()) {
eggyywarning(&(yylsp[0]), scanner, string("Using previous path: ") +
texture->get_filename().get_fullpath());
}
}
nassertr(texture != nullptr, 0);
DCAST(EggPrimitive, state.stack.back())->add_texture(texture);
}
#line 4178 "built/tmp/parser.yxx.c"
break;
case 202: /* primitive_material_body: material_name */
#line 2393 "panda/src/egg/parser.yxx"
{
if ((yyvsp[0]._egg) != nullptr) {
EggMaterial *material = DCAST(EggMaterial, (yyvsp[0]._egg));
DCAST(EggPrimitive, state.stack.back())->set_material(material);
}
}
#line 4189 "built/tmp/parser.yxx.c"
break;
case 203: /* primitive_normal_body: real real real */
#line 2410 "panda/src/egg/parser.yxx"
{
DCAST(EggPrimitive, state.stack.back())->set_normal(LNormald((yyvsp[-2]._number), (yyvsp[-1]._number), (yyvsp[0]._number)));
}
#line 4197 "built/tmp/parser.yxx.c"
break;
case 204: /* primitive_normal_body: primitive_normal_body DNORMAL string '{' real real real '}' */
#line 2414 "panda/src/egg/parser.yxx"
{
bool inserted = DCAST(EggPrimitive, state.stack.back())->_dnormals.
insert(EggMorphNormal((yyvsp[-5]._string), LVector3d((yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)))).second;
if (!inserted) {
eggyywarning(&(yylsp[-5]), scanner, "Ignoring repeated morph name " + (yyvsp[-5]._string));
}
}
#line 4209 "built/tmp/parser.yxx.c"
break;
case 205: /* primitive_normal_body: primitive_normal_body DNORMAL '{' string real real real '}' */
#line 2422 "panda/src/egg/parser.yxx"
{
bool inserted = DCAST(EggPrimitive, state.stack.back())->_dnormals.
insert(EggMorphNormal((yyvsp[-4]._string), LVector3d((yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)))).second;
if (!inserted) {
eggyywarning(&(yylsp[-4]), scanner, "Ignoring repeated morph name " + (yyvsp[-4]._string));
}
}
#line 4221 "built/tmp/parser.yxx.c"
break;
case 206: /* primitive_color_body: real real real real */
#line 2440 "panda/src/egg/parser.yxx"
{
DCAST(EggPrimitive, state.stack.back())->set_color(LColor((yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number), (yyvsp[0]._number)));
}
#line 4229 "built/tmp/parser.yxx.c"
break;
case 207: /* primitive_color_body: primitive_color_body DRGBA string '{' real real real real '}' */
#line 2444 "panda/src/egg/parser.yxx"
{
bool inserted = DCAST(EggPrimitive, state.stack.back())->_drgbas.
insert(EggMorphColor((yyvsp[-6]._string), LVector4((yyvsp[-4]._number), (yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)))).second;
if (!inserted) {
eggyywarning(&(yylsp[-6]), scanner, "Ignoring repeated morph name " + (yyvsp[-6]._string));
}
}
#line 4241 "built/tmp/parser.yxx.c"
break;
case 208: /* primitive_color_body: primitive_color_body DRGBA '{' string real real real real '}' */
#line 2452 "panda/src/egg/parser.yxx"
{
bool inserted = DCAST(EggPrimitive, state.stack.back())->_drgbas.
insert(EggMorphColor((yyvsp[-5]._string), LVector4((yyvsp[-4]._number), (yyvsp[-3]._number), (yyvsp[-2]._number), (yyvsp[-1]._number)))).second;
if (!inserted) {
eggyywarning(&(yylsp[-5]), scanner, "Ignoring repeated morph name " + (yyvsp[-5]._string));
}
}
#line 4253 "built/tmp/parser.yxx.c"
break;
case 209: /* primitive_bface_body: integer */
#line 2470 "panda/src/egg/parser.yxx"
{
EggPrimitive *primitive = DCAST(EggPrimitive, state.stack.back());
int value = (int)(yyvsp[0]._number);
primitive->set_bface_flag(value!=0);
}
#line 4263 "built/tmp/parser.yxx.c"
break;
case 210: /* primitive_vertex_ref: VERTEXREF '{' integer_list REF '{' vertex_pool_name '}' '}' */
#line 2486 "panda/src/egg/parser.yxx"
{
if ((yyvsp[-2]._egg) != nullptr) {
EggVertexPool *pool = DCAST(EggVertexPool, (yyvsp[-2]._egg));
EggPrimitive *prim = DCAST(EggPrimitive, state.stack.back());
PTA_double nums = (yyvsp[-5]._number_list);
for (int i = 0; i < (int)nums.size(); i++) {
int index = (int)nums[i];
EggVertex *vertex = pool->get_forward_vertex(index);
if (vertex == nullptr) {
ostringstream errmsg;
errmsg << "No vertex " << index << " in pool " << pool->get_name()
<< std::ends;
eggyyerror(&(yylsp[-5]), scanner, errmsg.str());
} else {
prim->add_vertex(vertex);
}
}
}
}
#line 4288 "built/tmp/parser.yxx.c"
break;
case 211: /* nurbs_surface_order_body: integer integer */
#line 2517 "panda/src/egg/parser.yxx"
{
EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, state.stack.back());
int u_order = (int)(yyvsp[-1]._number);
int v_order = (int)(yyvsp[0]._number);
nurbs->set_u_order(u_order);
nurbs->set_v_order(v_order);
}
#line 4300 "built/tmp/parser.yxx.c"
break;
case 212: /* nurbs_surface_uknots_body: real_list */
#line 2535 "panda/src/egg/parser.yxx"
{
EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, state.stack.back());
PTA_double nums = (yyvsp[0]._number_list);
nurbs->set_num_u_knots(nums.size());
for (int i = 0; i < (int)nums.size(); i++) {
nurbs->set_u_knot(i, nums[i]);
}
}
#line 4314 "built/tmp/parser.yxx.c"
break;
case 213: /* nurbs_surface_vknots_body: real_list */
#line 2555 "panda/src/egg/parser.yxx"
{
EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, state.stack.back());
PTA_double nums = (yyvsp[0]._number_list);
nurbs->set_num_v_knots(nums.size());
for (int i = 0; i < (int)nums.size(); i++) {
nurbs->set_v_knot(i, nums[i]);
}
}
#line 4328 "built/tmp/parser.yxx.c"
break;
case 214: /* nurbs_surface_trim_body: empty */
#line 2575 "panda/src/egg/parser.yxx"
{
EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, state.stack.back());
nurbs->_trims.push_back(EggNurbsSurface::Trim());
}
#line 4337 "built/tmp/parser.yxx.c"
break;
case 216: /* nurbs_surface_trim_loop_body: empty */
#line 2591 "panda/src/egg/parser.yxx"
{
EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, state.stack.back());
nassertr(!nurbs->_trims.empty(), 0);
nurbs->_trims.back().push_back(EggNurbsSurface::Loop());
}
#line 4347 "built/tmp/parser.yxx.c"
break;
case 217: /* nurbs_surface_trim_loop_body: nurbs_surface_trim_loop_body nurbs_curve */
#line 2597 "panda/src/egg/parser.yxx"
{
EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, state.stack.back());
nassertr(!nurbs->_trims.empty(), 0);
nassertr(!nurbs->_trims.back().empty(), 0);
EggNurbsCurve *curve = DCAST(EggNurbsCurve, (yyvsp[0]._egg));
nurbs->_trims.back().back().push_back(curve);
}
#line 4359 "built/tmp/parser.yxx.c"
break;
case 218: /* nurbs_curve_order_body: integer */
#line 2616 "panda/src/egg/parser.yxx"
{
EggNurbsCurve *nurbs = DCAST(EggNurbsCurve, state.stack.back());
int order = (int)(yyvsp[0]._number);
nurbs->set_order(order);
}
#line 4369 "built/tmp/parser.yxx.c"
break;
case 219: /* nurbs_curve_knots_body: real_list */
#line 2632 "panda/src/egg/parser.yxx"
{
EggNurbsCurve *nurbs = DCAST(EggNurbsCurve, state.stack.back());
PTA_double nums = (yyvsp[0]._number_list);
nurbs->set_num_knots(nums.size());
for (int i = 0; i < (int)nums.size(); i++) {
nurbs->set_knot(i, nums[i]);
}
}
#line 4383 "built/tmp/parser.yxx.c"
break;
case 220: /* $@22: %empty */
#line 2653 "panda/src/egg/parser.yxx"
{
EggTable *table = new EggTable((yyvsp[0]._string));
table->set_table_type(EggTable::TT_table);
state.stack.push_back(table);
}
#line 4393 "built/tmp/parser.yxx.c"
break;
case 221: /* table: TABLE optional_name $@22 '{' table_body '}' */
#line 2659 "panda/src/egg/parser.yxx"
{
(yyval._egg) = state.stack.back();
state.stack.pop_back();
Thread::consider_yield();
}
#line 4403 "built/tmp/parser.yxx.c"
break;
case 222: /* $@23: %empty */
#line 2676 "panda/src/egg/parser.yxx"
{
EggTable *table = new EggTable((yyvsp[0]._string));
table->set_table_type(EggTable::TT_bundle);
state.stack.push_back(table);
}
#line 4413 "built/tmp/parser.yxx.c"
break;
case 223: /* bundle: BUNDLE optional_name $@23 '{' table_body '}' */
#line 2682 "panda/src/egg/parser.yxx"
{
(yyval._egg) = state.stack.back();
state.stack.pop_back();
}
#line 4422 "built/tmp/parser.yxx.c"
break;
case 225: /* table_body: table_body table */
#line 2698 "panda/src/egg/parser.yxx"
{
DCAST(EggTable, state.stack.back())->add_child(DCAST(EggNode, (yyvsp[0]._egg)));
}
#line 4430 "built/tmp/parser.yxx.c"
break;
case 226: /* table_body: table_body bundle */
#line 2702 "panda/src/egg/parser.yxx"
{
DCAST(EggTable, state.stack.back())->add_child(DCAST(EggNode, (yyvsp[0]._egg)));
}
#line 4438 "built/tmp/parser.yxx.c"
break;
case 227: /* table_body: table_body sanim */
#line 2706 "panda/src/egg/parser.yxx"
{
DCAST(EggTable, state.stack.back())->add_child(DCAST(EggNode, (yyvsp[0]._egg)));
}
#line 4446 "built/tmp/parser.yxx.c"
break;
case 228: /* table_body: table_body xfmanim */
#line 2710 "panda/src/egg/parser.yxx"
{
DCAST(EggTable, state.stack.back())->add_child(DCAST(EggNode, (yyvsp[0]._egg)));
}
#line 4454 "built/tmp/parser.yxx.c"
break;
case 229: /* table_body: table_body xfm_s_anim */
#line 2714 "panda/src/egg/parser.yxx"
{
DCAST(EggTable, state.stack.back())->add_child(DCAST(EggNode, (yyvsp[0]._egg)));
}
#line 4462 "built/tmp/parser.yxx.c"
break;
case 230: /* $@24: %empty */
#line 2729 "panda/src/egg/parser.yxx"
{
EggSAnimData *anim_data = new EggSAnimData((yyvsp[0]._string));
state.stack.push_back(anim_data);
}
#line 4471 "built/tmp/parser.yxx.c"
break;
case 231: /* sanim: SANIM optional_name $@24 '{' sanim_body '}' */
#line 2734 "panda/src/egg/parser.yxx"
{
(yyval._egg) = state.stack.back();
state.stack.pop_back();
}
#line 4480 "built/tmp/parser.yxx.c"
break;
case 233: /* sanim_body: sanim_body SCALAR required_name '{' real_or_string '}' */
#line 2751 "panda/src/egg/parser.yxx"
{
EggSAnimData *anim_data = DCAST(EggSAnimData, state.stack.back());
string name = (yyvsp[-3]._string);
double value = (yyvsp[-1]._number);
if (cmp_nocase_uh(name, "fps") == 0) {
anim_data->set_fps(value);
} else {
eggyywarning(&(yylsp[-3]), scanner, "Unsupported S$Anim scalar: " + name);
}
}
#line 4496 "built/tmp/parser.yxx.c"
break;
case 234: /* sanim_body: sanim_body TABLE_V '{' real_list '}' */
#line 2763 "panda/src/egg/parser.yxx"
{
DCAST(EggSAnimData, state.stack.back())->set_data((yyvsp[-1]._number_list));
}
#line 4504 "built/tmp/parser.yxx.c"
break;
case 235: /* $@25: %empty */
#line 2777 "panda/src/egg/parser.yxx"
{
EggXfmAnimData *anim_data = new EggXfmAnimData((yyvsp[0]._string));
state.stack.push_back(anim_data);
}
#line 4513 "built/tmp/parser.yxx.c"
break;
case 236: /* xfmanim: XFMANIM optional_name $@25 '{' xfmanim_body '}' */
#line 2782 "panda/src/egg/parser.yxx"
{
(yyval._egg) = state.stack.back();
state.stack.pop_back();
}
#line 4522 "built/tmp/parser.yxx.c"
break;
case 238: /* xfmanim_body: xfmanim_body SCALAR required_name '{' real_or_string '}' */
#line 2799 "panda/src/egg/parser.yxx"
{
EggXfmAnimData *anim_data = DCAST(EggXfmAnimData, state.stack.back());
string name = (yyvsp[-3]._string);
double value = (yyvsp[-1]._number);
string strval = (yyvsp[-1]._string);
if (cmp_nocase_uh(name, "fps") == 0) {
anim_data->set_fps(value);
} else if (cmp_nocase_uh(name, "order") == 0) {
anim_data->set_order(strval);
} else if (cmp_nocase_uh(name, "contents") == 0) {
anim_data->set_contents(strval);
} else {
eggyywarning(&(yylsp[-3]), scanner, "Unsupported Xfm$Anim scalar: " + name);
}
}
#line 4543 "built/tmp/parser.yxx.c"
break;
case 239: /* xfmanim_body: xfmanim_body TABLE_V '{' real_list '}' */
#line 2816 "panda/src/egg/parser.yxx"
{
DCAST(EggXfmAnimData, state.stack.back())->set_data((yyvsp[-1]._number_list));
}
#line 4551 "built/tmp/parser.yxx.c"
break;
case 240: /* $@26: %empty */
#line 2830 "panda/src/egg/parser.yxx"
{
EggXfmSAnim *anim_group = new EggXfmSAnim((yyvsp[0]._string));
state.stack.push_back(anim_group);
}
#line 4560 "built/tmp/parser.yxx.c"
break;
case 241: /* xfm_s_anim: XFMSANIM optional_name $@26 '{' xfm_s_anim_body '}' */
#line 2835 "panda/src/egg/parser.yxx"
{
(yyval._egg) = state.stack.back();
state.stack.pop_back();
}
#line 4569 "built/tmp/parser.yxx.c"
break;
case 243: /* xfm_s_anim_body: xfm_s_anim_body SCALAR required_name '{' real_or_string '}' */
#line 2852 "panda/src/egg/parser.yxx"
{
EggXfmSAnim *anim_group = DCAST(EggXfmSAnim, state.stack.back());
string name = (yyvsp[-3]._string);
double value = (yyvsp[-1]._number);
string strval = (yyvsp[-1]._string);
if (cmp_nocase_uh(name, "fps") == 0) {
anim_group->set_fps(value);
} else if (cmp_nocase_uh(name, "order") == 0) {
anim_group->set_order(strval);
} else {
eggyywarning(&(yylsp[-3]), scanner, "Unsupported Xfm$Anim_S$ scalar: " + name);
}
}
#line 4588 "built/tmp/parser.yxx.c"
break;
case 244: /* xfm_s_anim_body: xfm_s_anim_body sanim */
#line 2867 "panda/src/egg/parser.yxx"
{
DCAST(EggXfmSAnim, state.stack.back())->add_child(DCAST(EggNode, (yyvsp[0]._egg)));
}
#line 4596 "built/tmp/parser.yxx.c"
break;
case 245: /* $@27: %empty */
#line 2882 "panda/src/egg/parser.yxx"
{
EggAnimPreload *anim_preload = new EggAnimPreload((yyvsp[0]._string));
state.stack.push_back(anim_preload);
}
#line 4605 "built/tmp/parser.yxx.c"
break;
case 246: /* anim_preload: ANIMPRELOAD optional_name $@27 '{' anim_preload_body '}' */
#line 2887 "panda/src/egg/parser.yxx"
{
(yyval._egg) = state.stack.back();
state.stack.pop_back();
}
#line 4614 "built/tmp/parser.yxx.c"
break;
case 248: /* anim_preload_body: anim_preload_body SCALAR required_name '{' real_or_string '}' */
#line 2904 "panda/src/egg/parser.yxx"
{
EggAnimPreload *anim_preload = DCAST(EggAnimPreload, state.stack.back());
string name = (yyvsp[-3]._string);
double value = (yyvsp[-1]._number);
if (cmp_nocase_uh(name, "fps") == 0) {
anim_preload->set_fps(value);
} else if (cmp_nocase_uh(name, "frames") == 0) {
anim_preload->set_num_frames((int)value);
} else {
eggyywarning(&(yylsp[-3]), scanner, "Unsupported AnimPreload scalar: " + name);
}
}
#line 4632 "built/tmp/parser.yxx.c"
break;
case 249: /* integer_list: empty */
#line 2928 "panda/src/egg/parser.yxx"
{
(yyval._number_list) = PTA_double::empty_array(0);
}
#line 4640 "built/tmp/parser.yxx.c"
break;
case 250: /* integer_list: integer_list integer */
#line 2932 "panda/src/egg/parser.yxx"
{
(yyval._number_list).push_back((double)(yyvsp[0]._number));
}
#line 4648 "built/tmp/parser.yxx.c"
break;
case 251: /* real_list: empty */
#line 2946 "panda/src/egg/parser.yxx"
{
(yyval._number_list) = PTA_double::empty_array(0);
}
#line 4656 "built/tmp/parser.yxx.c"
break;
case 252: /* real_list: real_list real */
#line 2950 "panda/src/egg/parser.yxx"
{
(yyval._number_list).push_back((yyvsp[0]._number));
}
#line 4664 "built/tmp/parser.yxx.c"
break;
case 253: /* texture_name: required_name */
#line 2964 "panda/src/egg/parser.yxx"
{
string name = (yyvsp[0]._string);
Textures::iterator vpi = state.textures.find(name);
if (vpi == state.textures.end()) {
eggyyerror(&(yylsp[0]), scanner, "Unknown texture " + name);
(yyval._egg) = PT(EggObject)();
} else {
(yyval._egg) = (*vpi).second;
}
}
#line 4679 "built/tmp/parser.yxx.c"
break;
case 254: /* material_name: required_name */
#line 2985 "panda/src/egg/parser.yxx"
{
string name = (yyvsp[0]._string);
Materials::iterator vpi = state.materials.find(name);
if (vpi == state.materials.end()) {
eggyyerror(&(yylsp[0]), scanner, "Unknown material " + name);
(yyval._egg) = PT(EggObject)();
} else {
(yyval._egg) = (*vpi).second;
}
}
#line 4694 "built/tmp/parser.yxx.c"
break;
case 255: /* vertex_pool_name: required_name */
#line 3006 "panda/src/egg/parser.yxx"
{
string name = (yyvsp[0]._string);
VertexPools::iterator vpi = state.vertex_pools.find(name);
if (vpi == state.vertex_pools.end()) {
// This will become a forward reference.
EggVertexPool *pool = new EggVertexPool(name);
// The egg syntax starts counting at 1 by convention.
pool->set_highest_index(0);
state.vertex_pools[name] = pool;
(yyval._egg) = pool;
} else {
(yyval._egg) = (*vpi).second;
}
}
#line 4713 "built/tmp/parser.yxx.c"
break;
case 256: /* group_name: required_name */
#line 3031 "panda/src/egg/parser.yxx"
{
string name = (yyvsp[0]._string);
Groups::iterator vpi = state.groups.find(name);
if (vpi == state.groups.end()) {
eggyyerror(&(yylsp[0]), scanner, "Unknown group " + name);
(yyval._egg) = PT(EggObject)();
} else {
(yyval._egg) = (*vpi).second;
}
}
#line 4728 "built/tmp/parser.yxx.c"
break;
case 257: /* required_name: empty */
#line 3052 "panda/src/egg/parser.yxx"
{
eggyyerror(&(yylsp[0]), scanner, "Name required.");
(yyval._string) = "";
}
#line 4737 "built/tmp/parser.yxx.c"
break;
case 260: /* required_string: empty */
#line 3081 "panda/src/egg/parser.yxx"
{
eggyyerror(&(yylsp[0]), scanner, "String required.");
(yyval._string) = "";
}
#line 4746 "built/tmp/parser.yxx.c"
break;
case 262: /* optional_string: empty */
#line 3097 "panda/src/egg/parser.yxx"
{
(yyval._string) = "";
}
#line 4754 "built/tmp/parser.yxx.c"
break;
case 264: /* string: EGG_NUMBER */
#line 3115 "panda/src/egg/parser.yxx"
{
(yyval._string) = (yyvsp[0]._string);
}
#line 4762 "built/tmp/parser.yxx.c"
break;
case 265: /* string: EGG_ULONG */
#line 3119 "panda/src/egg/parser.yxx"
{
(yyval._string) = (yyvsp[0]._string);
}
#line 4770 "built/tmp/parser.yxx.c"
break;
case 267: /* repeated_string: empty */
#line 3136 "panda/src/egg/parser.yxx"
{
(yyval._string) = "";
}
#line 4778 "built/tmp/parser.yxx.c"
break;
case 268: /* repeated_string: repeated_string_body */
#line 3140 "panda/src/egg/parser.yxx"
{
(yyval._string) = (yyvsp[0]._string);
}
#line 4786 "built/tmp/parser.yxx.c"
break;
case 269: /* repeated_string_body: string */
#line 3156 "panda/src/egg/parser.yxx"
{
(yyval._string) = (yyvsp[0]._string);
}
#line 4794 "built/tmp/parser.yxx.c"
break;
case 270: /* repeated_string_body: repeated_string_body string */
#line 3160 "panda/src/egg/parser.yxx"
{
(yyval._string) = (yyvsp[-1]._string) + "\n" + (yyvsp[0]._string);
}
#line 4802 "built/tmp/parser.yxx.c"
break;
case 272: /* real: EGG_ULONG */
#line 3175 "panda/src/egg/parser.yxx"
{
(yyval._number) = (yyvsp[0]._ulong);
}
#line 4810 "built/tmp/parser.yxx.c"
break;
case 273: /* real_or_string: EGG_NUMBER */
#line 3190 "panda/src/egg/parser.yxx"
{
(yyval._number) = (yyvsp[0]._number);
(yyval._ulong) = (unsigned long)(yyvsp[0]._number);
(yyval._string) = (yyvsp[0]._string);
}
#line 4820 "built/tmp/parser.yxx.c"
break;
case 274: /* real_or_string: EGG_ULONG */
#line 3196 "panda/src/egg/parser.yxx"
{
(yyval._number) = (yyvsp[0]._ulong);
(yyval._ulong) = (yyvsp[0]._ulong);
(yyval._string) = (yyvsp[0]._string);
}
#line 4830 "built/tmp/parser.yxx.c"
break;
case 275: /* real_or_string: EGG_STRING */
#line 3202 "panda/src/egg/parser.yxx"
{
(yyval._number) = 0.0;
(yyval._ulong) = 0;
(yyval._string) = (yyvsp[0]._string);
}
#line 4840 "built/tmp/parser.yxx.c"
break;
case 276: /* integer: EGG_NUMBER */
#line 3219 "panda/src/egg/parser.yxx"
{
int i = (int)(yyvsp[0]._number);
if ((double)i != (yyvsp[0]._number)) {
eggyywarning(&(yylsp[0]), scanner, "Integer expected.");
(yyval._number) = (double)i;
}
}
#line 4852 "built/tmp/parser.yxx.c"
break;
case 277: /* integer: EGG_ULONG */
#line 3227 "panda/src/egg/parser.yxx"
{
(yyval._number) = (yyvsp[0]._ulong);
}
#line 4860 "built/tmp/parser.yxx.c"
break;
#line 4864 "built/tmp/parser.yxx.c"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
that yytoken be updated with the new translation. We take the
approach of translating immediately before every use of yytoken.
One alternative is translating here after every semantic action,
but that translation would be missed if the semantic action invokes
YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
incorrect destructor might then be invoked immediately. In the
case of YYERROR or YYBACKUP, subsequent parser actions might lead
to an incorrect destructor call or verbose syntax error message
before the lookahead is translated. */
YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
YYPOPSTACK (yylen);
yylen = 0;
*++yyvsp = yyval;
*++yylsp = yyloc;
/* 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. */
{
const int yylhs = yyr1[yyn] - YYNTOKENS;
const int yyi = yypgoto[yylhs] + *yyssp;
yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
? yytable[yyi]
: yydefgoto[yylhs]);
}
goto yynewstate;
/*--------------------------------------.
| yyerrlab -- here on detecting error. |
`--------------------------------------*/
yyerrlab:
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = yychar == YYEMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
yyerror (&yylloc, state, scanner, YY_("syntax error"));
}
yyerror_range[1] = yylloc;
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
{
/* Return failure if at end of input. */
if (yychar == YYEOF)
YYABORT;
}
else
{
yydestruct ("Error: discarding",
yytoken, &yylval, &yylloc, state, scanner);
yychar = YYEMPTY;
}
}
/* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR. |
`---------------------------------------------------*/
yyerrorlab:
/* Pacify compilers when the user code never invokes YYERROR and the
label yyerrorlab therefore never appears in user code. */
if (0)
YYERROR;
/* Do not reclaim the symbols of the rule whose action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
YY_STACK_PRINT (yyss, yyssp);
yystate = *yyssp;
goto yyerrlab1;
/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
yyerrstatus = 3; /* Each real token shifted decrements this. */
/* Pop stack until we find a state that shifts the error token. */
for (;;)
{
yyn = yypact[yystate];
if (!yypact_value_is_default (yyn))
{
yyn += YYSYMBOL_YYerror;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
{
yyn = yytable[yyn];
if (0 < yyn)
break;
}
}
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
YYABORT;
yyerror_range[1] = *yylsp;
yydestruct ("Error: popping",
YY_ACCESSING_SYMBOL (yystate), yyvsp, yylsp, state, scanner);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
yyerror_range[2] = yylloc;
++yylsp;
YYLLOC_DEFAULT (*yylsp, yyerror_range, 2);
/* Shift the error token. */
YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here. |
`-------------------------------------*/
yyacceptlab:
yyresult = 0;
goto yyreturn;
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
yyabortlab:
yyresult = 1;
goto yyreturn;
#if !defined yyoverflow
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
yyexhaustedlab:
yyerror (&yylloc, state, scanner, YY_("memory exhausted"));
yyresult = 2;
goto yyreturn;
#endif
/*-------------------------------------------------------.
| yyreturn -- parsing is finished, clean up and return. |
`-------------------------------------------------------*/
yyreturn:
if (yychar != YYEMPTY)
{
/* Make sure we have latest lookahead translation. See comments at
user semantic actions for why this is necessary. */
yytoken = YYTRANSLATE (yychar);
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, &yylloc, state, scanner);
}
/* Do not reclaim the symbols of the rule whose action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, yylsp, state, scanner);
YYPOPSTACK (1);
}
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
return yyresult;
}