diff options
| -rwxr-xr-x | indra/lscript/lscript_compile/indra.l | 34 | 
1 files changed, 17 insertions, 17 deletions
| diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l index 9cbddb60e2..6fbdf13df7 100755 --- a/indra/lscript/lscript_compile/indra.l +++ b/indra/lscript/lscript_compile/indra.l @@ -685,23 +685,6 @@ int yyerror(const char *fmt, ...);  "PRIM_MEDIA_MAX_WIDTH_PIXELS"        { count(); yylval.ival = LLMediaEntry::MAX_WIDTH_PIXELS; return(INTEGER_CONSTANT); }  "PRIM_MEDIA_MAX_HEIGHT_PIXELS"       { count(); yylval.ival = LLMediaEntry::MAX_HEIGHT_PIXELS; return(INTEGER_CONSTANT); } -"XP_ERROR_NONE"                      { char* sval= "no error";                                yylval.sval = new char[strlen(sval)]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } -"XP_ERROR_THROTTLED"                 { char* sval= "exceeded throttle";                       yylval.sval = new char[strlen(sval)]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } -"XP_ERROR_EXPERIENCES_DISABLED"      { char* sval= "experiences are disabled";                yylval.sval = new char[strlen(sval)]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } -"XP_ERROR_INVALID_PARAMETERS"        { char* sval= "invalid parameters";                      yylval.sval = new char[strlen(sval)]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } -"XP_ERROR_NOT_PERMITTED"             { char* sval= "operation not permitted";                 yylval.sval = new char[strlen(sval)]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } -"XP_ERROR_NO_EXPERIENCE"             { char* sval= "script not associated with an experience";yylval.sval = new char[strlen(sval)]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } -"XP_ERROR_NOT_FOUND"                 { char* sval= "not found";                               yylval.sval = new char[strlen(sval)]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } -"XP_ERROR_INVALID_EXPERIENCE"        { char* sval= "invalid experience";                      yylval.sval = new char[strlen(sval)]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } -"XP_ERROR_EXPERIENCE_DISABLED"       { char* sval= "experience is disabled";                  yylval.sval = new char[strlen(sval)]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } -"XP_ERROR_EXPERIENCE_SUSPENDED"      { char* sval= "experience is suspended";                 yylval.sval = new char[strlen(sval)]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } -"XP_ERROR_UNKNOWN_ERROR"             { char* sval= "unknown error";                           yylval.sval = new char[strlen(sval)]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } -"XP_ERROR_QUOTA_EXCEEDED"            { char* sval= "experience data quota exceeded";          yylval.sval = new char[strlen(sval)]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } -"XP_ERROR_STORE_DISABLED"            { char* sval= "key-value store is disabled";             yylval.sval = new char[strlen(sval)]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } -"XP_ERROR_STORAGE_EXCEPTION"         { char* sval= "key-value store communication failed";    yylval.sval = new char[strlen(sval)]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } -"XP_ERROR_KEY_NOT_FOUND"             { char* sval= "key doesn't exist";                       yylval.sval = new char[strlen(sval)]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } -"XP_ERROR_RETRY_UPDATE"              { char* sval= "retry update";                            yylval.sval = new char[strlen(sval)]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } -  "STATUS_OK"                          { count(); yylval.ival = LSL_STATUS_OK; return(INTEGER_CONSTANT); }  "STATUS_MALFORMED_PARAMS"            { count(); yylval.ival = LSL_STATUS_MALFORMED_PARAMS; return(INTEGER_CONSTANT); }  "STATUS_TYPE_MISMATCH"               { count(); yylval.ival = LSL_STATUS_TYPE_MISMATCH; return(INTEGER_CONSTANT); } @@ -711,6 +694,23 @@ int yyerror(const char *fmt, ...);  "STATUS_INTERNAL_ERROR"              { count(); yylval.ival = LSL_STATUS_INTERNAL_ERROR; return(INTEGER_CONSTANT); }  "STATUS_WHITELIST_FAILED"            { count(); yylval.ival = LSL_STATUS_WHITELIST_FAILED; return(INTEGER_CONSTANT); } +"XP_ERROR_NONE"                      { const char* sval= "no error";                                yylval.sval = new char[strlen(sval)+1]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } +"XP_ERROR_THROTTLED"                 { const char* sval= "exceeded throttle";                       yylval.sval = new char[strlen(sval)+1]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } +"XP_ERROR_EXPERIENCES_DISABLED"      { const char* sval= "experiences are disabled";                yylval.sval = new char[strlen(sval)+1]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } +"XP_ERROR_INVALID_PARAMETERS"        { const char* sval= "invalid parameters";                      yylval.sval = new char[strlen(sval)+1]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } +"XP_ERROR_NOT_PERMITTED"             { const char* sval= "operation not permitted";                 yylval.sval = new char[strlen(sval)+1]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } +"XP_ERROR_NO_EXPERIENCE"             { const char* sval= "script not associated with an experience";yylval.sval = new char[strlen(sval)+1]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } +"XP_ERROR_NOT_FOUND"                 { const char* sval= "not found";                               yylval.sval = new char[strlen(sval)+1]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } +"XP_ERROR_INVALID_EXPERIENCE"        { const char* sval= "invalid experience";                      yylval.sval = new char[strlen(sval)+1]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } +"XP_ERROR_EXPERIENCE_DISABLED"       { const char* sval= "experience is disabled";                  yylval.sval = new char[strlen(sval)+1]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } +"XP_ERROR_EXPERIENCE_SUSPENDED"      { const char* sval= "experience is suspended";                 yylval.sval = new char[strlen(sval)+1]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } +"XP_ERROR_UNKNOWN_ERROR"             { const char* sval= "unknown error";                           yylval.sval = new char[strlen(sval)+1]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } +"XP_ERROR_QUOTA_EXCEEDED"            { const char* sval= "experience data quota exceeded";          yylval.sval = new char[strlen(sval)+1]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } +"XP_ERROR_STORE_DISABLED"            { const char* sval= "key-value store is disabled";             yylval.sval = new char[strlen(sval)+1]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } +"XP_ERROR_STORAGE_EXCEPTION"         { const char* sval= "key-value store communication failed";    yylval.sval = new char[strlen(sval)+1]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } +"XP_ERROR_KEY_NOT_FOUND"             { const char* sval= "key doesn't exist";                       yylval.sval = new char[strlen(sval)+1]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } +"XP_ERROR_RETRY_UPDATE"              { const char* sval= "retry update";                            yylval.sval = new char[strlen(sval)+1]; strcpy(yylval.sval, sval); return(STRING_CONSTANT); } +  {L}({L}|{N})*		{ count(); yylval.sval = new char[strlen(yytext) + 1]; strcpy(yylval.sval, yytext); return(IDENTIFIER); }  {N}+{E}					{ count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); } | 
