aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LuaSL_LSL_tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'LuaSL/src/LuaSL_LSL_tree.h')
-rw-r--r--LuaSL/src/LuaSL_LSL_tree.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h
index 597db54..0b2f125 100644
--- a/LuaSL/src/LuaSL_LSL_tree.h
+++ b/LuaSL/src/LuaSL_LSL_tree.h
@@ -89,16 +89,12 @@ typedef enum // In order of precedence, high to low.
89 LSL_BIT_XOR, 89 LSL_BIT_XOR,
90 LSL_BIT_OR, 90 LSL_BIT_OR,
91 LSL_BOOL_OR, 91 LSL_BOOL_OR,
92 LSL_BOOL_AND 92 LSL_BOOL_AND,
93} LSL_Operation;
94#else
95typedef int LSL_Operation;
96#endif
97 93
98#ifdef LUASL_USE_ENUM 94 // The rest are not operater types.
99typedef enum 95
100{ 96 LSL_SPACE,
101 LSL_COMMENT = (LSL_BOOL_AND + 1), 97 LSL_COMMENT,
102 LSL_TYPE, 98 LSL_TYPE,
103 LSL_NAME, 99 LSL_NAME,
104 LSL_IDENTIFIER, 100 LSL_IDENTIFIER,
@@ -125,7 +121,8 @@ typedef enum
125 LSL_PARAMETER, 121 LSL_PARAMETER,
126 LSL_FUNCTION, 122 LSL_FUNCTION,
127 LSL_STATE, 123 LSL_STATE,
128 LSL_SCRIPT 124 LSL_SCRIPT,
125 LSL_UNKNOWN
129} LSL_Type; 126} LSL_Type;
130#else 127#else
131typedef int LSL_Type; 128typedef int LSL_Type;
@@ -166,6 +163,7 @@ typedef struct
166 163
167typedef union LSL_Leaf 164typedef union LSL_Leaf
168{ 165{
166 char *spaceValue;
169 char *commentValue; 167 char *commentValue;
170 LSL_Type typeValue; 168 LSL_Type typeValue;
171 char *nameValue; 169 char *nameValue;
@@ -178,7 +176,7 @@ typedef union LSL_Leaf
178 float rotationValue[4]; 176 float rotationValue[4];
179 union LSL_Leaf *listValue; 177 union LSL_Leaf *listValue;
180 char *labelValue; 178 char *labelValue;
181 LSL_Operation operationValue; 179 LSL_Type operationValue;
182 struct LSL_AST *expressionValue; 180 struct LSL_AST *expressionValue;
183 LSL_Statement *doValue; 181 LSL_Statement *doValue;
184 LSL_Statement *forValue; 182 LSL_Statement *forValue;
@@ -192,6 +190,7 @@ typedef union LSL_Leaf
192 LSL_Function *functionValue; 190 LSL_Function *functionValue;
193 LSL_State *stateValue; 191 LSL_State *stateValue;
194 LSL_Script *scriptValue; 192 LSL_Script *scriptValue;
193 char *unknownValue;
195} LSL_Leaf; 194} LSL_Leaf;
196 195
197typedef struct 196typedef struct
@@ -257,10 +256,11 @@ typedef struct
257 256
258LSL_AST *addExpression(LSL_AST *exp); 257LSL_AST *addExpression(LSL_AST *exp);
259LSL_AST *addInteger(int value); 258LSL_AST *addInteger(int value);
260LSL_AST *addOperation(LSL_Operation type, LSL_AST *left, LSL_AST *right); 259LSL_AST *addOperation(LSL_Type type, LSL_AST *left, LSL_AST *right);
261LSL_AST *addParenthesis(LSL_AST *expr); 260LSL_AST *addParenthesis(LSL_AST *expr);
262LSL_Statement *createStatement(LSL_Type type, LSL_AST *expr); 261LSL_Statement *createStatement(LSL_Type type, LSL_AST *root);
263LSL_AST *addStatement(LSL_Statement *statement, LSL_AST *left); 262LSL_AST *addStatement(LSL_Statement *statement, LSL_AST *root);
263LSL_AST *addSpace(char *text, LSL_AST *root);
264 264
265int yyerror(const char *msg); 265int yyerror(const char *msg);
266int yyparse(void *param); 266int yyparse(void *param);