Browse Source

prebuild-bison

David Rose 23 years ago
parent
commit
93fbd33e19

+ 2213 - 0
direct/src/dcparser/dcLexer.cxx.prebuilt

@@ -0,0 +1,2213 @@
+#define yy_create_buffer dcyy_create_buffer
+#define yy_delete_buffer dcyy_delete_buffer
+#define yy_scan_buffer dcyy_scan_buffer
+#define yy_scan_string dcyy_scan_string
+#define yy_scan_bytes dcyy_scan_bytes
+#define yy_flex_debug dcyy_flex_debug
+#define yy_init_buffer dcyy_init_buffer
+#define yy_flush_buffer dcyy_flush_buffer
+#define yy_load_buffer_state dcyy_load_buffer_state
+#define yy_switch_to_buffer dcyy_switch_to_buffer
+#define yyin dcyyin
+#define yyleng dcyyleng
+#define yylex dcyylex
+#define yyout dcyyout
+#define yyrestart dcyyrestart
+#define yytext dcyytext
+#define yywrap dcyywrap
+
+#line 20 "lex.yy.c"
+/* A lexical scanner generated by flex */
+
+/* Scanner skeleton version:
+ * $Header$
+ */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+
+#include <stdio.h>
+
+
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
+#endif
+#endif
+
+
+#ifdef __cplusplus
+
+#include <stdlib.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_PROTOS
+#define YY_USE_CONST
+
+#endif	/* __STDC__ */
+#endif	/* ! __cplusplus */
+
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#define YY_BUF_SIZE 16384
+
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+extern int yyleng;
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator).  This
+ * avoids problems with code like:
+ *
+ * 	if ( condition_holds )
+ *		yyless( 5 );
+ *	else
+ *		do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+		*yy_cp = yy_hold_char; \
+		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+		} \
+	while ( 0 )
+
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
+
+struct yy_buffer_state
+	{
+	FILE *yy_input_file;
+
+	char *yy_ch_buf;		/* input buffer */
+	char *yy_buf_pos;		/* current position in input buffer */
+
+	/* Size of input buffer in bytes, not including room for EOB
+	 * characters.
+	 */
+	yy_size_t yy_buf_size;
+
+	/* Number of characters read into yy_ch_buf, not including EOB
+	 * characters.
+	 */
+	int yy_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int yy_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int yy_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int yy_at_bol;
+
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int yy_fill_buffer;
+
+	int yy_buffer_status;
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via yyrestart()), so that the user can continue scanning by
+	 * just pointing yyin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+	};
+
+static YY_BUFFER_STATE yy_current_buffer = 0;
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ */
+#define YY_CURRENT_BUFFER yy_current_buffer
+
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+
+static int yy_n_chars;		/* number of characters read into yy_ch_buf */
+
+
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 1;		/* whether we need to initialize */
+static int yy_start = 0;	/* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin.  A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart YY_PROTO(( FILE *input_file ));
+
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+	{ \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_is_interactive = is_interactive; \
+	}
+
+#define yy_set_bol(at_bol) \
+	{ \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_at_bol = at_bol; \
+	}
+
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+typedef unsigned char YY_CHAR;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+typedef int yy_state_type;
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	yytext_ptr = yy_bp; \
+	yyleng = (int) (yy_cp - yy_bp); \
+	yy_hold_char = *yy_cp; \
+	*yy_cp = '\0'; \
+	yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 40
+#define YY_END_OF_BUFFER 41
+static yyconst short int yy_accept[157] =
+    {   0,
+        0,    0,   41,   39,    2,    1,   36,   39,   39,   39,
+       33,   33,   37,   38,   38,   38,   38,   38,   38,   38,
+       38,   38,   38,   38,   38,    1,    0,   33,   35,    4,
+        3,   35,   34,   38,   38,   38,   38,   29,   38,   38,
+       38,   38,   38,   38,   38,   38,   38,   38,    0,    3,
+       34,   38,   38,   38,   38,   38,   38,   38,   38,   38,
+       27,   28,   38,   38,   38,    0,   35,   16,   38,   38,
+       38,   38,   38,   38,   38,   38,    6,   24,   38,   38,
+       38,   38,   38,   38,   38,   38,   38,    7,    8,    9,
+       38,   38,   38,   38,   38,   38,   38,   10,   38,   31,
+
+       30,    5,   38,   38,   38,   38,   38,   38,   15,   11,
+       12,   13,   38,   38,   14,   38,   38,   38,   32,   38,
+       38,   38,   38,   38,   38,   38,   38,   38,   25,   38,
+       38,   38,   38,   26,   38,   38,   17,   38,   38,   38,
+       38,   18,   19,   38,   38,   38,   20,   21,   22,   38,
+       38,   38,   38,   38,   23,    0
+    } ;
+
+static yyconst int yy_ec[256] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
+        1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    2,    1,    4,    1,    1,    1,    1,    1,    1,
+        1,    5,    6,    1,    6,    7,    8,    9,   10,   11,
+       12,   13,   14,   15,   14,   16,   14,    1,    1,   17,
+        1,    1,    1,    1,   18,   18,   18,   18,   19,   18,
+       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+       20,   20,   20,   20,   20,   20,   20,   20,   20,   20,
+        1,    1,    1,    1,   20,    1,   21,   22,   23,   24,
+
+       25,   26,   27,   20,   28,   20,   20,   29,   30,   31,
+       32,   33,   34,   35,   36,   37,   38,   39,   40,   41,
+       42,   20,    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,    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,    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
+    } ;
+
+static yyconst int yy_meta[43] =
+    {   0,
+        1,    1,    2,    1,    1,    3,    4,    1,    5,    5,
+        5,    5,    5,    5,    5,    5,    1,    6,    6,    7,
+        6,    6,    6,    6,    6,    6,    7,    7,    7,    7,
+        7,    7,    7,    7,    7,    7,    7,    7,    7,    7,
+        7,    7
+    } ;
+
+static yyconst short int yy_base[164] =
+    {   0,
+        0,    0,  200,  201,  201,    0,  201,  192,    0,   38,
+       37,  191,  201,    0,   16,  168,   25,  167,  164,  162,
+      153,  181,   28,  154,  162,    0,    0,  182,   31,  201,
+        0,    0,    0,    0,  156,  155,   19,    0,  157,  153,
+      147,  154,  151,  148,  150,  145,  143,  146,  170,    0,
+        0,  153,  153,  148,  147,  150,  149,   47,   70,  133,
+        0,    0,  130,  139,  129,  159,  158,    0,  139,  139,
+      130,  124,  122,  143,  146,  143,  134,    0,  129,  125,
+      121,   54,  128,  111,  125,  112,  132,  125,  124,    0,
+      109,  112,  107,  114,  125,  128,  125,  116,  115,    0,
+
+        0,    0,  122,   99,   98,   97,  107,  105,    0,  108,
+       37,    0,   93,   91,    0,   91,   90,  103,    0,   99,
+       87,   86,   92,   84,   81,   96,   95,   73,    0,   79,
+       78,   81,   90,    0,   67,   58,    0,   67,   56,   39,
+       32,    0,    0,   31,   30,   55,    0,    0,    0,   47,
+       32,   30,   40,   18,    0,  201,   86,   90,   47,   91,
+       98,  101,  105
+    } ;
+
+static yyconst short int yy_def[164] =
+    {   0,
+      156,    1,  156,  156,  156,  157,  156,  158,  159,  156,
+      158,  158,  156,  160,  160,  160,  160,  160,  160,  160,
+      160,  160,  160,  160,  160,  157,  159,  158,  159,  156,
+      161,   29,  162,  160,  160,  160,  160,  160,  160,  160,
+      160,  160,  160,  160,  160,  160,  160,  160,  163,  161,
+      162,  160,  160,  160,  160,  160,  160,  160,  160,  160,
+      160,  160,  160,  160,  160,  163,  163,  160,  160,  160,
+      160,  160,  160,  160,  160,  160,  160,   59,  160,  160,
+      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
+      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
+
+      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
+      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
+      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
+      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
+      160,  160,  160,  160,  160,  160,  160,  160,  160,  160,
+      160,  160,  160,  160,  160,    0,  156,  156,  156,  156,
+      156,  156,  156
+    } ;
+
+static yyconst short int yy_nxt[244] =
+    {   0,
+        4,    5,    6,    7,    4,    8,    9,   10,   11,   12,
+       12,   12,   12,   12,   12,   12,   13,   14,   14,   14,
+       14,   15,   16,   17,   14,   18,   14,   19,   14,   20,
+       14,   21,   22,   14,   23,   24,   14,   25,   14,   14,
+       14,   14,   30,   32,   35,   31,   38,   39,   45,   49,
+       36,   29,   46,   54,   55,   49,   74,  122,   75,  155,
+      154,   76,   77,   95,  153,   96,  152,  151,   97,   98,
+      150,  149,  148,  147,  123,  146,  145,   33,   78,   78,
+       78,   78,   78,   78,   78,   78,   26,  144,   26,   26,
+       26,   26,   26,   28,   28,   34,   34,   34,   50,  143,
+
+       50,   50,   50,   50,   50,   51,   51,   67,  142,   67,
+      141,  140,  139,  138,  137,  136,  135,  134,  133,  132,
+      131,  130,  129,  128,  127,  126,  125,  124,  121,  120,
+      119,  118,  117,  116,  115,  114,  113,  112,  111,  110,
+      109,  108,  107,  106,  105,  104,  103,  102,  101,  100,
+       99,   94,   93,   92,   91,   90,   89,   88,   87,   86,
+       85,   84,   83,  156,  156,   82,   81,   80,   79,   73,
+       72,   71,   70,   69,   68,   66,   65,   64,   63,   62,
+       61,   60,   59,   58,   57,   56,   53,   52,   32,   48,
+       47,   44,   43,   42,   41,   40,   37,   32,   27,  156,
+
+        3,  156,  156,  156,  156,  156,  156,  156,  156,  156,
+      156,  156,  156,  156,  156,  156,  156,  156,  156,  156,
+      156,  156,  156,  156,  156,  156,  156,  156,  156,  156,
+      156,  156,  156,  156,  156,  156,  156,  156,  156,  156,
+      156,  156,  156
+    } ;
+
+static yyconst short int yy_chk[244] =
+    {   0,
+        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,   10,   11,   15,   10,   17,   17,   23,   29,
+       15,  159,   23,   37,   37,   29,   58,  111,   58,  154,
+      153,   58,   58,   82,  152,   82,  151,  150,   82,   82,
+      146,  145,  144,  141,  111,  140,  139,   11,   59,   59,
+       59,   59,   59,   59,   59,   59,  157,  138,  157,  157,
+      157,  157,  157,  158,  158,  160,  160,  160,  161,  136,
+
+      161,  161,  161,  161,  161,  162,  162,  163,  135,  163,
+      133,  132,  131,  130,  128,  127,  126,  125,  124,  123,
+      122,  121,  120,  118,  117,  116,  114,  113,  110,  108,
+      107,  106,  105,  104,  103,   99,   98,   97,   96,   95,
+       94,   93,   92,   91,   89,   88,   87,   86,   85,   84,
+       83,   81,   80,   79,   77,   76,   75,   74,   73,   72,
+       71,   70,   69,   67,   66,   65,   64,   63,   60,   57,
+       56,   55,   54,   53,   52,   49,   48,   47,   46,   45,
+       44,   43,   42,   41,   40,   39,   36,   35,   28,   25,
+       24,   22,   21,   20,   19,   18,   16,   12,    8,    3,
+
+      156,  156,  156,  156,  156,  156,  156,  156,  156,  156,
+      156,  156,  156,  156,  156,  156,  156,  156,  156,  156,
+      156,  156,  156,  156,  156,  156,  156,  156,  156,  156,
+      156,  156,  156,  156,  156,  156,  156,  156,  156,  156,
+      156,  156,  156
+    } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+char *yytext;
+#line 1 "dcLexer.lxx"
+#define INITIAL 0
+/*
+// Filename: dcLexer.lxx
+// Created by:  drose (05Oct00)
+// 
+////////////////////////////////////////////////////////////////////
+*/
+#line 9 "dcLexer.lxx"
+#include "dcLexerDefs.h"
+#include "dcParserDefs.h"
+#include "dcParser.h"
+#include "dcindent.h"
+
+
+static int yyinput(void);        // declared by flex.
+extern "C" int dcyywrap();
+
+////////////////////////////////////////////////////////////////////
+// Static variables
+////////////////////////////////////////////////////////////////////
+
+// We'll increment line_number and col_number as we parse the file, so
+// that we can report the position of an error.
+static int line_number = 0;
+static int col_number = 0;
+
+// current_line holds as much of the current line as will fit.  Its
+// only purpose is for printing it out to report an error to the user.
+static const int max_error_width = 1024;
+static char current_line[max_error_width + 1];
+
+static int error_count = 0;
+static int warning_count = 0;
+
+// This is the pointer to the current input stream.
+static istream *inp = NULL;
+
+// This is the name of the dc file we're parsing.  We keep it so we
+// can print it out for error messages.
+static string dc_filename;
+
+
+////////////////////////////////////////////////////////////////////
+// Defining the interface to the lexer.
+////////////////////////////////////////////////////////////////////
+
+void
+dc_init_lexer(istream &in, const string &filename) {
+  inp = &in;
+  dc_filename = filename;
+  line_number = 0;
+  col_number = 0;
+  error_count = 0;
+  warning_count = 0;
+}
+
+int
+dc_error_count() {
+  return error_count;
+}
+
+int
+dc_warning_count() {
+  return warning_count;
+}
+
+
+////////////////////////////////////////////////////////////////////
+// Internal support functions.
+////////////////////////////////////////////////////////////////////
+
+int
+dcyywrap(void) {
+  return 1;
+}
+
+void
+dcyyerror(const string &msg) {
+  cerr << "\nError";
+  if (!dc_filename.empty()) {
+    cerr << " in " << dc_filename;
+  }
+  cerr 
+    << " at line " << line_number << ", column " << col_number << ":\n"
+    << current_line << "\n";
+  indent(cerr, col_number-1) 
+    << "^\n" << msg << "\n\n";
+  
+  error_count++;
+}
+
+void
+dcyywarning(const string &msg) {
+  cerr << "\nWarning";
+  if (!dc_filename.empty()) {
+    cerr << " in " << dc_filename;
+  }
+  cerr 
+    << " at line " << line_number << ", column " << col_number << ":\n"
+    << current_line << "\n";
+  indent(cerr, col_number-1) 
+    << "^\n" << msg << "\n\n";
+
+  warning_count++;
+}
+
+// Now define a function to take input from an istream instead of a
+// stdio FILE pointer.  This is flex-specific.
+static void
+input_chars(char *buffer, int &result, int max_size) {
+  nassertv(inp != NULL);
+  if (*inp) {
+    inp->read(buffer, max_size);
+    result = inp->gcount();
+
+    if (line_number == 0) {
+      // This is a special case.  If we are reading the very first bit
+      // from the stream, copy it into the current_line array.  This
+      // is because the \n.* rule below, which fills current_line
+      // normally, doesn't catch the first line.
+      strncpy(current_line, yytext, max_error_width);
+      current_line[max_error_width] = '\0';
+      line_number++;
+      col_number = 0;
+
+      // Truncate it at the newline.
+      char *end = strchr(current_line, '\n');
+      if (end != NULL) {
+        *end = '\0';
+      }
+    }
+
+  } else {
+    // End of file or I/O error.
+    result = 0;
+  }
+}
+#undef YY_INPUT
+#define YY_INPUT(buffer, result, max_size) input_chars(buffer, result, max_size)
+
+// read_char reads and returns a single character, incrementing the
+// supplied line and column numbers as appropriate.  A convenience
+// function for the scanning functions below.
+static int
+read_char(int &line, int &col) {
+  int c = yyinput();
+  if (c == '\n') {
+    line++;
+    col = 0;
+  } else {
+    col++;
+  }
+  return c;
+}
+
+// scan_quoted_string reads a string delimited by quotation marks and
+// returns it.
+static string
+scan_quoted_string() {
+  string result;
+
+  // We don't touch the current line number and column number during
+  // scanning, so that if we detect an error while scanning the string
+  // (e.g. an unterminated string), we'll report the error as
+  // occurring at the start of the string, not at the end--somewhat
+  // more convenient for the user.
+
+  // Instead of adjusting the global line_number and col_number
+  // variables, we'll operate on our own local variables for the
+  // interim.
+  int line = line_number;
+  int col = col_number;
+
+  int c;
+  c = read_char(line, col);
+  while (c != '"' && c != EOF) {
+    result += c;
+    c = read_char(line, col);
+  }
+
+  if (c == EOF) {
+    dcyyerror("This quotation mark is unterminated.");
+  }
+
+  line_number = line;
+  col_number = col;
+
+  return result;
+}
+
+// scan_hex_string reads a string of hexadecimal digits delimited by
+// angle brackets and returns the representative string.
+static string
+scan_hex_string() {
+  string result;
+
+  // We don't touch the current line number and column number during
+  // scanning, so that if we detect an error while scanning the string
+  // (e.g. an unterminated string), we'll report the error as
+  // occurring at the start of the string, not at the end--somewhat
+  // more convenient for the user.
+
+  // Instead of adjusting the global line_number and col_number
+  // variables, we'll operate on our own local variables for the
+  // interim.
+  int line = line_number;
+  int col = col_number;
+
+  bool odd = false;
+  int last = 0;
+  int c;
+  c = read_char(line, col);
+  while (c != '>' && c != EOF) {
+    int value;
+    if (c >= '0' && c <= '9') {
+      value = c - '0';
+    } else if (c >= 'a' && c <= 'f') {
+      value = c - 'a' + 10;
+    } else if (c >= 'A' && c <= 'F') {
+      value = c - 'A' + 10;
+    } else {
+      line_number = line;
+      col_number = col;
+      dcyyerror("Invalid hex digit.");
+      return string();
+    }
+
+    odd = !odd;
+    if (odd) {
+      last = value;
+    } else {
+      result += (char)((last << 4) | value);
+    }
+    c = read_char(line, col);
+  }
+
+  if (c == EOF) {
+    dcyyerror("This hex string is unterminated.");
+    return string();
+  } else if (odd) {
+    dcyyerror("Odd number of hex digits.");
+    return string();
+  }
+
+  line_number = line;
+  col_number = col;
+
+  return result;
+}
+
+// eat_c_comment scans past all characters up until the first */
+// encountered.
+static void
+eat_c_comment() {
+  // As above, we'll operate on our own local copies of line_number
+  // and col_number within this function.
+
+  int line = line_number;
+  int col = col_number;
+
+  int c, last_c;
+  
+  last_c = '\0';
+  c = read_char(line, col);
+  while (c != EOF && !(last_c == '*' && c == '/')) {
+    if (last_c == '/' && c == '*') {
+      dcyywarning("This comment contains a nested /* symbol--possibly unclosed?");
+    }
+    last_c = c;
+    c = read_char(line, col);
+  }
+
+  if (c == EOF) {
+    dcyyerror("This comment marker is unclosed.");
+  }
+
+  line_number = line;
+  col_number = col;
+}
+
+
+
+// accept() is called below as each piece is pulled off and
+// accepted by the lexer; it increments the current column number.
+inline void accept() {
+  col_number += yyleng;
+}
+
+#line 773 "lex.yy.c"
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap YY_PROTO(( void ));
+#else
+extern int yywrap YY_PROTO(( void ));
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput YY_PROTO(( void ));
+#else
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines.  This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#endif
+
+/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+	if ( yy_current_buffer->yy_is_interactive ) \
+		{ \
+		int c = '*', n; \
+		for ( n = 0; n < max_size && \
+			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+			buf[n] = (char) c; \
+		if ( c == '\n' ) \
+			buf[n++] = (char) c; \
+		if ( c == EOF && ferror( yyin ) ) \
+			YY_FATAL_ERROR( "input in flex scanner failed" ); \
+		result = n; \
+		} \
+	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+		  && ferror( yyin ) ) \
+		YY_FATAL_ERROR( "input in flex scanner failed" );
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+	YY_USER_ACTION
+
+YY_DECL
+	{
+	register yy_state_type yy_current_state;
+	register char *yy_cp, *yy_bp;
+	register int yy_act;
+
+#line 295 "dcLexer.lxx"
+
+
+
+
+
+#line 926 "lex.yy.c"
+
+	if ( yy_init )
+		{
+		yy_init = 0;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+		if ( ! yy_start )
+			yy_start = 1;	/* first start state */
+
+		if ( ! yyin )
+			yyin = stdin;
+
+		if ( ! yyout )
+			yyout = stdout;
+
+		if ( ! yy_current_buffer )
+			yy_current_buffer =
+				yy_create_buffer( yyin, YY_BUF_SIZE );
+
+		yy_load_buffer_state();
+		}
+
+	while ( 1 )		/* loops until end-of-file is reached */
+		{
+		yy_cp = yy_c_buf_p;
+
+		/* Support of yytext. */
+		*yy_cp = yy_hold_char;
+
+		/* yy_bp points to the position in yy_ch_buf of the start of
+		 * the current run.
+		 */
+		yy_bp = yy_cp;
+
+		yy_current_state = yy_start;
+yy_match:
+		do
+			{
+			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+			if ( yy_accept[yy_current_state] )
+				{
+				yy_last_accepting_state = yy_current_state;
+				yy_last_accepting_cpos = yy_cp;
+				}
+			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+				{
+				yy_current_state = (int) yy_def[yy_current_state];
+				if ( yy_current_state >= 157 )
+					yy_c = yy_meta[(unsigned int) yy_c];
+				}
+			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+			++yy_cp;
+			}
+		while ( yy_base[yy_current_state] != 201 );
+
+yy_find_action:
+		yy_act = yy_accept[yy_current_state];
+		if ( yy_act == 0 )
+			{ /* have to back up */
+			yy_cp = yy_last_accepting_cpos;
+			yy_current_state = yy_last_accepting_state;
+			yy_act = yy_accept[yy_current_state];
+			}
+
+		YY_DO_BEFORE_ACTION;
+
+
+do_action:	/* This label is used only to access EOF actions. */
+
+
+		switch ( yy_act )
+	{ /* beginning of action switch */
+			case 0: /* must back up */
+			/* undo the effects of YY_DO_BEFORE_ACTION */
+			*yy_cp = yy_hold_char;
+			yy_cp = yy_last_accepting_cpos;
+			yy_current_state = yy_last_accepting_state;
+			goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+#line 300 "dcLexer.lxx"
+{
+  // New line.  Save a copy of the line so we can print it out for the
+  // benefit of the user in case we get an error.
+
+  strncpy(current_line, yytext+1, max_error_width);
+  current_line[max_error_width] = '\0';
+  line_number++;
+  col_number=0;
+
+  // Return the whole line to the lexer, except the newline character,
+  // which we eat.
+  yyless(1);
+}
+	YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 314 "dcLexer.lxx"
+{ 
+  // Eat whitespace.
+  accept();
+}
+	YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 319 "dcLexer.lxx"
+{ 
+  // Eat C++-style comments.
+  accept();
+}
+	YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 324 "dcLexer.lxx"
+{
+  // Eat C-style comments.
+  accept();
+  eat_c_comment(); 
+}
+	YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 331 "dcLexer.lxx"
+{
+  accept();
+  return KW_DCLASS;
+}
+	YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 336 "dcLexer.lxx"
+{
+  accept();
+  return KW_INT8;
+}
+	YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 341 "dcLexer.lxx"
+{
+  accept();
+  return KW_INT16;
+}
+	YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 346 "dcLexer.lxx"
+{
+  accept();
+  return KW_INT32;
+}
+	YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 351 "dcLexer.lxx"
+{
+  accept();
+  return KW_INT64;
+}
+	YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 356 "dcLexer.lxx"
+{
+  accept();
+  return KW_UINT8;
+}
+	YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 361 "dcLexer.lxx"
+{
+  accept();
+  return KW_UINT16;
+}
+	YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 366 "dcLexer.lxx"
+{
+  accept();
+  return KW_UINT32;
+}
+	YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 371 "dcLexer.lxx"
+{
+  accept();
+  return KW_UINT64;
+}
+	YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 376 "dcLexer.lxx"
+{
+  accept();
+  return KW_FLOAT64;
+}
+	YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 381 "dcLexer.lxx"
+{
+  accept();
+  return KW_STRING;
+}
+	YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 386 "dcLexer.lxx"
+{
+  accept();
+  return KW_BLOB;
+}
+	YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 391 "dcLexer.lxx"
+{
+  accept();
+  return KW_INT8ARRAY;
+}
+	YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 396 "dcLexer.lxx"
+{
+  accept();
+  return KW_INT16ARRAY;
+}
+	YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 401 "dcLexer.lxx"
+{
+  accept();
+  return KW_INT32ARRAY;
+}
+	YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 406 "dcLexer.lxx"
+{
+  accept();
+  return KW_UINT8ARRAY;
+}
+	YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 411 "dcLexer.lxx"
+{
+  accept();
+  return KW_UINT16ARRAY;
+}
+	YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 416 "dcLexer.lxx"
+{
+  accept();
+  return KW_UINT32ARRAY;
+}
+	YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 421 "dcLexer.lxx"
+{
+  accept();
+  return KW_UINT32UINT8ARRAY;
+}
+	YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 426 "dcLexer.lxx"
+{
+  // A molecular keyword.
+  accept();
+  dcyylval.u.integer = atoi(dcyytext + 3); 
+  dcyylval.str = yytext;
+  return KW_MOL; 
+}
+	YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 434 "dcLexer.lxx"
+{
+  accept();
+  return KW_REQUIRED;
+}
+	YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 439 "dcLexer.lxx"
+{
+  accept();
+  return KW_BROADCAST;
+}
+	YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 444 "dcLexer.lxx"
+{
+  accept();
+  return KW_P2P;
+}
+	YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 449 "dcLexer.lxx"
+{
+  accept();
+  return KW_RAM;
+}
+	YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 454 "dcLexer.lxx"
+{
+  accept();
+  return KW_DB;
+}
+	YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 459 "dcLexer.lxx"
+{
+  accept();
+  return KW_CLSEND;
+}
+	YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 464 "dcLexer.lxx"
+{
+  accept();
+  return KW_CLRECV;
+}
+	YY_BREAK
+case 32:
+YY_RULE_SETUP
+#line 469 "dcLexer.lxx"
+{
+  accept();
+  return KW_OWNSEND;
+}
+	YY_BREAK
+case 33:
+YY_RULE_SETUP
+#line 474 "dcLexer.lxx"
+{ 
+  // An integer number.
+  accept(); 
+  dcyylval.u.integer = atoi(dcyytext); 
+  dcyylval.str = yytext;
+  return INTEGER; 
+}
+	YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 482 "dcLexer.lxx"
+{
+  // A hexadecimal integer number.
+  accept(); 
+  dcyylval.u.integer = strtoul(yytext+2, NULL, 16);
+  dcyylval.str = yytext;
+  return INTEGER; 
+}
+	YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 490 "dcLexer.lxx"
+{ 
+  // A floating-point number.
+  accept(); 
+  dcyylval.u.real = atof(dcyytext); 
+  dcyylval.str = yytext;
+  return REAL; 
+}
+	YY_BREAK
+case 36:
+YY_RULE_SETUP
+#line 498 "dcLexer.lxx"
+{
+  // Quoted string.
+  accept();
+  dcyylval.str = scan_quoted_string();
+  return STRING;
+}
+	YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 505 "dcLexer.lxx"
+{
+  // Long hex string.
+  accept();
+  dcyylval.str = scan_hex_string();
+  return HEX_STRING;
+}
+	YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 512 "dcLexer.lxx"
+{ 
+  // Identifier.
+  accept();
+  dcyylval.str = yytext;
+  return IDENTIFIER;
+}
+	YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 520 "dcLexer.lxx"
+{
+  // Send any other printable character as itself.
+  accept(); 
+  return dcyytext[0];
+}
+	YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 526 "dcLexer.lxx"
+ECHO;
+	YY_BREAK
+#line 1355 "lex.yy.c"
+case YY_STATE_EOF(INITIAL):
+	yyterminate();
+
+	case YY_END_OF_BUFFER:
+		{
+		/* Amount of text matched not including the EOB char. */
+		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+
+		/* Undo the effects of YY_DO_BEFORE_ACTION. */
+		*yy_cp = yy_hold_char;
+
+		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+			{
+			/* We're scanning a new file or input source.  It's
+			 * possible that this happened because the user
+			 * just pointed yyin at a new source and called
+			 * yylex().  If so, then we have to assure
+			 * consistency between yy_current_buffer and our
+			 * globals.  Here is the right place to do so, because
+			 * this is the first action (other than possibly a
+			 * back-up) that will match for the new input source.
+			 */
+			yy_n_chars = yy_current_buffer->yy_n_chars;
+			yy_current_buffer->yy_input_file = yyin;
+			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+			}
+
+		/* Note that here we test for yy_c_buf_p "<=" to the position
+		 * of the first EOB in the buffer, since yy_c_buf_p will
+		 * already have been incremented past the NUL character
+		 * (since all states make transitions on EOB to the
+		 * end-of-buffer state).  Contrast this with the test
+		 * in input().
+		 */
+		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+			{ /* This was really a NUL. */
+			yy_state_type yy_next_state;
+
+			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+
+			yy_current_state = yy_get_previous_state();
+
+			/* Okay, we're now positioned to make the NUL
+			 * transition.  We couldn't have
+			 * yy_get_previous_state() go ahead and do it
+			 * for us because it doesn't know how to deal
+			 * with the possibility of jamming (and we don't
+			 * want to build jamming into it because then it
+			 * will run more slowly).
+			 */
+
+			yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+			yy_bp = yytext_ptr + YY_MORE_ADJ;
+
+			if ( yy_next_state )
+				{
+				/* Consume the NUL. */
+				yy_cp = ++yy_c_buf_p;
+				yy_current_state = yy_next_state;
+				goto yy_match;
+				}
+
+			else
+				{
+				yy_cp = yy_c_buf_p;
+				goto yy_find_action;
+				}
+			}
+
+		else switch ( yy_get_next_buffer() )
+			{
+			case EOB_ACT_END_OF_FILE:
+				{
+				yy_did_buffer_switch_on_eof = 0;
+
+				if ( yywrap() )
+					{
+					/* Note: because we've taken care in
+					 * yy_get_next_buffer() to have set up
+					 * yytext, we can now set up
+					 * yy_c_buf_p so that if some total
+					 * hoser (like flex itself) wants to
+					 * call the scanner after we return the
+					 * YY_NULL, it'll still work - another
+					 * YY_NULL will get returned.
+					 */
+					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+
+					yy_act = YY_STATE_EOF(YY_START);
+					goto do_action;
+					}
+
+				else
+					{
+					if ( ! yy_did_buffer_switch_on_eof )
+						YY_NEW_FILE;
+					}
+				break;
+				}
+
+			case EOB_ACT_CONTINUE_SCAN:
+				yy_c_buf_p =
+					yytext_ptr + yy_amount_of_matched_text;
+
+				yy_current_state = yy_get_previous_state();
+
+				yy_cp = yy_c_buf_p;
+				yy_bp = yytext_ptr + YY_MORE_ADJ;
+				goto yy_match;
+
+			case EOB_ACT_LAST_MATCH:
+				yy_c_buf_p =
+				&yy_current_buffer->yy_ch_buf[yy_n_chars];
+
+				yy_current_state = yy_get_previous_state();
+
+				yy_cp = yy_c_buf_p;
+				yy_bp = yytext_ptr + YY_MORE_ADJ;
+				goto yy_find_action;
+			}
+		break;
+		}
+
+	default:
+		YY_FATAL_ERROR(
+			"fatal flex scanner internal error--no action found" );
+	} /* end of action switch */
+		} /* end of scanning one token */
+	} /* end of yylex */
+
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ *	EOB_ACT_LAST_MATCH -
+ *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ *	EOB_ACT_END_OF_FILE - end of file
+ */
+
+static int yy_get_next_buffer()
+	{
+	register char *dest = yy_current_buffer->yy_ch_buf;
+	register char *source = yytext_ptr;
+	register int number_to_move, i;
+	int ret_val;
+
+	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+		YY_FATAL_ERROR(
+		"fatal flex scanner internal error--end of buffer missed" );
+
+	if ( yy_current_buffer->yy_fill_buffer == 0 )
+		{ /* Don't try to fill the buffer, so this is an EOF. */
+		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+			{
+			/* We matched a singled characater, the EOB, so
+			 * treat this as a final EOF.
+			 */
+			return EOB_ACT_END_OF_FILE;
+			}
+
+		else
+			{
+			/* We matched some text prior to the EOB, first
+			 * process it.
+			 */
+			return EOB_ACT_LAST_MATCH;
+			}
+		}
+
+	/* Try to read more data. */
+
+	/* First move last chars to start of buffer. */
+	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+
+	for ( i = 0; i < number_to_move; ++i )
+		*(dest++) = *(source++);
+
+	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+		/* don't do the read, it's not guaranteed to return an EOF,
+		 * just force an EOF
+		 */
+		yy_n_chars = 0;
+
+	else
+		{
+		int num_to_read =
+			yy_current_buffer->yy_buf_size - number_to_move - 1;
+
+		while ( num_to_read <= 0 )
+			{ /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+			YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
+
+			/* just a shorter name for the current buffer */
+			YY_BUFFER_STATE b = yy_current_buffer;
+
+			int yy_c_buf_p_offset =
+				(int) (yy_c_buf_p - b->yy_ch_buf);
+
+			if ( b->yy_is_our_buffer )
+				{
+				int new_size = b->yy_buf_size * 2;
+
+				if ( new_size <= 0 )
+					b->yy_buf_size += b->yy_buf_size / 8;
+				else
+					b->yy_buf_size *= 2;
+
+				b->yy_ch_buf = (char *)
+					/* Include room in for 2 EOB chars. */
+					yy_flex_realloc( (void *) b->yy_ch_buf,
+							 b->yy_buf_size + 2 );
+				}
+			else
+				/* Can't grow it, we don't own it. */
+				b->yy_ch_buf = 0;
+
+			if ( ! b->yy_ch_buf )
+				YY_FATAL_ERROR(
+				"fatal error - scanner input buffer overflow" );
+
+			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+			num_to_read = yy_current_buffer->yy_buf_size -
+						number_to_move - 1;
+#endif
+			}
+
+		if ( num_to_read > YY_READ_BUF_SIZE )
+			num_to_read = YY_READ_BUF_SIZE;
+
+		/* Read in more data. */
+		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+			yy_n_chars, num_to_read );
+		}
+
+	if ( yy_n_chars == 0 )
+		{
+		if ( number_to_move == YY_MORE_ADJ )
+			{
+			ret_val = EOB_ACT_END_OF_FILE;
+			yyrestart( yyin );
+			}
+
+		else
+			{
+			ret_val = EOB_ACT_LAST_MATCH;
+			yy_current_buffer->yy_buffer_status =
+				YY_BUFFER_EOF_PENDING;
+			}
+		}
+
+	else
+		ret_val = EOB_ACT_CONTINUE_SCAN;
+
+	yy_n_chars += number_to_move;
+	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+
+	return ret_val;
+	}
+
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+static yy_state_type yy_get_previous_state()
+	{
+	register yy_state_type yy_current_state;
+	register char *yy_cp;
+
+	yy_current_state = yy_start;
+
+	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+		{
+		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+		if ( yy_accept[yy_current_state] )
+			{
+			yy_last_accepting_state = yy_current_state;
+			yy_last_accepting_cpos = yy_cp;
+			}
+		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+			{
+			yy_current_state = (int) yy_def[yy_current_state];
+			if ( yy_current_state >= 157 )
+				yy_c = yy_meta[(unsigned int) yy_c];
+			}
+		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+		}
+
+	return yy_current_state;
+	}
+
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ *	next_state = yy_try_NUL_trans( current_state );
+ */
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+	{
+	register int yy_is_jam;
+	register char *yy_cp = yy_c_buf_p;
+
+	register YY_CHAR yy_c = 1;
+	if ( yy_accept[yy_current_state] )
+		{
+		yy_last_accepting_state = yy_current_state;
+		yy_last_accepting_cpos = yy_cp;
+		}
+	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+		{
+		yy_current_state = (int) yy_def[yy_current_state];
+		if ( yy_current_state >= 157 )
+			yy_c = yy_meta[(unsigned int) yy_c];
+		}
+	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+	yy_is_jam = (yy_current_state == 156);
+
+	return yy_is_jam ? 0 : yy_current_state;
+	}
+
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+	{
+	register char *yy_cp = yy_c_buf_p;
+
+	/* undo effects of setting up yytext */
+	*yy_cp = yy_hold_char;
+
+	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+		{ /* need to shift things up to make room */
+		/* +2 for EOB chars. */
+		register int number_to_move = yy_n_chars + 2;
+		register char *dest = &yy_current_buffer->yy_ch_buf[
+					yy_current_buffer->yy_buf_size + 2];
+		register char *source =
+				&yy_current_buffer->yy_ch_buf[number_to_move];
+
+		while ( source > yy_current_buffer->yy_ch_buf )
+			*--dest = *--source;
+
+		yy_cp += (int) (dest - source);
+		yy_bp += (int) (dest - source);
+		yy_n_chars = yy_current_buffer->yy_buf_size;
+
+		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+			YY_FATAL_ERROR( "flex scanner push-back overflow" );
+		}
+
+	*--yy_cp = (char) c;
+
+
+	yytext_ptr = yy_bp;
+	yy_hold_char = *yy_cp;
+	yy_c_buf_p = yy_cp;
+	}
+#endif	/* ifndef YY_NO_UNPUT */
+
+
+#ifdef __cplusplus
+static int yyinput()
+#else
+static int input()
+#endif
+	{
+	int c;
+
+	*yy_c_buf_p = yy_hold_char;
+
+	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+		{
+		/* yy_c_buf_p now points to the character we want to return.
+		 * If this occurs *before* the EOB characters, then it's a
+		 * valid NUL; if not, then we've hit the end of the buffer.
+		 */
+		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+			/* This was really a NUL. */
+			*yy_c_buf_p = '\0';
+
+		else
+			{ /* need more input */
+			yytext_ptr = yy_c_buf_p;
+			++yy_c_buf_p;
+
+			switch ( yy_get_next_buffer() )
+				{
+				case EOB_ACT_END_OF_FILE:
+					{
+					if ( yywrap() )
+						{
+						yy_c_buf_p =
+						yytext_ptr + YY_MORE_ADJ;
+						return EOF;
+						}
+
+					if ( ! yy_did_buffer_switch_on_eof )
+						YY_NEW_FILE;
+#ifdef __cplusplus
+					return yyinput();
+#else
+					return input();
+#endif
+					}
+
+				case EOB_ACT_CONTINUE_SCAN:
+					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+					break;
+
+				case EOB_ACT_LAST_MATCH:
+#ifdef __cplusplus
+					YY_FATAL_ERROR(
+					"unexpected last match in yyinput()" );
+#else
+					YY_FATAL_ERROR(
+					"unexpected last match in input()" );
+#endif
+				}
+			}
+		}
+
+	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
+	*yy_c_buf_p = '\0';	/* preserve yytext */
+	yy_hold_char = *++yy_c_buf_p;
+
+
+	return c;
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+	{
+	if ( ! yy_current_buffer )
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+	yy_init_buffer( yy_current_buffer, input_file );
+	yy_load_buffer_state();
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+	{
+	if ( yy_current_buffer == new_buffer )
+		return;
+
+	if ( yy_current_buffer )
+		{
+		/* Flush out information for old buffer. */
+		*yy_c_buf_p = yy_hold_char;
+		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+		yy_current_buffer->yy_n_chars = yy_n_chars;
+		}
+
+	yy_current_buffer = new_buffer;
+	yy_load_buffer_state();
+
+	/* We don't actually know whether we did this switch during
+	 * EOF (yywrap()) processing, but the only time this flag
+	 * is looked at is after yywrap() is called, so it's safe
+	 * to go ahead and always set it.
+	 */
+	yy_did_buffer_switch_on_eof = 1;
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+	{
+	yy_n_chars = yy_current_buffer->yy_n_chars;
+	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+	yyin = yy_current_buffer->yy_input_file;
+	yy_hold_char = *yy_c_buf_p;
+	}
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+	{
+	YY_BUFFER_STATE b;
+
+	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_buf_size = size;
+
+	/* yy_ch_buf has to be 2 characters longer than the size given because
+	 * we need to put in 2 end-of-buffer characters.
+	 */
+	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+	if ( ! b->yy_ch_buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_is_our_buffer = 1;
+
+	yy_init_buffer( b, file );
+
+	return b;
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+	{
+	if ( ! b )
+		return;
+
+	if ( b == yy_current_buffer )
+		yy_current_buffer = (YY_BUFFER_STATE) 0;
+
+	if ( b->yy_is_our_buffer )
+		yy_flex_free( (void *) b->yy_ch_buf );
+
+	yy_flex_free( (void *) b );
+	}
+
+
+#ifndef YY_ALWAYS_INTERACTIVE
+#ifndef YY_NEVER_INTERACTIVE
+extern int isatty YY_PROTO(( int ));
+#endif
+#endif
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+	{
+	yy_flush_buffer( b );
+
+	b->yy_input_file = file;
+	b->yy_fill_buffer = 1;
+
+#if YY_ALWAYS_INTERACTIVE
+	b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+	b->yy_is_interactive = 0;
+#else
+	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+	{
+	b->yy_n_chars = 0;
+
+	/* We always need two end-of-buffer characters.  The first causes
+	 * a transition to the end-of-buffer state.  The second causes
+	 * a jam in that state.
+	 */
+	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+	b->yy_buf_pos = &b->yy_ch_buf[0];
+
+	b->yy_at_bol = 1;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	if ( b == yy_current_buffer )
+		yy_load_buffer_state();
+	}
+
+
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+	{
+	YY_BUFFER_STATE b;
+
+	if ( size < 2 ||
+	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
+	     base[size-1] != YY_END_OF_BUFFER_CHAR )
+		/* They forgot to leave room for the EOB's. */
+		return 0;
+
+	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
+	b->yy_buf_pos = b->yy_ch_buf = base;
+	b->yy_is_our_buffer = 0;
+	b->yy_input_file = 0;
+	b->yy_n_chars = b->yy_buf_size;
+	b->yy_is_interactive = 0;
+	b->yy_at_bol = 1;
+	b->yy_fill_buffer = 0;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	yy_switch_to_buffer( b );
+
+	return b;
+	}
+#endif
+
+
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *str )
+#else
+YY_BUFFER_STATE yy_scan_string( str )
+yyconst char *str;
+#endif
+	{
+	int len;
+	for ( len = 0; str[len]; ++len )
+		;
+
+	return yy_scan_bytes( str, len );
+	}
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+	{
+	YY_BUFFER_STATE b;
+	char *buf;
+	yy_size_t n;
+	int i;
+
+	/* Get memory for full buffer, including space for trailing EOB's. */
+	n = len + 2;
+	buf = (char *) yy_flex_alloc( n );
+	if ( ! buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+	for ( i = 0; i < len; ++i )
+		buf[i] = bytes[i];
+
+	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+
+	b = yy_scan_buffer( buf, n );
+	if ( ! b )
+		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+	/* It's okay to grow etc. this buffer, and we should throw it
+	 * away when we're done.
+	 */
+	b->yy_is_our_buffer = 1;
+
+	return b;
+	}
+#endif
+
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
+#endif
+	{
+	if ( yy_start_stack_ptr >= yy_start_stack_depth )
+		{
+		yy_size_t new_size;
+
+		yy_start_stack_depth += YY_START_STACK_INCR;
+		new_size = yy_start_stack_depth * sizeof( int );
+
+		if ( ! yy_start_stack )
+			yy_start_stack = (int *) yy_flex_alloc( new_size );
+
+		else
+			yy_start_stack = (int *) yy_flex_realloc(
+					(void *) yy_start_stack, new_size );
+
+		if ( ! yy_start_stack )
+			YY_FATAL_ERROR(
+			"out of memory expanding start-condition stack" );
+		}
+
+	yy_start_stack[yy_start_stack_ptr++] = YY_START;
+
+	BEGIN(new_state);
+	}
+#endif
+
+
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+	{
+	if ( --yy_start_stack_ptr < 0 )
+		YY_FATAL_ERROR( "start-condition stack underflow" );
+
+	BEGIN(yy_start_stack[yy_start_stack_ptr]);
+	}
+#endif
+
+
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+	{
+	return yy_start_stack[yy_start_stack_ptr - 1];
+	}
+#endif
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+	{
+	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+	}
+
+
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+		yytext[yyleng] = yy_hold_char; \
+		yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
+		yy_hold_char = *yy_c_buf_p; \
+		*yy_c_buf_p = '\0'; \
+		yyleng = n; \
+		} \
+	while ( 0 )
+
+
+/* Internal utility routines. */
+
+#ifndef yytext_ptr
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+	{
+	register int i;
+	for ( i = 0; i < n; ++i )
+		s1[i] = s2[i];
+	}
+#endif
+
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+	{
+	return (void *) malloc( size );
+	}
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+	{
+	/* The cast to (char *) in the following accommodates both
+	 * implementations that use char* generic pointers, and those
+	 * that use void* generic pointers.  It works with the latter
+	 * because both ANSI C and C++ allow castless assignment from
+	 * any pointer type to void*, and deal with argument conversions
+	 * as though doing an assignment.
+	 */
+	return (void *) realloc( (char *) ptr, size );
+	}
+
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+	{
+	free( ptr );
+	}
+
+#if YY_MAIN
+int main()
+	{
+	yylex();
+	return 0;
+	}
+#endif
+#line 526 "dcLexer.lxx"

+ 1439 - 0
direct/src/dcparser/dcParser.cxx.prebuilt

@@ -0,0 +1,1439 @@
+
+/*  A Bison parser, made from dcParser.yxx
+    by GNU Bison version 1.28  */
+
+#define YYBISON 1  /* Identify Bison output.  */
+
+#define yyparse dcyyparse
+#define yylex dcyylex
+#define yyerror dcyyerror
+#define yylval dcyylval
+#define yychar dcyychar
+#define yydebug dcyydebug
+#define yynerrs dcyynerrs
+#define	INTEGER	257
+#define	REAL	258
+#define	STRING	259
+#define	HEX_STRING	260
+#define	IDENTIFIER	261
+#define	KW_DCLASS	262
+#define	KW_INT8	263
+#define	KW_INT16	264
+#define	KW_INT32	265
+#define	KW_INT64	266
+#define	KW_UINT8	267
+#define	KW_UINT16	268
+#define	KW_UINT32	269
+#define	KW_UINT64	270
+#define	KW_FLOAT64	271
+#define	KW_STRING	272
+#define	KW_BLOB	273
+#define	KW_INT8ARRAY	274
+#define	KW_INT16ARRAY	275
+#define	KW_INT32ARRAY	276
+#define	KW_UINT8ARRAY	277
+#define	KW_UINT16ARRAY	278
+#define	KW_UINT32ARRAY	279
+#define	KW_UINT32UINT8ARRAY	280
+#define	KW_MOL	281
+#define	KW_REQUIRED	282
+#define	KW_BROADCAST	283
+#define	KW_P2P	284
+#define	KW_RAM	285
+#define	KW_DB	286
+#define	KW_CLSEND	287
+#define	KW_CLRECV	288
+#define	KW_OWNSEND	289
+
+#line 6 "dcParser.yxx"
+
+#include "dcLexerDefs.h"
+#include "dcParserDefs.h"
+#include "dcFile.h"
+#include "dcClass.h"
+#include "dcAtomicField.h"
+#include "dcMolecularField.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
+
+static DCFile *dc_file = (DCFile *)NULL;
+static DCClass *current_class = (DCClass *)NULL;
+static DCAtomicField *current_atomic = (DCAtomicField *)NULL;
+static DCMolecularField *current_molecular = (DCMolecularField *)NULL;
+static DCAtomicField::ElementType atomic_element;
+
+////////////////////////////////////////////////////////////////////
+// Defining the interface to the parser.
+////////////////////////////////////////////////////////////////////
+
+void
+dc_init_parser(istream &in, const string &filename, DCFile &file) {
+  dc_file = &file;
+  dc_init_lexer(in, filename);
+}
+
+void
+dc_cleanup_parser() {
+  dc_file = (DCFile *)NULL;
+}
+
+#include <stdio.h>
+
+#ifndef __cplusplus
+#ifndef __STDC__
+#define const
+#endif
+#endif
+
+
+
+#define	YYFINAL		101
+#define	YYFLAG		-32768
+#define	YYNTBASE	46
+
+#define YYTRANSLATE(x) ((unsigned)(x) <= 289 ? yytranslate[x] : 71)
+
+static const char yytranslate[] = {     0,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,    41,
+    42,    45,     2,    40,     2,     2,    43,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,    39,    36,     2,
+    44,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,    37,     2,    38,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     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,     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
+};
+
+#if YYDEBUG != 0
+static const short yyprhs[] = {     0,
+     0,     2,     5,     8,     9,    17,    19,    21,    24,    26,
+    30,    32,    35,    38,    41,    42,    49,    51,    53,    55,
+    57,    61,    62,    66,    68,    72,    75,    79,    83,    87,
+    91,    97,    99,   102,   104,   106,   108,   112,   114,   116,
+   118,   120,   124,   128,   132,   134,   136,   138,   140,   142,
+   144,   146,   148,   150,   152,   154,   156,   158,   160,   162,
+   164,   166,   168,   170,   173,   176,   179,   182,   185,   188,
+   191,   194,   195,   200,   202,   206
+};
+
+static const short yyrhs[] = {    70,
+     0,    46,    36,     0,    46,    47,     0,     0,     8,     7,
+    48,    50,    37,    52,    38,     0,     7,     0,    70,     0,
+    39,    51,     0,    49,     0,    51,    40,    49,     0,    70,
+     0,    52,    36,     0,    52,    53,     0,    52,    67,     0,
+     0,     7,    41,    54,    56,    42,    66,     0,     7,     0,
+    70,     0,    57,     0,    58,     0,    57,    40,    58,     0,
+     0,    65,    59,    60,     0,    70,     0,    60,    43,     3,
+     0,    60,     7,     0,    60,    44,     3,     0,    60,    44,
+     4,     0,    60,    44,     5,     0,    60,    44,     6,     0,
+    60,    44,    37,    61,    38,     0,    70,     0,    63,    62,
+     0,    70,     0,    40,     0,    64,     0,    63,    40,    64,
+     0,     3,     0,     4,     0,     5,     0,     6,     0,     3,
+    45,     3,     0,     4,    45,     3,     0,     6,    45,     3,
+     0,     9,     0,    10,     0,    11,     0,    12,     0,    13,
+     0,    14,     0,    15,     0,    16,     0,    17,     0,    18,
+     0,    19,     0,    20,     0,    21,     0,    22,     0,    23,
+     0,    24,     0,    25,     0,    26,     0,    70,     0,    66,
+    28,     0,    66,    29,     0,    66,    30,     0,    66,    31,
+     0,    66,    32,     0,    66,    33,     0,    66,    34,     0,
+    66,    35,     0,     0,     7,    39,    68,    69,     0,    55,
+     0,    69,    40,    55,     0,     0
+};
+
+#endif
+
+#if YYDEBUG != 0
+static const short yyrline[] = { 0,
+    87,    89,    90,    93,   102,   105,   119,   121,   124,   131,
+   139,   141,   142,   143,   146,   155,   158,   174,   176,   179,
+   181,   184,   191,   196,   198,   202,   206,   212,   218,   224,
+   230,   240,   242,   245,   247,   250,   252,   255,   262,   268,
+   274,   280,   289,   298,   309,   314,   318,   322,   326,   330,
+   334,   338,   342,   346,   350,   354,   358,   362,   366,   370,
+   374,   378,   384,   386,   390,   394,   398,   402,   406,   410,
+   414,   420,   430,   432,   439,   452
+};
+#endif
+
+
+#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
+
+static const char * const yytname[] = {   "$","error","$undefined.","INTEGER",
+"REAL","STRING","HEX_STRING","IDENTIFIER","KW_DCLASS","KW_INT8","KW_INT16","KW_INT32",
+"KW_INT64","KW_UINT8","KW_UINT16","KW_UINT32","KW_UINT64","KW_FLOAT64","KW_STRING",
+"KW_BLOB","KW_INT8ARRAY","KW_INT16ARRAY","KW_INT32ARRAY","KW_UINT8ARRAY","KW_UINT16ARRAY",
+"KW_UINT32ARRAY","KW_UINT32UINT8ARRAY","KW_MOL","KW_REQUIRED","KW_BROADCAST",
+"KW_P2P","KW_RAM","KW_DB","KW_CLSEND","KW_CLRECV","KW_OWNSEND","';'","'{'","'}'",
+"':'","','","'('","')'","'/'","'='","'*'","dc","dclass","@1","dclass_name","dclass_derivation",
+"base_list","dclass_fields","atomic_field","@2","atomic_name","parameter_list",
+"nonempty_parameter_list","atomic_element","@3","atomic_element_definition",
+"default_array","maybe_comma","default_array_def","default_array_element","type_token",
+"atomic_flags","molecular_field","@4","molecular_atom_list","empty", NULL
+};
+#endif
+
+static const short yyr1[] = {     0,
+    46,    46,    46,    48,    47,    49,    50,    50,    51,    51,
+    52,    52,    52,    52,    54,    53,    55,    56,    56,    57,
+    57,    59,    58,    60,    60,    60,    60,    60,    60,    60,
+    60,    61,    61,    62,    62,    63,    63,    64,    64,    64,
+    64,    64,    64,    64,    65,    65,    65,    65,    65,    65,
+    65,    65,    65,    65,    65,    65,    65,    65,    65,    65,
+    65,    65,    66,    66,    66,    66,    66,    66,    66,    66,
+    66,    68,    67,    69,    69,    70
+};
+
+static const short yyr2[] = {     0,
+     1,     2,     2,     0,     7,     1,     1,     2,     1,     3,
+     1,     2,     2,     2,     0,     6,     1,     1,     1,     1,
+     3,     0,     3,     1,     3,     2,     3,     3,     3,     3,
+     5,     1,     2,     1,     1,     1,     3,     1,     1,     1,
+     1,     3,     3,     3,     1,     1,     1,     1,     1,     1,
+     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+     1,     1,     1,     2,     2,     2,     2,     2,     2,     2,
+     2,     0,     4,     1,     3,     0
+};
+
+static const short yydefact[] = {    76,
+     0,     1,     0,     2,     3,     4,    76,     0,     0,     7,
+     6,     9,     8,    76,     0,     0,    11,    10,     0,    12,
+     5,    13,    14,    72,    15,     0,    76,    17,    74,    73,
+    45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
+    55,    56,    57,    58,    59,    60,    61,    62,     0,    19,
+    20,    22,    18,     0,    76,     0,    76,    75,    16,    63,
+    21,    23,    24,    64,    65,    66,    67,    68,    69,    70,
+    71,    26,     0,     0,    25,    27,    28,    29,    30,    76,
+    38,    39,    40,    41,     0,    76,    36,    32,     0,     0,
+     0,    31,    35,    33,    34,    42,    43,    44,    37,     0,
+     0
+};
+
+static const short yydefgoto[] = {     1,
+     5,     7,    12,     9,    13,    16,    22,    27,    29,    49,
+    50,    51,    57,    62,    85,    94,    86,    87,    52,    59,
+    23,    26,    30,     2
+};
+
+static const short yypact[] = {-32768,
+     3,-32768,    -2,-32768,-32768,-32768,   -31,     2,   -27,-32768,
+-32768,-32768,   -19,-32768,     2,    -5,-32768,-32768,   -35,-32768,
+-32768,-32768,-32768,-32768,-32768,    15,    42,-32768,-32768,   -17,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   -18,   -15,
+-32768,-32768,-32768,    15,-32768,    42,-32768,-32768,    52,-32768,
+-32768,    -6,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,    23,     9,-32768,-32768,-32768,-32768,-32768,    13,
+   -16,   -13,-32768,   -11,   -10,    -4,-32768,-32768,    24,    27,
+    32,-32768,    13,-32768,-32768,-32768,-32768,-32768,-32768,    40,
+-32768
+};
+
+static const short yypgoto[] = {-32768,
+-32768,-32768,    26,-32768,-32768,-32768,-32768,-32768,   -12,-32768,
+-32768,    -9,-32768,-32768,-32768,-32768,-32768,   -50,-32768,-32768,
+-32768,-32768,-32768,    -7
+};
+
+
+#define	YYLAST		87
+
+
+static const short yytable[] = {    10,
+    72,    19,   100,    24,     6,    25,    17,     8,    11,    14,
+     3,    76,    77,    78,    79,    81,    82,    83,    84,    53,
+    15,    28,    54,    55,    56,    75,    96,    92,    89,    97,
+    20,    90,    21,    91,    98,    93,    73,    74,     4,   101,
+    18,    58,    99,     0,     0,    80,    61,    60,     0,    63,
+    31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
+    41,    42,    43,    44,    45,    46,    47,    48,     0,     0,
+     0,     0,    88,     0,     0,     0,     0,     0,    95,    64,
+    65,    66,    67,    68,    69,    70,    71
+};
+
+static const short yycheck[] = {     7,
+     7,     7,     0,    39,     7,    41,    14,    39,     7,    37,
+     8,     3,     4,     5,     6,     3,     4,     5,     6,    27,
+    40,     7,    40,    42,    40,     3,     3,    38,    45,     3,
+    36,    45,    38,    45,     3,    40,    43,    44,    36,     0,
+    15,    54,    93,    -1,    -1,    37,    56,    55,    -1,    57,
+     9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
+    19,    20,    21,    22,    23,    24,    25,    26,    -1,    -1,
+    -1,    -1,    80,    -1,    -1,    -1,    -1,    -1,    86,    28,
+    29,    30,    31,    32,    33,    34,    35
+};
+/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
+#line 3 "/usr/share/bison.simple"
+/* This file comes from bison-1.28.  */
+
+/* Skeleton output parser for bison,
+   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+/* As a special exception, when this file is copied by Bison into a
+   Bison output file, you may use that output file without restriction.
+   This special exception was added by the Free Software Foundation
+   in version 1.24 of Bison.  */
+
+/* This is the parser code that is written into each bison parser
+  when the %semantic_parser declaration is not specified in the grammar.
+  It was written by Richard Stallman by simplifying the hairy parser
+  used when %semantic_parser is specified.  */
+
+#ifndef YYSTACK_USE_ALLOCA
+#ifdef alloca
+#define YYSTACK_USE_ALLOCA
+#else /* alloca not defined */
+#ifdef __GNUC__
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#else /* not GNU C.  */
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
+#define YYSTACK_USE_ALLOCA
+#include <alloca.h>
+#else /* not sparc */
+/* We think this test detects Watcom and Microsoft C.  */
+/* This used to test MSDOS, but that is a bad idea
+   since that symbol is in the user namespace.  */
+#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
+#if 0 /* No need for malloc.h, which pollutes the namespace;
+	 instead, just don't use alloca.  */
+#include <malloc.h>
+#endif
+#else /* not MSDOS, or __TURBOC__ */
+#if defined(_AIX)
+/* I don't know what this was needed for, but it pollutes the namespace.
+   So I turned it off.   rms, 2 May 1997.  */
+/* #include <malloc.h>  */
+ #pragma alloca
+#define YYSTACK_USE_ALLOCA
+#else /* not MSDOS, or __TURBOC__, or _AIX */
+#if 0
+#ifdef __hpux /* [email protected] says this works for HPUX 9.05 and up,
+		 and on HPUX 10.  Eventually we can turn this on.  */
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#endif /* __hpux */
+#endif
+#endif /* not _AIX */
+#endif /* not MSDOS, or __TURBOC__ */
+#endif /* not sparc */
+#endif /* not GNU C */
+#endif /* alloca not defined */
+#endif /* YYSTACK_USE_ALLOCA not defined */
+
+#ifdef YYSTACK_USE_ALLOCA
+#define YYSTACK_ALLOC alloca
+#else
+#define YYSTACK_ALLOC malloc
+#endif
+
+/* Note: there must be only one dollar sign in this file.
+   It is replaced by the list of actions, each action
+   as one case of the switch.  */
+
+#define yyerrok		(yyerrstatus = 0)
+#define yyclearin	(yychar = YYEMPTY)
+#define YYEMPTY		-2
+#define YYEOF		0
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT 	goto yyabortlab
+#define YYERROR		goto yyerrlab1
+/* Like YYERROR except do call yyerror.
+   This remains here temporarily to ease the
+   transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+#define YYFAIL		goto yyerrlab
+#define YYRECOVERING()  (!!yyerrstatus)
+#define YYBACKUP(token, value) \
+do								\
+  if (yychar == YYEMPTY && yylen == 1)				\
+    { yychar = (token), yylval = (value);			\
+      yychar1 = YYTRANSLATE (yychar);				\
+      YYPOPSTACK;						\
+      goto yybackup;						\
+    }								\
+  else								\
+    { yyerror ("syntax error: cannot back up"); YYERROR; }	\
+while (0)
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+#ifndef YYPURE
+#define YYLEX		yylex()
+#endif
+
+#ifdef YYPURE
+#ifdef YYLSP_NEEDED
+#ifdef YYLEX_PARAM
+#define YYLEX		yylex(&yylval, &yylloc, YYLEX_PARAM)
+#else
+#define YYLEX		yylex(&yylval, &yylloc)
+#endif
+#else /* not YYLSP_NEEDED */
+#ifdef YYLEX_PARAM
+#define YYLEX		yylex(&yylval, YYLEX_PARAM)
+#else
+#define YYLEX		yylex(&yylval)
+#endif
+#endif /* not YYLSP_NEEDED */
+#endif
+
+/* If nonreentrant, generate the variables here */
+
+#ifndef YYPURE
+
+int	yychar;			/*  the lookahead symbol		*/
+YYSTYPE	yylval;			/*  the semantic value of the		*/
+				/*  lookahead symbol			*/
+
+#ifdef YYLSP_NEEDED
+YYLTYPE yylloc;			/*  location data for the lookahead	*/
+				/*  symbol				*/
+#endif
+
+int yynerrs;			/*  number of parse errors so far       */
+#endif  /* not YYPURE */
+
+#if YYDEBUG != 0
+int yydebug;			/*  nonzero means print parse trace	*/
+/* Since this is uninitialized, it does not stop multiple parsers
+   from coexisting.  */
+#endif
+
+/*  YYINITDEPTH indicates the initial size of the parser's stacks	*/
+
+#ifndef	YYINITDEPTH
+#define YYINITDEPTH 200
+#endif
+
+/*  YYMAXDEPTH is the maximum size the stacks can grow to
+    (effective only if the built-in stack extension method is used).  */
+
+#if YYMAXDEPTH == 0
+#undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+#define YYMAXDEPTH 10000
+#endif
+
+/* Define __yy_memcpy.  Note that the size argument
+   should be passed with type unsigned int, because that is what the non-GCC
+   definitions require.  With GCC, __builtin_memcpy takes an arg
+   of type size_t, but it can handle unsigned int.  */
+
+#if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
+#define __yy_memcpy(TO,FROM,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
+#else				/* not GNU C or C++ */
+#ifndef __cplusplus
+
+/* This is the most reliable way to avoid incompatibilities
+   in available built-in functions on various systems.  */
+static void
+__yy_memcpy (to, from, count)
+     char *to;
+     char *from;
+     unsigned int count;
+{
+  register char *f = from;
+  register char *t = to;
+  register int i = count;
+
+  while (i-- > 0)
+    *t++ = *f++;
+}
+
+#else /* __cplusplus */
+
+/* This is the most reliable way to avoid incompatibilities
+   in available built-in functions on various systems.  */
+static void
+__yy_memcpy (char *to, char *from, unsigned int count)
+{
+  register char *t = to;
+  register char *f = from;
+  register int i = count;
+
+  while (i-- > 0)
+    *t++ = *f++;
+}
+
+#endif
+#endif
+
+#line 217 "/usr/share/bison.simple"
+
+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
+   into yyparse.  The argument should have type void *.
+   It should actually point to an object.
+   Grammar actions can access the variable by casting it
+   to the proper pointer type.  */
+
+#ifdef YYPARSE_PARAM
+#ifdef __cplusplus
+#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL
+#else /* not __cplusplus */
+#define YYPARSE_PARAM_ARG YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
+#endif /* not __cplusplus */
+#else /* not YYPARSE_PARAM */
+#define YYPARSE_PARAM_ARG
+#define YYPARSE_PARAM_DECL
+#endif /* not YYPARSE_PARAM */
+
+/* Prevent warning if -Wstrict-prototypes.  */
+#ifdef __GNUC__
+#ifdef YYPARSE_PARAM
+int yyparse (void *);
+#else
+int yyparse (void);
+#endif
+#endif
+
+int
+yyparse(YYPARSE_PARAM_ARG)
+     YYPARSE_PARAM_DECL
+{
+  register int yystate;
+  register int yyn;
+  register short *yyssp;
+  register YYSTYPE *yyvsp;
+  int yyerrstatus;	/*  number of tokens to shift before error messages enabled */
+  int yychar1 = 0;		/*  lookahead token as an internal (translated) token number */
+
+  short	yyssa[YYINITDEPTH];	/*  the state stack			*/
+  YYSTYPE yyvsa[YYINITDEPTH];	/*  the semantic value stack		*/
+
+  short *yyss = yyssa;		/*  refer to the stacks thru separate pointers */
+  YYSTYPE *yyvs = yyvsa;	/*  to allow yyoverflow to reallocate them elsewhere */
+
+#ifdef YYLSP_NEEDED
+  YYLTYPE yylsa[YYINITDEPTH];	/*  the location stack			*/
+  YYLTYPE *yyls = yylsa;
+  YYLTYPE *yylsp;
+
+#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
+#else
+#define YYPOPSTACK   (yyvsp--, yyssp--)
+#endif
+
+  int yystacksize = YYINITDEPTH;
+  int yyfree_stacks = 0;
+
+#ifdef YYPURE
+  int yychar;
+  YYSTYPE yylval;
+  int yynerrs;
+#ifdef YYLSP_NEEDED
+  YYLTYPE yylloc;
+#endif
+#endif
+
+  YYSTYPE yyval;		/*  the variable used to return		*/
+				/*  semantic values from the action	*/
+				/*  routines				*/
+
+  int yylen;
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Starting parse\n");
+#endif
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY;		/* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+
+  yyssp = yyss - 1;
+  yyvsp = yyvs;
+#ifdef YYLSP_NEEDED
+  yylsp = yyls;
+#endif
+
+/* Push a new state, which is found in  yystate  .  */
+/* In all cases, when you get here, the value and location stacks
+   have just been pushed. so pushing a state here evens the stacks.  */
+yynewstate:
+
+  *++yyssp = yystate;
+
+  if (yyssp >= yyss + yystacksize - 1)
+    {
+      /* Give user a chance to reallocate the stack */
+      /* Use copies of these so that the &'s don't force the real ones into memory. */
+      YYSTYPE *yyvs1 = yyvs;
+      short *yyss1 = yyss;
+#ifdef YYLSP_NEEDED
+      YYLTYPE *yyls1 = yyls;
+#endif
+
+      /* Get the current used size of the three stacks, in elements.  */
+      int size = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      /* Each stack pointer address is followed by the size of
+	 the data in use in that stack, in bytes.  */
+#ifdef YYLSP_NEEDED
+      /* This used to be a conditional around just the two extra args,
+	 but that might be undefined if yyoverflow is a macro.  */
+      yyoverflow("parser stack overflow",
+		 &yyss1, size * sizeof (*yyssp),
+		 &yyvs1, size * sizeof (*yyvsp),
+		 &yyls1, size * sizeof (*yylsp),
+		 &yystacksize);
+#else
+      yyoverflow("parser stack overflow",
+		 &yyss1, size * sizeof (*yyssp),
+		 &yyvs1, size * sizeof (*yyvsp),
+		 &yystacksize);
+#endif
+
+      yyss = yyss1; yyvs = yyvs1;
+#ifdef YYLSP_NEEDED
+      yyls = yyls1;
+#endif
+#else /* no yyoverflow */
+      /* Extend the stack our own way.  */
+      if (yystacksize >= YYMAXDEPTH)
+	{
+	  yyerror("parser stack overflow");
+	  if (yyfree_stacks)
+	    {
+	      free (yyss);
+	      free (yyvs);
+#ifdef YYLSP_NEEDED
+	      free (yyls);
+#endif
+	    }
+	  return 2;
+	}
+      yystacksize *= 2;
+      if (yystacksize > YYMAXDEPTH)
+	yystacksize = YYMAXDEPTH;
+#ifndef YYSTACK_USE_ALLOCA
+      yyfree_stacks = 1;
+#endif
+      yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
+      __yy_memcpy ((char *)yyss, (char *)yyss1,
+		   size * (unsigned int) sizeof (*yyssp));
+      yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
+      __yy_memcpy ((char *)yyvs, (char *)yyvs1,
+		   size * (unsigned int) sizeof (*yyvsp));
+#ifdef YYLSP_NEEDED
+      yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
+      __yy_memcpy ((char *)yyls, (char *)yyls1,
+		   size * (unsigned int) sizeof (*yylsp));
+#endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + size - 1;
+      yyvsp = yyvs + size - 1;
+#ifdef YYLSP_NEEDED
+      yylsp = yyls + size - 1;
+#endif
+
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Stack size increased to %d\n", yystacksize);
+#endif
+
+      if (yyssp >= yyss + yystacksize - 1)
+	YYABORT;
+    }
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Entering state %d\n", yystate);
+#endif
+
+  goto yybackup;
+ yybackup:
+
+/* Do appropriate processing given the current state.  */
+/* Read a lookahead token if we need one and don't already have one.  */
+/* yyresume: */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+
+  yyn = yypact[yystate];
+  if (yyn == YYFLAG)
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* yychar is either YYEMPTY or YYEOF
+     or a valid token in external form.  */
+
+  if (yychar == YYEMPTY)
+    {
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Reading a token: ");
+#endif
+      yychar = YYLEX;
+    }
+
+  /* Convert token to internal form (in yychar1) for indexing tables with */
+
+  if (yychar <= 0)		/* This means end of input. */
+    {
+      yychar1 = 0;
+      yychar = YYEOF;		/* Don't call YYLEX any more */
+
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Now at end of input.\n");
+#endif
+    }
+  else
+    {
+      yychar1 = YYTRANSLATE(yychar);
+
+#if YYDEBUG != 0
+      if (yydebug)
+	{
+	  fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
+	  /* Give the individual parser a way to print the precise meaning
+	     of a token, for further debugging info.  */
+#ifdef YYPRINT
+	  YYPRINT (stderr, yychar, yylval);
+#endif
+	  fprintf (stderr, ")\n");
+	}
+#endif
+    }
+
+  yyn += yychar1;
+  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+    goto yydefault;
+
+  yyn = yytable[yyn];
+
+  /* yyn is what to do for this token type in this state.
+     Negative => reduce, -yyn is rule number.
+     Positive => shift, yyn is new state.
+       New state is final state => don't bother to shift,
+       just return success.
+     0, or most negative number => error.  */
+
+  if (yyn < 0)
+    {
+      if (yyn == YYFLAG)
+	goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+  else if (yyn == 0)
+    goto yyerrlab;
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  /* Shift the lookahead token.  */
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
+#endif
+
+  /* Discard the token being shifted unless it is eof.  */
+  if (yychar != YYEOF)
+    yychar = YYEMPTY;
+
+  *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+  *++yylsp = yylloc;
+#endif
+
+  /* count tokens shifted since error; after three, turn off error status.  */
+  if (yyerrstatus) yyerrstatus--;
+
+  yystate = yyn;
+  goto yynewstate;
+
+/* Do the default action for the current state.  */
+yydefault:
+
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+
+/* Do a reduction.  yyn is the number of a rule to reduce with.  */
+yyreduce:
+  yylen = yyr2[yyn];
+  if (yylen > 0)
+    yyval = yyvsp[1-yylen]; /* implement default value of the action */
+
+#if YYDEBUG != 0
+  if (yydebug)
+    {
+      int i;
+
+      fprintf (stderr, "Reducing via rule %d (line %d), ",
+	       yyn, yyrline[yyn]);
+
+      /* Print the symbols being reduced, and their result.  */
+      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
+	fprintf (stderr, "%s ", yytname[yyrhs[i]]);
+      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
+    }
+#endif
+
+
+  switch (yyn) {
+
+case 4:
+#line 95 "dcParser.yxx"
+{
+  current_class = new DCClass;
+  current_class->_name = yyvsp[0].str;
+  if (!dc_file->add_class(current_class)) {
+    yyerror("Duplicate class name: " + current_class->_name);
+  }
+;
+    break;}
+case 6:
+#line 107 "dcParser.yxx"
+{
+  DCFile::ClassesByName::const_iterator ni;
+  ni = dc_file->_classes_by_name.find(yyvsp[0].str);
+  if (ni == dc_file->_classes_by_name.end()) {
+    yyerror("Unknown class: " + yyvsp[0].str);
+    yyval.u.dclass = (DCClass *)NULL;
+  } else {
+    yyval.u.dclass = (*ni).second;
+  }
+;
+    break;}
+case 9:
+#line 126 "dcParser.yxx"
+{
+  if (yyvsp[0].u.dclass != (DCClass *)NULL) {
+    current_class->_parents.push_back(yyvsp[0].u.dclass);
+  }
+;
+    break;}
+case 10:
+#line 132 "dcParser.yxx"
+{
+  if (yyvsp[0].u.dclass != (DCClass *)NULL) {
+    current_class->_parents.push_back(yyvsp[0].u.dclass);
+  }
+;
+    break;}
+case 15:
+#line 148 "dcParser.yxx"
+{
+  current_atomic = new DCAtomicField;
+  current_atomic->_name = yyvsp[-1].str;
+  if (!current_class->add_field(current_atomic)) {
+    yyerror("Duplicate field name: " + current_atomic->_name);
+  }
+;
+    break;}
+case 17:
+#line 160 "dcParser.yxx"
+{
+  DCField *field = current_class->get_field_by_name(yyvsp[0].str);
+  yyval.u.atomic = (DCAtomicField *)NULL;
+  if (field == (DCField *)NULL) {
+    yyerror("Unknown field: " + yyvsp[0].str);
+  } else {
+    yyval.u.atomic = field->as_atomic_field();
+    if (yyval.u.atomic == (DCAtomicField *)NULL) {
+      yyerror("Not an atomic field: " + yyvsp[0].str);
+    }
+  }
+;
+    break;}
+case 22:
+#line 186 "dcParser.yxx"
+{
+  atomic_element = DCAtomicField::ElementType();
+  atomic_element._type = yyvsp[0].u.subatomic;
+;
+    break;}
+case 23:
+#line 191 "dcParser.yxx"
+{
+  current_atomic->_elements.push_back(atomic_element);
+;
+    break;}
+case 25:
+#line 199 "dcParser.yxx"
+{
+  atomic_element._divisor = yyvsp[0].u.integer;
+;
+    break;}
+case 26:
+#line 203 "dcParser.yxx"
+{
+  atomic_element._name = yyvsp[0].str;
+;
+    break;}
+case 27:
+#line 207 "dcParser.yxx"
+{
+  if (!atomic_element.set_default_value(yyvsp[0].u.integer)) {
+    yyerror("Invalid default value: " + yyvsp[0].str);
+  }
+;
+    break;}
+case 28:
+#line 213 "dcParser.yxx"
+{
+  if (!atomic_element.set_default_value(yyvsp[0].u.real)) {
+    yyerror("Invalid default value: " + yyvsp[0].str);
+  }
+;
+    break;}
+case 29:
+#line 219 "dcParser.yxx"
+{
+  if (!atomic_element.set_default_value(yyvsp[0].str)) {
+    yyerror("Invalid default value: \"" + yyvsp[0].str + "\"");
+  }
+;
+    break;}
+case 30:
+#line 225 "dcParser.yxx"
+{
+  if (!atomic_element.set_default_value_literal(yyvsp[0].str)) {
+    yyerror("Invalid default hex string value");
+  }
+;
+    break;}
+case 31:
+#line 231 "dcParser.yxx"
+{
+  if (!atomic_element.end_array()) {
+    yyerror("Array default value inappropriate");
+  } else {
+    atomic_element._has_default_value = true;
+  }
+;
+    break;}
+case 38:
+#line 257 "dcParser.yxx"
+{
+  if (!atomic_element.add_default_value(yyvsp[0].u.integer)) {
+    yyerror("Invalid default value: " + yyvsp[0].str);
+  }
+;
+    break;}
+case 39:
+#line 263 "dcParser.yxx"
+{
+  if (!atomic_element.add_default_value(yyvsp[0].u.real)) {
+    yyerror("Invalid default value: " + yyvsp[0].str);
+  }
+;
+    break;}
+case 40:
+#line 269 "dcParser.yxx"
+{
+  if (!atomic_element.add_default_value(yyvsp[0].str)) {
+    yyerror("Invalid default value: " + yyvsp[0].str);
+  }
+;
+    break;}
+case 41:
+#line 275 "dcParser.yxx"
+{
+  if (!atomic_element.add_default_value_literal(yyvsp[0].str)) {
+    yyerror("Invalid hex literal in default array");
+  }
+;
+    break;}
+case 42:
+#line 281 "dcParser.yxx"
+{
+  for (int i = 0; i < yyvsp[0].u.integer; i++) {
+    if (!atomic_element.add_default_value(yyvsp[-2].u.integer)) {
+      yyerror("Invalid default value: " + yyvsp[-2].str);
+      break;
+    }
+  }
+;
+    break;}
+case 43:
+#line 290 "dcParser.yxx"
+{
+  for (int i = 0; i < yyvsp[0].u.integer; i++) {
+    if (!atomic_element.add_default_value(yyvsp[-2].u.real)) {
+      yyerror("Invalid default value: " + yyvsp[-2].str);
+      break;
+    }
+  }
+;
+    break;}
+case 44:
+#line 299 "dcParser.yxx"
+{
+  for (int i = 0; i < yyvsp[0].u.integer; i++) {
+    if (!atomic_element.add_default_value_literal(yyvsp[-2].str)) {
+      yyerror("Invalid hex literal in default array");
+      break;
+    }
+  }
+;
+    break;}
+case 45:
+#line 311 "dcParser.yxx"
+{
+  yyval.u.subatomic = ST_int8;
+;
+    break;}
+case 46:
+#line 315 "dcParser.yxx"
+{
+  yyval.u.subatomic = ST_int16;
+;
+    break;}
+case 47:
+#line 319 "dcParser.yxx"
+{
+  yyval.u.subatomic = ST_int32;
+;
+    break;}
+case 48:
+#line 323 "dcParser.yxx"
+{
+  yyval.u.subatomic = ST_int64;
+;
+    break;}
+case 49:
+#line 327 "dcParser.yxx"
+{
+  yyval.u.subatomic = ST_uint8;
+;
+    break;}
+case 50:
+#line 331 "dcParser.yxx"
+{
+  yyval.u.subatomic = ST_uint16;
+;
+    break;}
+case 51:
+#line 335 "dcParser.yxx"
+{
+  yyval.u.subatomic = ST_uint32;
+;
+    break;}
+case 52:
+#line 339 "dcParser.yxx"
+{
+  yyval.u.subatomic = ST_uint64;
+;
+    break;}
+case 53:
+#line 343 "dcParser.yxx"
+{
+  yyval.u.subatomic = ST_float64;
+;
+    break;}
+case 54:
+#line 347 "dcParser.yxx"
+{
+  yyval.u.subatomic = ST_string;
+;
+    break;}
+case 55:
+#line 351 "dcParser.yxx"
+{
+  yyval.u.subatomic = ST_blob;
+;
+    break;}
+case 56:
+#line 355 "dcParser.yxx"
+{
+  yyval.u.subatomic = ST_int8array;
+;
+    break;}
+case 57:
+#line 359 "dcParser.yxx"
+{
+  yyval.u.subatomic = ST_int16array;
+;
+    break;}
+case 58:
+#line 363 "dcParser.yxx"
+{
+  yyval.u.subatomic = ST_int32array;
+;
+    break;}
+case 59:
+#line 367 "dcParser.yxx"
+{
+  yyval.u.subatomic = ST_uint8array;
+;
+    break;}
+case 60:
+#line 371 "dcParser.yxx"
+{
+  yyval.u.subatomic = ST_uint16array;
+;
+    break;}
+case 61:
+#line 375 "dcParser.yxx"
+{
+  yyval.u.subatomic = ST_uint32array;
+;
+    break;}
+case 62:
+#line 379 "dcParser.yxx"
+{
+  yyval.u.subatomic = ST_uint32uint8array;
+;
+    break;}
+case 64:
+#line 387 "dcParser.yxx"
+{
+  current_atomic->_flags |= DCAtomicField::F_required;
+;
+    break;}
+case 65:
+#line 391 "dcParser.yxx"
+{
+  current_atomic->_flags |= DCAtomicField::F_broadcast;
+;
+    break;}
+case 66:
+#line 395 "dcParser.yxx"
+{
+  current_atomic->_flags |= DCAtomicField::F_p2p;
+;
+    break;}
+case 67:
+#line 399 "dcParser.yxx"
+{
+  current_atomic->_flags |= DCAtomicField::F_ram;
+;
+    break;}
+case 68:
+#line 403 "dcParser.yxx"
+{
+  current_atomic->_flags |= DCAtomicField::F_db;
+;
+    break;}
+case 69:
+#line 407 "dcParser.yxx"
+{
+  current_atomic->_flags |= DCAtomicField::F_clsend;
+;
+    break;}
+case 70:
+#line 411 "dcParser.yxx"
+{
+  current_atomic->_flags |= DCAtomicField::F_clrecv;
+;
+    break;}
+case 71:
+#line 415 "dcParser.yxx"
+{
+  current_atomic->_flags |= DCAtomicField::F_ownsend;
+;
+    break;}
+case 72:
+#line 422 "dcParser.yxx"
+{
+  current_molecular = new DCMolecularField;
+  current_molecular->_name = yyvsp[-1].str;
+  if (!current_class->add_field(current_molecular)) {
+    yyerror("Duplicate field name: " + current_molecular->_name);
+  }
+;
+    break;}
+case 74:
+#line 434 "dcParser.yxx"
+{
+  if (yyvsp[0].u.atomic != (DCAtomicField *)NULL) {
+    current_molecular->_fields.push_back(yyvsp[0].u.atomic);
+  }
+;
+    break;}
+case 75:
+#line 440 "dcParser.yxx"
+{
+  if (yyvsp[0].u.atomic != (DCAtomicField *)NULL) {
+    current_molecular->_fields.push_back(yyvsp[0].u.atomic);
+    if (current_molecular->_fields[0]->_flags != yyvsp[0].u.atomic->_flags) {
+      yyerror("Mismatched flags in molecule between " + 
+              current_molecular->_fields[0]->_name + " and " +
+              yyvsp[0].u.atomic->_name);
+    }
+  }
+;
+    break;}
+}
+   /* the action file gets copied in in place of this dollarsign */
+#line 543 "/usr/share/bison.simple"
+
+  yyvsp -= yylen;
+  yyssp -= yylen;
+#ifdef YYLSP_NEEDED
+  yylsp -= yylen;
+#endif
+
+#if YYDEBUG != 0
+  if (yydebug)
+    {
+      short *ssp1 = yyss - 1;
+      fprintf (stderr, "state stack now");
+      while (ssp1 != yyssp)
+	fprintf (stderr, " %d", *++ssp1);
+      fprintf (stderr, "\n");
+    }
+#endif
+
+  *++yyvsp = yyval;
+
+#ifdef YYLSP_NEEDED
+  yylsp++;
+  if (yylen == 0)
+    {
+      yylsp->first_line = yylloc.first_line;
+      yylsp->first_column = yylloc.first_column;
+      yylsp->last_line = (yylsp-1)->last_line;
+      yylsp->last_column = (yylsp-1)->last_column;
+      yylsp->text = 0;
+    }
+  else
+    {
+      yylsp->last_line = (yylsp+yylen-1)->last_line;
+      yylsp->last_column = (yylsp+yylen-1)->last_column;
+    }
+#endif
+
+  /* Now "shift" the result of the reduction.
+     Determine what state that goes to,
+     based on the state we popped back to
+     and the rule number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
+  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTBASE];
+
+  goto yynewstate;
+
+yyerrlab:   /* here on detecting error */
+
+  if (! yyerrstatus)
+    /* If not already recovering from an error, report this error.  */
+    {
+      ++yynerrs;
+
+#ifdef YYERROR_VERBOSE
+      yyn = yypact[yystate];
+
+      if (yyn > YYFLAG && yyn < YYLAST)
+	{
+	  int size = 0;
+	  char *msg;
+	  int x, count;
+
+	  count = 0;
+	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
+	  for (x = (yyn < 0 ? -yyn : 0);
+	       x < (sizeof(yytname) / sizeof(char *)); x++)
+	    if (yycheck[x + yyn] == x)
+	      size += strlen(yytname[x]) + 15, count++;
+	  msg = (char *) malloc(size + 15);
+	  if (msg != 0)
+	    {
+	      strcpy(msg, "parse error");
+
+	      if (count < 5)
+		{
+		  count = 0;
+		  for (x = (yyn < 0 ? -yyn : 0);
+		       x < (sizeof(yytname) / sizeof(char *)); x++)
+		    if (yycheck[x + yyn] == x)
+		      {
+			strcat(msg, count == 0 ? ", expecting `" : " or `");
+			strcat(msg, yytname[x]);
+			strcat(msg, "'");
+			count++;
+		      }
+		}
+	      yyerror(msg);
+	      free(msg);
+	    }
+	  else
+	    yyerror ("parse error; also virtual memory exceeded");
+	}
+      else
+#endif /* YYERROR_VERBOSE */
+	yyerror("parse error");
+    }
+
+  goto yyerrlab1;
+yyerrlab1:   /* here on error raised explicitly by an action */
+
+  if (yyerrstatus == 3)
+    {
+      /* if just tried and failed to reuse lookahead token after an error, discard it.  */
+
+      /* return failure if at end of input */
+      if (yychar == YYEOF)
+	YYABORT;
+
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
+#endif
+
+      yychar = YYEMPTY;
+    }
+
+  /* Else will try to reuse lookahead token
+     after shifting the error token.  */
+
+  yyerrstatus = 3;		/* Each real token shifted decrements this */
+
+  goto yyerrhandle;
+
+yyerrdefault:  /* current state does not do anything special for the error token. */
+
+#if 0
+  /* This is wrong; only states that explicitly want error tokens
+     should shift them.  */
+  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
+  if (yyn) goto yydefault;
+#endif
+
+yyerrpop:   /* pop the current state because it cannot handle the error token */
+
+  if (yyssp == yyss) YYABORT;
+  yyvsp--;
+  yystate = *--yyssp;
+#ifdef YYLSP_NEEDED
+  yylsp--;
+#endif
+
+#if YYDEBUG != 0
+  if (yydebug)
+    {
+      short *ssp1 = yyss - 1;
+      fprintf (stderr, "Error: state stack now");
+      while (ssp1 != yyssp)
+	fprintf (stderr, " %d", *++ssp1);
+      fprintf (stderr, "\n");
+    }
+#endif
+
+yyerrhandle:
+
+  yyn = yypact[yystate];
+  if (yyn == YYFLAG)
+    goto yyerrdefault;
+
+  yyn += YYTERROR;
+  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
+    goto yyerrdefault;
+
+  yyn = yytable[yyn];
+  if (yyn < 0)
+    {
+      if (yyn == YYFLAG)
+	goto yyerrpop;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+  else if (yyn == 0)
+    goto yyerrpop;
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Shifting error token, ");
+#endif
+
+  *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+  *++yylsp = yylloc;
+#endif
+
+  yystate = yyn;
+  goto yynewstate;
+
+ yyacceptlab:
+  /* YYACCEPT comes here.  */
+  if (yyfree_stacks)
+    {
+      free (yyss);
+      free (yyvs);
+#ifdef YYLSP_NEEDED
+      free (yyls);
+#endif
+    }
+  return 0;
+
+ yyabortlab:
+  /* YYABORT comes here.  */
+  if (yyfree_stacks)
+    {
+      free (yyss);
+      free (yyvs);
+#ifdef YYLSP_NEEDED
+      free (yyls);
+#endif
+    }
+  return 1;
+}
+#line 454 "dcParser.yxx"

+ 36 - 0
direct/src/dcparser/dcParser.h.prebuilt

@@ -0,0 +1,36 @@
+#define	INTEGER	257
+#define	REAL	258
+#define	STRING	259
+#define	HEX_STRING	260
+#define	IDENTIFIER	261
+#define	KW_DCLASS	262
+#define	KW_INT8	263
+#define	KW_INT16	264
+#define	KW_INT32	265
+#define	KW_INT64	266
+#define	KW_UINT8	267
+#define	KW_UINT16	268
+#define	KW_UINT32	269
+#define	KW_UINT64	270
+#define	KW_FLOAT64	271
+#define	KW_STRING	272
+#define	KW_BLOB	273
+#define	KW_INT8ARRAY	274
+#define	KW_INT16ARRAY	275
+#define	KW_INT32ARRAY	276
+#define	KW_UINT8ARRAY	277
+#define	KW_UINT16ARRAY	278
+#define	KW_UINT32ARRAY	279
+#define	KW_UINT32UINT8ARRAY	280
+#define	KW_MOL	281
+#define	KW_REQUIRED	282
+#define	KW_BROADCAST	283
+#define	KW_P2P	284
+#define	KW_RAM	285
+#define	KW_DB	286
+#define	KW_CLSEND	287
+#define	KW_CLRECV	288
+#define	KW_OWNSEND	289
+
+
+extern YYSTYPE dcyylval;

+ 2869 - 0
panda/src/egg/lexer.cxx.prebuilt

@@ -0,0 +1,2869 @@
+#define yy_create_buffer eggyy_create_buffer
+#define yy_delete_buffer eggyy_delete_buffer
+#define yy_scan_buffer eggyy_scan_buffer
+#define yy_scan_string eggyy_scan_string
+#define yy_scan_bytes eggyy_scan_bytes
+#define yy_flex_debug eggyy_flex_debug
+#define yy_init_buffer eggyy_init_buffer
+#define yy_flush_buffer eggyy_flush_buffer
+#define yy_load_buffer_state eggyy_load_buffer_state
+#define yy_switch_to_buffer eggyy_switch_to_buffer
+#define yyin eggyyin
+#define yyleng eggyyleng
+#define yylex eggyylex
+#define yyout eggyyout
+#define yyrestart eggyyrestart
+#define yytext eggyytext
+#define yywrap eggyywrap
+
+#line 20 "lex.yy.c"
+/* A lexical scanner generated by flex */
+
+/* Scanner skeleton version:
+ * $Header$
+ */
+
+#define FLEX_SCANNER
+#define YY_FLEX_MAJOR_VERSION 2
+#define YY_FLEX_MINOR_VERSION 5
+
+#include <stdio.h>
+
+
+/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
+#ifdef c_plusplus
+#ifndef __cplusplus
+#define __cplusplus
+#endif
+#endif
+
+
+#ifdef __cplusplus
+
+#include <stdlib.h>
+
+/* Use prototypes in function declarations. */
+#define YY_USE_PROTOS
+
+/* The "const" storage-class-modifier is valid. */
+#define YY_USE_CONST
+
+#else	/* ! __cplusplus */
+
+#if __STDC__
+
+#define YY_USE_PROTOS
+#define YY_USE_CONST
+
+#endif	/* __STDC__ */
+#endif	/* ! __cplusplus */
+
+#ifdef __TURBOC__
+ #pragma warn -rch
+ #pragma warn -use
+#include <io.h>
+#include <stdlib.h>
+#define YY_USE_CONST
+#define YY_USE_PROTOS
+#endif
+
+#ifdef YY_USE_CONST
+#define yyconst const
+#else
+#define yyconst
+#endif
+
+
+#ifdef YY_USE_PROTOS
+#define YY_PROTO(proto) proto
+#else
+#define YY_PROTO(proto) ()
+#endif
+
+/* Returned upon end-of-file. */
+#define YY_NULL 0
+
+/* Promotes a possibly negative, possibly signed char to an unsigned
+ * integer for use as an array index.  If the signed char is negative,
+ * we want to instead treat it as an 8-bit unsigned char, hence the
+ * double cast.
+ */
+#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
+
+/* Enter a start condition.  This macro really ought to take a parameter,
+ * but we do it the disgusting crufty way forced on us by the ()-less
+ * definition of BEGIN.
+ */
+#define BEGIN yy_start = 1 + 2 *
+
+/* Translate the current start state into a value that can be later handed
+ * to BEGIN to return to the state.  The YYSTATE alias is for lex
+ * compatibility.
+ */
+#define YY_START ((yy_start - 1) / 2)
+#define YYSTATE YY_START
+
+/* Action number for EOF rule of a given start state. */
+#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
+
+/* Special action meaning "start processing a new file". */
+#define YY_NEW_FILE yyrestart( yyin )
+
+#define YY_END_OF_BUFFER_CHAR 0
+
+/* Size of default input buffer. */
+#define YY_BUF_SIZE 16384
+
+typedef struct yy_buffer_state *YY_BUFFER_STATE;
+
+extern int yyleng;
+extern FILE *yyin, *yyout;
+
+#define EOB_ACT_CONTINUE_SCAN 0
+#define EOB_ACT_END_OF_FILE 1
+#define EOB_ACT_LAST_MATCH 2
+
+/* The funky do-while in the following #define is used to turn the definition
+ * int a single C statement (which needs a semi-colon terminator).  This
+ * avoids problems with code like:
+ *
+ * 	if ( condition_holds )
+ *		yyless( 5 );
+ *	else
+ *		do_something_else();
+ *
+ * Prior to using the do-while the compiler would get upset at the
+ * "else" because it interpreted the "if" statement as being all
+ * done when it reached the ';' after the yyless() call.
+ */
+
+/* Return all but the first 'n' matched characters back to the input stream. */
+
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+		*yy_cp = yy_hold_char; \
+		YY_RESTORE_YY_MORE_OFFSET \
+		yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
+		YY_DO_BEFORE_ACTION; /* set up yytext again */ \
+		} \
+	while ( 0 )
+
+#define unput(c) yyunput( c, yytext_ptr )
+
+/* The following is because we cannot portably get our hands on size_t
+ * (without autoconf's help, which isn't available because we want
+ * flex-generated scanners to compile on their own).
+ */
+typedef unsigned int yy_size_t;
+
+
+struct yy_buffer_state
+	{
+	FILE *yy_input_file;
+
+	char *yy_ch_buf;		/* input buffer */
+	char *yy_buf_pos;		/* current position in input buffer */
+
+	/* Size of input buffer in bytes, not including room for EOB
+	 * characters.
+	 */
+	yy_size_t yy_buf_size;
+
+	/* Number of characters read into yy_ch_buf, not including EOB
+	 * characters.
+	 */
+	int yy_n_chars;
+
+	/* Whether we "own" the buffer - i.e., we know we created it,
+	 * and can realloc() it to grow it, and should free() it to
+	 * delete it.
+	 */
+	int yy_is_our_buffer;
+
+	/* Whether this is an "interactive" input source; if so, and
+	 * if we're using stdio for input, then we want to use getc()
+	 * instead of fread(), to make sure we stop fetching input after
+	 * each newline.
+	 */
+	int yy_is_interactive;
+
+	/* Whether we're considered to be at the beginning of a line.
+	 * If so, '^' rules will be active on the next match, otherwise
+	 * not.
+	 */
+	int yy_at_bol;
+
+	/* Whether to try to fill the input buffer when we reach the
+	 * end of it.
+	 */
+	int yy_fill_buffer;
+
+	int yy_buffer_status;
+#define YY_BUFFER_NEW 0
+#define YY_BUFFER_NORMAL 1
+	/* When an EOF's been seen but there's still some text to process
+	 * then we mark the buffer as YY_EOF_PENDING, to indicate that we
+	 * shouldn't try reading from the input source any more.  We might
+	 * still have a bunch of tokens to match, though, because of
+	 * possible backing-up.
+	 *
+	 * When we actually see the EOF, we change the status to "new"
+	 * (via yyrestart()), so that the user can continue scanning by
+	 * just pointing yyin at a new input file.
+	 */
+#define YY_BUFFER_EOF_PENDING 2
+	};
+
+static YY_BUFFER_STATE yy_current_buffer = 0;
+
+/* We provide macros for accessing buffer states in case in the
+ * future we want to put the buffer states in a more general
+ * "scanner state".
+ */
+#define YY_CURRENT_BUFFER yy_current_buffer
+
+
+/* yy_hold_char holds the character lost when yytext is formed. */
+static char yy_hold_char;
+
+static int yy_n_chars;		/* number of characters read into yy_ch_buf */
+
+
+int yyleng;
+
+/* Points to current character in buffer. */
+static char *yy_c_buf_p = (char *) 0;
+static int yy_init = 1;		/* whether we need to initialize */
+static int yy_start = 0;	/* start state number */
+
+/* Flag which is used to allow yywrap()'s to do buffer switches
+ * instead of setting up a fresh yyin.  A bit of a hack ...
+ */
+static int yy_did_buffer_switch_on_eof;
+
+void yyrestart YY_PROTO(( FILE *input_file ));
+
+void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
+void yy_load_buffer_state YY_PROTO(( void ));
+YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
+void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
+void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b ));
+#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer )
+
+YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size ));
+YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str ));
+YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len ));
+
+static void *yy_flex_alloc YY_PROTO(( yy_size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t ));
+static void yy_flex_free YY_PROTO(( void * ));
+
+#define yy_new_buffer yy_create_buffer
+
+#define yy_set_interactive(is_interactive) \
+	{ \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_is_interactive = is_interactive; \
+	}
+
+#define yy_set_bol(at_bol) \
+	{ \
+	if ( ! yy_current_buffer ) \
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
+	yy_current_buffer->yy_at_bol = at_bol; \
+	}
+
+#define YY_AT_BOL() (yy_current_buffer->yy_at_bol)
+
+typedef unsigned char YY_CHAR;
+FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
+typedef int yy_state_type;
+extern char *yytext;
+#define yytext_ptr yytext
+
+static yy_state_type yy_get_previous_state YY_PROTO(( void ));
+static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
+static int yy_get_next_buffer YY_PROTO(( void ));
+static void yy_fatal_error YY_PROTO(( yyconst char msg[] ));
+
+/* Done after the current pattern has been matched and before the
+ * corresponding action - sets up yytext.
+ */
+#define YY_DO_BEFORE_ACTION \
+	yytext_ptr = yy_bp; \
+	yyleng = (int) (yy_cp - yy_bp); \
+	yy_hold_char = *yy_cp; \
+	*yy_cp = '\0'; \
+	yy_c_buf_p = yy_cp;
+
+#define YY_NUM_RULES 91
+#define YY_END_OF_BUFFER 92
+static yyconst short int yy_accept[516] =
+    {   0,
+        0,    0,   92,   90,    2,    1,   89,   90,   90,   90,
+       90,   83,   83,   90,   90,   90,    5,   90,    1,   90,
+       83,   90,   83,    4,    3,   83,   85,   90,   84,   90,
+       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
+       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
+       90,   90,    3,    3,   85,   90,   83,   84,   90,   90,
+       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
+       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
+       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
+       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
+
+       90,   90,   90,   90,   90,   90,   90,   90,   90,   63,
+       90,   90,   90,   87,   90,   88,   90,   90,   90,   90,
+       90,   90,   90,   90,   90,   16,   90,   90,   90,   90,
+       90,   90,   90,   90,   90,   90,   90,   90,   90,   30,
+       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
+       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
+       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
+       90,   90,   74,   90,   90,   90,   90,   90,   90,   90,
+       90,   90,   90,   90,   90,   90,   90,   90,   22,   90,
+       90,   90,   90,   20,   90,   90,   90,   90,   90,   29,
+
+       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
+       90,   90,   90,   90,   90,   90,   49,   90,   90,   90,
+       90,   90,   90,   90,   90,   90,   90,   90,   90,   90,
+       90,   90,   90,   90,   71,   90,   90,   90,   90,   90,
+       90,   86,   90,   90,   90,   90,   90,   90,   90,   90,
+       90,   17,   90,   90,   90,   90,   21,   90,   26,   90,
+       90,   90,   90,   90,   90,   35,   90,   90,   90,   40,
+       90,   90,   90,   90,   90,   90,   90,   50,   90,   52,
+       53,   54,   90,   90,   90,   90,   90,   90,   90,   90,
+       90,   90,   90,   69,   70,   90,   90,   90,   90,   90,
+
+       90,   86,   90,    7,   90,   90,   11,   90,   90,   90,
+       90,   90,   90,   19,   24,   90,   90,   28,   90,   90,
+       31,   32,   90,   90,   39,   90,   90,   90,   90,   45,
+       90,   90,   90,   90,   90,   90,   57,   90,   90,   90,
+       62,   90,   90,   90,   90,   90,   90,   90,   90,   90,
+       90,   90,   90,   90,   10,   12,   90,   90,   90,   90,
+       90,   90,   90,   90,   90,   90,   90,   90,   41,   90,
+       90,   90,   90,   90,   90,   51,   55,   56,   90,   90,
+       60,   90,   90,   90,   90,   90,   90,   90,   90,   90,
+       90,   77,   90,   90,   90,   90,   90,   90,   13,   14,
+
+       90,   90,   18,   90,   90,   33,   90,   90,   37,   38,
+       90,   90,   90,   90,   90,   48,   90,   59,   90,   64,
+       65,   90,   90,   90,   72,   73,   75,   76,   90,   90,
+       90,   90,   90,   90,   90,   23,   90,   90,   34,   36,
+       90,   90,   90,   90,   90,   58,   90,   66,   90,   90,
+       90,   90,   90,   81,   90,   90,    8,   90,   90,   90,
+       90,   90,   90,   90,   90,   90,   90,   67,   68,   90,
+       90,   80,   90,   90,   90,   90,   90,   27,   42,   90,
+       44,   46,   47,   90,   78,   79,   90,    6,   90,   90,
+       90,   90,   90,   82,   90,   90,   90,   43,   90,   90,
+
+       90,   90,   90,   90,   90,   90,   90,    9,   90,   90,
+       61,   15,   90,   25,    0
+    } ;
+
+static yyconst int yy_ec[256] =
+    {   0,
+        1,    1,    1,    1,    1,    1,    1,    1,    2,    3,
+        1,    1,    2,    1,    1,    1,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    1,    1,    1,    1,
+        1,    2,    1,    4,    1,    5,    1,    1,    1,    1,
+        1,    6,    7,    1,    8,    9,   10,   11,   12,   13,
+       14,   15,   13,   13,   13,   13,   13,    1,    1,   16,
+        1,   17,    1,    1,   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,
+        1,    1,    1,    1,   18,    1,   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,    1,   45,    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,
+        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,    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
+    } ;
+
+static yyconst int yy_meta[46] =
+    {   0,
+        1,    2,    3,    2,    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,    2
+    } ;
+
+static yyconst short int yy_base[521] =
+    {   0,
+        0,   44,  622,    0,  623,    0,  623,    8,   81,   22,
+       18,  100,   19,  123,  589,  601,  623,    0,    0,   29,
+       30,  587,   51,    0,   65,   68,   14,  159,  164,   61,
+       91,  170,   43,  582,  590,  584,  582,  582,  580,   68,
+       64,   66,  579,   93,  175,  181,  128,  111,  587,  586,
+      577,  584,  136,    0,   18,  207,  213,    0,  563,  587,
+      575,  572,  584,  569,  102,  584,  564,  562,  561,  564,
+      571,  559,  554,  550,  560,  561,  552,  556,  554,  173,
+      560,  553,  552,  546,  561,  559,  545,  544,  551,  556,
+      539,   48,  552,  555,  536,  554,  553,  536,  551,  542,
+
+      548,  525,  543,  176,  527,  535,  534,  545,  532,    0,
+      531,  523,  527,    0,  546,    0,  529,  534,  524,  531,
+      516,  514,  520,  518,  512,    0,  509,  529,  507,  508,
+      523,  519,  524,  496,  520,  515,  519,  497,  518,    0,
+      504,  495,  500,  493,  496,  146,  506,  504,  496,  506,
+      502,  501,  485,  490,  478,  503,  500,  188,  486,  487,
+      477,  493,  476,  483,   68,  480,  479,  486,  478,  491,
+      475,  474,    0,  473,  472,  465,  497,  459,  477,  476,
+      478,  467,  490,  472,  467,  470,  470,  474,    0,  471,
+      458,  469,  463,    0,  469,  454,  467,  457,  448,    0,
+
+      442,  461,  441,  441,  460,  440,  448,  444,  456,  453,
+      434,  449,  433,  449,  429,  441,    0,  448,  426,  446,
+      445,  444,  433,  118,  436,  431,  436,  433,  428,  415,
+      428,  415,  434,  433,    0,  416,  415,  414,  413,  422,
+      425,  222,  407,  425,  408,  417,  422,  416,  415,  404,
+      408,    0,  402,  414,  415,  414,    0,  403,    0,  406,
+      411,  405,  394,  408,  407,    0,  396,  380,  404,    0,
+      390,  217,  381,  401,  385,  386,  382,    0,  391,    0,
+        0,    0,  382,  376,  394,  378,  377,  382,  390,  369,
+      369,  366,  134,    0,    0,  365,  364,  363,  362,  357,
+
+      366,    0,  376,    0,  377,  378,    0,  377,  370,  354,
+      359,  369,  359,    0,    0,  367,  368,    0,  363,  364,
+        0,    0,  365,  178,    0,  366,  343,  342,  342,    0,
+      354,  351,  345,  359,  358,  357,    0,  352,  347,  230,
+        0,  333,  347,  343,  335,  348,  329,  328,  327,  326,
+      231,  335,  322,  324,    0,    0,  342,  341,  338,  333,
+      338,  314,  331,  335,  328,  320,  332,  331,    0,  311,
+      310,  302,  321,  318,  325,    0,    0,    0,  318,  323,
+        0,  306,  321,  320,  299,  299,  296,  316,  315,  314,
+      313,    0,  297,  295,  304,  295,  289,  302,    0,    0,
+
+      285,  305,    0,  298,  297,    0,  302,  301,    0,    0,
+      277,  292,  281,  282,  287,    0,  295,    0,  279,    0,
+        0,  293,  278,  285,    0,    0,    0,    0,  280,  273,
+      281,  197,  264,  232,  280,    0,  266,  265,    0,    0,
+      277,  280,  275,  259,  258,    0,  273,    0,  277,  276,
+      261,  261,  273,    0,  252,  265,    0,  264,  249,  247,
+      267,  266,  261,  264,  263,  262,  251,    0,    0,  260,
+      249,    0,  259,  246,  230,  218,  237,    0,    0,  236,
+        0,    0,    0,  220,    0,    0,  240,    0,  218,  218,
+      210,  223,  212,    0,  206,  167,  105,    0,   97,   91,
+
+      102,   89,   75,   82,   46,   35,   32,    0,   21,    1,
+        0,    0,    1,    0,  623,  267,    0,  270,  272,  274
+    } ;
+
+static yyconst short int yy_def[521] =
+    {   0,
+      516,  516,  515,  517,  515,  518,  515,  517,  517,  517,
+      517,  517,   12,  517,  517,  517,  515,  517,  518,  517,
+       12,  517,  517,  517,  519,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  519,  520,  517,  517,  517,   29,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+
+      517,  242,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+
+      517,  517,  517,  517,  517,  517,  517,  517,  517,  517,
+      517,  517,  517,  517,    0,  515,  515,  515,  515,  515
+    } ;
+
+static yyconst short int yy_nxt[669] =
+    {   0,
+       18,    5,    6,    7,  515,  515,    8,    9,   10,   11,
+       12,   13,   13,   13,   13,   14,   20,  514,   21,   21,
+       21,   21,   21,   24,   55,   55,   15,   25,   55,   55,
+      513,   16,   23,   23,   23,   23,   23,  512,   18,   23,
+       23,   23,   23,   23,   17,    5,    6,    7,  511,   18,
+        8,    9,   10,   11,   12,   13,   13,   13,   13,   14,
+       18,   23,   23,   23,   23,   23,   54,  510,   54,   76,
+       15,   18,   77,   28,  154,   16,  509,  155,   23,   23,
+       23,   23,   23,   59,   60,   89,   84,   61,   17,   20,
+       28,   21,   21,   21,   21,   21,   87,  229,  508,   62,
+
+       85,   90,   88,   86,   91,  230,  507,   22,   26,   54,
+       21,   21,   21,   21,   21,   93,   63,   94,  109,   27,
+       64,  506,   28,   65,  505,   95,  504,  110,  111,  503,
+       66,  123,  124,  112,  125,  106,  284,   54,  502,   54,
+      285,   29,   30,   31,   32,  107,   33,   34,   35,   36,
+       37,   38,   39,   40,   41,   42,   43,  345,   44,   45,
+       46,   47,   48,  346,   49,   56,   56,  108,  206,   57,
+       57,   57,   57,   57,   58,   58,   58,   58,   58,   96,
+       54,  207,   58,   58,   58,   58,   58,   58,   67,  140,
+       68,  367,  368,  141,  167,   97,   69,   98,  168,  101,
+
+       99,   70,  169,  102,  501,   71,  219,   72,   73,  142,
+      103,   74,   75,  454,  455,  100,  104,   57,   57,   57,
+       57,   57,  105,   57,   57,   57,   57,   57,  500,  220,
+      221,  222,  302,  302,  302,  302,  302,  327,  499,  498,
+      302,  302,  302,  302,  302,  302,  381,  392,  457,  393,
+      382,  497,  458,  328,  496,  495,  494,  493,  492,  491,
+      490,  489,  488,  487,  394,  486,  395,    4,    4,    4,
+       19,   19,   53,   53,   54,   54,  485,  484,  483,  482,
+      481,  480,  479,  478,  477,  476,  475,  474,  473,  472,
+      471,  470,  469,  468,  467,  466,  465,  464,  463,  462,
+
+      461,  460,  459,  456,  453,  452,  451,  450,  449,  448,
+      447,  446,  445,  444,  443,  442,  441,  440,  439,  438,
+      437,  436,  435,  434,  433,  432,  431,  430,  429,  428,
+      427,  426,  425,  424,  423,  422,  421,  420,  419,  418,
+      417,  416,  415,  414,  413,  412,  411,  410,  409,  408,
+      407,  406,  405,  404,  403,  402,  401,  400,  399,  398,
+      397,  396,  391,  390,  389,  388,  387,  386,  385,  384,
+      383,  380,  379,  378,  377,  376,  375,  374,  373,  372,
+      371,  370,  369,  366,  365,  364,  363,  362,  361,  360,
+      359,  358,  357,  356,  355,  354,  353,  352,  351,  350,
+
+      349,  348,  347,  344,  343,  342,  341,  340,  339,  338,
+      337,  336,  335,  334,  333,  332,  331,  330,  329,  326,
+      325,  324,  323,  322,  321,  320,  319,  318,  317,  316,
+      315,  314,  313,  312,  311,  310,  309,  308,  307,  306,
+      305,  304,  303,  301,  300,  299,  298,  297,  296,  295,
+      294,  293,  292,  291,  290,  289,  288,  287,  286,  283,
+      282,  281,  280,  279,  278,  277,  276,  275,  274,  273,
+      272,  271,  270,  269,  268,  267,  266,  265,  264,  263,
+      262,  261,  260,  259,  258,  257,  256,  255,  254,  253,
+      252,  251,  250,  249,  248,  247,  246,  245,  244,  243,
+
+      242,  241,  240,  239,  238,  237,  236,  235,  234,  233,
+      232,  231,  228,  227,  226,  225,  224,  223,  218,  217,
+      216,  215,  214,  213,  212,  211,  210,  209,  208,  205,
+      204,  203,  202,  201,  200,  199,  198,  197,  196,  195,
+      194,  193,  192,  191,  190,  189,  188,  187,  186,  185,
+      184,  183,  182,  181,  180,  179,  178,  177,  176,  175,
+      174,  173,  172,  171,  170,  166,  165,  164,  163,  162,
+      161,  160,  159,  158,  157,  156,  153,  152,  151,  150,
+      149,  148,  147,  146,  145,  144,  143,  139,  138,  137,
+      136,  135,  134,  133,  132,  131,  130,  129,  128,  127,
+
+      126,  122,  121,  120,  119,  118,  117,  116,  115,  114,
+      113,   92,   83,   82,   81,   80,   79,   78,   52,   51,
+       50,  515,    3,  515,  515,  515,  515,  515,  515,  515,
+      515,  515,  515,  515,  515,  515,  515,  515,  515,  515,
+      515,  515,  515,  515,  515,  515,  515,  515,  515,  515,
+      515,  515,  515,  515,  515,  515,  515,  515,  515,  515,
+      515,  515,  515,  515,  515,  515,  515,  515
+    } ;
+
+static yyconst short int yy_chk[669] =
+    {   0,
+      517,    1,    1,    1,    0,    0,    1,    1,    1,    1,
+        1,    1,    1,    1,    1,    1,    8,  513,    8,    8,
+        8,    8,    8,   11,   27,   27,    1,   11,   55,   55,
+      510,    1,   10,   10,   10,   10,   10,  509,   13,   20,
+       20,   20,   20,   20,    1,    2,    2,    2,  507,   21,
+        2,    2,    2,    2,    2,    2,    2,    2,    2,    2,
+       13,   23,   23,   23,   23,   23,   25,  506,   25,   33,
+        2,   21,   33,   23,   92,    2,  505,   92,   26,   26,
+       26,   26,   26,   30,   30,   42,   40,   30,    2,    9,
+       26,    9,    9,    9,    9,    9,   41,  165,  504,   30,
+
+       40,   42,   41,   40,   42,  165,  503,    9,   12,   25,
+       12,   12,   12,   12,   12,   44,   31,   44,   48,   12,
+       31,  502,   12,   31,  501,   44,  500,   48,   48,  499,
+       31,   65,   65,   48,   65,   47,  224,   53,  497,   53,
+      224,   12,   14,   14,   14,   47,   14,   14,   14,   14,
+       14,   14,   14,   14,   14,   14,   14,  293,   14,   14,
+       14,   14,   14,  293,   14,   28,   28,   47,  146,   28,
+       28,   28,   28,   28,   29,   29,   29,   29,   29,   45,
+       53,  146,   29,   29,   29,   29,   29,   29,   32,   80,
+       32,  324,  324,   80,  104,   45,   32,   45,  104,   46,
+
+       45,   32,  104,   46,  496,   32,  158,   32,   32,   80,
+       46,   32,   32,  432,  432,   45,   46,   56,   56,   56,
+       56,   56,   46,   57,   57,   57,   57,   57,  495,  158,
+      158,  158,  242,  242,  242,  242,  242,  272,  493,  492,
+      242,  242,  242,  242,  242,  242,  340,  351,  434,  351,
+      340,  491,  434,  272,  490,  489,  487,  484,  480,  477,
+      476,  475,  474,  473,  351,  471,  351,  516,  516,  516,
+      518,  518,  519,  519,  520,  520,  470,  467,  466,  465,
+      464,  463,  462,  461,  460,  459,  458,  456,  455,  453,
+      452,  451,  450,  449,  447,  445,  444,  443,  442,  441,
+
+      438,  437,  435,  433,  431,  430,  429,  424,  423,  422,
+      419,  417,  415,  414,  413,  412,  411,  408,  407,  405,
+      404,  402,  401,  398,  397,  396,  395,  394,  393,  391,
+      390,  389,  388,  387,  386,  385,  384,  383,  382,  380,
+      379,  375,  374,  373,  372,  371,  370,  368,  367,  366,
+      365,  364,  363,  362,  361,  360,  359,  358,  357,  354,
+      353,  352,  350,  349,  348,  347,  346,  345,  344,  343,
+      342,  339,  338,  336,  335,  334,  333,  332,  331,  329,
+      328,  327,  326,  323,  320,  319,  317,  316,  313,  312,
+      311,  310,  309,  308,  306,  305,  303,  301,  300,  299,
+
+      298,  297,  296,  292,  291,  290,  289,  288,  287,  286,
+      285,  284,  283,  279,  277,  276,  275,  274,  273,  271,
+      269,  268,  267,  265,  264,  263,  262,  261,  260,  258,
+      256,  255,  254,  253,  251,  250,  249,  248,  247,  246,
+      245,  244,  243,  241,  240,  239,  238,  237,  236,  234,
+      233,  232,  231,  230,  229,  228,  227,  226,  225,  223,
+      222,  221,  220,  219,  218,  216,  215,  214,  213,  212,
+      211,  210,  209,  208,  207,  206,  205,  204,  203,  202,
+      201,  199,  198,  197,  196,  195,  193,  192,  191,  190,
+      188,  187,  186,  185,  184,  183,  182,  181,  180,  179,
+
+      178,  177,  176,  175,  174,  172,  171,  170,  169,  168,
+      167,  166,  164,  163,  162,  161,  160,  159,  157,  156,
+      155,  154,  153,  152,  151,  150,  149,  148,  147,  145,
+      144,  143,  142,  141,  139,  138,  137,  136,  135,  134,
+      133,  132,  131,  130,  129,  128,  127,  125,  124,  123,
+      122,  121,  120,  119,  118,  117,  115,  113,  112,  111,
+      109,  108,  107,  106,  105,  103,  102,  101,  100,   99,
+       98,   97,   96,   95,   94,   93,   91,   90,   89,   88,
+       87,   86,   85,   84,   83,   82,   81,   79,   78,   77,
+       76,   75,   74,   73,   72,   71,   70,   69,   68,   67,
+
+       66,   64,   63,   62,   61,   60,   59,   52,   51,   50,
+       49,   43,   39,   38,   37,   36,   35,   34,   22,   16,
+       15,    3,  515,  515,  515,  515,  515,  515,  515,  515,
+      515,  515,  515,  515,  515,  515,  515,  515,  515,  515,
+      515,  515,  515,  515,  515,  515,  515,  515,  515,  515,
+      515,  515,  515,  515,  515,  515,  515,  515,  515,  515,
+      515,  515,  515,  515,  515,  515,  515,  515
+    } ;
+
+static yy_state_type yy_last_accepting_state;
+static char *yy_last_accepting_cpos;
+
+/* The intent behind this definition is that it'll catch
+ * any uses of REJECT which flex missed.
+ */
+#define REJECT reject_used_but_not_detected
+#define yymore() yymore_used_but_not_detected
+#define YY_MORE_ADJ 0
+#define YY_RESTORE_YY_MORE_OFFSET
+char *yytext;
+#line 1 "lexer.lxx"
+#define INITIAL 0
+/*
+// Filename: lexer.l
+// Created by:  drose (16Jan99)
+// 
+////////////////////////////////////////////////////////////////////
+*/
+#line 9 "lexer.lxx"
+#include "lexerDefs.h"
+#include "parserDefs.h"
+#include "config_egg.h"
+#include "parser.h"
+
+#include <indent.h>
+#include <notify.h>
+
+#include <math.h>
+#include <pandabase.h>
+
+extern "C" int eggyywrap(void);  // declared below.
+
+static int yyinput(void);        // declared by flex.
+
+
+////////////////////////////////////////////////////////////////////
+// Static variables
+////////////////////////////////////////////////////////////////////
+
+// We'll increment line_number and col_number as we parse the file, so
+// that we can report the position of an error.
+static int line_number = 0;
+static int col_number = 0;
+
+// current_line holds as much of the current line as will fit.  Its
+// only purpose is for printing it out to report an error to the user.
+static const int max_error_width = 1024;
+static char current_line[max_error_width + 1];
+
+static int error_count = 0;
+static int warning_count = 0;
+
+// This is the pointer to the current input stream.
+static istream *inp = NULL;
+
+// This is the name of the egg file we're parsing.  We keep it so we
+// can print it out for error messages.
+static string egg_filename;
+
+// This is the initial token state returned by the lexer.  It allows
+// the yacc grammar to start from initial points.
+static int initial_token;
+
+
+////////////////////////////////////////////////////////////////////
+// Defining the interface to the lexer.
+////////////////////////////////////////////////////////////////////
+
+void
+egg_init_lexer(istream &in, const string &filename) {
+  inp = &in;
+  egg_filename = filename;
+  line_number = 0;
+  col_number = 0;
+  error_count = 0;
+  warning_count = 0;
+  initial_token = START_EGG;
+}
+
+void
+egg_start_group_body() {
+  /* Set the initial state to begin within a group_body context,
+     instead of at the beginning of the egg file. */
+  initial_token = START_GROUP_BODY;
+}
+
+void
+egg_start_texture_body() {
+  initial_token = START_TEXTURE_BODY;
+}
+
+void
+egg_start_primitive_body() {
+  initial_token = START_PRIMITIVE_BODY;
+}
+
+int
+egg_error_count() {
+  return error_count;
+}
+
+int
+egg_warning_count() {
+  return warning_count;
+}
+
+
+////////////////////////////////////////////////////////////////////
+// Internal support functions.
+////////////////////////////////////////////////////////////////////
+
+int
+eggyywrap(void) {
+  return 1;
+}
+
+void
+eggyyerror(const string &msg) {
+  if (egg_cat.is_error()) {
+    ostream &out = egg_cat.error(false);
+
+    out << "\nError";
+    if (!egg_filename.empty()) {
+      out << " in " << egg_filename;
+    }
+    out 
+      << " at line " << line_number << ", column " << col_number << ":\n"
+      << setiosflags(Notify::get_literal_flag())
+      << current_line << "\n";
+    indent(out, col_number-1) 
+      << "^\n" << msg << "\n\n" 
+      << resetiosflags(Notify::get_literal_flag()) << flush;
+  }
+  error_count++;
+}
+
+void
+eggyyerror(ostringstream &strm) {
+  string s = strm.str();
+  eggyyerror(s);
+}
+
+void
+eggyywarning(const string &msg) {
+  if (egg_cat.is_warning()) {
+    ostream &out = egg_cat.warning(false);
+
+    out << "\nWarning";
+    if (!egg_filename.empty()) {
+      out << " in " << egg_filename;
+    }
+    out 
+      << " at line " << line_number << ", column " << col_number << ":\n"
+      << setiosflags(Notify::get_literal_flag())
+      << current_line << "\n";
+    indent(out, col_number-1) 
+      << "^\n" << msg << "\n\n" 
+      << resetiosflags(Notify::get_literal_flag()) << flush;
+  }
+  warning_count++;
+}
+
+void
+eggyywarning(ostringstream &strm) {
+  string s = strm.str();
+  eggyywarning(s);
+}
+
+// Now define a function to take input from an istream instead of a
+// stdio FILE pointer.  This is flex-specific.
+static void
+input_chars(char *buffer, int &result, int max_size) {
+  nassertv(inp != NULL);
+  if (*inp) {
+    inp->read(buffer, max_size);
+    result = inp->gcount();
+
+    if (line_number == 0) {
+      // This is a special case.  If we are reading the very first bit
+      // from the stream, copy it into the current_line array.  This
+      // is because the \n.* rule below, which fills current_line
+      // normally, doesn't catch the first line.
+      int length = min(max_error_width, result);
+      strncpy(current_line, buffer, length);
+      current_line[length] = '\0';
+      line_number++;
+      col_number = 0;
+
+      // Truncate it at the newline.
+      char *end = strchr(current_line, '\n');
+      if (end != NULL) {
+        *end = '\0';
+      }
+    }
+
+  } else {
+    // End of file or I/O error.
+    result = 0;
+  }
+}
+#undef YY_INPUT
+#define YY_INPUT(buffer, result, max_size) input_chars(buffer, result, max_size)
+
+// read_char reads and returns a single character, incrementing the
+// supplied line and column numbers as appropriate.  A convenience
+// function for the scanning functions below.
+static int
+read_char(int &line, int &col) {
+  int c = yyinput();
+  if (c == '\n') {
+    line++;
+    col = 0;
+  } else {
+    col++;
+  }
+  return c;
+}
+
+// scan_quoted_string reads a string delimited by quotation marks and
+// returns it.
+static string
+scan_quoted_string() {
+  string result;
+
+  // We don't touch the current line number and column number during
+  // scanning, so that if we detect an error while scanning the string
+  // (e.g. an unterminated string), we'll report the error as
+  // occurring at the start of the string, not at the end--somewhat
+  // more convenient for the user.
+
+  // Instead of adjusting the global line_number and col_number
+  // variables, we'll operate on our own local variables for the
+  // interim.
+  int line = line_number;
+  int col = col_number;
+
+  int c;
+  c = read_char(line, col);
+  while (c != '"' && c != EOF) {
+    result += c;
+    c = read_char(line, col);
+  }
+
+  if (c == EOF) {
+    eggyyerror("This quotation mark is unterminated.");
+  }
+
+  line_number = line;
+  col_number = col;
+
+  return result;
+}
+
+// eat_c_comment scans past all characters up until the first */
+// encountered.
+static void
+eat_c_comment() {
+  // As above, we'll operate on our own local copies of line_number
+  // and col_number within this function.
+
+  int line = line_number;
+  int col = col_number;
+
+  int c, last_c;
+  
+  last_c = '\0';
+  c = read_char(line, col);
+  while (c != EOF && !(last_c == '*' && c == '/')) {
+    if (last_c == '/' && c == '*') {
+      ostringstream errmsg;
+      errmsg << "This comment contains a nested /* symbol at line "
+             << line << ", column " << col-1 << "--possibly unclosed?"
+             << ends;
+      eggyywarning(errmsg);
+    }
+    last_c = c;
+    c = read_char(line, col);
+  }
+
+  if (c == EOF) {
+    eggyyerror("This comment marker is unclosed.");
+  }
+
+  line_number = line;
+  col_number = col;
+}
+
+
+
+// accept() is called below as each piece is pulled off and
+// accepted by the lexer; it increments the current column number.
+INLINE void accept() {
+  col_number += yyleng;
+}
+
+#line 981 "lex.yy.c"
+
+/* Macros after this point can all be overridden by user definitions in
+ * section 1.
+ */
+
+#ifndef YY_SKIP_YYWRAP
+#ifdef __cplusplus
+extern "C" int yywrap YY_PROTO(( void ));
+#else
+extern int yywrap YY_PROTO(( void ));
+#endif
+#endif
+
+#ifndef YY_NO_UNPUT
+static void yyunput YY_PROTO(( int c, char *buf_ptr ));
+#endif
+
+#ifndef yytext_ptr
+static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));
+#endif
+
+#ifdef YY_NEED_STRLEN
+static int yy_flex_strlen YY_PROTO(( yyconst char * ));
+#endif
+
+#ifndef YY_NO_INPUT
+#ifdef __cplusplus
+static int yyinput YY_PROTO(( void ));
+#else
+static int input YY_PROTO(( void ));
+#endif
+#endif
+
+#if YY_STACK_USED
+static int yy_start_stack_ptr = 0;
+static int yy_start_stack_depth = 0;
+static int *yy_start_stack = 0;
+#ifndef YY_NO_PUSH_STATE
+static void yy_push_state YY_PROTO(( int new_state ));
+#endif
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state YY_PROTO(( void ));
+#endif
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state YY_PROTO(( void ));
+#endif
+
+#else
+#define YY_NO_PUSH_STATE 1
+#define YY_NO_POP_STATE 1
+#define YY_NO_TOP_STATE 1
+#endif
+
+#ifdef YY_MALLOC_DECL
+YY_MALLOC_DECL
+#else
+#if __STDC__
+#ifndef __cplusplus
+#include <stdlib.h>
+#endif
+#else
+/* Just try to get by without declaring the routines.  This will fail
+ * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
+ * or sizeof(void*) != sizeof(int).
+ */
+#endif
+#endif
+
+/* Amount of stuff to slurp up with each read. */
+#ifndef YY_READ_BUF_SIZE
+#define YY_READ_BUF_SIZE 8192
+#endif
+
+/* Copy whatever the last rule matched to the standard output. */
+
+#ifndef ECHO
+/* This used to be an fputs(), but since the string might contain NUL's,
+ * we now use fwrite().
+ */
+#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
+#endif
+
+/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
+ * is returned in "result".
+ */
+#ifndef YY_INPUT
+#define YY_INPUT(buf,result,max_size) \
+	if ( yy_current_buffer->yy_is_interactive ) \
+		{ \
+		int c = '*', n; \
+		for ( n = 0; n < max_size && \
+			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+			buf[n] = (char) c; \
+		if ( c == '\n' ) \
+			buf[n++] = (char) c; \
+		if ( c == EOF && ferror( yyin ) ) \
+			YY_FATAL_ERROR( "input in flex scanner failed" ); \
+		result = n; \
+		} \
+	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
+		  && ferror( yyin ) ) \
+		YY_FATAL_ERROR( "input in flex scanner failed" );
+#endif
+
+/* No semi-colon after return; correct usage is to write "yyterminate();" -
+ * we don't want an extra ';' after the "return" because that will cause
+ * some compilers to complain about unreachable statements.
+ */
+#ifndef yyterminate
+#define yyterminate() return YY_NULL
+#endif
+
+/* Number of entries by which start-condition stack grows. */
+#ifndef YY_START_STACK_INCR
+#define YY_START_STACK_INCR 25
+#endif
+
+/* Report a fatal error. */
+#ifndef YY_FATAL_ERROR
+#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
+#endif
+
+/* Default declaration of generated scanner - a define so the user can
+ * easily add parameters.
+ */
+#ifndef YY_DECL
+#define YY_DECL int yylex YY_PROTO(( void ))
+#endif
+
+/* Code executed at the beginning of each rule, after yytext and yyleng
+ * have been set up.
+ */
+#ifndef YY_USER_ACTION
+#define YY_USER_ACTION
+#endif
+
+/* Code executed at the end of each rule. */
+#ifndef YY_BREAK
+#define YY_BREAK break;
+#endif
+
+#define YY_RULE_SETUP \
+	YY_USER_ACTION
+
+YY_DECL
+	{
+	register yy_state_type yy_current_state;
+	register char *yy_cp, *yy_bp;
+	register int yy_act;
+
+#line 291 "lexer.lxx"
+
+
+
+  if (initial_token != 0) {
+    int t = initial_token;
+    initial_token = 0;
+    return t;
+  }
+
+
+#line 1143 "lex.yy.c"
+
+	if ( yy_init )
+		{
+		yy_init = 0;
+
+#ifdef YY_USER_INIT
+		YY_USER_INIT;
+#endif
+
+		if ( ! yy_start )
+			yy_start = 1;	/* first start state */
+
+		if ( ! yyin )
+			yyin = stdin;
+
+		if ( ! yyout )
+			yyout = stdout;
+
+		if ( ! yy_current_buffer )
+			yy_current_buffer =
+				yy_create_buffer( yyin, YY_BUF_SIZE );
+
+		yy_load_buffer_state();
+		}
+
+	while ( 1 )		/* loops until end-of-file is reached */
+		{
+		yy_cp = yy_c_buf_p;
+
+		/* Support of yytext. */
+		*yy_cp = yy_hold_char;
+
+		/* yy_bp points to the position in yy_ch_buf of the start of
+		 * the current run.
+		 */
+		yy_bp = yy_cp;
+
+		yy_current_state = yy_start;
+yy_match:
+		do
+			{
+			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+			if ( yy_accept[yy_current_state] )
+				{
+				yy_last_accepting_state = yy_current_state;
+				yy_last_accepting_cpos = yy_cp;
+				}
+			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+				{
+				yy_current_state = (int) yy_def[yy_current_state];
+				if ( yy_current_state >= 516 )
+					yy_c = yy_meta[(unsigned int) yy_c];
+				}
+			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+			++yy_cp;
+			}
+		while ( yy_base[yy_current_state] != 623 );
+
+yy_find_action:
+		yy_act = yy_accept[yy_current_state];
+		if ( yy_act == 0 )
+			{ /* have to back up */
+			yy_cp = yy_last_accepting_cpos;
+			yy_current_state = yy_last_accepting_state;
+			yy_act = yy_accept[yy_current_state];
+			}
+
+		YY_DO_BEFORE_ACTION;
+
+
+do_action:	/* This label is used only to access EOF actions. */
+
+
+		switch ( yy_act )
+	{ /* beginning of action switch */
+			case 0: /* must back up */
+			/* undo the effects of YY_DO_BEFORE_ACTION */
+			*yy_cp = yy_hold_char;
+			yy_cp = yy_last_accepting_cpos;
+			yy_current_state = yy_last_accepting_state;
+			goto yy_find_action;
+
+case 1:
+YY_RULE_SETUP
+#line 301 "lexer.lxx"
+{
+  // New line.  Save a copy of the line so we can print it out for the
+  // benefit of the user in case we get an error.
+
+  strncpy(current_line, yytext+1, max_error_width);
+  current_line[max_error_width] = '\0';
+  line_number++;
+  col_number=0;
+
+  // Return the whole line to the lexer, except the newline character,
+  // which we eat.
+  yyless(1);
+}
+	YY_BREAK
+case 2:
+YY_RULE_SETUP
+#line 315 "lexer.lxx"
+{ 
+  // Eat whitespace.
+  accept();
+}
+	YY_BREAK
+case 3:
+YY_RULE_SETUP
+#line 320 "lexer.lxx"
+{ 
+  // Eat C++-style comments.
+  accept();
+}
+	YY_BREAK
+case 4:
+YY_RULE_SETUP
+#line 325 "lexer.lxx"
+{
+  // Eat C-style comments.
+  accept();
+  eat_c_comment(); 
+}
+	YY_BREAK
+case 5:
+YY_RULE_SETUP
+#line 331 "lexer.lxx"
+{
+  // Send curly braces as themselves.
+  accept(); 
+  return eggyytext[0];
+}
+	YY_BREAK
+case 6:
+YY_RULE_SETUP
+#line 339 "lexer.lxx"
+{
+  accept();
+  return BEZIERCURVE;
+}
+	YY_BREAK
+case 7:
+YY_RULE_SETUP
+#line 343 "lexer.lxx"
+{
+  accept();
+  return BFACE;
+}
+	YY_BREAK
+case 8:
+YY_RULE_SETUP
+#line 347 "lexer.lxx"
+{
+  accept();
+  return BILLBOARD;
+}
+	YY_BREAK
+case 9:
+YY_RULE_SETUP
+#line 351 "lexer.lxx"
+{
+  accept();
+  return BILLBOARDCENTER;
+}
+	YY_BREAK
+case 10:
+YY_RULE_SETUP
+#line 355 "lexer.lxx"
+{
+  accept();
+  return BUNDLE;
+}
+	YY_BREAK
+case 11:
+YY_RULE_SETUP
+#line 359 "lexer.lxx"
+{
+  accept();
+  return SCALAR;
+}
+	YY_BREAK
+case 12:
+YY_RULE_SETUP
+#line 363 "lexer.lxx"
+{
+  accept();
+  return CLOSED;
+}
+	YY_BREAK
+case 13:
+YY_RULE_SETUP
+#line 367 "lexer.lxx"
+{
+  accept();
+  return COLLIDE;
+}
+	YY_BREAK
+case 14:
+YY_RULE_SETUP
+#line 371 "lexer.lxx"
+{
+  accept();
+  return COMMENT;
+}
+	YY_BREAK
+case 15:
+YY_RULE_SETUP
+#line 375 "lexer.lxx"
+{
+  accept();
+  return COORDSYSTEM;
+}
+	YY_BREAK
+case 16:
+YY_RULE_SETUP
+#line 379 "lexer.lxx"
+{
+  accept();
+  return CV;
+}
+	YY_BREAK
+case 17:
+YY_RULE_SETUP
+#line 383 "lexer.lxx"
+{
+  accept();
+  return DART;
+}
+	YY_BREAK
+case 18:
+YY_RULE_SETUP
+#line 387 "lexer.lxx"
+{
+  accept();
+  return DNORMAL;
+}
+	YY_BREAK
+case 19:
+YY_RULE_SETUP
+#line 391 "lexer.lxx"
+{
+  accept();
+  return DRGBA;
+}
+	YY_BREAK
+case 20:
+YY_RULE_SETUP
+#line 395 "lexer.lxx"
+{
+  accept();
+  return DUV;
+}
+	YY_BREAK
+case 21:
+YY_RULE_SETUP
+#line 399 "lexer.lxx"
+{
+  accept();
+  return DXYZ;
+}
+	YY_BREAK
+case 22:
+YY_RULE_SETUP
+#line 403 "lexer.lxx"
+{
+  accept();
+  return DCS;
+}
+	YY_BREAK
+case 23:
+YY_RULE_SETUP
+#line 407 "lexer.lxx"
+{
+  accept();
+  return DISTANCE;
+}
+	YY_BREAK
+case 24:
+YY_RULE_SETUP
+#line 411 "lexer.lxx"
+{
+  accept();
+  return DTREF;
+}
+	YY_BREAK
+case 25:
+YY_RULE_SETUP
+#line 415 "lexer.lxx"
+{
+  accept();
+  return DYNAMICVERTEXPOOL;
+}
+	YY_BREAK
+case 26:
+YY_RULE_SETUP
+#line 419 "lexer.lxx"
+{
+  accept();
+  return EXTERNAL_FILE;
+}
+	YY_BREAK
+case 27:
+YY_RULE_SETUP
+#line 423 "lexer.lxx"
+{
+  accept();
+  return FLIGHT;
+}
+	YY_BREAK
+case 28:
+YY_RULE_SETUP
+#line 427 "lexer.lxx"
+{
+  accept();
+  return GROUP;
+}
+	YY_BREAK
+case 29:
+YY_RULE_SETUP
+#line 431 "lexer.lxx"
+{
+  accept();
+  return HIP;
+}
+	YY_BREAK
+case 30:
+YY_RULE_SETUP
+#line 435 "lexer.lxx"
+{
+  accept();
+  return INTANGENT;
+}
+	YY_BREAK
+case 31:
+YY_RULE_SETUP
+#line 439 "lexer.lxx"
+{
+  accept();
+  return JOINT;
+}
+	YY_BREAK
+case 32:
+YY_RULE_SETUP
+#line 443 "lexer.lxx"
+{
+  accept();
+  return KNOTS;
+}
+	YY_BREAK
+case 33:
+YY_RULE_SETUP
+#line 447 "lexer.lxx"
+{
+  accept();
+  return INCLUDE;
+}
+	YY_BREAK
+case 34:
+YY_RULE_SETUP
+#line 451 "lexer.lxx"
+{
+  accept();
+  return INSTANCE;
+}
+	YY_BREAK
+case 35:
+YY_RULE_SETUP
+#line 455 "lexer.lxx"
+{
+  accept();
+  return LOOP;
+}
+	YY_BREAK
+case 36:
+YY_RULE_SETUP
+#line 459 "lexer.lxx"
+{
+  accept();
+  return MATERIAL;
+}
+	YY_BREAK
+case 37:
+YY_RULE_SETUP
+#line 463 "lexer.lxx"
+{
+  accept();
+  return MATRIX3;
+}
+	YY_BREAK
+case 38:
+YY_RULE_SETUP
+#line 467 "lexer.lxx"
+{
+  accept();
+  return MATRIX4;
+}
+	YY_BREAK
+case 39:
+YY_RULE_SETUP
+#line 471 "lexer.lxx"
+{
+  accept();
+  return MODEL;
+}
+	YY_BREAK
+case 40:
+YY_RULE_SETUP
+#line 475 "lexer.lxx"
+{
+  accept();
+  return MREF;
+}
+	YY_BREAK
+case 41:
+YY_RULE_SETUP
+#line 479 "lexer.lxx"
+{
+  accept();
+  return NORMAL;
+}
+	YY_BREAK
+case 42:
+YY_RULE_SETUP
+#line 483 "lexer.lxx"
+{
+  accept();
+  return NURBSCURVE;
+}
+	YY_BREAK
+case 43:
+YY_RULE_SETUP
+#line 487 "lexer.lxx"
+{
+  accept();
+  return NURBSSURFACE;
+}
+	YY_BREAK
+case 44:
+YY_RULE_SETUP
+#line 491 "lexer.lxx"
+{
+  accept();
+  return OBJECTTYPE;
+}
+	YY_BREAK
+case 45:
+YY_RULE_SETUP
+#line 495 "lexer.lxx"
+{
+  accept();
+  return ORDER;
+}
+	YY_BREAK
+case 46:
+YY_RULE_SETUP
+#line 499 "lexer.lxx"
+{
+  accept();
+  return OUTTANGENT;
+}
+	YY_BREAK
+case 47:
+YY_RULE_SETUP
+#line 503 "lexer.lxx"
+{
+  accept();
+  return POINTLIGHT;
+}
+	YY_BREAK
+case 48:
+YY_RULE_SETUP
+#line 507 "lexer.lxx"
+{
+  accept();
+  return POLYGON;
+}
+	YY_BREAK
+case 49:
+YY_RULE_SETUP
+#line 511 "lexer.lxx"
+{
+  accept();
+  return REF;
+}
+	YY_BREAK
+case 50:
+YY_RULE_SETUP
+#line 515 "lexer.lxx"
+{
+  accept();
+  return RGBA;
+}
+	YY_BREAK
+case 51:
+YY_RULE_SETUP
+#line 519 "lexer.lxx"
+{
+  accept();
+  return ROTATE;
+}
+	YY_BREAK
+case 52:
+YY_RULE_SETUP
+#line 523 "lexer.lxx"
+{
+  accept();
+  return ROTX;
+}
+	YY_BREAK
+case 53:
+YY_RULE_SETUP
+#line 527 "lexer.lxx"
+{
+  accept();
+  return ROTY;
+}
+	YY_BREAK
+case 54:
+YY_RULE_SETUP
+#line 531 "lexer.lxx"
+{
+  accept();
+  return ROTZ;
+}
+	YY_BREAK
+case 55:
+YY_RULE_SETUP
+#line 535 "lexer.lxx"
+{
+  accept();
+  return SANIM;
+}
+	YY_BREAK
+case 56:
+YY_RULE_SETUP
+#line 539 "lexer.lxx"
+{
+  accept();
+  return SCALAR;
+}
+	YY_BREAK
+case 57:
+YY_RULE_SETUP
+#line 543 "lexer.lxx"
+{
+  accept();
+  return SCALE;
+}
+	YY_BREAK
+case 58:
+YY_RULE_SETUP
+#line 547 "lexer.lxx"
+{
+  accept();
+  return SEQUENCE;
+}
+	YY_BREAK
+case 59:
+YY_RULE_SETUP
+#line 551 "lexer.lxx"
+{
+  accept();
+  return SHADING;
+}
+	YY_BREAK
+case 60:
+YY_RULE_SETUP
+#line 555 "lexer.lxx"
+{
+  accept();
+  return SWITCH;
+}
+	YY_BREAK
+case 61:
+YY_RULE_SETUP
+#line 559 "lexer.lxx"
+{
+  accept();
+  return SWITCHCONDITION;
+}
+	YY_BREAK
+case 62:
+YY_RULE_SETUP
+#line 563 "lexer.lxx"
+{
+  accept();
+  return TABLE;
+}
+	YY_BREAK
+case 63:
+YY_RULE_SETUP
+#line 567 "lexer.lxx"
+{
+  accept();
+  return TABLE_V;
+}
+	YY_BREAK
+case 64:
+YY_RULE_SETUP
+#line 571 "lexer.lxx"
+{
+  accept();
+  return TEXLIST;
+}
+	YY_BREAK
+case 65:
+YY_RULE_SETUP
+#line 575 "lexer.lxx"
+{
+  accept();
+  return TEXTURE;
+}
+	YY_BREAK
+case 66:
+YY_RULE_SETUP
+#line 579 "lexer.lxx"
+{
+  accept();
+  return TLENGTHS;
+}
+	YY_BREAK
+case 67:
+YY_RULE_SETUP
+#line 583 "lexer.lxx"
+{
+  accept();
+  return TRANSFORM;
+}
+	YY_BREAK
+case 68:
+YY_RULE_SETUP
+#line 587 "lexer.lxx"
+{
+  accept();
+  return TRANSLATE;
+}
+	YY_BREAK
+case 69:
+YY_RULE_SETUP
+#line 591 "lexer.lxx"
+{
+  accept();
+  return TREF;
+}
+	YY_BREAK
+case 70:
+YY_RULE_SETUP
+#line 595 "lexer.lxx"
+{
+  accept();
+  return TRIM;
+}
+	YY_BREAK
+case 71:
+YY_RULE_SETUP
+#line 599 "lexer.lxx"
+{
+  accept();
+  return TXT;
+}
+	YY_BREAK
+case 72:
+YY_RULE_SETUP
+#line 603 "lexer.lxx"
+{
+  accept();
+  return UKNOTS;
+}
+	YY_BREAK
+case 73:
+YY_RULE_SETUP
+#line 607 "lexer.lxx"
+{
+  accept();
+  return UKNOTS;
+}
+	YY_BREAK
+case 74:
+YY_RULE_SETUP
+#line 611 "lexer.lxx"
+{
+  accept();
+  return UV;
+}
+	YY_BREAK
+case 75:
+YY_RULE_SETUP
+#line 615 "lexer.lxx"
+{
+  accept();
+  return VKNOTS;
+}
+	YY_BREAK
+case 76:
+YY_RULE_SETUP
+#line 619 "lexer.lxx"
+{
+  accept();
+  return VKNOTS;
+}
+	YY_BREAK
+case 77:
+YY_RULE_SETUP
+#line 623 "lexer.lxx"
+{
+  accept();
+  return VERTEX;
+}
+	YY_BREAK
+case 78:
+YY_RULE_SETUP
+#line 627 "lexer.lxx"
+{
+  accept();
+  return VERTEXANIM;
+}
+	YY_BREAK
+case 79:
+YY_RULE_SETUP
+#line 631 "lexer.lxx"
+{
+  accept();
+  return VERTEXPOOL;
+}
+	YY_BREAK
+case 80:
+YY_RULE_SETUP
+#line 635 "lexer.lxx"
+{
+  accept();
+  return VERTEXREF;
+}
+	YY_BREAK
+case 81:
+YY_RULE_SETUP
+#line 639 "lexer.lxx"
+{
+  accept();
+  return XFMANIM;
+}
+	YY_BREAK
+case 82:
+YY_RULE_SETUP
+#line 643 "lexer.lxx"
+{
+  accept();
+  return XFMSANIM;
+}
+	YY_BREAK
+case 83:
+YY_RULE_SETUP
+#line 650 "lexer.lxx"
+{ 
+  // An integer or floating-point number.
+  accept(); 
+  eggyylval._number = atof(eggyytext); 
+  eggyylval._string = yytext;
+  return NUMBER; 
+}
+	YY_BREAK
+case 84:
+YY_RULE_SETUP
+#line 658 "lexer.lxx"
+{
+  // A hexadecimal integer number.
+  accept(); 
+  eggyylval._number = strtoul(yytext+2, NULL, 16);
+  eggyylval._string = yytext;
+  return NUMBER; 
+}
+	YY_BREAK
+case 85:
+YY_RULE_SETUP
+#line 666 "lexer.lxx"
+{
+  // A binary integer number.
+  accept(); 
+  eggyylval._number = strtoul(yytext+2, NULL, 2);
+  eggyylval._string = yytext;
+  return NUMBER; 
+}
+	YY_BREAK
+case 86:
+YY_RULE_SETUP
+#line 674 "lexer.lxx"
+{
+  // not-a-number.  These sometimes show up in egg files accidentally.
+  accept(); 
+  memset(&eggyylval._number, 0, sizeof(eggyylval._number));
+  *(unsigned long *)&eggyylval._number = strtoul(yytext+3, NULL, 0);
+  eggyylval._string = yytext;
+  return NUMBER;
+}
+	YY_BREAK
+case 87:
+YY_RULE_SETUP
+#line 683 "lexer.lxx"
+{ 
+  // infinity.  As above.
+  accept(); 
+  eggyylval._number = HUGE_VAL;
+  eggyylval._string = yytext;
+  return NUMBER; 
+}
+	YY_BREAK
+case 88:
+YY_RULE_SETUP
+#line 691 "lexer.lxx"
+{
+  // minus infinity.  As above.
+  accept(); 
+  eggyylval._number = -HUGE_VAL;
+  eggyylval._string = yytext;
+  return NUMBER; 
+}
+	YY_BREAK
+case 89:
+YY_RULE_SETUP
+#line 700 "lexer.lxx"
+{
+  // Quoted string.
+  accept();
+  eggyylval._string = scan_quoted_string();
+  return STRING;
+}
+	YY_BREAK
+case 90:
+YY_RULE_SETUP
+#line 707 "lexer.lxx"
+{ 
+  // Unquoted string.
+  accept();
+  eggyylval._string = yytext;
+  return STRING;
+}
+	YY_BREAK
+case 91:
+YY_RULE_SETUP
+#line 713 "lexer.lxx"
+ECHO;
+	YY_BREAK
+#line 1985 "lex.yy.c"
+case YY_STATE_EOF(INITIAL):
+	yyterminate();
+
+	case YY_END_OF_BUFFER:
+		{
+		/* Amount of text matched not including the EOB char. */
+		int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
+
+		/* Undo the effects of YY_DO_BEFORE_ACTION. */
+		*yy_cp = yy_hold_char;
+		YY_RESTORE_YY_MORE_OFFSET
+
+		if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
+			{
+			/* We're scanning a new file or input source.  It's
+			 * possible that this happened because the user
+			 * just pointed yyin at a new source and called
+			 * yylex().  If so, then we have to assure
+			 * consistency between yy_current_buffer and our
+			 * globals.  Here is the right place to do so, because
+			 * this is the first action (other than possibly a
+			 * back-up) that will match for the new input source.
+			 */
+			yy_n_chars = yy_current_buffer->yy_n_chars;
+			yy_current_buffer->yy_input_file = yyin;
+			yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
+			}
+
+		/* Note that here we test for yy_c_buf_p "<=" to the position
+		 * of the first EOB in the buffer, since yy_c_buf_p will
+		 * already have been incremented past the NUL character
+		 * (since all states make transitions on EOB to the
+		 * end-of-buffer state).  Contrast this with the test
+		 * in input().
+		 */
+		if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+			{ /* This was really a NUL. */
+			yy_state_type yy_next_state;
+
+			yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
+
+			yy_current_state = yy_get_previous_state();
+
+			/* Okay, we're now positioned to make the NUL
+			 * transition.  We couldn't have
+			 * yy_get_previous_state() go ahead and do it
+			 * for us because it doesn't know how to deal
+			 * with the possibility of jamming (and we don't
+			 * want to build jamming into it because then it
+			 * will run more slowly).
+			 */
+
+			yy_next_state = yy_try_NUL_trans( yy_current_state );
+
+			yy_bp = yytext_ptr + YY_MORE_ADJ;
+
+			if ( yy_next_state )
+				{
+				/* Consume the NUL. */
+				yy_cp = ++yy_c_buf_p;
+				yy_current_state = yy_next_state;
+				goto yy_match;
+				}
+
+			else
+				{
+				yy_cp = yy_c_buf_p;
+				goto yy_find_action;
+				}
+			}
+
+		else switch ( yy_get_next_buffer() )
+			{
+			case EOB_ACT_END_OF_FILE:
+				{
+				yy_did_buffer_switch_on_eof = 0;
+
+				if ( yywrap() )
+					{
+					/* Note: because we've taken care in
+					 * yy_get_next_buffer() to have set up
+					 * yytext, we can now set up
+					 * yy_c_buf_p so that if some total
+					 * hoser (like flex itself) wants to
+					 * call the scanner after we return the
+					 * YY_NULL, it'll still work - another
+					 * YY_NULL will get returned.
+					 */
+					yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
+
+					yy_act = YY_STATE_EOF(YY_START);
+					goto do_action;
+					}
+
+				else
+					{
+					if ( ! yy_did_buffer_switch_on_eof )
+						YY_NEW_FILE;
+					}
+				break;
+				}
+
+			case EOB_ACT_CONTINUE_SCAN:
+				yy_c_buf_p =
+					yytext_ptr + yy_amount_of_matched_text;
+
+				yy_current_state = yy_get_previous_state();
+
+				yy_cp = yy_c_buf_p;
+				yy_bp = yytext_ptr + YY_MORE_ADJ;
+				goto yy_match;
+
+			case EOB_ACT_LAST_MATCH:
+				yy_c_buf_p =
+				&yy_current_buffer->yy_ch_buf[yy_n_chars];
+
+				yy_current_state = yy_get_previous_state();
+
+				yy_cp = yy_c_buf_p;
+				yy_bp = yytext_ptr + YY_MORE_ADJ;
+				goto yy_find_action;
+			}
+		break;
+		}
+
+	default:
+		YY_FATAL_ERROR(
+			"fatal flex scanner internal error--no action found" );
+	} /* end of action switch */
+		} /* end of scanning one token */
+	} /* end of yylex */
+
+
+/* yy_get_next_buffer - try to read in a new buffer
+ *
+ * Returns a code representing an action:
+ *	EOB_ACT_LAST_MATCH -
+ *	EOB_ACT_CONTINUE_SCAN - continue scanning from current position
+ *	EOB_ACT_END_OF_FILE - end of file
+ */
+
+static int yy_get_next_buffer()
+	{
+	register char *dest = yy_current_buffer->yy_ch_buf;
+	register char *source = yytext_ptr;
+	register int number_to_move, i;
+	int ret_val;
+
+	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
+		YY_FATAL_ERROR(
+		"fatal flex scanner internal error--end of buffer missed" );
+
+	if ( yy_current_buffer->yy_fill_buffer == 0 )
+		{ /* Don't try to fill the buffer, so this is an EOF. */
+		if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
+			{
+			/* We matched a single character, the EOB, so
+			 * treat this as a final EOF.
+			 */
+			return EOB_ACT_END_OF_FILE;
+			}
+
+		else
+			{
+			/* We matched some text prior to the EOB, first
+			 * process it.
+			 */
+			return EOB_ACT_LAST_MATCH;
+			}
+		}
+
+	/* Try to read more data. */
+
+	/* First move last chars to start of buffer. */
+	number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
+
+	for ( i = 0; i < number_to_move; ++i )
+		*(dest++) = *(source++);
+
+	if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
+		/* don't do the read, it's not guaranteed to return an EOF,
+		 * just force an EOF
+		 */
+		yy_current_buffer->yy_n_chars = yy_n_chars = 0;
+
+	else
+		{
+		int num_to_read =
+			yy_current_buffer->yy_buf_size - number_to_move - 1;
+
+		while ( num_to_read <= 0 )
+			{ /* Not enough room in the buffer - grow it. */
+#ifdef YY_USES_REJECT
+			YY_FATAL_ERROR(
+"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
+#else
+
+			/* just a shorter name for the current buffer */
+			YY_BUFFER_STATE b = yy_current_buffer;
+
+			int yy_c_buf_p_offset =
+				(int) (yy_c_buf_p - b->yy_ch_buf);
+
+			if ( b->yy_is_our_buffer )
+				{
+				int new_size = b->yy_buf_size * 2;
+
+				if ( new_size <= 0 )
+					b->yy_buf_size += b->yy_buf_size / 8;
+				else
+					b->yy_buf_size *= 2;
+
+				b->yy_ch_buf = (char *)
+					/* Include room in for 2 EOB chars. */
+					yy_flex_realloc( (void *) b->yy_ch_buf,
+							 b->yy_buf_size + 2 );
+				}
+			else
+				/* Can't grow it, we don't own it. */
+				b->yy_ch_buf = 0;
+
+			if ( ! b->yy_ch_buf )
+				YY_FATAL_ERROR(
+				"fatal error - scanner input buffer overflow" );
+
+			yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
+
+			num_to_read = yy_current_buffer->yy_buf_size -
+						number_to_move - 1;
+#endif
+			}
+
+		if ( num_to_read > YY_READ_BUF_SIZE )
+			num_to_read = YY_READ_BUF_SIZE;
+
+		/* Read in more data. */
+		YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
+			yy_n_chars, num_to_read );
+
+		yy_current_buffer->yy_n_chars = yy_n_chars;
+		}
+
+	if ( yy_n_chars == 0 )
+		{
+		if ( number_to_move == YY_MORE_ADJ )
+			{
+			ret_val = EOB_ACT_END_OF_FILE;
+			yyrestart( yyin );
+			}
+
+		else
+			{
+			ret_val = EOB_ACT_LAST_MATCH;
+			yy_current_buffer->yy_buffer_status =
+				YY_BUFFER_EOF_PENDING;
+			}
+		}
+
+	else
+		ret_val = EOB_ACT_CONTINUE_SCAN;
+
+	yy_n_chars += number_to_move;
+	yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
+	yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
+
+	yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
+
+	return ret_val;
+	}
+
+
+/* yy_get_previous_state - get the state just before the EOB char was reached */
+
+static yy_state_type yy_get_previous_state()
+	{
+	register yy_state_type yy_current_state;
+	register char *yy_cp;
+
+	yy_current_state = yy_start;
+
+	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
+		{
+		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+		if ( yy_accept[yy_current_state] )
+			{
+			yy_last_accepting_state = yy_current_state;
+			yy_last_accepting_cpos = yy_cp;
+			}
+		while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+			{
+			yy_current_state = (int) yy_def[yy_current_state];
+			if ( yy_current_state >= 516 )
+				yy_c = yy_meta[(unsigned int) yy_c];
+			}
+		yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+		}
+
+	return yy_current_state;
+	}
+
+
+/* yy_try_NUL_trans - try to make a transition on the NUL character
+ *
+ * synopsis
+ *	next_state = yy_try_NUL_trans( current_state );
+ */
+
+#ifdef YY_USE_PROTOS
+static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
+#else
+static yy_state_type yy_try_NUL_trans( yy_current_state )
+yy_state_type yy_current_state;
+#endif
+	{
+	register int yy_is_jam;
+	register char *yy_cp = yy_c_buf_p;
+
+	register YY_CHAR yy_c = 1;
+	if ( yy_accept[yy_current_state] )
+		{
+		yy_last_accepting_state = yy_current_state;
+		yy_last_accepting_cpos = yy_cp;
+		}
+	while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
+		{
+		yy_current_state = (int) yy_def[yy_current_state];
+		if ( yy_current_state >= 516 )
+			yy_c = yy_meta[(unsigned int) yy_c];
+		}
+	yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
+	yy_is_jam = (yy_current_state == 515);
+
+	return yy_is_jam ? 0 : yy_current_state;
+	}
+
+
+#ifndef YY_NO_UNPUT
+#ifdef YY_USE_PROTOS
+static void yyunput( int c, register char *yy_bp )
+#else
+static void yyunput( c, yy_bp )
+int c;
+register char *yy_bp;
+#endif
+	{
+	register char *yy_cp = yy_c_buf_p;
+
+	/* undo effects of setting up yytext */
+	*yy_cp = yy_hold_char;
+
+	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+		{ /* need to shift things up to make room */
+		/* +2 for EOB chars. */
+		register int number_to_move = yy_n_chars + 2;
+		register char *dest = &yy_current_buffer->yy_ch_buf[
+					yy_current_buffer->yy_buf_size + 2];
+		register char *source =
+				&yy_current_buffer->yy_ch_buf[number_to_move];
+
+		while ( source > yy_current_buffer->yy_ch_buf )
+			*--dest = *--source;
+
+		yy_cp += (int) (dest - source);
+		yy_bp += (int) (dest - source);
+		yy_current_buffer->yy_n_chars =
+			yy_n_chars = yy_current_buffer->yy_buf_size;
+
+		if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
+			YY_FATAL_ERROR( "flex scanner push-back overflow" );
+		}
+
+	*--yy_cp = (char) c;
+
+
+	yytext_ptr = yy_bp;
+	yy_hold_char = *yy_cp;
+	yy_c_buf_p = yy_cp;
+	}
+#endif	/* ifndef YY_NO_UNPUT */
+
+
+#ifdef __cplusplus
+static int yyinput()
+#else
+static int input()
+#endif
+	{
+	int c;
+
+	*yy_c_buf_p = yy_hold_char;
+
+	if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
+		{
+		/* yy_c_buf_p now points to the character we want to return.
+		 * If this occurs *before* the EOB characters, then it's a
+		 * valid NUL; if not, then we've hit the end of the buffer.
+		 */
+		if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
+			/* This was really a NUL. */
+			*yy_c_buf_p = '\0';
+
+		else
+			{ /* need more input */
+			int offset = yy_c_buf_p - yytext_ptr;
+			++yy_c_buf_p;
+
+			switch ( yy_get_next_buffer() )
+				{
+				case EOB_ACT_LAST_MATCH:
+					/* This happens because yy_g_n_b()
+					 * sees that we've accumulated a
+					 * token and flags that we need to
+					 * try matching the token before
+					 * proceeding.  But for input(),
+					 * there's no matching to consider.
+					 * So convert the EOB_ACT_LAST_MATCH
+					 * to EOB_ACT_END_OF_FILE.
+					 */
+
+					/* Reset buffer status. */
+					yyrestart( yyin );
+
+					/* fall through */
+
+				case EOB_ACT_END_OF_FILE:
+					{
+					if ( yywrap() )
+						return EOF;
+
+					if ( ! yy_did_buffer_switch_on_eof )
+						YY_NEW_FILE;
+#ifdef __cplusplus
+					return yyinput();
+#else
+					return input();
+#endif
+					}
+
+				case EOB_ACT_CONTINUE_SCAN:
+					yy_c_buf_p = yytext_ptr + offset;
+					break;
+				}
+			}
+		}
+
+	c = *(unsigned char *) yy_c_buf_p;	/* cast for 8-bit char's */
+	*yy_c_buf_p = '\0';	/* preserve yytext */
+	yy_hold_char = *++yy_c_buf_p;
+
+
+	return c;
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yyrestart( FILE *input_file )
+#else
+void yyrestart( input_file )
+FILE *input_file;
+#endif
+	{
+	if ( ! yy_current_buffer )
+		yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
+
+	yy_init_buffer( yy_current_buffer, input_file );
+	yy_load_buffer_state();
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
+#else
+void yy_switch_to_buffer( new_buffer )
+YY_BUFFER_STATE new_buffer;
+#endif
+	{
+	if ( yy_current_buffer == new_buffer )
+		return;
+
+	if ( yy_current_buffer )
+		{
+		/* Flush out information for old buffer. */
+		*yy_c_buf_p = yy_hold_char;
+		yy_current_buffer->yy_buf_pos = yy_c_buf_p;
+		yy_current_buffer->yy_n_chars = yy_n_chars;
+		}
+
+	yy_current_buffer = new_buffer;
+	yy_load_buffer_state();
+
+	/* We don't actually know whether we did this switch during
+	 * EOF (yywrap()) processing, but the only time this flag
+	 * is looked at is after yywrap() is called, so it's safe
+	 * to go ahead and always set it.
+	 */
+	yy_did_buffer_switch_on_eof = 1;
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_load_buffer_state( void )
+#else
+void yy_load_buffer_state()
+#endif
+	{
+	yy_n_chars = yy_current_buffer->yy_n_chars;
+	yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
+	yyin = yy_current_buffer->yy_input_file;
+	yy_hold_char = *yy_c_buf_p;
+	}
+
+
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
+#else
+YY_BUFFER_STATE yy_create_buffer( file, size )
+FILE *file;
+int size;
+#endif
+	{
+	YY_BUFFER_STATE b;
+
+	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_buf_size = size;
+
+	/* yy_ch_buf has to be 2 characters longer than the size given because
+	 * we need to put in 2 end-of-buffer characters.
+	 */
+	b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
+	if ( ! b->yy_ch_buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
+
+	b->yy_is_our_buffer = 1;
+
+	yy_init_buffer( b, file );
+
+	return b;
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_delete_buffer( YY_BUFFER_STATE b )
+#else
+void yy_delete_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+	{
+	if ( ! b )
+		return;
+
+	if ( b == yy_current_buffer )
+		yy_current_buffer = (YY_BUFFER_STATE) 0;
+
+	if ( b->yy_is_our_buffer )
+		yy_flex_free( (void *) b->yy_ch_buf );
+
+	yy_flex_free( (void *) b );
+	}
+
+
+#ifndef YY_ALWAYS_INTERACTIVE
+#ifndef YY_NEVER_INTERACTIVE
+extern int isatty YY_PROTO(( int ));
+#endif
+#endif
+
+#ifdef YY_USE_PROTOS
+void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
+#else
+void yy_init_buffer( b, file )
+YY_BUFFER_STATE b;
+FILE *file;
+#endif
+
+
+	{
+	yy_flush_buffer( b );
+
+	b->yy_input_file = file;
+	b->yy_fill_buffer = 1;
+
+#if YY_ALWAYS_INTERACTIVE
+	b->yy_is_interactive = 1;
+#else
+#if YY_NEVER_INTERACTIVE
+	b->yy_is_interactive = 0;
+#else
+	b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
+#endif
+#endif
+	}
+
+
+#ifdef YY_USE_PROTOS
+void yy_flush_buffer( YY_BUFFER_STATE b )
+#else
+void yy_flush_buffer( b )
+YY_BUFFER_STATE b;
+#endif
+
+	{
+	if ( ! b )
+		return;
+
+	b->yy_n_chars = 0;
+
+	/* We always need two end-of-buffer characters.  The first causes
+	 * a transition to the end-of-buffer state.  The second causes
+	 * a jam in that state.
+	 */
+	b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
+	b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
+
+	b->yy_buf_pos = &b->yy_ch_buf[0];
+
+	b->yy_at_bol = 1;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	if ( b == yy_current_buffer )
+		yy_load_buffer_state();
+	}
+
+
+#ifndef YY_NO_SCAN_BUFFER
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size )
+#else
+YY_BUFFER_STATE yy_scan_buffer( base, size )
+char *base;
+yy_size_t size;
+#endif
+	{
+	YY_BUFFER_STATE b;
+
+	if ( size < 2 ||
+	     base[size-2] != YY_END_OF_BUFFER_CHAR ||
+	     base[size-1] != YY_END_OF_BUFFER_CHAR )
+		/* They forgot to leave room for the EOB's. */
+		return 0;
+
+	b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
+	if ( ! b )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
+
+	b->yy_buf_size = size - 2;	/* "- 2" to take care of EOB's */
+	b->yy_buf_pos = b->yy_ch_buf = base;
+	b->yy_is_our_buffer = 0;
+	b->yy_input_file = 0;
+	b->yy_n_chars = b->yy_buf_size;
+	b->yy_is_interactive = 0;
+	b->yy_at_bol = 1;
+	b->yy_fill_buffer = 0;
+	b->yy_buffer_status = YY_BUFFER_NEW;
+
+	yy_switch_to_buffer( b );
+
+	return b;
+	}
+#endif
+
+
+#ifndef YY_NO_SCAN_STRING
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str )
+#else
+YY_BUFFER_STATE yy_scan_string( yy_str )
+yyconst char *yy_str;
+#endif
+	{
+	int len;
+	for ( len = 0; yy_str[len]; ++len )
+		;
+
+	return yy_scan_bytes( yy_str, len );
+	}
+#endif
+
+
+#ifndef YY_NO_SCAN_BYTES
+#ifdef YY_USE_PROTOS
+YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len )
+#else
+YY_BUFFER_STATE yy_scan_bytes( bytes, len )
+yyconst char *bytes;
+int len;
+#endif
+	{
+	YY_BUFFER_STATE b;
+	char *buf;
+	yy_size_t n;
+	int i;
+
+	/* Get memory for full buffer, including space for trailing EOB's. */
+	n = len + 2;
+	buf = (char *) yy_flex_alloc( n );
+	if ( ! buf )
+		YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
+
+	for ( i = 0; i < len; ++i )
+		buf[i] = bytes[i];
+
+	buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
+
+	b = yy_scan_buffer( buf, n );
+	if ( ! b )
+		YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
+
+	/* It's okay to grow etc. this buffer, and we should throw it
+	 * away when we're done.
+	 */
+	b->yy_is_our_buffer = 1;
+
+	return b;
+	}
+#endif
+
+
+#ifndef YY_NO_PUSH_STATE
+#ifdef YY_USE_PROTOS
+static void yy_push_state( int new_state )
+#else
+static void yy_push_state( new_state )
+int new_state;
+#endif
+	{
+	if ( yy_start_stack_ptr >= yy_start_stack_depth )
+		{
+		yy_size_t new_size;
+
+		yy_start_stack_depth += YY_START_STACK_INCR;
+		new_size = yy_start_stack_depth * sizeof( int );
+
+		if ( ! yy_start_stack )
+			yy_start_stack = (int *) yy_flex_alloc( new_size );
+
+		else
+			yy_start_stack = (int *) yy_flex_realloc(
+					(void *) yy_start_stack, new_size );
+
+		if ( ! yy_start_stack )
+			YY_FATAL_ERROR(
+			"out of memory expanding start-condition stack" );
+		}
+
+	yy_start_stack[yy_start_stack_ptr++] = YY_START;
+
+	BEGIN(new_state);
+	}
+#endif
+
+
+#ifndef YY_NO_POP_STATE
+static void yy_pop_state()
+	{
+	if ( --yy_start_stack_ptr < 0 )
+		YY_FATAL_ERROR( "start-condition stack underflow" );
+
+	BEGIN(yy_start_stack[yy_start_stack_ptr]);
+	}
+#endif
+
+
+#ifndef YY_NO_TOP_STATE
+static int yy_top_state()
+	{
+	return yy_start_stack[yy_start_stack_ptr - 1];
+	}
+#endif
+
+#ifndef YY_EXIT_FAILURE
+#define YY_EXIT_FAILURE 2
+#endif
+
+#ifdef YY_USE_PROTOS
+static void yy_fatal_error( yyconst char msg[] )
+#else
+static void yy_fatal_error( msg )
+char msg[];
+#endif
+	{
+	(void) fprintf( stderr, "%s\n", msg );
+	exit( YY_EXIT_FAILURE );
+	}
+
+
+
+/* Redefine yyless() so it works in section 3 code. */
+
+#undef yyless
+#define yyless(n) \
+	do \
+		{ \
+		/* Undo effects of setting up yytext. */ \
+		yytext[yyleng] = yy_hold_char; \
+		yy_c_buf_p = yytext + n; \
+		yy_hold_char = *yy_c_buf_p; \
+		*yy_c_buf_p = '\0'; \
+		yyleng = n; \
+		} \
+	while ( 0 )
+
+
+/* Internal utility routines. */
+
+#ifndef yytext_ptr
+#ifdef YY_USE_PROTOS
+static void yy_flex_strncpy( char *s1, yyconst char *s2, int n )
+#else
+static void yy_flex_strncpy( s1, s2, n )
+char *s1;
+yyconst char *s2;
+int n;
+#endif
+	{
+	register int i;
+	for ( i = 0; i < n; ++i )
+		s1[i] = s2[i];
+	}
+#endif
+
+#ifdef YY_NEED_STRLEN
+#ifdef YY_USE_PROTOS
+static int yy_flex_strlen( yyconst char *s )
+#else
+static int yy_flex_strlen( s )
+yyconst char *s;
+#endif
+	{
+	register int n;
+	for ( n = 0; s[n]; ++n )
+		;
+
+	return n;
+	}
+#endif
+
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_alloc( yy_size_t size )
+#else
+static void *yy_flex_alloc( size )
+yy_size_t size;
+#endif
+	{
+	return (void *) malloc( size );
+	}
+
+#ifdef YY_USE_PROTOS
+static void *yy_flex_realloc( void *ptr, yy_size_t size )
+#else
+static void *yy_flex_realloc( ptr, size )
+void *ptr;
+yy_size_t size;
+#endif
+	{
+	/* The cast to (char *) in the following accommodates both
+	 * implementations that use char* generic pointers, and those
+	 * that use void* generic pointers.  It works with the latter
+	 * because both ANSI C and C++ allow castless assignment from
+	 * any pointer type to void*, and deal with argument conversions
+	 * as though doing an assignment.
+	 */
+	return (void *) realloc( (char *) ptr, size );
+	}
+
+#ifdef YY_USE_PROTOS
+static void yy_flex_free( void *ptr )
+#else
+static void yy_flex_free( ptr )
+void *ptr;
+#endif
+	{
+	free( ptr );
+	}
+
+#if YY_MAIN
+int main()
+	{
+	yylex();
+	return 0;
+	}
+#endif
+#line 713 "lexer.lxx"

+ 3295 - 0
panda/src/egg/parser.cxx.prebuilt

@@ -0,0 +1,3295 @@
+
+/*  A Bison parser, made from parser.yxx
+    by GNU Bison version 1.28  */
+
+#define YYBISON 1  /* Identify Bison output.  */
+
+#define yyparse eggyyparse
+#define yylex eggyylex
+#define yyerror eggyyerror
+#define yylval eggyylval
+#define yychar eggyychar
+#define yydebug eggyydebug
+#define yynerrs eggyynerrs
+#define	NUMBER	257
+#define	STRING	258
+#define	BEZIERCURVE	259
+#define	BFACE	260
+#define	BILLBOARD	261
+#define	BILLBOARDCENTER	262
+#define	BUNDLE	263
+#define	CLOSED	264
+#define	COLLIDE	265
+#define	COMMENT	266
+#define	COORDSYSTEM	267
+#define	CV	268
+#define	DART	269
+#define	DNORMAL	270
+#define	DRGBA	271
+#define	DUV	272
+#define	DXYZ	273
+#define	DCS	274
+#define	DISTANCE	275
+#define	DTREF	276
+#define	DYNAMICVERTEXPOOL	277
+#define	EXTERNAL_FILE	278
+#define	FLIGHT	279
+#define	GROUP	280
+#define	HIP	281
+#define	INTANGENT	282
+#define	JOINT	283
+#define	KNOTS	284
+#define	INCLUDE	285
+#define	INSTANCE	286
+#define	LOOP	287
+#define	MATERIAL	288
+#define	MATRIX3	289
+#define	MATRIX4	290
+#define	MODEL	291
+#define	MREF	292
+#define	NORMAL	293
+#define	NURBSCURVE	294
+#define	NURBSSURFACE	295
+#define	OBJECTTYPE	296
+#define	ORDER	297
+#define	OUTTANGENT	298
+#define	POINTLIGHT	299
+#define	POLYGON	300
+#define	REF	301
+#define	RGBA	302
+#define	ROTATE	303
+#define	ROTX	304
+#define	ROTY	305
+#define	ROTZ	306
+#define	SANIM	307
+#define	SCALAR	308
+#define	SCALE	309
+#define	SEQUENCE	310
+#define	SHADING	311
+#define	SWITCH	312
+#define	SWITCHCONDITION	313
+#define	TABLE	314
+#define	TABLE_V	315
+#define	TEXLIST	316
+#define	TEXTURE	317
+#define	TLENGTHS	318
+#define	TRANSFORM	319
+#define	TRANSLATE	320
+#define	TREF	321
+#define	TRIM	322
+#define	TXT	323
+#define	UKNOTS	324
+#define	UV	325
+#define	VKNOTS	326
+#define	VERTEX	327
+#define	VERTEXANIM	328
+#define	VERTEXPOOL	329
+#define	VERTEXREF	330
+#define	XFMANIM	331
+#define	XFMSANIM	332
+#define	START_EGG	333
+#define	START_GROUP_BODY	334
+#define	START_TEXTURE_BODY	335
+#define	START_PRIMITIVE_BODY	336
+
+#line 6 "parser.yxx"
+
+
+#include <pandabase.h>
+#include "parserDefs.h"
+#include "lexerDefs.h"
+#include "eggObject.h"
+#include "eggGroup.h"
+#include "eggVertex.h"
+#include "eggVertexPool.h"
+#include "eggPolygon.h"
+#include "eggPoint.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 "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"
+
+// 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
+
+// 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.
+
+typedef pvector< PT(EggObject) > EggStack;
+static EggStack egg_stack;
+
+// There's one "top-level" egg node, which is where we should parent
+// things (e.g. implicit 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.
+static EggGroupNode *egg_top_node;
+
+// We need a table mapping vertex pool names to vertex pools.
+typedef pmap<string,  PT(EggVertexPool) > VertexPools;
+static VertexPools vertex_pools;
+
+// And another one mapping texture names to textures.
+typedef pmap<string,  PT_EggTexture > Textures;
+static Textures textures;
+
+// And again for material names to materials.
+typedef pmap<string,  PT_EggMaterial > Materials;
+static Materials materials;
+
+// We need to be able to save the index number requested for a vertex
+// temporarily.
+static int vertex_index;
+
+// We need to hold a matrix for a little bit while parsing the
+// <Transform> entries.
+static LMatrix4d matrix_3d;
+static LMatrix3d matrix_2d;
+
+
+////////////////////////////////////////////////////////////////////
+// Defining the interface to the parser.
+////////////////////////////////////////////////////////////////////
+
+void
+egg_init_parser(istream &in, const string &filename,
+                EggObject *tos, EggGroupNode *top_node) {
+  egg_init_lexer(in, filename);
+
+  egg_stack.clear();
+  vertex_pools.clear();
+  textures.clear();
+  materials.clear();
+
+  egg_stack.push_back(tos);
+  egg_top_node = top_node;
+}
+
+void
+egg_cleanup_parser() {
+  // Clean these out after we're done, so we don't keep big memory
+  // structures around needlessly.
+  egg_stack.clear();
+  vertex_pools.clear();
+  textures.clear();
+  materials.clear();
+}
+
+#include <stdio.h>
+
+#ifndef __cplusplus
+#ifndef __STDC__
+#define const
+#endif
+#endif
+
+
+
+#define	YYFINAL		686
+#define	YYFLAG		-32768
+#define	YYNTBASE	85
+
+#define YYTRANSLATE(x) ((unsigned)(x) <= 336 ? yytranslate[x] : 196)
+
+static const char yytranslate[] = {     0,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,    83,     2,    84,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
+     2,     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,     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
+};
+
+#if YYDEBUG != 0
+static const short yyprhs[] = {     0,
+     0,     3,     6,     9,    12,    14,    17,    19,    21,    23,
+    25,    27,    29,    31,    33,    35,    37,    39,    41,    43,
+    45,    50,    56,    57,    65,    67,    74,    77,    78,    85,
+    87,    94,   100,   107,   108,   115,   117,   120,   121,   127,
+   128,   135,   137,   140,   144,   149,   155,   161,   167,   176,
+   185,   188,   196,   204,   208,   217,   226,   231,   241,   251,
+   252,   259,   260,   267,   268,   275,   277,   284,   290,   298,
+   306,   312,   318,   324,   330,   336,   342,   348,   351,   354,
+   357,   360,   362,   364,   367,   368,   374,   376,   379,   382,
+   385,   388,   391,   394,   397,   400,   407,   412,   417,   422,
+   430,   437,   442,   444,   461,   466,   468,   478,   479,   485,
+   487,   490,   493,   496,   499,   505,   510,   516,   521,   523,
+   533,   543,   545,   552,   557,   569,   582,   583,   590,   591,
+   598,   599,   606,   607,   614,   616,   622,   628,   634,   637,
+   643,   649,   655,   662,   664,   670,   676,   682,   685,   691,
+   697,   703,   709,   715,   721,   724,   730,   737,   739,   745,
+   751,   757,   760,   766,   772,   778,   784,   790,   797,   799,
+   801,   803,   807,   816,   825,   830,   840,   850,   852,   861,
+   864,   866,   868,   870,   876,   878,   881,   883,   885,   886,
+   893,   894,   901,   903,   906,   909,   912,   915,   918,   919,
+   926,   928,   935,   941,   942,   949,   951,   958,   964,   965,
+   972,   974,   981,   984,   986,   989,   991,   994,   996,   998,
+  1000,  1002,  1004,  1006,  1008,  1010,  1012,  1014,  1016,  1018,
+  1020,  1022,  1024,  1027,  1029,  1031,  1033,  1035
+};
+
+static const short yyrhs[] = {    79,
+    86,     0,    80,   113,     0,    81,    92,     0,    82,   149,
+     0,   195,     0,    86,    87,     0,    88,     0,    89,     0,
+    90,     0,    93,     0,    96,     0,    97,     0,   107,     0,
+   109,     0,   111,     0,   141,     0,   143,     0,   145,     0,
+   147,     0,   166,     0,    13,    83,   187,    84,     0,    12,
+   186,    83,   190,    84,     0,     0,    63,   185,    83,   187,
+    91,    92,    84,     0,   195,     0,    92,    54,   185,    83,
+   193,    84,     0,    92,   129,     0,     0,    34,   185,    83,
+    94,    95,    84,     0,   195,     0,    95,    54,   185,    83,
+   193,    84,     0,    24,   186,    83,   187,    84,     0,   189,
+    24,   186,    83,   187,    84,     0,     0,    75,   185,    98,
+    83,    99,    84,     0,   195,     0,    99,   100,     0,     0,
+    73,   101,    83,   103,    84,     0,     0,    73,   194,   102,
+    83,   103,    84,     0,   192,     0,   192,   192,     0,   192,
+   192,   192,     0,   192,   192,   192,   192,     0,   103,    71,
+    83,   104,    84,     0,   103,    39,    83,   105,    84,     0,
+   103,    48,    83,   106,    84,     0,   103,    19,   189,    83,
+   192,   192,   192,    84,     0,   103,    19,    83,   189,   192,
+   192,   192,    84,     0,   192,   192,     0,   104,    18,   189,
+    83,   192,   192,    84,     0,   104,    18,    83,   189,   192,
+   192,    84,     0,   192,   192,   192,     0,   105,    16,   189,
+    83,   192,   192,   192,    84,     0,   105,    16,    83,   189,
+   192,   192,   192,    84,     0,   192,   192,   192,   192,     0,
+   106,    17,   189,    83,   192,   192,   192,   192,    84,     0,
+   106,    17,    83,   189,   192,   192,   192,   192,    84,     0,
+     0,    26,   186,   108,    83,   113,    84,     0,     0,    29,
+   186,   110,    83,   113,    84,     0,     0,    32,   186,   112,
+    83,   113,    84,     0,   195,     0,   113,    54,   185,    83,
+   193,    84,     0,   113,     7,    83,   189,    84,     0,   113,
+     8,    83,   192,   192,   192,    84,     0,   113,    11,   186,
+    83,   114,   115,    84,     0,   113,    20,    83,   194,    84,
+     0,   113,    15,    83,   194,    84,     0,   113,    15,    83,
+     4,    84,     0,   113,    58,    83,   194,    84,     0,   113,
+    42,    83,   187,    84,     0,   113,    37,    83,   194,    84,
+     0,   113,    62,    83,   194,    84,     0,   113,   116,     0,
+   113,   137,     0,   113,   139,     0,   113,    87,     0,   189,
+     0,   195,     0,   115,   189,     0,     0,    65,   117,    83,
+   118,    84,     0,   195,     0,   118,   127,     0,   118,   125,
+     0,   118,   119,     0,   118,   120,     0,   118,   121,     0,
+   118,   122,     0,   118,   123,     0,   118,   124,     0,    66,
+    83,   192,   192,   192,    84,     0,    50,    83,   192,    84,
+     0,    51,    83,   192,    84,     0,    52,    83,   192,    84,
+     0,    49,    83,   192,   192,   192,   192,    84,     0,    55,
+    83,   192,   192,   192,    84,     0,    36,    83,   126,    84,
+     0,   195,     0,   192,   192,   192,   192,   192,   192,   192,
+   192,   192,   192,   192,   192,   192,   192,   192,   192,     0,
+    35,    83,   128,    84,     0,   195,     0,   192,   192,   192,
+   192,   192,   192,   192,   192,   192,     0,     0,    65,   130,
+    83,   131,    84,     0,   195,     0,   131,   135,     0,   131,
+   132,     0,   131,   133,     0,   131,   134,     0,    66,    83,
+   192,   192,    84,     0,    49,    83,   192,    84,     0,    55,
+    83,   192,   192,    84,     0,    35,    83,   136,    84,     0,
+   195,     0,   192,   192,   192,   192,   192,   192,   192,   192,
+   192,     0,    76,    83,   180,   138,    47,    83,   184,    84,
+    84,     0,   195,     0,   138,    54,   185,    83,   193,    84,
+     0,    59,    83,   140,    84,     0,    21,    83,   192,   192,
+    73,    83,   192,   192,   192,    84,    84,     0,    21,    83,
+   192,   192,   192,    73,    83,   192,   192,   192,    84,    84,
+     0,     0,    46,   186,   142,    83,   149,    84,     0,     0,
+    45,   186,   144,    83,   149,    84,     0,     0,    41,   186,
+   146,    83,   150,    84,     0,     0,    40,   186,   148,    83,
+   151,    84,     0,   195,     0,   149,    67,    83,   152,    84,
+     0,   149,    63,    83,   153,    84,     0,   149,    38,    83,
+   154,    84,     0,   149,   158,     0,   149,    39,    83,   155,
+    84,     0,   149,    48,    83,   156,    84,     0,   149,     6,
+    83,   157,    84,     0,   149,    54,   185,    83,   193,    84,
+     0,   195,     0,   150,    67,    83,   152,    84,     0,   150,
+    63,    83,   153,    84,     0,   150,    38,    83,   154,    84,
+     0,   150,   158,     0,   150,    39,    83,   155,    84,     0,
+   150,    48,    83,   156,    84,     0,   150,     6,    83,   157,
+    84,     0,   150,    43,    83,   159,    84,     0,   150,    70,
+    83,   160,    84,     0,   150,    72,    83,   161,    84,     0,
+   150,   147,     0,   150,    68,    83,   162,    84,     0,   150,
+    54,   185,    83,   193,    84,     0,   195,     0,   151,    67,
+    83,   152,    84,     0,   151,    63,    83,   153,    84,     0,
+   151,    38,    83,   154,    84,     0,   151,   158,     0,   151,
+    39,    83,   155,    84,     0,   151,    48,    83,   156,    84,
+     0,   151,     6,    83,   157,    84,     0,   151,    43,    83,
+   164,    84,     0,   151,    30,    83,   165,    84,     0,   151,
+    54,   185,    83,   193,    84,     0,   182,     0,   185,     0,
+   183,     0,   192,   192,   192,     0,   155,    16,   189,    83,
+   192,   192,   192,    84,     0,   155,    16,    83,   189,   192,
+   192,   192,    84,     0,   192,   192,   192,   192,     0,   156,
+    17,   189,    83,   192,   192,   192,   192,    84,     0,   156,
+    17,    83,   189,   192,   192,   192,   192,    84,     0,   194,
+     0,    76,    83,   180,    47,    83,   184,    84,    84,     0,
+   194,   194,     0,   181,     0,   181,     0,   195,     0,   162,
+    33,    83,   163,    84,     0,   195,     0,   163,   147,     0,
+   194,     0,   181,     0,     0,    60,   186,   167,    83,   170,
+    84,     0,     0,     9,   186,   169,    83,   170,    84,     0,
+   195,     0,   170,   166,     0,   170,   168,     0,   170,   171,
+     0,   170,   174,     0,   170,   177,     0,     0,    53,   186,
+   172,    83,   173,    84,     0,   195,     0,   173,    54,   185,
+    83,   193,    84,     0,   173,    61,    83,   181,    84,     0,
+     0,    77,   186,   175,    83,   176,    84,     0,   195,     0,
+   176,    54,   185,    83,   193,    84,     0,   176,    61,    83,
+   181,    84,     0,     0,    78,   186,   178,    83,   179,    84,
+     0,   195,     0,   179,    54,   185,    83,   193,    84,     0,
+   179,   171,     0,   195,     0,   180,   194,     0,   195,     0,
+   181,   192,     0,   185,     0,   185,     0,   185,     0,   195,
+     0,   189,     0,   188,     0,   195,     0,   189,     0,   195,
+     0,   189,     0,     3,     0,     4,     0,   195,     0,   191,
+     0,   189,     0,   191,   189,     0,     3,     0,     3,     0,
+     4,     0,     3,     0,     0
+};
+
+#endif
+
+#if YYDEBUG != 0
+static const short yyrline[] = { 0,
+   179,   181,   182,   183,   193,   195,   209,   211,   212,   213,
+   214,   215,   216,   217,   218,   219,   220,   221,   222,   223,
+   233,   256,   270,   284,   298,   300,   404,   414,   427,   441,
+   443,   537,   545,   564,   577,   592,   594,   604,   609,   616,
+   641,   661,   666,   670,   674,   678,   679,   680,   681,   689,
+   707,   712,   720,   737,   742,   750,   767,   772,   780,   797,
+   803,   817,   824,   838,   845,   859,   861,   914,   926,   931,
+   938,   944,   951,   964,   970,   976,   982,   988,   989,   990,
+   991,  1004,  1026,  1028,  1049,  1054,  1068,  1070,  1071,  1072,
+  1073,  1074,  1075,  1076,  1077,  1080,  1086,  1092,  1098,  1104,
+  1110,  1116,  1120,  1122,  1134,  1137,  1139,  1157,  1162,  1176,
+  1178,  1179,  1180,  1181,  1184,  1190,  1196,  1202,  1205,  1207,
+  1225,  1258,  1263,  1287,  1299,  1305,  1321,  1326,  1340,  1345,
+  1359,  1364,  1378,  1383,  1398,  1400,  1401,  1402,  1403,  1404,
+  1405,  1406,  1407,  1455,  1457,  1458,  1459,  1460,  1461,  1462,
+  1463,  1464,  1465,  1466,  1467,  1473,  1474,  1527,  1529,  1530,
+  1531,  1532,  1533,  1534,  1535,  1536,  1537,  1538,  1596,  1613,
+  1653,  1670,  1675,  1683,  1700,  1705,  1713,  1730,  1746,  1777,
+  1795,  1815,  1835,  1841,  1851,  1858,  1876,  1892,  1913,  1920,
+  1935,  1942,  1957,  1959,  1963,  1967,  1971,  1975,  1989,  1995,
+  2010,  2012,  2024,  2037,  2043,  2058,  2060,  2077,  2090,  2096,
+  2111,  2113,  2128,  2142,  2147,  2160,  2165,  2178,  2199,  2220,
+  2242,  2248,  2259,  2271,  2277,  2287,  2292,  2305,  2310,  2322,
+  2327,  2342,  2347,  2360,  2371,  2377,  2392,  2403
+};
+#endif
+
+
+#if YYDEBUG != 0 || defined (YYERROR_VERBOSE)
+
+static const char * const yytname[] = {   "$","error","$undefined.","NUMBER",
+"STRING","BEZIERCURVE","BFACE","BILLBOARD","BILLBOARDCENTER","BUNDLE","CLOSED",
+"COLLIDE","COMMENT","COORDSYSTEM","CV","DART","DNORMAL","DRGBA","DUV","DXYZ",
+"DCS","DISTANCE","DTREF","DYNAMICVERTEXPOOL","EXTERNAL_FILE","FLIGHT","GROUP",
+"HIP","INTANGENT","JOINT","KNOTS","INCLUDE","INSTANCE","LOOP","MATERIAL","MATRIX3",
+"MATRIX4","MODEL","MREF","NORMAL","NURBSCURVE","NURBSSURFACE","OBJECTTYPE","ORDER",
+"OUTTANGENT","POINTLIGHT","POLYGON","REF","RGBA","ROTATE","ROTX","ROTY","ROTZ",
+"SANIM","SCALAR","SCALE","SEQUENCE","SHADING","SWITCH","SWITCHCONDITION","TABLE",
+"TABLE_V","TEXLIST","TEXTURE","TLENGTHS","TRANSFORM","TRANSLATE","TREF","TRIM",
+"TXT","UKNOTS","UV","VKNOTS","VERTEX","VERTEXANIM","VERTEXPOOL","VERTEXREF",
+"XFMANIM","XFMSANIM","START_EGG","START_GROUP_BODY","START_TEXTURE_BODY","START_PRIMITIVE_BODY",
+"'{'","'}'","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","vertex_uv_body","vertex_normal_body","vertex_color_body",
+"group","@6","joint","@7","instance","@8","group_body","cs_type","collide_flags",
+"transform_3d","@9","transform_3d_body","translate_3d","rotx_3d","roty_3d","rotz_3d",
+"rotate_3d","scale_3d","matrix4_3d","matrix4_3d_body","matrix3_3d","matrix3_3d_body",
+"transform_2d","@10","transform_2d_body","translate_2d","rotate_2d","scale_2d",
+"matrix3_2d","matrix3_2d_body","group_vertex_ref","group_vertex_membership",
+"switchcondition","switchcondition_body","polygon","@11","point_light","@12",
+"nurbs_surface","@13","nurbs_curve","@14","primitive_body","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","@15","bundle","@16","table_body","sanim","@17",
+"sanim_body","xfmanim","@18","xfmanim_body","xfm_s_anim","@19","xfm_s_anim_body",
+"integer_list","real_list","texture_name","material_name","vertex_pool_name",
+"required_name","optional_name","required_string","optional_string","string",
+"repeated_string","repeated_string_body","real","real_or_string","integer","empty", NULL
+};
+#endif
+
+static const short yyr1[] = {     0,
+    85,    85,    85,    85,    86,    86,    87,    87,    87,    87,
+    87,    87,    87,    87,    87,    87,    87,    87,    87,    87,
+    88,    89,    91,    90,    92,    92,    92,    94,    93,    95,
+    95,    96,    96,    98,    97,    99,    99,   101,   100,   102,
+   100,   103,   103,   103,   103,   103,   103,   103,   103,   103,
+   104,   104,   104,   105,   105,   105,   106,   106,   106,   108,
+   107,   110,   109,   112,   111,   113,   113,   113,   113,   113,
+   113,   113,   113,   113,   113,   113,   113,   113,   113,   113,
+   113,   114,   115,   115,   117,   116,   118,   118,   118,   118,
+   118,   118,   118,   118,   118,   119,   120,   121,   122,   123,
+   124,   125,   126,   126,   127,   128,   128,   130,   129,   131,
+   131,   131,   131,   131,   132,   133,   134,   135,   136,   136,
+   137,   138,   138,   139,   140,   140,   142,   141,   144,   143,
+   146,   145,   148,   147,   149,   149,   149,   149,   149,   149,
+   149,   149,   149,   150,   150,   150,   150,   150,   150,   150,
+   150,   150,   150,   150,   150,   150,   150,   151,   151,   151,
+   151,   151,   151,   151,   151,   151,   151,   151,   152,   153,
+   154,   155,   155,   155,   156,   156,   156,   157,   158,   159,
+   160,   161,   162,   162,   163,   163,   164,   165,   167,   166,
+   169,   168,   170,   170,   170,   170,   170,   170,   172,   171,
+   173,   173,   173,   175,   174,   176,   176,   176,   178,   177,
+   179,   179,   179,   180,   180,   181,   181,   182,   183,   184,
+   185,   185,   186,   187,   187,   188,   188,   189,   189,   190,
+   190,   191,   191,   192,   193,   193,   194,   195
+};
+
+static const short yyr2[] = {     0,
+     2,     2,     2,     2,     1,     2,     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,     5,     5,     5,     8,     8,
+     2,     7,     7,     3,     8,     8,     4,     9,     9,     0,
+     6,     0,     6,     0,     6,     1,     6,     5,     7,     7,
+     5,     5,     5,     5,     5,     5,     5,     2,     2,     2,
+     2,     1,     1,     2,     0,     5,     1,     2,     2,     2,
+     2,     2,     2,     2,     2,     6,     4,     4,     4,     7,
+     6,     4,     1,    16,     4,     1,     9,     0,     5,     1,
+     2,     2,     2,     2,     5,     4,     5,     4,     1,     9,
+     9,     1,     6,     4,    11,    12,     0,     6,     0,     6,
+     0,     6,     0,     6,     1,     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,     1,     2,     1,     2,     1,     1,     1,
+     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
+     1,     1,     2,     1,     1,     1,     1,     0
+};
+
+static const short yydefact[] = {     0,
+   238,   238,   238,   238,     1,     5,     2,    66,     3,    25,
+     4,   135,   228,   229,   238,     0,   238,   238,   238,   238,
+   238,   238,   238,   238,   238,   238,   238,   238,     6,     7,
+     8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
+    18,    19,    20,     0,     0,     0,   238,     0,     0,     0,
+     0,   238,     0,     0,     0,    85,     0,    81,    78,    79,
+    80,   238,   108,    27,     0,     0,     0,     0,   238,     0,
+     0,     0,   139,     0,   223,   227,   226,   238,     0,    60,
+    62,    64,     0,   222,   221,   133,   131,   129,   127,   189,
+     0,    34,   238,     0,     0,     0,     0,     0,     0,   238,
+     0,     0,     0,     0,     0,   238,     0,     0,     0,   238,
+     0,     0,     0,   238,   238,   238,   238,     0,   225,   224,
+   238,     0,     0,     0,    28,     0,     0,     0,     0,     0,
+   238,     0,     0,     0,   234,     0,     0,   237,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,   238,   238,
+   214,     0,   238,     0,   178,     0,   171,   219,     0,     0,
+     0,     0,     0,     0,   170,     0,   169,   218,     0,   232,
+     0,   231,   230,    21,     0,   238,   238,   238,   238,   238,
+   238,   238,   238,   238,    23,   238,   238,    68,     0,   238,
+    82,    73,    72,    71,    76,    75,   235,   236,     0,    74,
+     0,   124,    77,     0,    87,     0,   215,   122,     0,     0,
+   110,   142,   138,     0,   140,     0,     0,   141,     0,     0,
+   137,   136,     0,    22,   233,    32,     0,     0,     0,     0,
+    30,     0,   158,     0,   144,     0,     0,     0,   193,   238,
+     0,    36,     0,     0,     0,    83,    67,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,    86,    90,    91,    92,
+    93,    94,    95,    89,    88,     0,   238,    26,     0,     0,
+     0,     0,   109,   112,   113,   114,   111,     0,     0,   172,
+     0,     0,     0,   143,   238,    61,    63,    65,   238,    29,
+     0,     0,     0,     0,     0,     0,   238,     0,     0,   134,
+   162,     0,     0,     0,     0,     0,   238,     0,     0,     0,
+     0,     0,   132,   155,   148,   130,   128,   238,   238,   238,
+   238,   190,   194,   195,   196,   197,   198,     0,    38,    35,
+    37,    33,    69,    70,    84,     0,   238,   238,     0,     0,
+     0,     0,     0,     0,   238,     0,   238,     0,     0,     0,
+     0,     0,     0,     0,   175,     0,   220,     0,     0,   238,
+   238,     0,     0,     0,     0,   238,   238,     0,   238,     0,
+     0,     0,     0,   238,   238,   238,   238,   238,   191,   199,
+   204,   209,    24,     0,    40,     0,     0,     0,     0,   106,
+     0,     0,   103,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,   119,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,   188,   216,     0,     0,     0,
+   187,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,   183,     0,   181,     0,   182,
+     0,     0,     0,     0,     0,     0,     0,     0,   105,     0,
+   102,     0,     0,    97,    98,    99,     0,     0,     0,     0,
+   118,     0,   116,     0,     0,     0,     0,     0,     0,   179,
+     0,   165,   167,   217,   161,   163,   166,   164,     0,   160,
+   159,   151,   147,   149,   152,   180,   150,     0,   146,   145,
+     0,   156,   153,   154,   238,   238,   238,   238,     0,    42,
+     0,     0,     0,     0,     0,     0,     0,     0,   121,   123,
+     0,   117,   115,     0,     0,     0,     0,    31,   168,   157,
+   238,     0,     0,   201,     0,   206,     0,   211,     0,     0,
+     0,     0,    39,    43,     0,     0,     0,     0,     0,     0,
+   101,    96,     0,   174,   173,     0,     0,     0,   185,   192,
+   238,     0,   200,   238,     0,   205,   238,   210,   213,     0,
+     0,     0,     0,     0,    44,    41,     0,     0,     0,     0,
+   100,     0,   177,   176,   184,   186,     0,   238,     0,   238,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,    45,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,    47,     0,     0,    48,     0,     0,    46,
+    51,   125,     0,     0,     0,     0,     0,   203,     0,   208,
+     0,     0,     0,     0,     0,    54,     0,     0,     0,     0,
+     0,   126,     0,     0,     0,   202,   207,   212,     0,     0,
+     0,     0,     0,     0,    57,     0,     0,   107,     0,   120,
+    50,    49,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+    53,    52,     0,    56,    55,     0,     0,     0,    59,    58,
+     0,     0,   104,     0,     0,     0
+};
+
+static const short yydefgoto[] = {   684,
+     5,    58,    30,    31,    32,   240,     9,    33,   179,   230,
+    34,    35,   132,   241,   331,   384,   446,   499,   588,   584,
+   586,    36,   122,    37,   123,    38,   124,     7,   190,   245,
+    59,   105,   204,   258,   259,   260,   261,   262,   263,   264,
+   391,   265,   388,    64,   108,   210,   274,   275,   276,   277,
+   402,    60,   206,    61,   147,    39,   129,    40,   128,    41,
+   127,    42,   126,    11,   234,   232,   166,   164,   156,   159,
+   161,   154,    73,   429,   437,   439,   435,   548,   420,   415,
+    43,   130,   324,   441,   238,   325,   442,   523,   326,   443,
+   525,   327,   444,   527,   150,   416,   167,   157,   356,   158,
+    74,   118,    75,    84,   171,   172,   474,   199,   155,    85
+};
+
+static const short yypact[] = {   186,
+-32768,-32768,-32768,-32768,   354,-32768,  1026,-32768,    12,-32768,
+   255,-32768,-32768,-32768,   188,    -7,   188,   188,   188,   188,
+   188,   188,   188,   188,   188,   188,   188,   188,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,    66,    32,    41,   188,    53,    74,    76,
+    78,   188,    80,    91,    95,-32768,   105,-32768,-32768,-32768,
+-32768,   188,-32768,-32768,   110,   114,   125,   133,   188,   143,
+   146,   158,-32768,   169,-32768,-32768,-32768,   188,   172,-32768,
+-32768,-32768,   174,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+   179,-32768,   188,   188,   100,   189,   228,   192,   192,   188,
+   194,   192,   227,   192,   196,-32768,   197,   200,   192,   188,
+   100,   100,   201,   188,   188,-32768,   188,   166,-32768,-32768,
+   188,   206,   207,   212,-32768,   214,   218,   219,   221,   223,
+   188,   224,   225,   175,-32768,   100,   188,-32768,   191,   226,
+   236,   237,   239,   235,   240,   229,   241,   242,-32768,   192,
+-32768,   235,-32768,   243,-32768,   244,-32768,-32768,    16,   100,
+     7,   100,   235,   245,-32768,   246,-32768,-32768,    64,-32768,
+   248,   188,-32768,-32768,   249,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,   188,-32768,   100,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   259,-32768,
+   100,-32768,-32768,   375,-32768,    98,-32768,-32768,   260,    15,
+-32768,-32768,-32768,    19,-32768,   100,    31,-32768,   100,   277,
+-32768,-32768,   280,-32768,-32768,-32768,   697,   856,   922,    17,
+-32768,    99,-32768,   101,-32768,   180,   215,   112,-32768,-32768,
+    -1,-32768,   281,   285,     3,-32768,-32768,   100,   288,   289,
+   290,   291,   292,   293,   294,   296,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,   298,   188,-32768,   299,   301,
+   302,   306,-32768,-32768,-32768,-32768,-32768,   188,   308,-32768,
+   188,   310,   100,-32768,   188,-32768,-32768,-32768,   188,-32768,
+   315,   319,   320,   329,   330,   332,   188,   333,   335,-32768,
+-32768,   336,   337,   338,   339,   340,   188,   345,   348,   349,
+   350,   351,-32768,-32768,-32768,-32768,-32768,   188,   188,   188,
+   188,-32768,-32768,-32768,-32768,-32768,-32768,    20,   192,-32768,
+-32768,-32768,-32768,-32768,-32768,     5,   100,   100,   100,   100,
+   100,   100,   100,   100,   188,   352,   100,   100,   100,   100,
+   100,   100,   100,   100,-32768,   353,-32768,   355,   192,-32768,
+   188,   100,   192,   100,   356,   188,   188,   192,   188,   100,
+   192,   100,   359,   188,   188,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,   361,-32768,   363,   238,   365,   100,-32768,
+   368,   100,-32768,   100,   369,   370,   373,   100,   100,   377,
+   235,   379,   100,-32768,   384,   100,   100,   100,   100,   100,
+   100,   388,   235,   390,   391,   100,-32768,   392,    46,   393,
+-32768,    22,   235,   394,   395,   397,   398,    47,   399,   192,
+    24,   235,   400,   401,    -4,-32768,   402,   100,   403,   100,
+   364,   405,   406,   407,   100,   408,   100,   409,-32768,   100,
+-32768,   100,   100,-32768,-32768,-32768,   100,   100,   410,   411,
+-32768,   100,-32768,   412,   413,   100,   100,   100,   100,-32768,
+   421,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   422,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,   423,-32768,-32768,
+   425,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   131,   100,
+   100,   100,   100,   100,   100,   100,   426,   427,-32768,-32768,
+   100,-32768,-32768,   428,   429,   100,   100,-32768,-32768,-32768,
+-32768,   167,   149,-32768,   176,-32768,   127,-32768,    34,   433,
+   434,   436,-32768,   100,   165,   100,   100,   100,   100,   437,
+-32768,-32768,   100,-32768,-32768,   438,   439,    29,-32768,-32768,
+   188,   442,-32768,   188,   443,-32768,   188,-32768,-32768,   188,
+   444,   100,   100,   100,   100,-32768,   445,   100,   100,   100,
+-32768,   100,-32768,-32768,-32768,-32768,   447,-32768,   448,-32768,
+   450,   100,   100,    49,   100,    51,   100,    38,   100,-32768,
+   454,   458,   100,   100,   100,   235,     8,   235,    13,   235,
+   100,   100,    40,-32768,   100,    42,-32768,   100,    44,-32768,
+-32768,-32768,   459,   100,   100,   100,   460,-32768,   461,-32768,
+   462,   100,   100,   188,   466,-32768,   188,   467,   100,   188,
+   468,-32768,   100,   100,   100,-32768,-32768,-32768,   469,   470,
+   100,   100,   100,   100,-32768,   100,   100,-32768,   100,-32768,
+-32768,-32768,   100,   100,   100,   100,   100,   100,   100,   100,
+   100,   100,   100,   472,   473,   100,   474,   475,   100,   100,
+-32768,-32768,   100,-32768,-32768,   480,   481,   100,-32768,-32768,
+   100,   100,-32768,   493,   520,-32768
+};
+
+static const short yypgoto[] = {-32768,
+-32768,   314,-32768,-32768,-32768,-32768,    58,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,  -137,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,   -58,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+-32768,  -231,-32768,    88,-32768,-32768,  -281,  -223,  -215,  -214,
+  -166,  -284,  -183,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
+  -237,-32768,-32768,-32768,   -59,     1,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,   453,  -373,-32768,-32768,   230,   173,
+    35,   -91,-32768,    -5,-32768,-32768,    -2,  -127,   -71,   671
+};
+
+
+#define	YYLAST		1251
+
+
+static const short yytable[] = {    44,
+   323,    44,   314,   438,   440,    13,    14,   135,   143,    76,
+   135,    76,    76,    76,    76,   135,    76,    76,    76,    76,
+    76,    13,    14,   217,   209,   140,   141,   142,   491,   175,
+   145,   214,   148,    13,    14,   220,    13,    14,   217,   185,
+   217,    76,    13,    14,    13,    14,    13,    14,   301,   269,
+   315,    79,    80,    81,    82,   609,    86,    87,    88,    89,
+    90,   214,   214,   270,   603,    62,   138,   606,    22,   271,
+   289,   329,   119,    62,   414,    78,    63,   386,   207,   492,
+   272,    96,   330,   426,    63,   425,   334,    76,   134,    93,
+   218,   618,   136,   434,   119,   243,   620,   207,   273,   215,
+   290,   278,   135,   383,   291,   478,   302,   487,   160,   162,
+   223,   170,   575,   281,    94,   119,   560,   227,   228,   229,
+   318,   610,   624,    95,   627,   119,   630,   133,   292,   476,
+   484,   191,   604,   189,   607,    97,   293,   294,   303,   304,
+    22,   295,   424,   305,   266,   418,   296,   419,   306,   529,
+   433,   267,   297,   427,   307,   428,    98,   216,    99,   219,
+   100,   298,   102,   308,   319,   299,   225,   309,   310,   530,
+   311,    26,   312,   103,    72,   318,    72,   104,   531,   319,
+   557,   119,   300,   529,   313,    65,   244,   106,   320,   321,
+    13,    14,   109,    83,   138,   322,   110,   422,   248,    91,
+    92,   532,   551,   530,   597,   431,   599,   111,   279,   552,
+   558,   282,   531,   280,   533,   112,   283,    66,    67,   319,
+    65,    44,    44,    44,   101,   114,    26,    68,   115,   554,
+   138,   139,   553,    69,   107,   532,   555,   197,   198,   335,
+   116,   113,    70,   320,   321,   336,    71,   146,   566,   174,
+   550,   117,    66,    67,   121,    72,   125,   385,   188,   556,
+    65,   131,    68,   316,     1,     2,     3,     4,    69,   236,
+   237,   137,   351,   460,   192,   353,   144,    70,   149,   152,
+   355,    71,   153,   163,   323,   471,   165,   168,   176,   177,
+    72,   421,    66,    67,   178,   479,   180,   328,   317,   430,
+   181,   182,    68,   183,   488,   184,   186,   187,    69,   193,
+   448,   201,    76,    76,    76,    76,   576,    70,    29,   194,
+   195,    71,   196,   200,   202,   203,   212,   213,   221,   222,
+    72,   224,   226,   387,   389,   392,   394,   395,   396,   397,
+   398,   399,   247,   268,   403,   405,   406,   407,   408,   409,
+   410,   411,   379,   380,   381,   382,    13,    14,   486,   160,
+   284,   162,   285,   535,   332,    15,    16,   160,   333,   162,
+   337,   338,   339,   340,   341,   342,   343,    17,   344,    18,
+   345,   347,    19,   348,   349,    20,   450,    21,   350,   452,
+   352,   453,   354,    22,    23,   457,   458,   359,    24,    25,
+   462,   360,   361,   464,   465,   466,   467,   468,   469,   249,
+   250,   362,   363,    26,   364,   366,    27,   367,   368,   369,
+   370,   371,   372,   251,   252,   253,   254,   374,    28,   255,
+   375,   376,   377,   378,   401,   522,   412,   413,   423,   346,
+   256,   432,   500,   445,   502,   447,   495,   504,   449,   505,
+   506,   451,   454,   455,   507,   508,   456,   357,   257,   511,
+   459,   358,   461,   514,   515,   516,   517,   463,   617,   365,
+   619,   470,   621,   472,   473,   475,   477,   480,   481,   373,
+   482,   483,   485,   489,   490,   493,   494,   496,   497,   498,
+   501,   503,   685,   509,   510,   512,   513,   534,   500,   536,
+   537,   538,   539,   540,   518,   519,   520,   521,   543,   541,
+   542,   544,   545,   546,   547,   562,   563,   357,   564,   686,
+   571,   573,   574,   561,   578,   580,   583,   559,   591,   596,
+   598,   565,   600,   567,   568,   569,   570,   612,   165,   168,
+   572,   613,   632,   636,   637,   638,   165,   168,   642,   644,
+   647,     0,   651,   652,   582,   671,   672,   674,   675,   585,
+   587,   589,   590,   679,   680,   592,   593,   594,   169,   595,
+     0,     0,     0,     0,   400,     0,     0,     0,     0,   601,
+   602,     0,   605,     0,   608,     0,   611,     0,     0,     0,
+   614,   615,   616,     0,     0,     0,     0,   625,   622,   623,
+   628,     0,   626,   631,     0,   629,     0,     0,     0,     0,
+     0,   633,   634,   635,     0,     0,     0,     0,   641,   639,
+   640,   643,     0,     0,   646,     0,   645,     0,     0,     0,
+   648,   649,   650,     0,     0,     0,     0,     0,   653,   654,
+   655,   656,     0,   657,   658,     0,   659,     0,     0,     0,
+   660,   661,   662,   663,   664,   665,   666,   667,   668,   669,
+   670,     0,     0,   673,     0,     0,   676,   677,     0,     0,
+   678,     6,     8,    10,    12,   681,     0,     0,   682,   683,
+     0,     0,     0,     0,     0,    77,     0,    77,    77,    77,
+    77,     0,    77,    77,    77,    77,    77,     0,     0,    13,
+    14,     0,     0,    45,    46,     0,     0,    47,    15,    16,
+     0,    48,     0,     0,     0,     0,    49,    77,     0,     0,
+    17,     0,    18,   577,     0,    19,   579,     0,    20,   581,
+    21,     0,     0,    50,     0,     0,    22,    23,    51,     0,
+     0,    24,    25,     0,     0,     0,     0,     0,   120,     0,
+    52,     0,     0,     0,    53,    54,    26,     0,    55,    27,
+     0,    56,     0,    77,     0,     0,     0,     0,     0,     0,
+   120,    28,    57,     0,     0,     0,   151,     0,     0,     0,
+   286,     0,     0,     0,     0,     0,   151,   173,     0,     0,
+     0,   120,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,   120,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,   205,
+   208,     0,     0,   211,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     8,     8,     8,   231,
+   233,   235,    12,    12,   239,     0,   242,   120,    13,    14,
+   246,     0,    45,    46,     0,     0,    47,    15,    16,     0,
+    48,     0,     0,     0,     0,    49,     0,     0,     0,    17,
+     0,    18,     0,     0,    19,     0,     0,    20,     0,    21,
+     0,     0,    50,     0,     0,    22,    23,    51,     0,     0,
+    24,    25,     0,     0,     0,     0,     0,     0,     0,    52,
+    10,     0,     0,    53,    54,    26,     0,    55,    27,     0,
+    56,     0,     0,     0,    13,    14,     0,     0,    45,    46,
+    28,    57,    47,    15,    16,     0,    48,     0,     0,   287,
+     0,    49,     0,     0,     0,    17,     0,    18,     0,     0,
+    19,     0,     0,    20,     0,    21,     0,     0,    50,     0,
+     0,    22,    23,    51,     0,     0,    24,    25,     0,     0,
+     0,     0,     0,     0,     0,    52,     0,     0,     0,    53,
+    54,    26,     0,    55,    27,     0,    56,     0,    77,    77,
+    77,    77,     0,     0,     0,     0,    28,    57,     0,     0,
+     0,     0,     0,     0,     0,   288,     0,   390,   393,     0,
+     0,     0,     0,     0,     0,     0,     0,   404,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,    13,    14,
+   417,     0,    45,    46,     0,     0,    47,    15,    16,     0,
+    48,     0,     0,     0,     0,    49,   436,   417,   417,    17,
+     0,    18,     0,     0,    19,     0,     0,    20,     0,    21,
+     0,     0,    50,     0,     0,    22,    23,    51,     0,     0,
+    24,    25,     0,     0,     0,     0,     0,     0,     0,    52,
+     0,     0,     0,    53,    54,    26,     0,    55,    27,     0,
+    56,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+    28,    57,     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,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,   239,   524,   526,   528,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
+     0,   549,     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,     0,     0,     0,
+     0,     0,     0,     0,     0,     0,     0,     0,   417,     0,
+   417
+};
+
+static const short yycheck[] = {     5,
+   238,     7,   234,   377,   378,     3,     4,     3,   100,    15,
+     3,    17,    18,    19,    20,     3,    22,    23,    24,    25,
+    26,     3,     4,    17,   152,    97,    98,    99,    33,   121,
+   102,    16,   104,     3,     4,   163,     3,     4,    17,   131,
+    17,    47,     3,     4,     3,     4,     3,     4,   232,    35,
+   234,    17,    18,    19,    20,    18,    22,    23,    24,    25,
+    26,    16,    16,    49,    16,    54,     3,    17,    40,    55,
+    54,    73,    78,    54,   359,    83,    65,    73,   150,    84,
+    66,    47,    84,   368,    65,   367,    84,    93,    94,    24,
+    84,    84,    95,   375,   100,   187,    84,   169,    84,    84,
+    84,    83,     3,    84,     6,    84,     6,    84,   111,   112,
+    47,   117,    84,    83,    83,   121,    83,   176,   177,   178,
+     9,    84,    83,    83,    83,   131,    83,    93,    30,    84,
+    84,   137,    84,   136,    84,    83,    38,    39,    38,    39,
+    40,    43,   366,    43,    47,   361,    48,   362,    48,    19,
+   374,    54,    54,   369,    54,   370,    83,   160,    83,   162,
+    83,    63,    83,    63,    53,    67,   172,    67,    68,    39,
+    70,    60,    72,    83,    76,     9,    76,    83,    48,    53,
+    54,   187,    84,    19,    84,     6,   189,    83,    77,    78,
+     3,     4,    83,    21,     3,    84,    83,   364,   201,    27,
+    28,    71,    54,    39,   578,   372,   580,    83,   214,    61,
+    84,   217,    48,   216,    84,    83,   219,    38,    39,    53,
+     6,   227,   228,   229,    52,    83,    60,    48,    83,    54,
+     3,     4,    84,    54,    62,    71,    61,     3,     4,   245,
+    83,    69,    63,    77,    78,   248,    67,    21,    84,    84,
+    84,    83,    38,    39,    83,    76,    83,   329,    84,    84,
+     6,    83,    48,    84,    79,    80,    81,    82,    54,   182,
+   183,    83,   278,   401,    84,   281,    83,    63,    83,    83,
+   283,    67,    83,    83,   522,   413,   114,   115,    83,    83,
+    76,   363,    38,    39,    83,   423,    83,   240,    84,   371,
+    83,    83,    48,    83,   432,    83,    83,    83,    54,    84,
+    73,    83,   318,   319,   320,   321,   548,    63,     5,    84,
+    84,    67,    84,    84,    84,    84,    84,    84,    84,    84,
+    76,    84,    84,   336,   337,   338,   339,   340,   341,   342,
+   343,   344,    84,    84,   347,   348,   349,   350,   351,   352,
+   353,   354,   318,   319,   320,   321,     3,     4,   430,   362,
+    84,   364,    83,   501,    84,    12,    13,   370,    84,   372,
+    83,    83,    83,    83,    83,    83,    83,    24,    83,    26,
+    83,    83,    29,    83,    83,    32,   389,    34,    83,   392,
+    83,   394,    83,    40,    41,   398,   399,    83,    45,    46,
+   403,    83,    83,   406,   407,   408,   409,   410,   411,    35,
+    36,    83,    83,    60,    83,    83,    63,    83,    83,    83,
+    83,    83,    83,    49,    50,    51,    52,    83,    75,    55,
+    83,    83,    83,    83,    83,   495,    84,    83,    83,   267,
+    66,    83,   445,    83,   447,    83,    83,   450,    84,   452,
+   453,    84,    84,    84,   457,   458,    84,   285,    84,   462,
+    84,   289,    84,   466,   467,   468,   469,    84,   596,   297,
+   598,    84,   600,    84,    84,    84,    84,    84,    84,   307,
+    84,    84,    84,    84,    84,    84,    84,    83,    83,    83,
+    83,    83,     0,    84,    84,    84,    84,   500,   501,   502,
+   503,   504,   505,   506,    84,    84,    84,    83,   511,    84,
+    84,    84,    84,   516,   517,    83,    83,   345,    83,     0,
+    84,    84,    84,   529,    83,    83,    83,   527,    84,    83,
+    83,   534,    83,   536,   537,   538,   539,    84,   366,   367,
+   543,    84,    84,    84,    84,    84,   374,   375,    83,    83,
+    83,    -1,    84,    84,   560,    84,    84,    84,    84,   562,
+   563,   564,   565,    84,    84,   568,   569,   570,   116,   572,
+    -1,    -1,    -1,    -1,   345,    -1,    -1,    -1,    -1,   582,
+   583,    -1,   585,    -1,   587,    -1,   589,    -1,    -1,    -1,
+   593,   594,   595,    -1,    -1,    -1,    -1,   603,   601,   602,
+   606,    -1,   605,   609,    -1,   608,    -1,    -1,    -1,    -1,
+    -1,   614,   615,   616,    -1,    -1,    -1,    -1,   624,   622,
+   623,   627,    -1,    -1,   630,    -1,   629,    -1,    -1,    -1,
+   633,   634,   635,    -1,    -1,    -1,    -1,    -1,   641,   642,
+   643,   644,    -1,   646,   647,    -1,   649,    -1,    -1,    -1,
+   653,   654,   655,   656,   657,   658,   659,   660,   661,   662,
+   663,    -1,    -1,   666,    -1,    -1,   669,   670,    -1,    -1,
+   673,     1,     2,     3,     4,   678,    -1,    -1,   681,   682,
+    -1,    -1,    -1,    -1,    -1,    15,    -1,    17,    18,    19,
+    20,    -1,    22,    23,    24,    25,    26,    -1,    -1,     3,
+     4,    -1,    -1,     7,     8,    -1,    -1,    11,    12,    13,
+    -1,    15,    -1,    -1,    -1,    -1,    20,    47,    -1,    -1,
+    24,    -1,    26,   551,    -1,    29,   554,    -1,    32,   557,
+    34,    -1,    -1,    37,    -1,    -1,    40,    41,    42,    -1,
+    -1,    45,    46,    -1,    -1,    -1,    -1,    -1,    78,    -1,
+    54,    -1,    -1,    -1,    58,    59,    60,    -1,    62,    63,
+    -1,    65,    -1,    93,    -1,    -1,    -1,    -1,    -1,    -1,
+   100,    75,    76,    -1,    -1,    -1,   106,    -1,    -1,    -1,
+    84,    -1,    -1,    -1,    -1,    -1,   116,   117,    -1,    -1,
+    -1,   121,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,   131,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   149,
+   150,    -1,    -1,   153,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,   176,   177,   178,   179,
+   180,   181,   182,   183,   184,    -1,   186,   187,     3,     4,
+   190,    -1,     7,     8,    -1,    -1,    11,    12,    13,    -1,
+    15,    -1,    -1,    -1,    -1,    20,    -1,    -1,    -1,    24,
+    -1,    26,    -1,    -1,    29,    -1,    -1,    32,    -1,    34,
+    -1,    -1,    37,    -1,    -1,    40,    41,    42,    -1,    -1,
+    45,    46,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    54,
+   240,    -1,    -1,    58,    59,    60,    -1,    62,    63,    -1,
+    65,    -1,    -1,    -1,     3,     4,    -1,    -1,     7,     8,
+    75,    76,    11,    12,    13,    -1,    15,    -1,    -1,    84,
+    -1,    20,    -1,    -1,    -1,    24,    -1,    26,    -1,    -1,
+    29,    -1,    -1,    32,    -1,    34,    -1,    -1,    37,    -1,
+    -1,    40,    41,    42,    -1,    -1,    45,    46,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    54,    -1,    -1,    -1,    58,
+    59,    60,    -1,    62,    63,    -1,    65,    -1,   318,   319,
+   320,   321,    -1,    -1,    -1,    -1,    75,    76,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    84,    -1,   337,   338,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,   347,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,     3,     4,
+   360,    -1,     7,     8,    -1,    -1,    11,    12,    13,    -1,
+    15,    -1,    -1,    -1,    -1,    20,   376,   377,   378,    24,
+    -1,    26,    -1,    -1,    29,    -1,    -1,    32,    -1,    34,
+    -1,    -1,    37,    -1,    -1,    40,    41,    42,    -1,    -1,
+    45,    46,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    54,
+    -1,    -1,    -1,    58,    59,    60,    -1,    62,    63,    -1,
+    65,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    75,    76,    -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,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,   495,   496,   497,   498,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
+    -1,   521,    -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,    -1,    -1,    -1,
+    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   578,    -1,
+   580
+};
+/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
+#line 3 "/usr/share/bison.simple"
+/* This file comes from bison-1.28.  */
+
+/* Skeleton output parser for bison,
+   Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+/* As a special exception, when this file is copied by Bison into a
+   Bison output file, you may use that output file without restriction.
+   This special exception was added by the Free Software Foundation
+   in version 1.24 of Bison.  */
+
+/* This is the parser code that is written into each bison parser
+  when the %semantic_parser declaration is not specified in the grammar.
+  It was written by Richard Stallman by simplifying the hairy parser
+  used when %semantic_parser is specified.  */
+
+#ifndef YYSTACK_USE_ALLOCA
+#ifdef alloca
+#define YYSTACK_USE_ALLOCA
+#else /* alloca not defined */
+#ifdef __GNUC__
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#else /* not GNU C.  */
+#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386))
+#define YYSTACK_USE_ALLOCA
+#include <alloca.h>
+#else /* not sparc */
+/* We think this test detects Watcom and Microsoft C.  */
+/* This used to test MSDOS, but that is a bad idea
+   since that symbol is in the user namespace.  */
+#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__)
+#if 0 /* No need for malloc.h, which pollutes the namespace;
+	 instead, just don't use alloca.  */
+#include <malloc.h>
+#endif
+#else /* not MSDOS, or __TURBOC__ */
+#if defined(_AIX)
+/* I don't know what this was needed for, but it pollutes the namespace.
+   So I turned it off.   rms, 2 May 1997.  */
+/* #include <malloc.h>  */
+ #pragma alloca
+#define YYSTACK_USE_ALLOCA
+#else /* not MSDOS, or __TURBOC__, or _AIX */
+#if 0
+#ifdef __hpux /* [email protected] says this works for HPUX 9.05 and up,
+		 and on HPUX 10.  Eventually we can turn this on.  */
+#define YYSTACK_USE_ALLOCA
+#define alloca __builtin_alloca
+#endif /* __hpux */
+#endif
+#endif /* not _AIX */
+#endif /* not MSDOS, or __TURBOC__ */
+#endif /* not sparc */
+#endif /* not GNU C */
+#endif /* alloca not defined */
+#endif /* YYSTACK_USE_ALLOCA not defined */
+
+#ifdef YYSTACK_USE_ALLOCA
+#define YYSTACK_ALLOC alloca
+#else
+#define YYSTACK_ALLOC malloc
+#endif
+
+/* Note: there must be only one dollar sign in this file.
+   It is replaced by the list of actions, each action
+   as one case of the switch.  */
+
+#define yyerrok		(yyerrstatus = 0)
+#define yyclearin	(yychar = YYEMPTY)
+#define YYEMPTY		-2
+#define YYEOF		0
+#define YYACCEPT	goto yyacceptlab
+#define YYABORT 	goto yyabortlab
+#define YYERROR		goto yyerrlab1
+/* Like YYERROR except do call yyerror.
+   This remains here temporarily to ease the
+   transition to the new meaning of YYERROR, for GCC.
+   Once GCC version 2 has supplanted version 1, this can go.  */
+#define YYFAIL		goto yyerrlab
+#define YYRECOVERING()  (!!yyerrstatus)
+#define YYBACKUP(token, value) \
+do								\
+  if (yychar == YYEMPTY && yylen == 1)				\
+    { yychar = (token), yylval = (value);			\
+      yychar1 = YYTRANSLATE (yychar);				\
+      YYPOPSTACK;						\
+      goto yybackup;						\
+    }								\
+  else								\
+    { yyerror ("syntax error: cannot back up"); YYERROR; }	\
+while (0)
+
+#define YYTERROR	1
+#define YYERRCODE	256
+
+#ifndef YYPURE
+#define YYLEX		yylex()
+#endif
+
+#ifdef YYPURE
+#ifdef YYLSP_NEEDED
+#ifdef YYLEX_PARAM
+#define YYLEX		yylex(&yylval, &yylloc, YYLEX_PARAM)
+#else
+#define YYLEX		yylex(&yylval, &yylloc)
+#endif
+#else /* not YYLSP_NEEDED */
+#ifdef YYLEX_PARAM
+#define YYLEX		yylex(&yylval, YYLEX_PARAM)
+#else
+#define YYLEX		yylex(&yylval)
+#endif
+#endif /* not YYLSP_NEEDED */
+#endif
+
+/* If nonreentrant, generate the variables here */
+
+#ifndef YYPURE
+
+int	yychar;			/*  the lookahead symbol		*/
+YYSTYPE	yylval;			/*  the semantic value of the		*/
+				/*  lookahead symbol			*/
+
+#ifdef YYLSP_NEEDED
+YYLTYPE yylloc;			/*  location data for the lookahead	*/
+				/*  symbol				*/
+#endif
+
+int yynerrs;			/*  number of parse errors so far       */
+#endif  /* not YYPURE */
+
+#if YYDEBUG != 0
+int yydebug;			/*  nonzero means print parse trace	*/
+/* Since this is uninitialized, it does not stop multiple parsers
+   from coexisting.  */
+#endif
+
+/*  YYINITDEPTH indicates the initial size of the parser's stacks	*/
+
+#ifndef	YYINITDEPTH
+#define YYINITDEPTH 200
+#endif
+
+/*  YYMAXDEPTH is the maximum size the stacks can grow to
+    (effective only if the built-in stack extension method is used).  */
+
+#if YYMAXDEPTH == 0
+#undef YYMAXDEPTH
+#endif
+
+#ifndef YYMAXDEPTH
+#define YYMAXDEPTH 10000
+#endif
+
+/* Define __yy_memcpy.  Note that the size argument
+   should be passed with type unsigned int, because that is what the non-GCC
+   definitions require.  With GCC, __builtin_memcpy takes an arg
+   of type size_t, but it can handle unsigned int.  */
+
+#if __GNUC__ > 1		/* GNU C and GNU C++ define this.  */
+#define __yy_memcpy(TO,FROM,COUNT)	__builtin_memcpy(TO,FROM,COUNT)
+#else				/* not GNU C or C++ */
+#ifndef __cplusplus
+
+/* This is the most reliable way to avoid incompatibilities
+   in available built-in functions on various systems.  */
+static void
+__yy_memcpy (to, from, count)
+     char *to;
+     char *from;
+     unsigned int count;
+{
+  register char *f = from;
+  register char *t = to;
+  register int i = count;
+
+  while (i-- > 0)
+    *t++ = *f++;
+}
+
+#else /* __cplusplus */
+
+/* This is the most reliable way to avoid incompatibilities
+   in available built-in functions on various systems.  */
+static void
+__yy_memcpy (char *to, char *from, unsigned int count)
+{
+  register char *t = to;
+  register char *f = from;
+  register int i = count;
+
+  while (i-- > 0)
+    *t++ = *f++;
+}
+
+#endif
+#endif
+
+#line 217 "/usr/share/bison.simple"
+
+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
+   into yyparse.  The argument should have type void *.
+   It should actually point to an object.
+   Grammar actions can access the variable by casting it
+   to the proper pointer type.  */
+
+#ifdef YYPARSE_PARAM
+#ifdef __cplusplus
+#define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL
+#else /* not __cplusplus */
+#define YYPARSE_PARAM_ARG YYPARSE_PARAM
+#define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
+#endif /* not __cplusplus */
+#else /* not YYPARSE_PARAM */
+#define YYPARSE_PARAM_ARG
+#define YYPARSE_PARAM_DECL
+#endif /* not YYPARSE_PARAM */
+
+/* Prevent warning if -Wstrict-prototypes.  */
+#ifdef __GNUC__
+#ifdef YYPARSE_PARAM
+int yyparse (void *);
+#else
+int yyparse (void);
+#endif
+#endif
+
+int
+yyparse(YYPARSE_PARAM_ARG)
+     YYPARSE_PARAM_DECL
+{
+  register int yystate;
+  register int yyn;
+  register short *yyssp;
+  register YYSTYPE *yyvsp;
+  int yyerrstatus;	/*  number of tokens to shift before error messages enabled */
+  int yychar1 = 0;		/*  lookahead token as an internal (translated) token number */
+
+  short	yyssa[YYINITDEPTH];	/*  the state stack			*/
+  YYSTYPE yyvsa[YYINITDEPTH];	/*  the semantic value stack		*/
+
+  short *yyss = yyssa;		/*  refer to the stacks thru separate pointers */
+  YYSTYPE *yyvs = yyvsa;	/*  to allow yyoverflow to reallocate them elsewhere */
+
+#ifdef YYLSP_NEEDED
+  YYLTYPE yylsa[YYINITDEPTH];	/*  the location stack			*/
+  YYLTYPE *yyls = yylsa;
+  YYLTYPE *yylsp;
+
+#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
+#else
+#define YYPOPSTACK   (yyvsp--, yyssp--)
+#endif
+
+  int yystacksize = YYINITDEPTH;
+  int yyfree_stacks = 0;
+
+#ifdef YYPURE
+  int yychar;
+  YYSTYPE yylval;
+  int yynerrs;
+#ifdef YYLSP_NEEDED
+  YYLTYPE yylloc;
+#endif
+#endif
+
+  YYSTYPE yyval;		/*  the variable used to return		*/
+				/*  semantic values from the action	*/
+				/*  routines				*/
+
+  int yylen;
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Starting parse\n");
+#endif
+
+  yystate = 0;
+  yyerrstatus = 0;
+  yynerrs = 0;
+  yychar = YYEMPTY;		/* Cause a token to be read.  */
+
+  /* Initialize stack pointers.
+     Waste one element of value and location stack
+     so that they stay on the same level as the state stack.
+     The wasted elements are never initialized.  */
+
+  yyssp = yyss - 1;
+  yyvsp = yyvs;
+#ifdef YYLSP_NEEDED
+  yylsp = yyls;
+#endif
+
+/* Push a new state, which is found in  yystate  .  */
+/* In all cases, when you get here, the value and location stacks
+   have just been pushed. so pushing a state here evens the stacks.  */
+yynewstate:
+
+  *++yyssp = yystate;
+
+  if (yyssp >= yyss + yystacksize - 1)
+    {
+      /* Give user a chance to reallocate the stack */
+      /* Use copies of these so that the &'s don't force the real ones into memory. */
+      YYSTYPE *yyvs1 = yyvs;
+      short *yyss1 = yyss;
+#ifdef YYLSP_NEEDED
+      YYLTYPE *yyls1 = yyls;
+#endif
+
+      /* Get the current used size of the three stacks, in elements.  */
+      int size = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+      /* Each stack pointer address is followed by the size of
+	 the data in use in that stack, in bytes.  */
+#ifdef YYLSP_NEEDED
+      /* This used to be a conditional around just the two extra args,
+	 but that might be undefined if yyoverflow is a macro.  */
+      yyoverflow("parser stack overflow",
+		 &yyss1, size * sizeof (*yyssp),
+		 &yyvs1, size * sizeof (*yyvsp),
+		 &yyls1, size * sizeof (*yylsp),
+		 &yystacksize);
+#else
+      yyoverflow("parser stack overflow",
+		 &yyss1, size * sizeof (*yyssp),
+		 &yyvs1, size * sizeof (*yyvsp),
+		 &yystacksize);
+#endif
+
+      yyss = yyss1; yyvs = yyvs1;
+#ifdef YYLSP_NEEDED
+      yyls = yyls1;
+#endif
+#else /* no yyoverflow */
+      /* Extend the stack our own way.  */
+      if (yystacksize >= YYMAXDEPTH)
+	{
+	  yyerror("parser stack overflow");
+	  if (yyfree_stacks)
+	    {
+	      free (yyss);
+	      free (yyvs);
+#ifdef YYLSP_NEEDED
+	      free (yyls);
+#endif
+	    }
+	  return 2;
+	}
+      yystacksize *= 2;
+      if (yystacksize > YYMAXDEPTH)
+	yystacksize = YYMAXDEPTH;
+#ifndef YYSTACK_USE_ALLOCA
+      yyfree_stacks = 1;
+#endif
+      yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp));
+      __yy_memcpy ((char *)yyss, (char *)yyss1,
+		   size * (unsigned int) sizeof (*yyssp));
+      yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp));
+      __yy_memcpy ((char *)yyvs, (char *)yyvs1,
+		   size * (unsigned int) sizeof (*yyvsp));
+#ifdef YYLSP_NEEDED
+      yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp));
+      __yy_memcpy ((char *)yyls, (char *)yyls1,
+		   size * (unsigned int) sizeof (*yylsp));
+#endif
+#endif /* no yyoverflow */
+
+      yyssp = yyss + size - 1;
+      yyvsp = yyvs + size - 1;
+#ifdef YYLSP_NEEDED
+      yylsp = yyls + size - 1;
+#endif
+
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Stack size increased to %d\n", yystacksize);
+#endif
+
+      if (yyssp >= yyss + yystacksize - 1)
+	YYABORT;
+    }
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Entering state %d\n", yystate);
+#endif
+
+  goto yybackup;
+ yybackup:
+
+/* Do appropriate processing given the current state.  */
+/* Read a lookahead token if we need one and don't already have one.  */
+/* yyresume: */
+
+  /* First try to decide what to do without reference to lookahead token.  */
+
+  yyn = yypact[yystate];
+  if (yyn == YYFLAG)
+    goto yydefault;
+
+  /* Not known => get a lookahead token if don't already have one.  */
+
+  /* yychar is either YYEMPTY or YYEOF
+     or a valid token in external form.  */
+
+  if (yychar == YYEMPTY)
+    {
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Reading a token: ");
+#endif
+      yychar = YYLEX;
+    }
+
+  /* Convert token to internal form (in yychar1) for indexing tables with */
+
+  if (yychar <= 0)		/* This means end of input. */
+    {
+      yychar1 = 0;
+      yychar = YYEOF;		/* Don't call YYLEX any more */
+
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Now at end of input.\n");
+#endif
+    }
+  else
+    {
+      yychar1 = YYTRANSLATE(yychar);
+
+#if YYDEBUG != 0
+      if (yydebug)
+	{
+	  fprintf (stderr, "Next token is %d (%s", yychar, yytname[yychar1]);
+	  /* Give the individual parser a way to print the precise meaning
+	     of a token, for further debugging info.  */
+#ifdef YYPRINT
+	  YYPRINT (stderr, yychar, yylval);
+#endif
+	  fprintf (stderr, ")\n");
+	}
+#endif
+    }
+
+  yyn += yychar1;
+  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+    goto yydefault;
+
+  yyn = yytable[yyn];
+
+  /* yyn is what to do for this token type in this state.
+     Negative => reduce, -yyn is rule number.
+     Positive => shift, yyn is new state.
+       New state is final state => don't bother to shift,
+       just return success.
+     0, or most negative number => error.  */
+
+  if (yyn < 0)
+    {
+      if (yyn == YYFLAG)
+	goto yyerrlab;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+  else if (yyn == 0)
+    goto yyerrlab;
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+  /* Shift the lookahead token.  */
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Shifting token %d (%s), ", yychar, yytname[yychar1]);
+#endif
+
+  /* Discard the token being shifted unless it is eof.  */
+  if (yychar != YYEOF)
+    yychar = YYEMPTY;
+
+  *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+  *++yylsp = yylloc;
+#endif
+
+  /* count tokens shifted since error; after three, turn off error status.  */
+  if (yyerrstatus) yyerrstatus--;
+
+  yystate = yyn;
+  goto yynewstate;
+
+/* Do the default action for the current state.  */
+yydefault:
+
+  yyn = yydefact[yystate];
+  if (yyn == 0)
+    goto yyerrlab;
+
+/* Do a reduction.  yyn is the number of a rule to reduce with.  */
+yyreduce:
+  yylen = yyr2[yyn];
+  if (yylen > 0)
+    yyval = yyvsp[1-yylen]; /* implement default value of the action */
+
+#if YYDEBUG != 0
+  if (yydebug)
+    {
+      int i;
+
+      fprintf (stderr, "Reducing via rule %d (line %d), ",
+	       yyn, yyrline[yyn]);
+
+      /* Print the symbols being reduced, and their result.  */
+      for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
+	fprintf (stderr, "%s ", yytname[yyrhs[i]]);
+      fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]);
+    }
+#endif
+
+
+  switch (yyn) {
+
+case 6:
+#line 196 "parser.yxx"
+{
+  DCAST(EggData, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
+;
+    break;}
+case 21:
+#line 235 "parser.yxx"
+{
+  string strval = yyvsp[-1]._string;
+  EggCoordinateSystem *cs = new EggCoordinateSystem;
+
+  CoordinateSystem f = parse_coordinate_system_string(strval);
+  if (f == CS_invalid) {
+    eggyywarning("Unknown coordinate system " + strval);
+  } else {
+    cs->set_value(f);
+  }
+  yyval._egg = cs;
+;
+    break;}
+case 22:
+#line 258 "parser.yxx"
+{
+  yyval._egg = new EggComment(yyvsp[-3]._string, yyvsp[-1]._string);
+;
+    break;}
+case 23:
+#line 272 "parser.yxx"
+{
+  string tref_name = yyvsp[-2]._string;
+  Filename filename = yyvsp[0]._string;
+  EggTexture *texture = new EggTexture(tref_name, filename);
+
+  if (textures.find(tref_name) != textures.end()) {
+    eggyywarning("Duplicate texture name " + tref_name);
+  }
+  textures[tref_name] = texture;
+
+  egg_stack.push_back(texture);
+;
+    break;}
+case 24:
+#line 285 "parser.yxx"
+{
+  yyval._egg = egg_stack.back();
+  egg_stack.pop_back();
+;
+    break;}
+case 26:
+#line 301 "parser.yxx"
+{
+  EggTexture *texture = DCAST(EggTexture, egg_stack.back());
+  string name = yyvsp[-3]._string;
+  double value = yyvsp[-1]._number;
+  string strval = yyvsp[-1]._string;
+
+  if (cmp_nocase_uh(name, "format") == 0) {
+    EggTexture::Format f = EggTexture::string_format(strval);
+    if (f == EggTexture::F_unspecified) {
+      eggyywarning("Unknown texture format " + strval);
+    } else {
+      texture->set_format(f);
+    }
+
+  } else if (cmp_nocase_uh(name, "wrap") == 0) {
+    EggTexture::WrapMode w = EggTexture::string_wrap_mode(strval);
+    if (w == EggTexture::WM_unspecified) {
+      eggyywarning("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("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("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("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("Unknown texture filter type " + strval);
+    } else {
+      texture->set_magfilter(f);
+    }
+  } else if (cmp_nocase_uh(name, "anisotropic_degree") == 0) {
+    texture->set_anisotropic_degree(value);
+
+  } else if (cmp_nocase_uh(name, "envtype") == 0) {
+    EggTexture::EnvType e = EggTexture::string_env_type(strval);
+    if (e == EggTexture::ET_unspecified) {
+      eggyywarning("Unknown texture env type " + strval);
+    } else {
+      texture->set_env_type(e);
+    }
+
+  } else if (cmp_nocase_uh(name, "alpha") == 0) {
+    EggRenderMode::AlphaMode a = EggRenderMode::string_alpha_mode(strval);
+    if (a == EggRenderMode::AM_unspecified) {
+      eggyywarning("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("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("Unknown depth-test mode " + strval);
+    } else {
+      texture->set_depth_test_mode(m);
+    }
+
+  } 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_file(strval);
+
+  } else {
+    eggyywarning("Unsupported texture scalar: " + name);
+  }
+;
+    break;}
+case 28:
+#line 416 "parser.yxx"
+{
+  string mref_name = yyvsp[-1]._string;
+  EggMaterial *material = new EggMaterial(mref_name);
+
+  if (materials.find(mref_name) != materials.end()) {
+    eggyywarning("Duplicate material name " + mref_name);
+  }
+  materials[mref_name] = material;
+
+  egg_stack.push_back(material);
+;
+    break;}
+case 29:
+#line 428 "parser.yxx"
+{
+  yyval._egg = egg_stack.back();
+  egg_stack.pop_back();
+;
+    break;}
+case 31:
+#line 444 "parser.yxx"
+{
+  EggMaterial *material = DCAST(EggMaterial, egg_stack.back());
+  string name = yyvsp[-3]._string;
+  double value = yyvsp[-1]._number;
+
+  if (cmp_nocase_uh(name, "diffr") == 0) {
+    Colorf diff = material->get_diff();
+    diff[0] = value;
+    material->set_diff(diff);
+  } else if (cmp_nocase_uh(name, "diffg") == 0) {
+    Colorf diff = material->get_diff();
+    diff[1] = value;
+    material->set_diff(diff);
+  } else if (cmp_nocase_uh(name, "diffb") == 0) {
+    Colorf diff = material->get_diff();
+    diff[2] = value;
+    material->set_diff(diff);
+  } else if (cmp_nocase_uh(name, "diffa") == 0) {
+    Colorf diff = material->get_diff();
+    diff[3] = value;
+    material->set_diff(diff);
+
+  } else if (cmp_nocase_uh(name, "ambr") == 0) {
+    Colorf amb = material->get_amb();
+    amb[0] = value;
+    material->set_amb(amb);
+  } else if (cmp_nocase_uh(name, "ambg") == 0) {
+    Colorf amb = material->get_amb();
+    amb[1] = value;
+    material->set_amb(amb);
+  } else if (cmp_nocase_uh(name, "ambb") == 0) {
+    Colorf amb = material->get_amb();
+    amb[2] = value;
+    material->set_amb(amb);
+  } else if (cmp_nocase_uh(name, "amba") == 0) {
+    Colorf amb = material->get_amb();
+    amb[3] = value;
+    material->set_amb(amb);
+
+  } else if (cmp_nocase_uh(name, "emitr") == 0) {
+    Colorf emit = material->get_emit();
+    emit[0] = value;
+    material->set_emit(emit);
+  } else if (cmp_nocase_uh(name, "emitg") == 0) {
+    Colorf emit = material->get_emit();
+    emit[1] = value;
+    material->set_emit(emit);
+  } else if (cmp_nocase_uh(name, "emitb") == 0) {
+    Colorf emit = material->get_emit();
+    emit[2] = value;
+    material->set_emit(emit);
+  } else if (cmp_nocase_uh(name, "emita") == 0) {
+    Colorf emit = material->get_emit();
+    emit[3] = value;
+    material->set_emit(emit);
+
+  } else if (cmp_nocase_uh(name, "specr") == 0) {
+    Colorf spec = material->get_spec();
+    spec[0] = value;
+    material->set_spec(spec);
+  } else if (cmp_nocase_uh(name, "specg") == 0) {
+    Colorf spec = material->get_spec();
+    spec[1] = value;
+    material->set_spec(spec);
+  } else if (cmp_nocase_uh(name, "specb") == 0) {
+    Colorf spec = material->get_spec();
+    spec[2] = value;
+    material->set_spec(spec);
+  } else if (cmp_nocase_uh(name, "speca") == 0) {
+    Colorf 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, "local") == 0) {
+    material->set_local(value != 0.0);
+
+  } else {
+    eggyywarning("Unsupported material scalar: " + name);
+  }
+;
+    break;}
+case 32:
+#line 539 "parser.yxx"
+{
+  string node_name = yyvsp[-3]._string;
+  Filename filename = yyvsp[-1]._string;
+  EggExternalReference *ref = new EggExternalReference(node_name, filename);
+  yyval._egg = ref;
+;
+    break;}
+case 33:
+#line 546 "parser.yxx"
+{
+  if (cmp_nocase_uh(yyvsp[-5]._string, "group") != 0) {
+    eggyyerror("keyword 'group' expected");
+  }
+  string node_name = yyvsp[-3]._string;
+  Filename filename = yyvsp[-1]._string;
+  EggExternalReference *ref = new EggExternalReference(node_name, filename);
+  yyval._egg = ref;
+;
+    break;}
+case 34:
+#line 566 "parser.yxx"
+{
+  string name = yyvsp[0]._string;
+  EggVertexPool *pool = new EggVertexPool(name);
+
+  if (vertex_pools.find(name) != vertex_pools.end()) {
+    eggyywarning("Duplicate vertex pool name " + name);
+  }
+  vertex_pools[name] = pool;
+
+  egg_stack.push_back(pool);
+;
+    break;}
+case 35:
+#line 578 "parser.yxx"
+{
+  yyval._egg = egg_stack.back();
+  egg_stack.pop_back();
+;
+    break;}
+case 38:
+#line 606 "parser.yxx"
+{
+  egg_stack.push_back(new EggVertex);
+;
+    break;}
+case 39:
+#line 610 "parser.yxx"
+{
+  PT(EggVertex) vtx = DCAST(EggVertex, egg_stack.back());
+  egg_stack.pop_back();
+
+  DCAST(EggVertexPool, egg_stack.back())->add_vertex(vtx);
+;
+    break;}
+case 40:
+#line 617 "parser.yxx"
+{
+  vertex_index = (int)yyvsp[0]._number;
+  EggVertexPool *pool = DCAST(EggVertexPool, egg_stack.back());
+
+  if (vertex_index < 0) {
+    ostringstream errmsg;
+    errmsg << "Ignoring invalid vertex index " << vertex_index
+           << " in vertex pool " << pool->get_name() << ends;
+    eggyywarning(errmsg);
+    vertex_index = -1;
+
+  } else if (pool->get_vertex(vertex_index) != NULL) {
+    ostringstream errmsg;
+    errmsg << "Ignoring duplicate vertex index " << vertex_index
+           << " in vertex pool " << pool->get_name() << ends;
+    eggyywarning(errmsg);
+    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.
+
+  egg_stack.push_back(new EggVertex);
+;
+    break;}
+case 41:
+#line 642 "parser.yxx"
+{
+  PT(EggVertex) vtx = DCAST(EggVertex, egg_stack.back());
+  egg_stack.pop_back();
+
+  EggVertexPool *pool = DCAST(EggVertexPool, egg_stack.back());
+  if (vertex_index != -1) {
+    pool->add_vertex(vtx, vertex_index);
+  }
+;
+    break;}
+case 42:
+#line 663 "parser.yxx"
+{
+  DCAST(EggVertex, egg_stack.back())->set_pos(yyvsp[0]._number);
+;
+    break;}
+case 43:
+#line 667 "parser.yxx"
+{
+  DCAST(EggVertex, egg_stack.back())->set_pos(LPoint2d(yyvsp[-1]._number, yyvsp[0]._number));
+;
+    break;}
+case 44:
+#line 671 "parser.yxx"
+{
+  DCAST(EggVertex, egg_stack.back())->set_pos(LPoint3d(yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number));
+;
+    break;}
+case 45:
+#line 675 "parser.yxx"
+{
+  DCAST(EggVertex, egg_stack.back())->set_pos(LPoint4d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number));
+;
+    break;}
+case 49:
+#line 682 "parser.yxx"
+{
+  bool inserted = DCAST(EggVertex, egg_stack.back())->_dxyzs.
+    insert(EggMorphVertex(yyvsp[-5]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
+  if (!inserted) {
+    eggyywarning("Ignoring repeated morph name " + yyvsp[-5]._string);
+  }
+;
+    break;}
+case 50:
+#line 690 "parser.yxx"
+{
+  bool inserted = DCAST(EggVertex, egg_stack.back())->_dxyzs.
+    insert(EggMorphVertex(yyvsp[-4]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
+  if (!inserted) {
+    eggyywarning("Ignoring repeated morph name " + yyvsp[-4]._string);
+  }
+;
+    break;}
+case 51:
+#line 709 "parser.yxx"
+{
+  DCAST(EggVertex, egg_stack.back())->set_uv(TexCoordd(yyvsp[-1]._number, yyvsp[0]._number));
+;
+    break;}
+case 52:
+#line 713 "parser.yxx"
+{
+  bool inserted = DCAST(EggVertex, egg_stack.back())->_duvs.
+    insert(EggMorphTexCoord(yyvsp[-4]._string, LVector2d(yyvsp[-2]._number, yyvsp[-1]._number))).second;
+  if (!inserted) {
+    eggyywarning("Ignoring repeated morph name " + yyvsp[-4]._string);
+  }
+;
+    break;}
+case 53:
+#line 721 "parser.yxx"
+{
+  bool inserted = DCAST(EggVertex, egg_stack.back())->_duvs.
+    insert(EggMorphTexCoord(yyvsp[-3]._string, LVector2d(yyvsp[-2]._number, yyvsp[-1]._number))).second;
+  if (!inserted) {
+    eggyywarning("Ignoring repeated morph name " + yyvsp[-3]._string);
+  }
+;
+    break;}
+case 54:
+#line 739 "parser.yxx"
+{
+  DCAST(EggVertex, egg_stack.back())->set_normal(Normald(yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number));
+;
+    break;}
+case 55:
+#line 743 "parser.yxx"
+{
+  bool inserted = DCAST(EggVertex, egg_stack.back())->_dnormals.
+    insert(EggMorphNormal(yyvsp[-5]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
+  if (!inserted) {
+    eggyywarning("Ignoring repeated morph name " + yyvsp[-5]._string);
+  }
+;
+    break;}
+case 56:
+#line 751 "parser.yxx"
+{
+  bool inserted = DCAST(EggVertex, egg_stack.back())->_dnormals.
+    insert(EggMorphNormal(yyvsp[-4]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
+  if (!inserted) {
+    eggyywarning("Ignoring repeated morph name " + yyvsp[-4]._string);
+  }
+;
+    break;}
+case 57:
+#line 769 "parser.yxx"
+{
+  DCAST(EggVertex, egg_stack.back())->set_color(Colorf(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number));
+;
+    break;}
+case 58:
+#line 773 "parser.yxx"
+{
+  bool inserted = DCAST(EggVertex, egg_stack.back())->_drgbas.
+    insert(EggMorphColor(yyvsp[-6]._string, LVector4f(yyvsp[-4]._number, yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
+  if (!inserted) {
+    eggyywarning("Ignoring repeated morph name " + yyvsp[-6]._string);
+  }
+;
+    break;}
+case 59:
+#line 781 "parser.yxx"
+{
+  bool inserted = DCAST(EggVertex, egg_stack.back())->_drgbas.
+    insert(EggMorphColor(yyvsp[-5]._string, LVector4f(yyvsp[-4]._number, yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
+  if (!inserted) {
+    eggyywarning("Ignoring repeated morph name " + yyvsp[-5]._string);
+  }
+;
+    break;}
+case 60:
+#line 799 "parser.yxx"
+{
+  EggGroup *group = new EggGroup(yyvsp[0]._string);
+  egg_stack.push_back(group);
+;
+    break;}
+case 61:
+#line 804 "parser.yxx"
+{
+  yyval._egg = egg_stack.back();
+  egg_stack.pop_back();
+;
+    break;}
+case 62:
+#line 819 "parser.yxx"
+{
+  EggGroup *group = new EggGroup(yyvsp[0]._string);
+  group->set_group_type(EggGroup::GT_joint);
+  egg_stack.push_back(group);
+;
+    break;}
+case 63:
+#line 825 "parser.yxx"
+{
+  yyval._egg = egg_stack.back();
+  egg_stack.pop_back();
+;
+    break;}
+case 64:
+#line 840 "parser.yxx"
+{
+  EggGroup *group = new EggGroup(yyvsp[0]._string);
+  group->set_group_type(EggGroup::GT_instance);
+  egg_stack.push_back(group);
+;
+    break;}
+case 65:
+#line 846 "parser.yxx"
+{
+  yyval._egg = egg_stack.back();
+  egg_stack.pop_back();
+;
+    break;}
+case 67:
+#line 862 "parser.yxx"
+{
+  EggGroup *group = DCAST(EggGroup, egg_stack.back());
+  string name = yyvsp[-3]._string;
+  double value = yyvsp[-1]._number;
+  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("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("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("Unknown depth-test mode " + strval);
+    } else {
+      group->set_depth_test_mode(m);
+    }
+  } else if (cmp_nocase_uh(name, "draw_order") == 0) {
+    group->set_draw_order((int)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(value);
+  } else if (cmp_nocase_uh(name, "from_collide_mask") == 0) {
+    group->set_from_collide_mask(value);
+  } else if (cmp_nocase_uh(name, "into_collide_mask") == 0) {
+    group->set_into_collide_mask(value);
+  } else {
+    eggyywarning("Unknown group scalar " + name);
+  }
+;
+    break;}
+case 68:
+#line 915 "parser.yxx"
+{
+  EggGroup *group = DCAST(EggGroup, egg_stack.back());
+  string strval = yyvsp[-1]._string;
+
+  EggGroup::BillboardType f = EggGroup::string_billboard_type(strval);
+  if (f == EggGroup::BT_none) {
+    eggyywarning("Unknown billboard type " + strval);
+  } else {
+    group->set_billboard_type(f);
+  }
+;
+    break;}
+case 69:
+#line 927 "parser.yxx"
+{
+  EggGroup *group = DCAST(EggGroup, egg_stack.back());
+  group->set_billboard_center(LPoint3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number));
+;
+    break;}
+case 70:
+#line 932 "parser.yxx"
+{
+  EggGroup *group = DCAST(EggGroup, egg_stack.back());
+  string name = yyvsp[-4]._string;
+
+  group->set_collision_name(name);
+;
+    break;}
+case 71:
+#line 939 "parser.yxx"
+{
+  EggGroup *group = DCAST(EggGroup, egg_stack.back());
+  int value = (int)yyvsp[-1]._number;
+  group->set_dcs_flag(value!=0);
+;
+    break;}
+case 72:
+#line 945 "parser.yxx"
+{
+  // The traditional flavor of DART, with { 0 } or { 1 }.
+  EggGroup *group = DCAST(EggGroup, egg_stack.back());
+  int value = (int)yyvsp[-1]._number;
+  group->set_dart_type(value!=0 ? EggGroup::DT_default : EggGroup::DT_none);
+;
+    break;}
+case 73:
+#line 952 "parser.yxx"
+{
+  // The special flavor of DART, with { sync } or { nosync }.
+  EggGroup *group = DCAST(EggGroup, egg_stack.back());
+  string strval = yyvsp[-1]._string;
+
+  EggGroup::DartType f = EggGroup::string_dart_type(strval);
+  if (f == EggGroup::DT_none) {
+    eggyywarning("Unknown dart type " + strval);
+  } else {
+    group->set_dart_type(f);
+  }
+;
+    break;}
+case 74:
+#line 965 "parser.yxx"
+{
+  EggGroup *group = DCAST(EggGroup, egg_stack.back());
+  int value = (int)yyvsp[-1]._number;
+  group->set_switch_flag(value!=0);
+;
+    break;}
+case 75:
+#line 971 "parser.yxx"
+{
+  EggGroup *group = DCAST(EggGroup, egg_stack.back());
+  string type = yyvsp[-1]._string;
+  group->set_objecttype(type);
+;
+    break;}
+case 76:
+#line 977 "parser.yxx"
+{
+  EggGroup *group = DCAST(EggGroup, egg_stack.back());
+  int value = (int)yyvsp[-1]._number;
+  group->set_model_flag(value!=0);
+;
+    break;}
+case 77:
+#line 983 "parser.yxx"
+{
+  EggGroup *group = DCAST(EggGroup, egg_stack.back());
+  int value = (int)yyvsp[-1]._number;
+  group->set_texlist_flag(value!=0);
+;
+    break;}
+case 81:
+#line 992 "parser.yxx"
+{
+  DCAST(EggGroup, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
+;
+    break;}
+case 82:
+#line 1006 "parser.yxx"
+{
+  EggGroup *group = DCAST(EggGroup, egg_stack.back());
+  string strval = yyvsp[0]._string;
+
+  EggGroup::CollisionSolidType f = EggGroup::string_cs_type(strval);
+  if (f == EggGroup::CST_none) {
+    eggyywarning("Unknown collision solid type " + strval);
+  } else {
+    group->set_cs_type(f);
+  }
+;
+    break;}
+case 84:
+#line 1029 "parser.yxx"
+{
+  EggGroup *group = DCAST(EggGroup, egg_stack.back());
+  string strval = yyvsp[0]._string;
+
+  EggGroup::CollideFlags f = EggGroup::string_collide_flags(strval);
+  if (f == EggGroup::CF_none) {
+    eggyywarning("Unknown collision flag " + strval);
+  } else {
+    group->set_collide_flags(group->get_collide_flags() | f);
+  }
+;
+    break;}
+case 85:
+#line 1051 "parser.yxx"
+{
+  matrix_3d = LMatrix4d::ident_mat();
+;
+    break;}
+case 86:
+#line 1055 "parser.yxx"
+{
+  DCAST(EggGroup, egg_stack.back())->set_transform(matrix_3d);
+;
+    break;}
+case 96:
+#line 1081 "parser.yxx"
+{
+  matrix_3d *= LMatrix4d::translate_mat(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number);
+;
+    break;}
+case 97:
+#line 1087 "parser.yxx"
+{
+  matrix_3d *= LMatrix4d::rotate_mat_normaxis(yyvsp[-1]._number, LVector3d(1.0, 0.0, 0.0));
+;
+    break;}
+case 98:
+#line 1093 "parser.yxx"
+{
+  matrix_3d *= LMatrix4d::rotate_mat_normaxis(yyvsp[-1]._number, LVector3d(0.0, 1.0, 0.0));
+;
+    break;}
+case 99:
+#line 1099 "parser.yxx"
+{
+  matrix_3d *= LMatrix4d::rotate_mat_normaxis(yyvsp[-1]._number, LVector3d(0.0, 0.0, 1.0));
+;
+    break;}
+case 100:
+#line 1105 "parser.yxx"
+{
+  matrix_3d *= LMatrix4d::rotate_mat(yyvsp[-4]._number, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number));
+;
+    break;}
+case 101:
+#line 1111 "parser.yxx"
+{
+  matrix_3d *= LMatrix4d::scale_mat(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number);
+;
+    break;}
+case 104:
+#line 1126 "parser.yxx"
+{
+  matrix_3d *= 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);
+;
+    break;}
+case 107:
+#line 1142 "parser.yxx"
+{
+  matrix_3d *= LMatrix4d(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));
+;
+    break;}
+case 108:
+#line 1159 "parser.yxx"
+{
+  matrix_2d = LMatrix3d::ident_mat();
+;
+    break;}
+case 109:
+#line 1163 "parser.yxx"
+{
+  DCAST(EggTexture, egg_stack.back())->set_transform(matrix_2d);
+;
+    break;}
+case 115:
+#line 1185 "parser.yxx"
+{
+  matrix_2d *= LMatrix3d::translate_mat(yyvsp[-2]._number, yyvsp[-1]._number);
+;
+    break;}
+case 116:
+#line 1191 "parser.yxx"
+{
+  matrix_2d *= LMatrix3d::rotate_mat(yyvsp[-1]._number);
+;
+    break;}
+case 117:
+#line 1197 "parser.yxx"
+{
+  matrix_2d *= LMatrix3d::scale_mat(yyvsp[-2]._number, yyvsp[-1]._number);
+;
+    break;}
+case 120:
+#line 1210 "parser.yxx"
+{
+  matrix_2d *= 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);
+;
+    break;}
+case 121:
+#line 1227 "parser.yxx"
+{
+  if (yyvsp[-2]._egg != (EggVertexPool *)NULL) {
+    EggVertexPool *pool = DCAST(EggVertexPool, yyvsp[-2]._egg);
+    EggGroup *group = DCAST(EggGroup, egg_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_vertex(index);
+      if (vertex == NULL) {
+        ostringstream errmsg;
+        errmsg << "No vertex " << index << " in pool " << pool->get_name() 
+               << ends;
+        eggyyerror(errmsg);
+      } else {
+        group->ref_vertex(vertex, membership);
+      }
+    }
+  }
+;
+    break;}
+case 122:
+#line 1260 "parser.yxx"
+{
+  yyval._number = 1.0;
+;
+    break;}
+case 123:
+#line 1264 "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("Unknown group vertex scalar " + name);
+  }
+
+  yyval._number = result;
+;
+    break;}
+case 125:
+#line 1301 "parser.yxx"
+{
+  EggGroup *group = DCAST(EggGroup, egg_stack.back());
+  group->set_lod(EggSwitchConditionDistance(yyvsp[-8]._number, yyvsp[-7]._number, LPoint3d(yyvsp[-4]._number, yyvsp[-3]._number, yyvsp[-2]._number)));
+;
+    break;}
+case 126:
+#line 1306 "parser.yxx"
+{
+  EggGroup *group = DCAST(EggGroup, egg_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));
+;
+    break;}
+case 127:
+#line 1323 "parser.yxx"
+{
+  egg_stack.push_back(new EggPolygon(yyvsp[0]._string));
+;
+    break;}
+case 128:
+#line 1327 "parser.yxx"
+{
+  yyval._egg = egg_stack.back();
+  egg_stack.pop_back();
+;
+    break;}
+case 129:
+#line 1342 "parser.yxx"
+{
+  egg_stack.push_back(new EggPoint(yyvsp[0]._string));
+;
+    break;}
+case 130:
+#line 1346 "parser.yxx"
+{
+  yyval._egg = egg_stack.back();
+  egg_stack.pop_back();
+;
+    break;}
+case 131:
+#line 1361 "parser.yxx"
+{
+  egg_stack.push_back(new EggNurbsSurface(yyvsp[0]._string));
+;
+    break;}
+case 132:
+#line 1365 "parser.yxx"
+{
+  yyval._egg = egg_stack.back();
+  egg_stack.pop_back();
+;
+    break;}
+case 133:
+#line 1380 "parser.yxx"
+{
+  egg_stack.push_back(new EggNurbsCurve(yyvsp[0]._string));
+;
+    break;}
+case 134:
+#line 1384 "parser.yxx"
+{
+  yyval._egg = egg_stack.back();
+  egg_stack.pop_back();
+;
+    break;}
+case 143:
+#line 1408 "parser.yxx"
+{
+  EggPrimitive *primitive = DCAST(EggPrimitive, egg_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("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("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("Unknown depth-test mode " + strval);
+    } else {
+      primitive->set_depth_test_mode(m);
+    }
+  } 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 {
+    eggyywarning("Unknown scalar " + name);
+  }
+;
+    break;}
+case 155:
+#line 1468 "parser.yxx"
+{
+  EggNurbsCurve *curve = DCAST(EggNurbsCurve, yyvsp[0]._egg);
+  EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back());
+  nurbs->_curves_on_surface.push_back(curve);
+;
+    break;}
+case 157:
+#line 1475 "parser.yxx"
+{
+  EggNurbsSurface *primitive = DCAST(EggNurbsSurface, egg_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("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("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("Unknown depth-test mode " + strval);
+    } else {
+      primitive->set_depth_test_mode(m);
+    }
+  } 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(value);
+  } else if (cmp_nocase_uh(name, "v_subdiv") == 0) {
+    primitive->set_v_subdiv(value);
+  } else {
+    eggyywarning("Unknown scalar " + name);
+  }
+;
+    break;}
+case 168:
+#line 1539 "parser.yxx"
+{
+  EggNurbsCurve *primitive = DCAST(EggNurbsCurve, egg_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("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("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("Unknown depth-test mode " + strval);
+    } else {
+      primitive->set_depth_test_mode(m);
+    }
+  } 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(value);
+  } else if (cmp_nocase_uh(name, "type") == 0) {
+    EggCurve::CurveType a = EggCurve::string_curve_type(strval);
+    if (a == EggCurve::CT_none) {
+      eggyywarning("Unknown curve type " + strval);
+    } else {
+      primitive->set_curve_type(a);
+    }
+    
+  } else {
+    eggyywarning("Unknown scalar " + name);
+  }
+;
+    break;}
+case 169:
+#line 1598 "parser.yxx"
+{
+  if (yyvsp[0]._egg != (EggTexture *)NULL) {
+    EggTexture *texture = DCAST(EggTexture, yyvsp[0]._egg);
+    DCAST(EggPrimitive, egg_stack.back())->set_texture(texture);
+  }
+;
+    break;}
+case 170:
+#line 1615 "parser.yxx"
+{
+  EggTexture *texture = NULL;
+
+  // Defining a texture on-the-fly.
+  Filename filename = yyvsp[0]._string;
+  string tref_name = filename.get_basename();
+
+  Textures::iterator vpi = textures.find(tref_name);
+  if (vpi == textures.end()) {
+    // The texture was not yet defined.  Define it.
+    texture = new EggTexture(tref_name, filename);
+    textures[tref_name] = texture;
+
+    if (egg_top_node != NULL) {
+      egg_top_node->add_child(texture);
+    }
+
+  } else {
+    // The texture already existed.  Use it.
+    texture = (*vpi).second;
+    if (filename != texture->get_filename()) {
+      eggyywarning(string("Using previous path: ") + 
+                   texture->get_filename().get_fullpath());
+    }
+  }
+
+  nassertr(texture != NULL, 0);
+  DCAST(EggPrimitive, egg_stack.back())->set_texture(texture);
+;
+    break;}
+case 171:
+#line 1655 "parser.yxx"
+{
+  if (yyvsp[0]._egg != (EggMaterial *)NULL) {
+    EggMaterial *material = DCAST(EggMaterial, yyvsp[0]._egg);
+    DCAST(EggPrimitive, egg_stack.back())->set_material(material);
+  }
+;
+    break;}
+case 172:
+#line 1672 "parser.yxx"
+{
+  DCAST(EggPrimitive, egg_stack.back())->set_normal(Normald(yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number));
+;
+    break;}
+case 173:
+#line 1676 "parser.yxx"
+{
+  bool inserted = DCAST(EggPrimitive, egg_stack.back())->_dnormals.
+    insert(EggMorphNormal(yyvsp[-5]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
+  if (!inserted) {
+    eggyywarning("Ignoring repeated morph name " + yyvsp[-5]._string);
+  }
+;
+    break;}
+case 174:
+#line 1684 "parser.yxx"
+{
+  bool inserted = DCAST(EggPrimitive, egg_stack.back())->_dnormals.
+    insert(EggMorphNormal(yyvsp[-4]._string, LVector3d(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
+  if (!inserted) {
+    eggyywarning("Ignoring repeated morph name " + yyvsp[-4]._string);
+  }
+;
+    break;}
+case 175:
+#line 1702 "parser.yxx"
+{
+  DCAST(EggPrimitive, egg_stack.back())->set_color(Colorf(yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number, yyvsp[0]._number));
+;
+    break;}
+case 176:
+#line 1706 "parser.yxx"
+{
+  bool inserted = DCAST(EggPrimitive, egg_stack.back())->_drgbas.
+    insert(EggMorphColor(yyvsp[-6]._string, LVector4f(yyvsp[-4]._number, yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
+  if (!inserted) {
+    eggyywarning("Ignoring repeated morph name " + yyvsp[-6]._string);
+  }
+;
+    break;}
+case 177:
+#line 1714 "parser.yxx"
+{
+  bool inserted = DCAST(EggPrimitive, egg_stack.back())->_drgbas.
+    insert(EggMorphColor(yyvsp[-5]._string, LVector4f(yyvsp[-4]._number, yyvsp[-3]._number, yyvsp[-2]._number, yyvsp[-1]._number))).second;
+  if (!inserted) {
+    eggyywarning("Ignoring repeated morph name " + yyvsp[-5]._string);
+  }
+;
+    break;}
+case 178:
+#line 1732 "parser.yxx"
+{
+  EggPrimitive *primitive = DCAST(EggPrimitive, egg_stack.back());
+  int value = (int)yyvsp[0]._number;
+  primitive->set_bface_flag(value!=0);
+;
+    break;}
+case 179:
+#line 1748 "parser.yxx"
+{
+  if (yyvsp[-2]._egg != (EggVertexPool *)NULL) {
+    EggVertexPool *pool = DCAST(EggVertexPool, yyvsp[-2]._egg);
+    EggPrimitive *prim = DCAST(EggPrimitive, egg_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_vertex(index);
+      if (vertex == NULL) {
+        ostringstream errmsg;
+        errmsg << "No vertex " << index << " in pool " << pool->get_name() 
+               << ends;
+        eggyyerror(errmsg);
+      } else {
+        prim->add_vertex(vertex);
+      }
+    }
+  }
+;
+    break;}
+case 180:
+#line 1779 "parser.yxx"
+{
+  EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_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);
+;
+    break;}
+case 181:
+#line 1797 "parser.yxx"
+{
+  EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_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]);
+  }
+;
+    break;}
+case 182:
+#line 1817 "parser.yxx"
+{
+  EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_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]);
+  }
+;
+    break;}
+case 183:
+#line 1837 "parser.yxx"
+{
+  EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back());
+  nurbs->_trims.push_back(EggNurbsSurface::Trim());
+;
+    break;}
+case 185:
+#line 1853 "parser.yxx"
+{
+  EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_stack.back());
+  nassertr(!nurbs->_trims.empty(), 0);
+  nurbs->_trims.back().push_back(EggNurbsSurface::Loop());
+;
+    break;}
+case 186:
+#line 1859 "parser.yxx"
+{
+  EggNurbsSurface *nurbs = DCAST(EggNurbsSurface, egg_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);
+;
+    break;}
+case 187:
+#line 1878 "parser.yxx"
+{
+  EggNurbsCurve *nurbs = DCAST(EggNurbsCurve, egg_stack.back());
+  int order = (int)yyvsp[0]._number;
+  nurbs->set_order(order);
+;
+    break;}
+case 188:
+#line 1894 "parser.yxx"
+{
+  EggNurbsCurve *nurbs = DCAST(EggNurbsCurve, egg_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]);
+  }
+;
+    break;}
+case 189:
+#line 1915 "parser.yxx"
+{
+  EggTable *table = new EggTable(yyvsp[0]._string);
+  table->set_table_type(EggTable::TT_table);
+  egg_stack.push_back(table);
+;
+    break;}
+case 190:
+#line 1921 "parser.yxx"
+{
+  yyval._egg = egg_stack.back();
+  egg_stack.pop_back();
+;
+    break;}
+case 191:
+#line 1937 "parser.yxx"
+{
+  EggTable *table = new EggTable(yyvsp[0]._string);
+  table->set_table_type(EggTable::TT_bundle);
+  egg_stack.push_back(table);
+;
+    break;}
+case 192:
+#line 1943 "parser.yxx"
+{
+  yyval._egg = egg_stack.back();
+  egg_stack.pop_back();
+;
+    break;}
+case 194:
+#line 1960 "parser.yxx"
+{
+  DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
+;
+    break;}
+case 195:
+#line 1964 "parser.yxx"
+{
+  DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
+;
+    break;}
+case 196:
+#line 1968 "parser.yxx"
+{
+  DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
+;
+    break;}
+case 197:
+#line 1972 "parser.yxx"
+{
+  DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
+;
+    break;}
+case 198:
+#line 1976 "parser.yxx"
+{
+  DCAST(EggTable, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
+;
+    break;}
+case 199:
+#line 1991 "parser.yxx"
+{
+  EggSAnimData *anim_data = new EggSAnimData(yyvsp[0]._string);
+  egg_stack.push_back(anim_data);
+;
+    break;}
+case 200:
+#line 1996 "parser.yxx"
+{
+  yyval._egg = egg_stack.back();
+  egg_stack.pop_back();
+;
+    break;}
+case 202:
+#line 2013 "parser.yxx"
+{
+  EggSAnimData *anim_data = DCAST(EggSAnimData, egg_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("Unsupported S$Anim scalar: " + name);
+  }
+;
+    break;}
+case 203:
+#line 2025 "parser.yxx"
+{
+  DCAST(EggSAnimData, egg_stack.back())->set_data(yyvsp[-1]._number_list);
+;
+    break;}
+case 204:
+#line 2039 "parser.yxx"
+{
+  EggXfmAnimData *anim_data = new EggXfmAnimData(yyvsp[0]._string);
+  egg_stack.push_back(anim_data);
+;
+    break;}
+case 205:
+#line 2044 "parser.yxx"
+{
+  yyval._egg = egg_stack.back();
+  egg_stack.pop_back();
+;
+    break;}
+case 207:
+#line 2061 "parser.yxx"
+{
+  EggXfmAnimData *anim_data = DCAST(EggXfmAnimData, egg_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("Unsupported Xfm$Anim scalar: " + name);
+  }
+;
+    break;}
+case 208:
+#line 2078 "parser.yxx"
+{
+  DCAST(EggXfmAnimData, egg_stack.back())->set_data(yyvsp[-1]._number_list);
+;
+    break;}
+case 209:
+#line 2092 "parser.yxx"
+{
+  EggXfmSAnim *anim_group = new EggXfmSAnim(yyvsp[0]._string);
+  egg_stack.push_back(anim_group);
+;
+    break;}
+case 210:
+#line 2097 "parser.yxx"
+{
+  yyval._egg = egg_stack.back();
+  egg_stack.pop_back();
+;
+    break;}
+case 212:
+#line 2114 "parser.yxx"
+{
+  EggXfmSAnim *anim_group = DCAST(EggXfmSAnim, egg_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("Unsupported Xfm$Anim_S$ scalar: " + name);
+  }
+;
+    break;}
+case 213:
+#line 2129 "parser.yxx"
+{
+  DCAST(EggXfmSAnim, egg_stack.back())->add_child(DCAST(EggNode, yyvsp[0]._egg));
+;
+    break;}
+case 214:
+#line 2144 "parser.yxx"
+{
+  yyval._number_list = PTA_double::empty_array(0);
+;
+    break;}
+case 215:
+#line 2148 "parser.yxx"
+{
+  yyval._number_list.push_back((double)yyvsp[0]._number);
+;
+    break;}
+case 216:
+#line 2162 "parser.yxx"
+{
+  yyval._number_list = PTA_double::empty_array(0);
+;
+    break;}
+case 217:
+#line 2166 "parser.yxx"
+{
+  yyval._number_list.push_back(yyvsp[0]._number);
+;
+    break;}
+case 218:
+#line 2180 "parser.yxx"
+{
+  string name = yyvsp[0]._string;
+  Textures::iterator vpi = textures.find(name);
+  if (vpi == textures.end()) {
+    eggyyerror("Unknown texture " + name);
+    yyval._egg = PT(EggObject)();
+  } else {
+    yyval._egg = (*vpi).second;
+  }
+;
+    break;}
+case 219:
+#line 2201 "parser.yxx"
+{
+  string name = yyvsp[0]._string;
+  Materials::iterator vpi = materials.find(name);
+  if (vpi == materials.end()) {
+    eggyyerror("Unknown material " + name);
+    yyval._egg = PT(EggObject)();
+  } else {
+    yyval._egg = (*vpi).second;
+  }
+;
+    break;}
+case 220:
+#line 2222 "parser.yxx"
+{
+  string name = yyvsp[0]._string;
+  VertexPools::iterator vpi = vertex_pools.find(name);
+  if (vpi == vertex_pools.end()) {
+    eggyyerror("Unknown vertex pool " + name);
+    yyval._egg = PT(EggObject)();
+  } else {
+    yyval._egg = (*vpi).second;
+  }
+;
+    break;}
+case 221:
+#line 2244 "parser.yxx"
+{
+  eggyyerror("Name required.");
+  yyval._string = "";
+;
+    break;}
+case 224:
+#line 2273 "parser.yxx"
+{
+  eggyyerror("String required.");
+  yyval._string = "";
+;
+    break;}
+case 226:
+#line 2289 "parser.yxx"
+{
+  yyval._string = "";
+;
+    break;}
+case 228:
+#line 2307 "parser.yxx"
+{
+  yyval._string = yyvsp[0]._string;
+;
+    break;}
+case 230:
+#line 2324 "parser.yxx"
+{
+  yyval._string = "";
+;
+    break;}
+case 231:
+#line 2328 "parser.yxx"
+{
+  yyval._string = yyvsp[0]._string;
+;
+    break;}
+case 232:
+#line 2344 "parser.yxx"
+{
+  yyval._string = yyvsp[0]._string;
+;
+    break;}
+case 233:
+#line 2348 "parser.yxx"
+{
+  yyval._string = yyvsp[-1]._string + "\n" + yyvsp[0]._string;
+;
+    break;}
+case 235:
+#line 2373 "parser.yxx"
+{
+  yyval._number = yyvsp[0]._number;
+  yyval._string = yyvsp[0]._string;
+;
+    break;}
+case 236:
+#line 2378 "parser.yxx"
+{
+  yyval._number = 0.0;
+  yyval._string = yyvsp[0]._string;
+;
+    break;}
+case 237:
+#line 2394 "parser.yxx"
+{
+  int i = (int)yyvsp[0]._number;
+  if ((double)i != yyvsp[0]._number) {
+    eggyywarning("Integer expected.");
+    yyval._number = (double)i;
+  }
+;
+    break;}
+}
+   /* the action file gets copied in in place of this dollarsign */
+#line 543 "/usr/share/bison.simple"
+
+  yyvsp -= yylen;
+  yyssp -= yylen;
+#ifdef YYLSP_NEEDED
+  yylsp -= yylen;
+#endif
+
+#if YYDEBUG != 0
+  if (yydebug)
+    {
+      short *ssp1 = yyss - 1;
+      fprintf (stderr, "state stack now");
+      while (ssp1 != yyssp)
+	fprintf (stderr, " %d", *++ssp1);
+      fprintf (stderr, "\n");
+    }
+#endif
+
+  *++yyvsp = yyval;
+
+#ifdef YYLSP_NEEDED
+  yylsp++;
+  if (yylen == 0)
+    {
+      yylsp->first_line = yylloc.first_line;
+      yylsp->first_column = yylloc.first_column;
+      yylsp->last_line = (yylsp-1)->last_line;
+      yylsp->last_column = (yylsp-1)->last_column;
+      yylsp->text = 0;
+    }
+  else
+    {
+      yylsp->last_line = (yylsp+yylen-1)->last_line;
+      yylsp->last_column = (yylsp+yylen-1)->last_column;
+    }
+#endif
+
+  /* Now "shift" the result of the reduction.
+     Determine what state that goes to,
+     based on the state we popped back to
+     and the rule number reduced by.  */
+
+  yyn = yyr1[yyn];
+
+  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
+  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+    yystate = yytable[yystate];
+  else
+    yystate = yydefgoto[yyn - YYNTBASE];
+
+  goto yynewstate;
+
+yyerrlab:   /* here on detecting error */
+
+  if (! yyerrstatus)
+    /* If not already recovering from an error, report this error.  */
+    {
+      ++yynerrs;
+
+#ifdef YYERROR_VERBOSE
+      yyn = yypact[yystate];
+
+      if (yyn > YYFLAG && yyn < YYLAST)
+	{
+	  int size = 0;
+	  char *msg;
+	  int x, count;
+
+	  count = 0;
+	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
+	  for (x = (yyn < 0 ? -yyn : 0);
+	       x < (sizeof(yytname) / sizeof(char *)); x++)
+	    if (yycheck[x + yyn] == x)
+	      size += strlen(yytname[x]) + 15, count++;
+	  msg = (char *) malloc(size + 15);
+	  if (msg != 0)
+	    {
+	      strcpy(msg, "parse error");
+
+	      if (count < 5)
+		{
+		  count = 0;
+		  for (x = (yyn < 0 ? -yyn : 0);
+		       x < (sizeof(yytname) / sizeof(char *)); x++)
+		    if (yycheck[x + yyn] == x)
+		      {
+			strcat(msg, count == 0 ? ", expecting `" : " or `");
+			strcat(msg, yytname[x]);
+			strcat(msg, "'");
+			count++;
+		      }
+		}
+	      yyerror(msg);
+	      free(msg);
+	    }
+	  else
+	    yyerror ("parse error; also virtual memory exceeded");
+	}
+      else
+#endif /* YYERROR_VERBOSE */
+	yyerror("parse error");
+    }
+
+  goto yyerrlab1;
+yyerrlab1:   /* here on error raised explicitly by an action */
+
+  if (yyerrstatus == 3)
+    {
+      /* if just tried and failed to reuse lookahead token after an error, discard it.  */
+
+      /* return failure if at end of input */
+      if (yychar == YYEOF)
+	YYABORT;
+
+#if YYDEBUG != 0
+      if (yydebug)
+	fprintf(stderr, "Discarding token %d (%s).\n", yychar, yytname[yychar1]);
+#endif
+
+      yychar = YYEMPTY;
+    }
+
+  /* Else will try to reuse lookahead token
+     after shifting the error token.  */
+
+  yyerrstatus = 3;		/* Each real token shifted decrements this */
+
+  goto yyerrhandle;
+
+yyerrdefault:  /* current state does not do anything special for the error token. */
+
+#if 0
+  /* This is wrong; only states that explicitly want error tokens
+     should shift them.  */
+  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
+  if (yyn) goto yydefault;
+#endif
+
+yyerrpop:   /* pop the current state because it cannot handle the error token */
+
+  if (yyssp == yyss) YYABORT;
+  yyvsp--;
+  yystate = *--yyssp;
+#ifdef YYLSP_NEEDED
+  yylsp--;
+#endif
+
+#if YYDEBUG != 0
+  if (yydebug)
+    {
+      short *ssp1 = yyss - 1;
+      fprintf (stderr, "Error: state stack now");
+      while (ssp1 != yyssp)
+	fprintf (stderr, " %d", *++ssp1);
+      fprintf (stderr, "\n");
+    }
+#endif
+
+yyerrhandle:
+
+  yyn = yypact[yystate];
+  if (yyn == YYFLAG)
+    goto yyerrdefault;
+
+  yyn += YYTERROR;
+  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
+    goto yyerrdefault;
+
+  yyn = yytable[yyn];
+  if (yyn < 0)
+    {
+      if (yyn == YYFLAG)
+	goto yyerrpop;
+      yyn = -yyn;
+      goto yyreduce;
+    }
+  else if (yyn == 0)
+    goto yyerrpop;
+
+  if (yyn == YYFINAL)
+    YYACCEPT;
+
+#if YYDEBUG != 0
+  if (yydebug)
+    fprintf(stderr, "Shifting error token, ");
+#endif
+
+  *++yyvsp = yylval;
+#ifdef YYLSP_NEEDED
+  *++yylsp = yylloc;
+#endif
+
+  yystate = yyn;
+  goto yynewstate;
+
+ yyacceptlab:
+  /* YYACCEPT comes here.  */
+  if (yyfree_stacks)
+    {
+      free (yyss);
+      free (yyvs);
+#ifdef YYLSP_NEEDED
+      free (yyls);
+#endif
+    }
+  return 0;
+
+ yyabortlab:
+  /* YYABORT comes here.  */
+  if (yyfree_stacks)
+    {
+      free (yyss);
+      free (yyvs);
+#ifdef YYLSP_NEEDED
+      free (yyls);
+#endif
+    }
+  return 1;
+}
+#line 2405 "parser.yxx"

+ 83 - 0
panda/src/egg/parser.h.prebuilt

@@ -0,0 +1,83 @@
+#define	NUMBER	257
+#define	STRING	258
+#define	BEZIERCURVE	259
+#define	BFACE	260
+#define	BILLBOARD	261
+#define	BILLBOARDCENTER	262
+#define	BUNDLE	263
+#define	CLOSED	264
+#define	COLLIDE	265
+#define	COMMENT	266
+#define	COORDSYSTEM	267
+#define	CV	268
+#define	DART	269
+#define	DNORMAL	270
+#define	DRGBA	271
+#define	DUV	272
+#define	DXYZ	273
+#define	DCS	274
+#define	DISTANCE	275
+#define	DTREF	276
+#define	DYNAMICVERTEXPOOL	277
+#define	EXTERNAL_FILE	278
+#define	FLIGHT	279
+#define	GROUP	280
+#define	HIP	281
+#define	INTANGENT	282
+#define	JOINT	283
+#define	KNOTS	284
+#define	INCLUDE	285
+#define	INSTANCE	286
+#define	LOOP	287
+#define	MATERIAL	288
+#define	MATRIX3	289
+#define	MATRIX4	290
+#define	MODEL	291
+#define	MREF	292
+#define	NORMAL	293
+#define	NURBSCURVE	294
+#define	NURBSSURFACE	295
+#define	OBJECTTYPE	296
+#define	ORDER	297
+#define	OUTTANGENT	298
+#define	POINTLIGHT	299
+#define	POLYGON	300
+#define	REF	301
+#define	RGBA	302
+#define	ROTATE	303
+#define	ROTX	304
+#define	ROTY	305
+#define	ROTZ	306
+#define	SANIM	307
+#define	SCALAR	308
+#define	SCALE	309
+#define	SEQUENCE	310
+#define	SHADING	311
+#define	SWITCH	312
+#define	SWITCHCONDITION	313
+#define	TABLE	314
+#define	TABLE_V	315
+#define	TEXLIST	316
+#define	TEXTURE	317
+#define	TLENGTHS	318
+#define	TRANSFORM	319
+#define	TRANSLATE	320
+#define	TREF	321
+#define	TRIM	322
+#define	TXT	323
+#define	UKNOTS	324
+#define	UV	325
+#define	VKNOTS	326
+#define	VERTEX	327
+#define	VERTEXANIM	328
+#define	VERTEXPOOL	329
+#define	VERTEXREF	330
+#define	XFMANIM	331
+#define	XFMSANIM	332
+#define	START_EGG	333
+#define	START_GROUP_BODY	334
+#define	START_TEXTURE_BODY	335
+#define	START_PRIMITIVE_BODY	336
+
+
+extern YYSTYPE eggyylval;