From f496ed1880d0140b171dd96642692a155fb85104 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sat, 21 Jan 2012 10:57:19 +1000 Subject: Make vectors and rotations parse. --- LuaSL/src/LuaSL_lemon_yaccer.y | 5 +++-- LuaSL/src/constants.lsl | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/LuaSL/src/LuaSL_lemon_yaccer.y b/LuaSL/src/LuaSL_lemon_yaccer.y index eafab12..54af56d 100644 --- a/LuaSL/src/LuaSL_lemon_yaccer.y +++ b/LuaSL/src/LuaSL_lemon_yaccer.y @@ -190,12 +190,13 @@ expr(A) ::= LSL_KEY(B). { B->basicType = OT_key; A = B; } %nonassoc LSL_LIST. expr ::= LSL_BRACKET_OPEN exprList LSL_BRACKET_CLOSE. [LSL_BRACKET_OPEN] %nonassoc LSL_ROTATION. -expr ::= LSL_ANGLE_OPEN expr LSL_COMMA expr LSL_COMMA expr LSL_COMMA expr LSL_ANGLE_CLOSE. [LSL_ANGLE_OPEN] +// Uses the same symbol for less than, greater than, and the rotation / vector delimiters. +expr ::= LSL_LESS_THAN expr LSL_COMMA expr LSL_COMMA expr LSL_COMMA expr LSL_GREATER_THAN. [LSL_ANGLE_OPEN] %nonassoc LSL_STRING. expr(A) ::= LSL_STRING(B). { B->basicType = OT_string; A = B; } %nonassoc LSL_VECTOR. expr ::= LSL_VECTOR. -expr ::= LSL_ANGLE_OPEN expr LSL_COMMA expr LSL_COMMA expr LSL_ANGLE_CLOSE. [LSL_ANGLE_OPEN] +expr ::= LSL_LESS_THAN expr LSL_COMMA expr LSL_COMMA expr LSL_GREATER_THAN. [LSL_ANGLE_OPEN] // Parser callbacks. diff --git a/LuaSL/src/constants.lsl b/LuaSL/src/constants.lsl index 5caf962..3b2f5a8 100644 --- a/LuaSL/src/constants.lsl +++ b/LuaSL/src/constants.lsl @@ -18,6 +18,6 @@ integer FALSE = 0; string NULL_KEY = "00000000-0000-0000-0000-000000000000"; 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>; +rotation ZERO_ROTATION = <0.0, 0.0, 0.0, 1.0>; +vector ZERO_VECTOR = <0.0, 0.0, 0.0>; -- cgit v1.1