Panda3D
 All Classes Functions Variables Enumerations
parserDefs.h
1 // Filename: parserDefs.h
2 // Created by: drose (17Jan99)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #ifndef PARSER_H
16 #define PARSER_H
17 
18 #include "pandabase.h"
19 
20 #include "eggObject.h"
21 
22 #include "pointerTo.h"
23 #include "pointerToArray.h"
24 #include "pta_double.h"
25 
26 #include <string>
27 
28 class EggGroupNode;
29 class LightMutex;
30 
31 extern LightMutex egg_lock;
32 
33 void egg_init_parser(istream &in, const string &filename,
34  EggObject *tos, EggGroupNode *egg_top_node);
35 
36 void egg_cleanup_parser();
37 
38 // This structure holds the return value for each token.
39 // Traditionally, this is a union, and is declared with the %union
40 // declaration in the parser.y file, but unions are pretty worthless
41 // in C++ (you can't include an object that has member functions in a
42 // union), so we'll use a class instead. That means we need to
43 // declare it externally, here.
44 
45 class EXPCL_PANDAEGG EggTokenType {
46 public:
47  double _number;
48  unsigned long _ulong;
49  string _string;
50  PT(EggObject) _egg;
51  PTA_double _number_list;
52 };
53 
54 // The yacc-generated code expects to use the symbol 'YYSTYPE' to
55 // refer to the above class.
56 #define YYSTYPE EggTokenType
57 
58 #endif
A base class for nodes in the hierarchy that are not leaf nodes.
Definition: eggGroupNode.h:51
This is a standard, non-reentrant mutex, similar to the Mutex class.
Definition: lightMutex.h:45
The highest-level base class in the egg directory.
Definition: eggObject.h:31