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, 19 insertions, 9 deletions
diff --git a/LuaSL/src/LuaSL_LSL_tree.h b/LuaSL/src/LuaSL_LSL_tree.h
index 7973509..42cf0ac 100644
--- a/LuaSL/src/LuaSL_LSL_tree.h
+++ b/LuaSL/src/LuaSL_LSL_tree.h
@@ -8,7 +8,17 @@
8#define YY_NO_UNISTD_H 1 8#define YY_NO_UNISTD_H 1
9#endif // YY_NO_UNISTD_H 9#endif // YY_NO_UNISTD_H
10 10
11//#define LUASL_USE_ENUM
12#define LUASL_DEBUG
13
14#ifndef LUASL_USE_ENUM
11#include "LuaSL_yaccer.tab.h" 15#include "LuaSL_yaccer.tab.h"
16#endif
17
18#define YYERRCODE 256
19#define YYDEBUG 1
20extern int yydebug;
21
12 22
13// http://w-hat.com/stackdepth is a useful discussion about some aspects of the LL parser. 23// http://w-hat.com/stackdepth is a useful discussion about some aspects of the LL parser.
14 24
@@ -22,12 +32,12 @@ typedef enum
22 LSL_CREATION = 16 32 LSL_CREATION = 16
23} LSL_Flags; 33} LSL_Flags;
24 34
25/* 35#ifdef LUASL_USE_ENUM
26typedef enum // In order of precedence, high to low. 36typedef enum // In order of precedence, high to low.
27 // Left to right, unless oterwise stated. 37 // Left to right, unless oterwise stated.
28 // According to http://wiki.secondlife.com/wiki/Category:LSL_Operators 38 // According to http://wiki.secondlife.com/wiki/Category:LSL_Operators
29{ 39{
30 LSL_COMMA, 40 LSL_COMMA = 257,
31 LSL_INCREMENT_PRE, // Right to left. 41 LSL_INCREMENT_PRE, // Right to left.
32 LSL_INCREMENT_POST, // Right to left. 42 LSL_INCREMENT_POST, // Right to left.
33 LSL_DECREMENT_PRE, // Right to left. 43 LSL_DECREMENT_PRE, // Right to left.
@@ -72,9 +82,9 @@ typedef enum // In order of precedence, high to low.
72 LSL_BOOL_OR, 82 LSL_BOOL_OR,
73 LSL_BOOL_AND 83 LSL_BOOL_AND
74} LSL_Operation; 84} LSL_Operation;
75*/ 85#else
76
77typedef int LSL_Operation; 86typedef int LSL_Operation;
87#endif
78 88
79typedef struct 89typedef struct
80{ 90{
@@ -137,10 +147,11 @@ LSL_Operator LSL_Tokens[] =
137}; 147};
138#endif 148#endif
139 149
140/* 150
151#ifdef LUASL_USE_ENUM
141typedef enum 152typedef enum
142{ 153{
143 LSL_COMMENT, 154 LSL_COMMENT = (LSL_BOOL_AND + 1),
144 LSL_TYPE, 155 LSL_TYPE,
145 LSL_NAME, 156 LSL_NAME,
146 LSL_IDENTIFIER, 157 LSL_IDENTIFIER,
@@ -169,11 +180,10 @@ typedef enum
169 LSL_STATE, 180 LSL_STATE,
170 LSL_SCRIPT 181 LSL_SCRIPT
171} LSL_Type; 182} LSL_Type;
172*/ 183#else
173
174typedef int LSL_Type; 184typedef int LSL_Type;
175#define LSL_EXPRESSION 1 185#define LSL_EXPRESSION 1
176 186#endif
177 187
178#ifdef LSL_Keywords_define 188#ifdef LSL_Keywords_define
179char *LSL_Keywords[] = 189char *LSL_Keywords[] =