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