summaryrefslogtreecommitdiff
path: root/indra/lscript
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2007-03-16 20:39:40 +0000
committerSteven Bennetts <steve@lindenlab.com>2007-03-16 20:39:40 +0000
commit5e9e67cb2d1d3dfc82dfe96103270b2341991ddd (patch)
tree2df2a064523b2bffef6ff7566399c76b1f2cc196 /indra/lscript
parent1ada34fc0c5dc20bffba231ef513b569dbec32ea (diff)
merge -r 59028:59178 maintenance -> release.
Diffstat (limited to 'indra/lscript')
-rw-r--r--indra/lscript/lscript_compile/indra.l6
-rw-r--r--indra/lscript/lscript_library/lscript_library.cpp2
2 files changed, 7 insertions, 1 deletions
diff --git a/indra/lscript/lscript_compile/indra.l b/indra/lscript/lscript_compile/indra.l
index 2ee219a8ee..e93cc6082d 100644
--- a/indra/lscript/lscript_compile/indra.l
+++ b/indra/lscript/lscript_compile/indra.l
@@ -4,7 +4,7 @@ L [a-zA-Z_]
H [a-fA-F0-9]
E [Ee][+-]?{D}+
FS (f|F)
-%e 8000
+%e 9000
%n 4000
%p 5000
@@ -559,6 +559,10 @@ extern "C" { int yyerror(const char *fmt, ...); }
"PARCEL_DETAILS_GROUP" { count(); yylval.ival = PARCEL_DETAILS_GROUP; return(INTEGER_CONSTANT); }
"PARCEL_DETAILS_AREA" { count(); yylval.ival = PARCEL_DETAILS_AREA; return(INTEGER_CONSTANT); }
+"STRING_TRIM_HEAD" { count(); yylval.ival = STRING_TRIM_HEAD; return(INTEGER_CONSTANT); }
+"STRING_TRIM_TAIL" { count(); yylval.ival = STRING_TRIM_TAIL; return(INTEGER_CONSTANT); }
+"STRING_TRIM" { count(); yylval.ival = STRING_TRIM; return(INTEGER_CONSTANT); }
+
{L}({L}|{N})* { count(); yylval.sval = new char[strlen(yytext) + 1]; strcpy(yylval.sval, yytext); return(IDENTIFIER); }
{D}+{E} { count(); yylval.fval = (F32)atof(yytext); return(FP_CONSTANT); }
diff --git a/indra/lscript/lscript_library/lscript_library.cpp b/indra/lscript/lscript_library/lscript_library.cpp
index 0a2e896aea..5e87928ae6 100644
--- a/indra/lscript/lscript_library/lscript_library.cpp
+++ b/indra/lscript/lscript_library/lscript_library.cpp
@@ -403,6 +403,8 @@ void LLScriptLibrary::init()
addFunction(new LLScriptLibraryFunction(10.f, 0.2f, dummy_func, "llSetLinkTexture", NULL, "isi", "llSetLinkTexture(integer link_pos, string texture, integer face)\nSets the texture of face for link_pos"));
+ addFunction(new LLScriptLibraryFunction(10.f, 0.f, dummy_func, "llStringTrim", "s", "si", "string llStringTrim(string src, integer trim_type)\nTrim leading and/or trailing spaces from a string.\nUses trim_type of STRING_TRIM, STRING_TRIM_HEAD or STRING_TRIM_TAIL."));
+
// energy, sleep, dummy_func, name, return type, parameters, help text, gods-only
// IF YOU ADD NEW SCRIPT CALLS, YOU MUST PUT THEM AT THE END OF THIS LIST.