"L. Spiro Engine"

F:/My Projects/LSEngine/Modules/LSGraphicsLib/Src/PreProc/LSGPreProcSyntaxNodes.h

00001 
00016 #ifndef __LSG_PREPROCSYNTAXNODES_H__
00017 #define __LSG_PREPROCSYNTAXNODES_H__
00018 
00019 #include "../LSGGraphicsLib.h"
00020 
00021 
00022 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00023 // MACROS
00024 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00025 #ifndef yy
00026 #define yy                                                                                                                              lsg
00027 #endif  // #ifndef yy
00028 #ifdef YYSTYPE
00029 #undef YYSTYPE
00030 #endif  // #ifdef YYSTYPE
00031 #define YYSTYPE                                                                                                                 LSG_PREPROC_SYNTAX_NODES
00032 
00033 namespace lsg {
00034 
00038         enum LSG_PREPROC_NODE {
00039                 LSG_PPN_IDENTIFIER,
00040                 LSG_PPN_NUMERICCONSTANT,
00041                 LSG_PPN_UNARY,
00042                 LSG_PPN_MATH,
00043                 LSG_PPN_TERTIARY,
00044                 LSG_PPN_DEFINED,
00045                 LSG_PPN_TU
00046         };
00047 
00051         enum LSG_PREPROC_NUM_CONSTANTS {
00052                 LSG_PPNC_SIGNED,
00053                 LSG_PPNC_UNSIGNED,
00054                 LSG_PPNC_FLOATING,
00055                 LSG_PPNC_INVALID,
00056         };
00057 
00061         union YYSTYPE {
00062                 LSUINT64                                                                                                                ui64Op;                         // Operators (mainly unary).
00063 
00064                 struct LSG_NODE_DATA {
00065                         LSG_PREPROC_NODE                                                                                        ppnNodeType;            // One of the LSG_PPN_* constants.
00066                         LSUINT32                                                                                                        ui32NodeIndex;          // Index of the node within the stack of nodes.
00067                         union LSG_NODE_UNION {
00068                                 LSUINT32                                                                                                ui32IdentifierIndex;// Index of an identifier in the master list of identifiers.
00069                                 LSUINT64                                                                                                ui64Const;                      // Value of unsigned constant numeric.
00070                                 LSINT64                                                                                                 i64Const;                       // Value of signed constant numeric.
00071                                 LSDOUBLE                                                                                                dConst;                         // Value of floating-point numeric.
00072                                 LSUINT32                                                                                                ui32UnaryOp;            // Unary operator.
00073                                 LSUINT32                                                                                                ui32NodeIndex;          // Index of a node.  Multi-purpose.
00074                         }                                                                                                                       nuNodeData;                     // Node data.
00075                         union LSG_NODE_UNION_EX {
00076                                 LSG_PREPROC_NUM_CONSTANTS                                                               ncConstantType;         // Whether the given numeric constant is signed, unsigned, or floating.
00077                                 LSUINT32                                                                                                ui32NodeIndexEx;        // Index of a node.  Multi-purpose.
00078                         }                                                                                                                       nueNodeDataEx;
00079                         union LSG_NODE_UNION_OP {
00080                                 LSUINT32                                                                                                ui32Op;                         // Operator.
00081                                 LSUINT32                                                                                                ui32NodeIndex3;         // Tertiary expression and initializer index in single declarations.
00082                         }                                                                                                                       nuoOp;
00083                 }                                                                                                                               ndData;
00084         };
00085 
00086 
00087 }       // namespace lsg
00088 
00089 #endif  // __LSG_PREPROCSYNTAXNODES_H__
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator