Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/egg/parserDefs.h

Go to the documentation of this file.
00001 // Filename: parserDefs.h
00002 // Created by:  drose (17Jan99)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef PARSER_H
00020 #define PARSER_H
00021 
00022 #include <pandabase.h>
00023 
00024 #include "eggObject.h"
00025 
00026 #include <pointerTo.h>
00027 #include <pointerToArray.h>
00028 #include <pta_double.h>
00029 
00030 #include <string>
00031 
00032 class EggGroupNode;
00033 
00034 void egg_init_parser(istream &in, const string &filename,
00035                      EggObject *tos, EggGroupNode *egg_top_node);
00036 
00037 void egg_cleanup_parser();
00038 
00039 // This structure holds the return value for each token.
00040 // Traditionally, this is a union, and is declared with the %union
00041 // declaration in the parser.y file, but unions are pretty worthless
00042 // in C++ (you can't include an object that has member functions in a
00043 // union), so we'll use a class instead.  That means we need to
00044 // declare it externally, here.
00045 
00046 class EXPCL_PANDAEGG EggTokenType {
00047 public:
00048   double _number;
00049   unsigned long _ulong;
00050   string _string;
00051   PT(EggObject) _egg;
00052   PTA_double _number_list;
00053 };
00054 
00055 // The yacc-generated code expects to use the symbol 'YYSTYPE' to
00056 // refer to the above class.
00057 #define YYSTYPE EggTokenType
00058 
00059 #endif

Generated on Fri May 2 00:38:07 2003 for Panda by doxygen1.3