%{ #include "linden_common.h" #include "lscript_tree.h" #ifdef __cplusplus extern "C" { #endif int yylex(void); int yyparse( void ); int yyerror(const char *fmt, ...); #if LL_LINUX // broken yacc codegen... --ryan. #define getenv getenv_workaround #endif #ifdef LL_WINDOWS #pragma warning (disable : 4702) // warning C4702: unreachable code #pragma warning( disable : 4065 ) // warning: switch statement contains 'default' but no 'case' labels #endif #ifdef __cplusplus } #endif %} %union { S32 ival; F32 fval; char *sval; class LLScriptType *type; class LLScriptConstant *constant; class LLScriptIdentifier *identifier; class LLScriptSimpleAssignable *assignable; class LLScriptGlobalVariable *global; class LLScriptEvent *event; class LLScriptEventHandler *handler; class LLScriptExpression *expression; class LLScriptStatement *statement; class LLScriptGlobalFunctions *global_funcs; class LLScriptFunctionDec *global_decl; class LLScriptState *state; class LLScritpGlobalStorage *global_store; class LLScriptScript *script; }; %token INTEGER %token FLOAT_TYPE %token STRING %token LLKEY %token VECTOR %token QUATERNION %token LIST %token STATE %token EVENT %token JUMP %token RETURN %token STATE_ENTRY %token STATE_EXIT %token TOUCH_START %token TOUCH %token TOUCH_END %token COLLISION_START %token COLLISION %token COLLISION_END %token LAND_COLLISION_START %token LAND_COLLISION %token LAND_COLLISION_END %token TIMER %token CHAT %token SENSOR %token NO_SENSOR %token CONTROL %token AT_TARGET %token NOT_AT_TARGET %token AT_ROT_TARGET %token NOT_AT_ROT_TARGET %token MONEY %token EMAIL %token RUN_TIME_PERMISSIONS %token INVENTORY %token ATTACH %token DATASERVER %token MOVING_START %token MOVING_END %token REZ %token OBJECT_REZ %token LINK_MESSAGE %token REMOTE_DATA %token HTTP_RESPONSE %token IDENTIFIER %token STATE_DEFAULT %token INTEGER_CONSTANT %token INTEGER_TRUE %token INTEGER_FALSE %token FP_CONSTANT %token STRING_CONSTANT %token INC_OP %token DEC_OP %token ADD_ASSIGN %token SUB_ASSIGN %token MUL_ASSIGN %token DIV_ASSIGN %token MOD_ASSIGN %token EQ %token NEQ %token GEQ %token LEQ %token BOOLEAN_AND %token BOOLEAN_OR %token SHIFT_LEFT %token SHIFT_RIGHT %token IF %token ELSE %token FOR %token DO %token WHILE %token PRINT %token PERIOD %token ZERO_VECTOR %token ZERO_ROTATION %nonassoc LOWER_THAN_ELSE %nonassoc ELSE %type