aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-23 20:08:18 +1000
committerDavid Walter Seikel2012-01-23 20:08:18 +1000
commit08930c34941a930bdedcee532adc92f72b6e483a (patch)
treee7ba076923e9edb4257c3ba1d94b933263591fb5 /LuaSL
parentStub lists so they work, probaly needs more work. (diff)
downloadSledjHamr-08930c34941a930bdedcee532adc92f72b6e483a.zip
SledjHamr-08930c34941a930bdedcee532adc92f72b6e483a.tar.gz
SledjHamr-08930c34941a930bdedcee532adc92f72b6e483a.tar.bz2
SledjHamr-08930c34941a930bdedcee532adc92f72b6e483a.tar.xz
Get the dot operator stubbed out so it parses.
Diffstat (limited to 'LuaSL')
-rw-r--r--LuaSL/src/LuaSL_lemon_yaccer.y2
-rw-r--r--LuaSL/src/constants.lsl7
2 files changed, 8 insertions, 1 deletions
diff --git a/LuaSL/src/LuaSL_lemon_yaccer.y b/LuaSL/src/LuaSL_lemon_yaccer.y
index e2af75e..a9caaa4 100644
--- a/LuaSL/src/LuaSL_lemon_yaccer.y
+++ b/LuaSL/src/LuaSL_lemon_yaccer.y
@@ -175,7 +175,7 @@ statement(A) ::= type(B) LSL_IDENTIFIER(C) LSL_ASSIGNMENT_PLAIN(D) expr(E) LSL_S
175statement(A) ::= type(B) LSL_IDENTIFIER(C) LSL_STATEMENT(F). { A = addStatement(F, LSL_IDENTIFIER, addVariable(compiler, B, C, NULL, NULL)); } 175statement(A) ::= type(B) LSL_IDENTIFIER(C) LSL_STATEMENT(F). { A = addStatement(F, LSL_IDENTIFIER, addVariable(compiler, B, C, NULL, NULL)); }
176 176
177%right LSL_DOT LSL_IDENTIFIER LSL_FUNCTION_CALL. 177%right LSL_DOT LSL_IDENTIFIER LSL_FUNCTION_CALL.
178identifier ::= identifier LSL_DOT LSL_IDENTIFIER. 178identifier(A) ::= identifier LSL_DOT LSL_IDENTIFIER(B). { A = checkVariable(compiler, B); A->basicType = OT_float; } // Just a stub to get it to work for now.
179identifier(A) ::= LSL_IDENTIFIER(B). { A = checkVariable(compiler, B); } 179identifier(A) ::= LSL_IDENTIFIER(B). { A = checkVariable(compiler, B); }
180 180
181%right LSL_DECREMENT_PRE LSL_INCREMENT_PRE LSL_DECREMENT_POST LSL_INCREMENT_POST. 181%right LSL_DECREMENT_PRE LSL_INCREMENT_PRE LSL_DECREMENT_POST LSL_INCREMENT_POST.
diff --git a/LuaSL/src/constants.lsl b/LuaSL/src/constants.lsl
index 682fa05..a3b01e4 100644
--- a/LuaSL/src/constants.lsl
+++ b/LuaSL/src/constants.lsl
@@ -160,6 +160,13 @@ string EOF = "\n\n\n";
160rotation ZERO_ROTATION = <0.0, 0.0, 0.0, 1.0>; 160rotation ZERO_ROTATION = <0.0, 0.0, 0.0, 1.0>;
161vector ZERO_VECTOR = <0.0, 0.0, 0.0>; 161vector ZERO_VECTOR = <0.0, 0.0, 0.0>;
162 162
163// Temporary dummy variables to got vector and rotation thingies to work for now.
164
165float s = 1.0;
166float x = 0.0;
167float y = 0.0;
168float z = 0.0;
169
163// Functions. 170// Functions.
164 171
165float llPow(float number, float places){} 172float llPow(float number, float places){}