From 08930c34941a930bdedcee532adc92f72b6e483a Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Mon, 23 Jan 2012 20:08:18 +1000 Subject: Get the dot operator stubbed out so it parses. --- LuaSL/src/LuaSL_lemon_yaccer.y | 2 +- LuaSL/src/constants.lsl | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) 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 statement(A) ::= type(B) LSL_IDENTIFIER(C) LSL_STATEMENT(F). { A = addStatement(F, LSL_IDENTIFIER, addVariable(compiler, B, C, NULL, NULL)); } %right LSL_DOT LSL_IDENTIFIER LSL_FUNCTION_CALL. -identifier ::= identifier LSL_DOT LSL_IDENTIFIER. +identifier(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. identifier(A) ::= LSL_IDENTIFIER(B). { A = checkVariable(compiler, B); } %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"; rotation ZERO_ROTATION = <0.0, 0.0, 0.0, 1.0>; vector ZERO_VECTOR = <0.0, 0.0, 0.0>; +// Temporary dummy variables to got vector and rotation thingies to work for now. + +float s = 1.0; +float x = 0.0; +float y = 0.0; +float z = 0.0; + // Functions. float llPow(float number, float places){} -- cgit v1.1