From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 21:24:15 +1000 Subject: Dump OpenSim 0.9.0.1 into it's own branch. --- .../Shared/CodeTools/CSCodeGenerator.cs | 584 +++---- .../Shared/CodeTools/CSReservedWords.cs | 2 +- .../ScriptEngine/Shared/CodeTools/Compiler.cs | 230 +-- .../Shared/CodeTools/ICodeConverter.cs | 3 + .../Shared/CodeTools/LSL2CSCodeTransformer.cs | 2 +- .../Shared/CodeTools/Properties/AssemblyInfo.cs | 10 +- .../Shared/CodeTools/Tests/CSCodeGeneratorTest.cs | 2 +- .../Shared/CodeTools/Tests/CompilerTest.cs | 13 +- .../Shared/CodeTools/Tests/LSL_EventTests.cs | 24 +- .../ScriptEngine/Shared/CodeTools/lsl.lexer.cs | 6 +- .../ScriptEngine/Shared/CodeTools/lsl.parser.cs | 1710 ++++++++++---------- 11 files changed, 1265 insertions(+), 1321 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools') diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs index 4e0c273..031f00a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs @@ -26,6 +26,7 @@ */ using System; +using System.Text; using System.IO; using System.Collections.Generic; using System.Reflection; @@ -39,9 +40,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private static yyLSLSyntax yyLSL = new yyLSLSyntax(); private SYMBOL m_astRoot = null; private Dictionary, KeyValuePair> m_positionMap; - private int m_indentWidth = 4; // for indentation private int m_braceCount; // for indentation private int m_CSharpLine; // the current line of generated C# code private int m_CSharpCol; // the current column of generated C# code @@ -94,6 +95,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools get { return m_astRoot; } } + public void Clear() + { + m_astRoot.kids = null; + m_astRoot.yylx = null; + m_astRoot.yyps = null; + m_astRoot = null; + m_positionMap = null; + m_warnings.Clear(); + m_comms = null; + } /// /// Resets various counters and metadata. /// @@ -106,18 +117,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools m_astRoot = null; } + public string Convert(string script) + { + StringBuilder sb = new StringBuilder(4096); + Convert(script, sb); + return sb.ToString(); + } + /// /// Generate the code from the AST we have. /// /// The LSL source as a string. /// String containing the generated C# code. - public string Convert(string script) + public void Convert(string script, StringBuilder sb) { // m_log.DebugFormat("[CS CODE GENERATOR]: Converting to C#\n{0}", script); m_warnings.Clear(); ResetCounters(); - Parser p = new LSLSyntax(new yyLSLSyntax(), new ErrorHandler(true)); + ErrorHandler errorHandler = new ErrorHandler(true); + Parser p = new LSLSyntax(yyLSL, errorHandler); LSL2CSCodeTransformer codeTransformer; try @@ -148,38 +167,39 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools m_astRoot = codeTransformer.Transform(); - string retstr = String.Empty; // standard preamble - //retstr = GenerateLine("using OpenSim.Region.ScriptEngine.Common;"); - //retstr += GenerateLine("using System.Collections.Generic;"); - //retstr += GenerateLine(""); - //retstr += GenerateLine("namespace SecondLife"); - //retstr += GenerateLine("{"); + + + m_braceCount++; - //retstr += GenerateIndentedLine("public class Script : OpenSim.Region.ScriptEngine.Common"); - //retstr += GenerateIndentedLine("{"); m_braceCount++; // line number - m_CSharpLine += 9; + m_CSharpLine += 10; // here's the payload - retstr += GenerateLine(); + sb.Append("\n"); foreach (SYMBOL s in m_astRoot.kids) - retstr += GenerateNode(m_astRoot, s); + GenerateNodeToSB(m_astRoot, s, sb); + + codeTransformer = null; + p.m_lexer.m_buf=null; + p.m_lexer.yytext = null; + p.m_lexer = null; + p.m_symbols = null; + p = null; + errorHandler = null; // close braces! - m_braceCount--; +// m_braceCount--; //retstr += GenerateIndentedLine("}"); - m_braceCount--; +// m_braceCount--; //retstr += GenerateLine("}"); // Removes all carriage return characters which may be generated in Windows platform. Is there // cleaner way of doing this? - retstr = retstr.Replace("\r", ""); - - return retstr; +// sb.Replace("\r", ""); } /// @@ -206,78 +226,76 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// The parent node. /// The current node to generate code for. /// String containing C# code for SYMBOL s. - private string GenerateNode(SYMBOL previousSymbol, SYMBOL s) + private void GenerateNodeToSB(SYMBOL previousSymbol, SYMBOL s, StringBuilder sb) { - string retstr = String.Empty; - // make sure to put type lower in the inheritance hierarchy first // ie: since IdentArgument and ExpressionArgument inherit from // Argument, put IdentArgument and ExpressionArgument before Argument if (s is GlobalFunctionDefinition) - retstr += GenerateGlobalFunctionDefinition((GlobalFunctionDefinition) s); + GenerateGlobalFunctionDefinition((GlobalFunctionDefinition) s, sb); else if (s is GlobalVariableDeclaration) - retstr += GenerateGlobalVariableDeclaration((GlobalVariableDeclaration) s); + GenerateGlobalVariableDeclaration((GlobalVariableDeclaration) s , sb); else if (s is State) - retstr += GenerateState((State) s); + GenerateState((State) s, sb); else if (s is CompoundStatement) - retstr += GenerateCompoundStatement(previousSymbol, (CompoundStatement) s); + GenerateCompoundStatement(previousSymbol, (CompoundStatement) s, sb); else if (s is Declaration) - retstr += GenerateDeclaration((Declaration) s); + GenerateDeclaration((Declaration) s, sb); else if (s is Statement) - retstr += GenerateStatement(previousSymbol, (Statement) s); + GenerateStatement(previousSymbol, (Statement) s, sb); else if (s is ReturnStatement) - retstr += GenerateReturnStatement((ReturnStatement) s); + GenerateReturnStatement((ReturnStatement) s, sb); else if (s is JumpLabel) - retstr += GenerateJumpLabel((JumpLabel) s); + GenerateJumpLabel((JumpLabel) s, sb); else if (s is JumpStatement) - retstr += GenerateJumpStatement((JumpStatement) s); + GenerateJumpStatement((JumpStatement) s, sb); else if (s is StateChange) - retstr += GenerateStateChange((StateChange) s); + GenerateStateChange((StateChange) s, sb); else if (s is IfStatement) - retstr += GenerateIfStatement((IfStatement) s); + GenerateIfStatement((IfStatement) s, sb); else if (s is WhileStatement) - retstr += GenerateWhileStatement((WhileStatement) s); + GenerateWhileStatement((WhileStatement) s, sb); else if (s is DoWhileStatement) - retstr += GenerateDoWhileStatement((DoWhileStatement) s); + GenerateDoWhileStatement((DoWhileStatement) s, sb); else if (s is ForLoop) - retstr += GenerateForLoop((ForLoop) s); + GenerateForLoop((ForLoop) s, sb); else if (s is ArgumentList) - retstr += GenerateArgumentList((ArgumentList) s); + GenerateArgumentList((ArgumentList) s, sb); else if (s is Assignment) - retstr += GenerateAssignment((Assignment) s); + GenerateAssignment((Assignment) s, sb); else if (s is BinaryExpression) - retstr += GenerateBinaryExpression((BinaryExpression) s); + GenerateBinaryExpression((BinaryExpression) s, sb); else if (s is ParenthesisExpression) - retstr += GenerateParenthesisExpression((ParenthesisExpression) s); + GenerateParenthesisExpression((ParenthesisExpression) s, sb); else if (s is UnaryExpression) - retstr += GenerateUnaryExpression((UnaryExpression) s); + GenerateUnaryExpression((UnaryExpression) s, sb); else if (s is IncrementDecrementExpression) - retstr += GenerateIncrementDecrementExpression((IncrementDecrementExpression) s); + GenerateIncrementDecrementExpression((IncrementDecrementExpression) s, sb); else if (s is TypecastExpression) - retstr += GenerateTypecastExpression((TypecastExpression) s); + GenerateTypecastExpression((TypecastExpression) s, sb); else if (s is FunctionCall) - retstr += GenerateFunctionCall((FunctionCall) s); + GenerateFunctionCall((FunctionCall) s, sb); else if (s is VectorConstant) - retstr += GenerateVectorConstant((VectorConstant) s); + GenerateVectorConstant((VectorConstant) s, sb); else if (s is RotationConstant) - retstr += GenerateRotationConstant((RotationConstant) s); + GenerateRotationConstant((RotationConstant) s, sb); else if (s is ListConstant) - retstr += GenerateListConstant((ListConstant) s); + GenerateListConstant((ListConstant) s, sb); else if (s is Constant) - retstr += GenerateConstant((Constant) s); + GenerateConstant((Constant) s, sb); else if (s is IdentDotExpression) - retstr += Generate(CheckName(((IdentDotExpression) s).Name) + "." + ((IdentDotExpression) s).Member, s); + Generate(CheckName(((IdentDotExpression) s).Name) + "." + ((IdentDotExpression) s).Member, s, sb); else if (s is IdentExpression) - retstr += GenerateIdentifier(((IdentExpression) s).Name, s); + GenerateIdentifier(((IdentExpression) s).Name, s, sb); else if (s is IDENT) - retstr += Generate(CheckName(((TOKEN) s).yytext), s); + Generate(CheckName(((TOKEN) s).yytext), s, sb); else { foreach (SYMBOL kid in s.kids) - retstr += GenerateNode(s, kid); + GenerateNodeToSB(s, kid,sb); } - return retstr; + return; } /// @@ -285,10 +303,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The GlobalFunctionDefinition node. /// String containing C# code for GlobalFunctionDefinition gf. - private string GenerateGlobalFunctionDefinition(GlobalFunctionDefinition gf) + private void GenerateGlobalFunctionDefinition(GlobalFunctionDefinition gf, StringBuilder sb) { - string retstr = String.Empty; - // we need to separate the argument declaration list from other kids List argumentDeclarationListKids = new List(); List remainingKids = new List(); @@ -299,18 +315,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools else remainingKids.Add(kid); - retstr += GenerateIndented(String.Format("{0} {1}(", gf.ReturnType, CheckName(gf.Name)), gf); + GenerateIndented(String.Format("{0} {1}(", gf.ReturnType, CheckName(gf.Name)), gf, sb); // print the state arguments, if any foreach (SYMBOL kid in argumentDeclarationListKids) - retstr += GenerateArgumentDeclarationList((ArgumentDeclarationList) kid); + GenerateArgumentDeclarationList((ArgumentDeclarationList) kid, sb); - retstr += GenerateLine(")"); + GenerateLine(")", sb); foreach (SYMBOL kid in remainingKids) - retstr += GenerateNode(gf, kid); - - return retstr; + GenerateNodeToSB(gf, kid,sb); } /// @@ -318,18 +332,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The GlobalVariableDeclaration node. /// String containing C# code for GlobalVariableDeclaration gv. - private string GenerateGlobalVariableDeclaration(GlobalVariableDeclaration gv) + private void GenerateGlobalVariableDeclaration(GlobalVariableDeclaration gv, StringBuilder sb) { - string retstr = String.Empty; - foreach (SYMBOL s in gv.kids) { - retstr += Indent(); - retstr += GenerateNode(gv, s); - retstr += GenerateLine(";"); + Indent(sb); + GenerateNodeToSB(gv, s ,sb); + GenerateLine(";", sb); } - - return retstr; } /// @@ -337,15 +347,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The State node. /// String containing C# code for State s. - private string GenerateState(State s) + private void GenerateState(State s, StringBuilder sb) { - string retstr = String.Empty; - foreach (SYMBOL kid in s.kids) if (kid is StateEvent) - retstr += GenerateStateEvent((StateEvent) kid, s.Name); - - return retstr; + GenerateStateEvent((StateEvent) kid, s.Name, sb); } /// @@ -354,10 +360,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// The StateEvent node. /// The name of the parent state. /// String containing C# code for StateEvent se. - private string GenerateStateEvent(StateEvent se, string parentStateName) + private void GenerateStateEvent(StateEvent se, string parentStateName, StringBuilder sb) { - string retstr = String.Empty; - // we need to separate the argument declaration list from other kids List argumentDeclarationListKids = new List(); List remainingKids = new List(); @@ -369,18 +373,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools remainingKids.Add(kid); // "state" (function) declaration - retstr += GenerateIndented(String.Format("public void {0}_event_{1}(", parentStateName, se.Name), se); + GenerateIndented(String.Format("public void {0}_event_{1}(", parentStateName, se.Name), se , sb); // print the state arguments, if any foreach (SYMBOL kid in argumentDeclarationListKids) - retstr += GenerateArgumentDeclarationList((ArgumentDeclarationList) kid); + GenerateArgumentDeclarationList((ArgumentDeclarationList) kid, sb); - retstr += GenerateLine(")"); + GenerateLine(")", sb); foreach (SYMBOL kid in remainingKids) - retstr += GenerateNode(se, kid); - - return retstr; + GenerateNodeToSB(se, kid, sb); } /// @@ -388,20 +390,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The ArgumentDeclarationList node. /// String containing C# code for ArgumentDeclarationList adl. - private string GenerateArgumentDeclarationList(ArgumentDeclarationList adl) + private void GenerateArgumentDeclarationList(ArgumentDeclarationList adl, StringBuilder sb) { - string retstr = String.Empty; - int comma = adl.kids.Count - 1; // tells us whether to print a comma foreach (Declaration d in adl.kids) { - retstr += Generate(String.Format("{0} {1}", d.Datatype, CheckName(d.Id)), d); + Generate(String.Format("{0} {1}", d.Datatype, CheckName(d.Id)), d, sb); if (0 < comma--) - retstr += Generate(", "); + Generate(", ", sb); } - - return retstr; } /// @@ -409,20 +407,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The ArgumentList node. /// String containing C# code for ArgumentList al. - private string GenerateArgumentList(ArgumentList al) + private void GenerateArgumentList(ArgumentList al, StringBuilder sb) { - string retstr = String.Empty; - int comma = al.kids.Count - 1; // tells us whether to print a comma foreach (SYMBOL s in al.kids) { - retstr += GenerateNode(al, s); + GenerateNodeToSB(al, s, sb); if (0 < comma--) - retstr += Generate(", "); + Generate(", ", sb); } - - return retstr; } /// @@ -430,33 +424,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The CompoundStatement node. /// String containing C# code for CompoundStatement cs. - private string GenerateCompoundStatement(SYMBOL previousSymbol, CompoundStatement cs) + private void GenerateCompoundStatement(SYMBOL previousSymbol, CompoundStatement cs, StringBuilder sb) { - string retstr = String.Empty; - // opening brace - retstr += GenerateIndentedLine("{"); + GenerateIndentedLine("{", sb); m_braceCount++; if (m_insertCoopTerminationChecks) { // We have to check in event functions as well because the user can manually call these. - if (previousSymbol is GlobalFunctionDefinition - || previousSymbol is WhileStatement - || previousSymbol is DoWhileStatement + if (previousSymbol is GlobalFunctionDefinition + || previousSymbol is WhileStatement + || previousSymbol is DoWhileStatement || previousSymbol is ForLoop || previousSymbol is StateEvent) - retstr += GenerateIndentedLine(m_coopTerminationCheck); + GenerateIndentedLine(m_coopTerminationCheck, sb); } foreach (SYMBOL kid in cs.kids) - retstr += GenerateNode(cs, kid); + GenerateNodeToSB(cs, kid, sb); // closing brace m_braceCount--; - retstr += GenerateIndentedLine("}"); - - return retstr; + GenerateIndentedLine("}", sb); } /// @@ -464,9 +454,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The Declaration node. /// String containing C# code for Declaration d. - private string GenerateDeclaration(Declaration d) + private void GenerateDeclaration(Declaration d, StringBuilder sb) { - return Generate(String.Format("{0} {1}", d.Datatype, CheckName(d.Id)), d); + Generate(String.Format("{0} {1}", d.Datatype, CheckName(d.Id)), d, sb); } /// @@ -474,7 +464,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The Statement node. /// String containing C# code for Statement s. - private string GenerateStatement(SYMBOL previousSymbol, Statement s) + private void GenerateStatement(SYMBOL previousSymbol, Statement s, StringBuilder sb) { string retstr = String.Empty; bool printSemicolon = true; @@ -484,20 +474,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools { // A non-braced single line do while structure cannot contain multiple statements. // So to insert the termination check we change this to a braced control structure instead. - if (previousSymbol is WhileStatement - || previousSymbol is DoWhileStatement + if (previousSymbol is WhileStatement + || previousSymbol is DoWhileStatement || previousSymbol is ForLoop) { transformToBlock = true; // FIXME: This will be wrongly indented because the previous for/while/dowhile will have already indented. - retstr += GenerateIndentedLine("{"); + GenerateIndentedLine("{", sb); - retstr += GenerateIndentedLine(m_coopTerminationCheck); + GenerateIndentedLine(m_coopTerminationCheck, sb); } } - retstr += Indent(); + Indent(sb); if (0 < s.kids.Count) { @@ -508,19 +498,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools // (MONO) error. if (!(s.kids.Top is IdentExpression && 1 == s.kids.Count)) foreach (SYMBOL kid in s.kids) - retstr += GenerateNode(s, kid); + GenerateNodeToSB(s, kid, sb); } if (printSemicolon) - retstr += GenerateLine(";"); + GenerateLine(";", sb); if (transformToBlock) { // FIXME: This will be wrongly indented because the for/while/dowhile is currently handling the unindent - retstr += GenerateIndentedLine("}"); + GenerateIndentedLine("}", sb); } - - return retstr; } /// @@ -528,25 +516,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The Assignment node. /// String containing C# code for Assignment a. - private string GenerateAssignment(Assignment a) + private void GenerateAssignment(Assignment a, StringBuilder sb) { - string retstr = String.Empty; - List identifiers = new List(); checkForMultipleAssignments(identifiers, a); - retstr += GenerateNode(a, (SYMBOL) a.kids.Pop()); - retstr += Generate(String.Format(" {0} ", a.AssignmentType), a); + GenerateNodeToSB(a, (SYMBOL) a.kids.Pop(), sb); + Generate(String.Format(" {0} ", a.AssignmentType), a, sb); foreach (SYMBOL kid in a.kids) - retstr += GenerateNode(a, kid); - - return retstr; + GenerateNodeToSB(a, kid, sb); } // This code checks for LSL of the following forms, and generates a // warning if it finds them. // - // list l = [ "foo" ]; + // list l = [ "foo" ]; // l = (l=[]) + l + ["bar"]; // (produces l=["foo","bar"] in SL but l=["bar"] in OS) // @@ -604,16 +588,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The ReturnStatement node. /// String containing C# code for ReturnStatement rs. - private string GenerateReturnStatement(ReturnStatement rs) + private void GenerateReturnStatement(ReturnStatement rs, StringBuilder sb) { - string retstr = String.Empty; - - retstr += Generate("return ", rs); + Generate("return ", rs, sb); foreach (SYMBOL kid in rs.kids) - retstr += GenerateNode(rs, kid); - - return retstr; + GenerateNodeToSB(rs, kid, sb); } /// @@ -621,7 +601,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The JumpLabel node. /// String containing C# code for JumpLabel jl. - private string GenerateJumpLabel(JumpLabel jl) + private void GenerateJumpLabel(JumpLabel jl, StringBuilder sb) { string labelStatement; @@ -630,7 +610,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools else labelStatement = "NoOp();"; - return GenerateLine(String.Format("{0}: {1}", CheckName(jl.LabelName), labelStatement), jl); + GenerateLine(String.Format("{0}: {1}", CheckName(jl.LabelName), labelStatement), jl, sb); } /// @@ -638,9 +618,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The JumpStatement node. /// String containing C# code for JumpStatement js. - private string GenerateJumpStatement(JumpStatement js) + private void GenerateJumpStatement(JumpStatement js, StringBuilder sb) { - return Generate(String.Format("goto {0}", CheckName(js.TargetName)), js); + Generate(String.Format("goto {0}", CheckName(js.TargetName)), js, sb); } /// @@ -648,32 +628,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The IfStatement node. /// String containing C# code for IfStatement ifs. - private string GenerateIfStatement(IfStatement ifs) + private void GenerateIfStatement(IfStatement ifs, StringBuilder sb) { - string retstr = String.Empty; - - retstr += GenerateIndented("if (", ifs); - retstr += GenerateNode(ifs, (SYMBOL) ifs.kids.Pop()); - retstr += GenerateLine(")"); + GenerateIndented("if (", ifs, sb); + GenerateNodeToSB(ifs, (SYMBOL) ifs.kids.Pop(), sb); + GenerateLine(")", sb); // CompoundStatement handles indentation itself but we need to do it // otherwise. bool indentHere = ifs.kids.Top is Statement; if (indentHere) m_braceCount++; - retstr += GenerateNode(ifs, (SYMBOL) ifs.kids.Pop()); + GenerateNodeToSB(ifs, (SYMBOL) ifs.kids.Pop(), sb); if (indentHere) m_braceCount--; if (0 < ifs.kids.Count) // do it again for an else { - retstr += GenerateIndentedLine("else", ifs); + GenerateIndentedLine("else", ifs, sb); indentHere = ifs.kids.Top is Statement; if (indentHere) m_braceCount++; - retstr += GenerateNode(ifs, (SYMBOL) ifs.kids.Pop()); + GenerateNodeToSB(ifs, (SYMBOL) ifs.kids.Pop(), sb); if (indentHere) m_braceCount--; } - - return retstr; } /// @@ -681,9 +657,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The StateChange node. /// String containing C# code for StateChange sc. - private string GenerateStateChange(StateChange sc) + private void GenerateStateChange(StateChange sc, StringBuilder sb) { - return Generate(String.Format("state(\"{0}\")", sc.NewState), sc); + Generate(String.Format("state(\"{0}\")", sc.NewState), sc, sb); } /// @@ -691,22 +667,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The WhileStatement node. /// String containing C# code for WhileStatement ws. - private string GenerateWhileStatement(WhileStatement ws) + private void GenerateWhileStatement(WhileStatement ws, StringBuilder sb) { - string retstr = String.Empty; - - retstr += GenerateIndented("while (", ws); - retstr += GenerateNode(ws, (SYMBOL) ws.kids.Pop()); - retstr += GenerateLine(")"); + GenerateIndented("while (", ws, sb); + GenerateNodeToSB(ws, (SYMBOL) ws.kids.Pop(), sb); + GenerateLine(")", sb); // CompoundStatement handles indentation itself but we need to do it // otherwise. bool indentHere = ws.kids.Top is Statement; if (indentHere) m_braceCount++; - retstr += GenerateNode(ws, (SYMBOL) ws.kids.Pop()); + GenerateNodeToSB(ws, (SYMBOL) ws.kids.Pop(), sb); if (indentHere) m_braceCount--; - - return retstr; } /// @@ -714,24 +686,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The DoWhileStatement node. /// String containing C# code for DoWhileStatement dws. - private string GenerateDoWhileStatement(DoWhileStatement dws) + private void GenerateDoWhileStatement(DoWhileStatement dws, StringBuilder sb) { - string retstr = String.Empty; - - retstr += GenerateIndentedLine("do", dws); + GenerateIndentedLine("do", dws, sb); // CompoundStatement handles indentation itself but we need to do it // otherwise. bool indentHere = dws.kids.Top is Statement; if (indentHere) m_braceCount++; - retstr += GenerateNode(dws, (SYMBOL) dws.kids.Pop()); + GenerateNodeToSB(dws, (SYMBOL) dws.kids.Pop(), sb); if (indentHere) m_braceCount--; - retstr += GenerateIndented("while (", dws); - retstr += GenerateNode(dws, (SYMBOL) dws.kids.Pop()); - retstr += GenerateLine(");"); - - return retstr; + GenerateIndented("while (", dws ,sb); + GenerateNodeToSB(dws, (SYMBOL) dws.kids.Pop(), sb); + GenerateLine(");", sb); } /// @@ -739,11 +707,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The ForLoop node. /// String containing C# code for ForLoop fl. - private string GenerateForLoop(ForLoop fl) + private void GenerateForLoop(ForLoop fl, StringBuilder sb) { - string retstr = String.Empty; - - retstr += GenerateIndented("for (", fl); + GenerateIndented("for (", fl, sb); // It's possible that we don't have an assignment, in which case // the child will be null and we only print the semicolon. @@ -752,26 +718,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools ForLoopStatement s = (ForLoopStatement) fl.kids.Pop(); if (null != s) { - retstr += GenerateForLoopStatement(s); + GenerateForLoopStatement(s, sb); } - retstr += Generate("; "); + Generate("; ", sb); // for (x = 0; x < 10; x++) // ^^^^^^ - retstr += GenerateNode(fl, (SYMBOL) fl.kids.Pop()); - retstr += Generate("; "); + GenerateNodeToSB(fl, (SYMBOL) fl.kids.Pop(), sb); + Generate("; ", sb); // for (x = 0; x < 10; x++) // ^^^ - retstr += GenerateForLoopStatement((ForLoopStatement) fl.kids.Pop()); - retstr += GenerateLine(")"); + GenerateForLoopStatement((ForLoopStatement) fl.kids.Pop(), sb); + GenerateLine(")", sb); // CompoundStatement handles indentation itself but we need to do it // otherwise. bool indentHere = fl.kids.Top is Statement; if (indentHere) m_braceCount++; - retstr += GenerateNode(fl, (SYMBOL) fl.kids.Pop()); + GenerateNodeToSB(fl, (SYMBOL) fl.kids.Pop(), sb); if (indentHere) m_braceCount--; - - return retstr; } /// @@ -779,10 +743,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The ForLoopStatement node. /// String containing C# code for ForLoopStatement fls. - private string GenerateForLoopStatement(ForLoopStatement fls) + private void GenerateForLoopStatement(ForLoopStatement fls, StringBuilder sb) { - string retstr = String.Empty; - int comma = fls.kids.Count - 1; // tells us whether to print a comma // It's possible that all we have is an empty Ident, for example: @@ -791,12 +753,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools // // Which is illegal in C# (MONO). We'll skip it. if (fls.kids.Top is IdentExpression && 1 == fls.kids.Count) - return retstr; + return; for (int i = 0; i < fls.kids.Count; i++) { SYMBOL s = (SYMBOL)fls.kids[i]; - + // Statements surrounded by parentheses in for loops // // e.g. for ((i = 0), (j = 7); (i < 10); (++i)) @@ -812,13 +774,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools // like it would be considerably more complicated to handle). while (s is ParenthesisExpression) s = (SYMBOL)s.kids.Pop(); - - retstr += GenerateNode(fls, s); + + GenerateNodeToSB(fls, s, sb); if (0 < comma--) - retstr += Generate(", "); + Generate(", ", sb); } - - return retstr; } /// @@ -826,31 +786,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The BinaryExpression node. /// String containing C# code for BinaryExpression be. - private string GenerateBinaryExpression(BinaryExpression be) + private void GenerateBinaryExpression(BinaryExpression be, StringBuilder sb) { - string retstr = String.Empty; - if (be.ExpressionSymbol.Equals("&&") || be.ExpressionSymbol.Equals("||")) { // special case handling for logical and/or, see Mantis 3174 - retstr += "((bool)("; - retstr += GenerateNode(be, (SYMBOL)be.kids.Pop()); - retstr += "))"; - retstr += Generate(String.Format(" {0} ", be.ExpressionSymbol.Substring(0,1)), be); - retstr += "((bool)("; + sb.Append("((bool)("); + GenerateNodeToSB(be, (SYMBOL)be.kids.Pop(), sb); + sb.Append("))"); + Generate(String.Format(" {0} ", be.ExpressionSymbol.Substring(0,1)), be, sb); + sb.Append("((bool)("); foreach (SYMBOL kid in be.kids) - retstr += GenerateNode(be, kid); - retstr += "))"; + GenerateNodeToSB(be, kid, sb); + sb.Append("))"); } else { - retstr += GenerateNode(be, (SYMBOL)be.kids.Pop()); - retstr += Generate(String.Format(" {0} ", be.ExpressionSymbol), be); + GenerateNodeToSB(be, (SYMBOL)be.kids.Pop(), sb); + Generate(String.Format(" {0} ", be.ExpressionSymbol), be, sb); foreach (SYMBOL kid in be.kids) - retstr += GenerateNode(be, kid); + GenerateNodeToSB(be, kid, sb); } - - return retstr; } /// @@ -858,14 +814,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The UnaryExpression node. /// String containing C# code for UnaryExpression ue. - private string GenerateUnaryExpression(UnaryExpression ue) + private void GenerateUnaryExpression(UnaryExpression ue, StringBuilder sb) { - string retstr = String.Empty; - - retstr += Generate(ue.UnarySymbol, ue); - retstr += GenerateNode(ue, (SYMBOL) ue.kids.Pop()); - - return retstr; + Generate(ue.UnarySymbol, ue, sb); + GenerateNodeToSB(ue, (SYMBOL) ue.kids.Pop(), sb); } /// @@ -873,16 +825,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The ParenthesisExpression node. /// String containing C# code for ParenthesisExpression pe. - private string GenerateParenthesisExpression(ParenthesisExpression pe) + private void GenerateParenthesisExpression(ParenthesisExpression pe, StringBuilder sb) { string retstr = String.Empty; - retstr += Generate("("); + Generate("(", sb); foreach (SYMBOL kid in pe.kids) - retstr += GenerateNode(pe, kid); - retstr += Generate(")"); - - return retstr; + GenerateNodeToSB(pe, kid, sb); + Generate(")", sb); } /// @@ -890,19 +840,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The IncrementDecrementExpression node. /// String containing C# code for IncrementDecrementExpression ide. - private string GenerateIncrementDecrementExpression(IncrementDecrementExpression ide) + private void GenerateIncrementDecrementExpression(IncrementDecrementExpression ide, StringBuilder sb) { - string retstr = String.Empty; - if (0 < ide.kids.Count) { IdentDotExpression dot = (IdentDotExpression) ide.kids.Top; - retstr += Generate(String.Format("{0}", ide.PostOperation ? CheckName(dot.Name) + "." + dot.Member + ide.Operation : ide.Operation + CheckName(dot.Name) + "." + dot.Member), ide); + Generate(String.Format("{0}", ide.PostOperation ? CheckName(dot.Name) + "." + dot.Member + ide.Operation : ide.Operation + CheckName(dot.Name) + "." + dot.Member), ide, sb); } else - retstr += Generate(String.Format("{0}", ide.PostOperation ? CheckName(ide.Name) + ide.Operation : ide.Operation + CheckName(ide.Name)), ide); - - return retstr; + Generate(String.Format("{0}", ide.PostOperation ? CheckName(ide.Name) + ide.Operation : ide.Operation + CheckName(ide.Name)), ide, sb); } /// @@ -910,16 +856,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The TypecastExpression node. /// String containing C# code for TypecastExpression te. - private string GenerateTypecastExpression(TypecastExpression te) + private void GenerateTypecastExpression(TypecastExpression te, StringBuilder sb) { - string retstr = String.Empty; - // we wrap all typecasted statements in parentheses - retstr += Generate(String.Format("({0}) (", te.TypecastType), te); - retstr += GenerateNode(te, (SYMBOL) te.kids.Pop()); - retstr += Generate(")"); - - return retstr; + Generate(String.Format("({0}) (", te.TypecastType), te, sb); + GenerateNodeToSB(te, (SYMBOL) te.kids.Pop(), sb); + Generate(")", sb); } /// @@ -928,7 +870,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// The symbol name /// The Symbol node. /// String containing C# code for identifier reference. - private string GenerateIdentifier(string id, SYMBOL s) + private void GenerateIdentifier(string id, SYMBOL s, StringBuilder sb) { if (m_comms != null) { @@ -949,12 +891,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools else if (value is OpenMetaverse.Quaternion) retval = String.Format("new LSL_Types.Quaternion(\"{0}\")",((OpenMetaverse.Quaternion)value).ToString()); else retval = id; - - return Generate(retval, s); + + Generate(retval, s, sb); + return; } } - return Generate(CheckName(id), s); + Generate(CheckName(id), s, sb); + return; } /// @@ -962,35 +906,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The FunctionCall node. /// String containing C# code for FunctionCall fc. - private string GenerateFunctionCall(FunctionCall fc) + private void GenerateFunctionCall(FunctionCall fc, StringBuilder sb) { - string retstr = String.Empty; - string modinvoke = null; if (m_comms != null) modinvoke = m_comms.LookupModInvocation(fc.Id); - + if (modinvoke != null) { if (fc.kids[0] is ArgumentList) { if ((fc.kids[0] as ArgumentList).kids.Count == 0) - retstr += Generate(String.Format("{0}(\"{1}\"",modinvoke,fc.Id), fc); + Generate(String.Format("{0}(\"{1}\"",modinvoke,fc.Id), fc, sb); else - retstr += Generate(String.Format("{0}(\"{1}\",",modinvoke,fc.Id), fc); + Generate(String.Format("{0}(\"{1}\",",modinvoke,fc.Id), fc, sb); } } else { - retstr += Generate(String.Format("{0}(", CheckName(fc.Id)), fc); + Generate(String.Format("{0}(", CheckName(fc.Id)), fc, sb); } - - foreach (SYMBOL kid in fc.kids) - retstr += GenerateNode(fc, kid); - retstr += Generate(")"); + foreach (SYMBOL kid in fc.kids) + GenerateNodeToSB(fc, kid, sb); - return retstr; + Generate(")", sb); } /// @@ -998,10 +938,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The Constant node. /// String containing C# code for Constant c. - private string GenerateConstant(Constant c) + private void GenerateConstant(Constant c, StringBuilder sb) { - string retstr = String.Empty; - // Supprt LSL's weird acceptance of floats with no trailing digits // after the period. Turn float x = 10.; into float x = 10.0; if ("LSL_Types.LSLFloat" == c.Type) @@ -1020,9 +958,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools c.Value = "new LSL_Types.LSLString(\""+c.Value+"\")"; } - retstr += Generate(c.Value, c); - - return retstr; + Generate(c.Value, c, sb); } /// @@ -1030,19 +966,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The VectorConstant node. /// String containing C# code for VectorConstant vc. - private string GenerateVectorConstant(VectorConstant vc) + private void GenerateVectorConstant(VectorConstant vc, StringBuilder sb) { - string retstr = String.Empty; - - retstr += Generate(String.Format("new {0}(", vc.Type), vc); - retstr += GenerateNode(vc, (SYMBOL) vc.kids.Pop()); - retstr += Generate(", "); - retstr += GenerateNode(vc, (SYMBOL) vc.kids.Pop()); - retstr += Generate(", "); - retstr += GenerateNode(vc, (SYMBOL) vc.kids.Pop()); - retstr += Generate(")"); - - return retstr; + Generate(String.Format("new {0}(", vc.Type), vc, sb); + GenerateNodeToSB(vc, (SYMBOL) vc.kids.Pop(), sb); + Generate(", ", sb); + GenerateNodeToSB(vc, (SYMBOL) vc.kids.Pop(), sb); + Generate(", ", sb); + GenerateNodeToSB(vc, (SYMBOL) vc.kids.Pop(), sb); + Generate(")", sb); } /// @@ -1050,21 +982,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The RotationConstant node. /// String containing C# code for RotationConstant rc. - private string GenerateRotationConstant(RotationConstant rc) + private void GenerateRotationConstant(RotationConstant rc, StringBuilder sb) { - string retstr = String.Empty; - - retstr += Generate(String.Format("new {0}(", rc.Type), rc); - retstr += GenerateNode(rc, (SYMBOL) rc.kids.Pop()); - retstr += Generate(", "); - retstr += GenerateNode(rc, (SYMBOL) rc.kids.Pop()); - retstr += Generate(", "); - retstr += GenerateNode(rc, (SYMBOL) rc.kids.Pop()); - retstr += Generate(", "); - retstr += GenerateNode(rc, (SYMBOL) rc.kids.Pop()); - retstr += Generate(")"); - - return retstr; + Generate(String.Format("new {0}(", rc.Type), rc, sb); + GenerateNodeToSB(rc, (SYMBOL) rc.kids.Pop(), sb); + Generate(", ", sb); + GenerateNodeToSB(rc, (SYMBOL) rc.kids.Pop(), sb); + Generate(", ", sb); + GenerateNodeToSB(rc, (SYMBOL) rc.kids.Pop(), sb); + Generate(", ", sb); + GenerateNodeToSB(rc, (SYMBOL) rc.kids.Pop(), sb); + Generate(")", sb); } /// @@ -1072,27 +1000,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// The ListConstant node. /// String containing C# code for ListConstant lc. - private string GenerateListConstant(ListConstant lc) + private void GenerateListConstant(ListConstant lc, StringBuilder sb) { - string retstr = String.Empty; - - retstr += Generate(String.Format("new {0}(", lc.Type), lc); + Generate(String.Format("new {0}(", lc.Type), lc, sb); foreach (SYMBOL kid in lc.kids) - retstr += GenerateNode(lc, kid); - - retstr += Generate(")"); + GenerateNodeToSB(lc, kid, sb); - return retstr; + Generate(")", sb); } /// /// Prints a newline. /// /// A newline. - private string GenerateLine() + private void GenerateLine(StringBuilder sb) { - return GenerateLine(""); + sb.Append("\n"); + m_CSharpLine++; + m_CSharpCol = 1; } /// @@ -1100,9 +1026,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// String of text to print. /// String s followed by newline. - private string GenerateLine(string s) + private void GenerateLine(string s, StringBuilder sb) { - return GenerateLine(s, null); + sb.Append(s); + sb.Append("\n"); + m_CSharpLine++; + m_CSharpCol = 1; } /// @@ -1112,14 +1041,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// Symbol being generated to extract original line /// number and column from. /// String s followed by newline. - private string GenerateLine(string s, SYMBOL sym) + private void GenerateLine(string s, SYMBOL sym, StringBuilder sb) { - string retstr = Generate(s, sym) + "\n"; + Generate(s, sym, sb); + sb.Append("\n"); m_CSharpLine++; m_CSharpCol = 1; - - return retstr; } /// @@ -1127,9 +1055,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// String of text to print. /// String s. - private string Generate(string s) + private void Generate(string s, StringBuilder sb) { - return Generate(s, null); + sb.Append(s); + m_CSharpCol += s.Length; } /// @@ -1139,14 +1068,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// Symbol being generated to extract original line /// number and column from. /// String s. - private string Generate(string s, SYMBOL sym) + private void Generate(string s, SYMBOL sym, StringBuilder sb) { + sb.Append(s); if (null != sym) m_positionMap.Add(new KeyValuePair(m_CSharpLine, m_CSharpCol), new KeyValuePair(sym.Line, sym.Position)); m_CSharpCol += s.Length; - - return s; } /// @@ -1154,9 +1082,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// /// String of text to print. /// Properly indented string s followed by newline. - private string GenerateIndentedLine(string s) + private void GenerateIndentedLine(string s, StringBuilder sb) { - return GenerateIndentedLine(s, null); + GenerateIndentedLine(s, null, sb); } /// @@ -1166,14 +1094,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// Symbol being generated to extract original line /// number and column from. /// Properly indented string s followed by newline. - private string GenerateIndentedLine(string s, SYMBOL sym) + private void GenerateIndentedLine(string s, SYMBOL sym, StringBuilder sb) { - string retstr = GenerateIndented(s, sym) + "\n"; - + GenerateIndented(s, sym , sb ); + sb.Append("\n"); m_CSharpLine++; m_CSharpCol = 1; - - return retstr; } /// @@ -1194,34 +1120,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools /// Symbol being generated to extract original line /// number and column from. /// Properly indented string s. - private string GenerateIndented(string s, SYMBOL sym) + private void GenerateIndented(string s, SYMBOL sym, StringBuilder sb) { - string retstr = Indent() + s; + Indent(sb); + sb.Append(s); if (null != sym) m_positionMap.Add(new KeyValuePair(m_CSharpLine, m_CSharpCol), new KeyValuePair(sym.Line, sym.Position)); m_CSharpCol += s.Length; - - return retstr; } /// /// Prints correct indentation. /// /// Indentation based on brace count. - private string Indent() + private void Indent(StringBuilder sb) { - string retstr = String.Empty; - for (int i = 0; i < m_braceCount; i++) - for (int j = 0; j < m_indentWidth; j++) - { - retstr += " "; - m_CSharpCol++; - } - - return retstr; + { + sb.Append(" "); + m_CSharpCol += 4; + } } /// diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSReservedWords.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSReservedWords.cs index 7a2a4a0..19a248f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSReservedWords.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSReservedWords.cs @@ -84,7 +84,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools if (word.StartsWith("ll")) return false; char first = word.ToCharArray(0,1)[0]; if (first >= 'A' && first <= 'Z') return false; - + return (reservedWords.BinarySearch(word) >= 0); } } diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs index af324bf..89211a5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs @@ -79,12 +79,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools private List m_warnings = new List(); - // private object m_syncy = new object(); - - private static CSharpCodeProvider CScodeProvider = new CSharpCodeProvider(); - private static VBCodeProvider VBcodeProvider = new VBCodeProvider(); - - // private static int instanceID = new Random().Next(0, int.MaxValue); // Unique number to use on our compiled files private static UInt64 scriptCompileCounter = 0; // And a counter public IScriptEngine m_scriptEngine; @@ -119,7 +113,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools { in_startup = false; CheckOrCreateScriptsDirectory(); - + // First time we start? Delete old files if (DeleteScriptsOnStartup) DeleteOldFiles(); @@ -251,23 +245,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools } } - ////private ICodeCompiler icc = codeProvider.CreateCompiler(); - //public string CompileFromFile(string LSOFileName) - //{ - // switch (Path.GetExtension(LSOFileName).ToLower()) - // { - // case ".txt": - // case ".lsl": - // Common.ScriptEngineBase.Shared.SendToDebug("Source code is LSL, converting to CS"); - // return CompileFromLSLText(File.ReadAllText(LSOFileName)); - // case ".cs": - // Common.ScriptEngineBase.Shared.SendToDebug("Source code is CS"); - // return CompileFromCSText(File.ReadAllText(LSOFileName)); - // default: - // throw new Exception("Unknown script type."); - // } - //} - public string GetCompilerOutput(string assetID) { return Path.Combine(ScriptEnginesPath, Path.Combine( @@ -310,9 +287,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools { // m_log.DebugFormat("[Compiler]: Found existing assembly {0} for asset {1} in {2}", assembly, asset, m_scriptEngine.World.Name); - // If we have already read this linemap file, then it will be in our dictionary. + // If we have already read this linemap file, then it will be in our dictionary. // Don't build another copy of the dictionary (saves memory) and certainly - // don't keep reading the same file from disk multiple times. + // don't keep reading the same file from disk multiple times. if (!m_lineMaps.ContainsKey(assembly)) m_lineMaps[assembly] = ReadMapFile(assembly + ".map"); linemap = m_lineMaps[assembly]; @@ -356,14 +333,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools throw new Exception(errtext); } - string compileScript = source; + string compileScript = string.Empty; if (language == enumCompileType.lsl) { // Its LSL, convert it to C# - LSL_Converter = (ICodeConverter)new CSCodeGenerator(comms, m_insertCoopTerminationCalls); - compileScript = LSL_Converter.Convert(source); + StringBuilder sb = new StringBuilder(16394); + + LSL_Converter = (ICodeConverter)new CSCodeGenerator(comms, m_insertCoopTerminationCalls); + AddCSScriptHeader( + m_scriptEngine.ScriptClassName, + m_scriptEngine.ScriptBaseClassName, + m_scriptEngine.ScriptBaseClassParameters, + sb); + + LSL_Converter.Convert(source,sb); + AddCSScriptTail(sb); + compileScript = sb.ToString(); // copy converter warnings into our warnings. foreach (string warning in LSL_Converter.GetWarnings()) { @@ -371,25 +358,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools } linemap = ((CSCodeGenerator)LSL_Converter).PositionMap; - // Write the linemap to a file and save it in our dictionary for next time. + // Write the linemap to a file and save it in our dictionary for next time. m_lineMaps[assembly] = linemap; WriteMapFile(assembly + ".map", linemap); + LSL_Converter.Clear(); } - - switch (language) + else { - case enumCompileType.cs: - case enumCompileType.lsl: - compileScript = CreateCSCompilerScript( - compileScript, - m_scriptEngine.ScriptClassName, - m_scriptEngine.ScriptBaseClassName, - m_scriptEngine.ScriptBaseClassParameters); - break; - case enumCompileType.vb: - compileScript = CreateVBCompilerScript( - compileScript, m_scriptEngine.ScriptClassName, m_scriptEngine.ScriptBaseClassName); - break; + switch (language) + { + case enumCompileType.cs: + compileScript = CreateCSCompilerScript( + source, + m_scriptEngine.ScriptClassName, + m_scriptEngine.ScriptBaseClassName, + m_scriptEngine.ScriptBaseClassParameters); + break; + case enumCompileType.vb: + compileScript = CreateVBCompilerScript( + source, m_scriptEngine.ScriptClassName, m_scriptEngine.ScriptBaseClassName); + break; + } } assembly = CompileFromDotNetText(compileScript, language, asset, assembly); @@ -419,29 +408,57 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools // return compileScript; // } + public static void AddCSScriptHeader(string className, string baseClassName, ParameterInfo[] constructorParameters, StringBuilder sb) + { + sb.Append(string.Format( +@"using OpenSim.Region.ScriptEngine.Shared; +using System.Collections.Generic; + +namespace SecondLife +{{ + public class {0} : {1} + {{ + public {0}({2}) : base({3}) {{}} +", + className, + baseClassName, + constructorParameters != null + ? string.Join(", ", Array.ConvertAll(constructorParameters, pi => pi.ToString())) + : "", + constructorParameters != null + ? string.Join(", ", Array.ConvertAll(constructorParameters, pi => pi.Name)) + : "" + )); + } + + public static void AddCSScriptTail(StringBuilder sb) + { + sb.Append(string.Format(" }}\n}}\n")); + } + public static string CreateCSCompilerScript( string compileScript, string className, string baseClassName, ParameterInfo[] constructorParameters) { - compileScript = string.Format( -@"using OpenSim.Region.ScriptEngine.Shared; + compileScript = string.Format( +@"using OpenSim.Region.ScriptEngine.Shared; using System.Collections.Generic; -namespace SecondLife -{{ - public class {0} : {1} +namespace SecondLife +{{ + public class {0} : {1} {{ public {0}({2}) : base({3}) {{}} {4} }} }}", className, - baseClassName, - constructorParameters != null - ? string.Join(", ", Array.ConvertAll(constructorParameters, pi => pi.ToString())) - : "", - constructorParameters != null - ? string.Join(", ", Array.ConvertAll(constructorParameters, pi => pi.Name)) - : "", + baseClassName, + constructorParameters != null + ? string.Join(", ", Array.ConvertAll(constructorParameters, pi => pi.ToString())) + : "", + constructorParameters != null + ? string.Join(", ", Array.ConvertAll(constructorParameters, pi => pi.Name)) + : "", compileScript); return compileScript; @@ -468,7 +485,7 @@ namespace SecondLife internal string CompileFromDotNetText(string Script, enumCompileType lang, string asset, string assembly) { // m_log.DebugFormat("[Compiler]: Compiling to assembly\n{0}", Script); - + string ext = "." + lang.ToString(); // Output assembly name @@ -511,8 +528,6 @@ namespace SecondLife // Do actual compile CompilerParameters parameters = new CompilerParameters(); - parameters.IncludeDebugInformation = true; - string rootPath = AppDomain.CurrentDomain.BaseDirectory; parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, @@ -524,7 +539,7 @@ namespace SecondLife if (m_scriptEngine.ScriptReferencedAssemblies != null) Array.ForEach( - m_scriptEngine.ScriptReferencedAssemblies, + m_scriptEngine.ScriptReferencedAssemblies, a => parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, a))); parameters.GenerateExecutable = false; @@ -532,62 +547,62 @@ namespace SecondLife parameters.IncludeDebugInformation = CompileWithDebugInformation; //parameters.WarningLevel = 1; // Should be 4? parameters.TreatWarningsAsErrors = false; + parameters.GenerateInMemory = false; + +// this seems to cause issues on some windows servers +// parameters.TempFiles = new TempFileCollection(Path.Combine(ScriptEnginesPath, +// m_scriptEngine.World.RegionInfo.RegionID.ToString()), CompileWithDebugInformation); CompilerResults results; + + CodeDomProvider provider; switch (lang) { case enumCompileType.vb: - results = VBcodeProvider.CompileAssemblyFromSource( - parameters, Script); + provider = CodeDomProvider.CreateProvider("VisualBasic"); break; case enumCompileType.cs: case enumCompileType.lsl: - bool complete = false; - bool retried = false; - do - { - lock (CScodeProvider) - { - results = CScodeProvider.CompileAssemblyFromSource( - parameters, Script); - } - - // Deal with an occasional segv in the compiler. - // Rarely, if ever, occurs twice in succession. - // Line # == 0 and no file name are indications that - // this is a native stack trace rather than a normal - // error log. - if (results.Errors.Count > 0) - { - if (!retried && string.IsNullOrEmpty(results.Errors[0].FileName) && - results.Errors[0].Line == 0) - { - // System.Console.WriteLine("retrying failed compilation"); - retried = true; - } - else - { - complete = true; - } - } - else - { - complete = true; - } - } while (!complete); + provider = CodeDomProvider.CreateProvider("CSharp"); break; default: throw new Exception("Compiler is not able to recongnize " + "language type \"" + lang.ToString() + "\""); } -// foreach (Type type in results.CompiledAssembly.GetTypes()) -// { -// foreach (MethodInfo method in type.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static)) -// { -// m_log.DebugFormat("[COMPILER]: {0}.{1}", type.FullName, method.Name); -// } -// } + if(provider == null) + throw new Exception("Compiler failed to load "); + + bool complete = false; + bool retried = false; + + do + { + results = provider.CompileAssemblyFromSource( + parameters, Script); + // Deal with an occasional segv in the compiler. + // Rarely, if ever, occurs twice in succession. + // Line # == 0 and no file name are indications that + // this is a native stack trace rather than a normal + // error log. + if (results.Errors.Count > 0) + { + if (!retried && string.IsNullOrEmpty(results.Errors[0].FileName) && + results.Errors[0].Line == 0) + { + // System.Console.WriteLine("retrying failed compilation"); + retried = true; + } + else + { + complete = true; + } + } + else + { + complete = true; + } + } while (!complete); // // WARNINGS AND ERRORS @@ -628,13 +643,15 @@ namespace SecondLife } } + provider.Dispose(); + if (hadErrors) { throw new Exception(errtext); } // On today's highly asynchronous systems, the result of - // the compile may not be immediately apparent. Wait a + // the compile may not be immediately apparent. Wait a // reasonable amount of time before giving up on it. if (!File.Exists(assembly)) @@ -785,15 +802,16 @@ namespace SecondLife private static void WriteMapFile(string filename, Dictionary, KeyValuePair> linemap) { - string mapstring = String.Empty; + StringBuilder mapbuilder = new StringBuilder(1024); + foreach (KeyValuePair, KeyValuePair> kvp in linemap) { KeyValuePair k = kvp.Key; KeyValuePair v = kvp.Value; - mapstring += String.Format("{0},{1},{2},{3}\n", k.Key, k.Value, v.Key, v.Value); + mapbuilder.Append(String.Format("{0},{1},{2},{3}\n", k.Key, k.Value, v.Key, v.Value)); } - Byte[] mapbytes = Encoding.ASCII.GetBytes(mapstring); + Byte[] mapbytes = Encoding.ASCII.GetBytes(mapbuilder.ToString()); using (FileStream mfs = File.Create(filename)) mfs.Write(mapbytes, 0, mapbytes.Length); diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/ICodeConverter.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/ICodeConverter.cs index 84e8ab2..076caad 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/ICodeConverter.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/ICodeConverter.cs @@ -27,12 +27,15 @@ */ using System; +using System.Text; namespace OpenSim.Region.ScriptEngine.Shared.CodeTools { public interface ICodeConverter { string Convert(string script); + void Convert(string script, StringBuilder sb); string[] GetWarnings(); + void Clear(); } } diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs index 0fb3574..0585f8b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs @@ -191,7 +191,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools Constant rca = new Constant(p, "float", "0.0"); Constant rcb = new Constant(p, "float", "0.0"); Constant rcc = new Constant(p, "float", "0.0"); - Constant rcd = new Constant(p, "float", "0.0"); + Constant rcd = new Constant(p, "float", "1.0"); ConstantExpression rcea = new ConstantExpression(p, rca); ConstantExpression rceb = new ConstantExpression(p, rcb); ConstantExpression rcec = new ConstantExpression(p, rcc); diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs index 0aece99..304cd81 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Properties/AssemblyInfo.cs @@ -2,7 +2,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("OpenSim.Region.ScriptEngine.Shared.CodeTools")] @@ -14,8 +14,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] @@ -25,9 +25,9 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // -[assembly: AssemblyVersion("0.8.3.*")] +[assembly: AssemblyVersion(OpenSim.VersionInfo.AssemblyVersionNumber)] diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs index b92f3a3..a9f3283 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs @@ -1388,7 +1388,7 @@ default "\n LSL_Types.list m = new LSL_Types.list(new LSL_Types.LSLInteger(1), new LSL_Types.LSLInteger(2), new LSL_Types.LSLInteger(3));" + "\n LSL_Types.Vector3 v = new LSL_Types.Vector3(new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(0.0));" + "\n LSL_Types.Vector3 w = new LSL_Types.Vector3(new LSL_Types.LSLFloat(1.0), new LSL_Types.LSLFloat(0.1), new LSL_Types.LSLFloat(0.5));" + - "\n LSL_Types.Quaternion r = new LSL_Types.Quaternion(new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(0.0));" + + "\n LSL_Types.Quaternion r = new LSL_Types.Quaternion(new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(0.0), new LSL_Types.LSLFloat(1.0));" + "\n LSL_Types.Quaternion u = new LSL_Types.Quaternion(new LSL_Types.LSLFloat(0.8), new LSL_Types.LSLFloat(0.7), new LSL_Types.LSLFloat(0.6), llSomeFunc());" + "\n LSL_Types.LSLString k = new LSL_Types.LSLString(\"\");" + "\n LSL_Types.LSLString n = new LSL_Types.LSLString(\"ping\");" + diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs index b476e32..12ba4de 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CompilerTest.cs @@ -37,6 +37,7 @@ using OpenSim.Tests.Common; namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests { + /// /// Tests the LSL compiler. Among other things, test that error messages /// generated by the C# compiler can be mapped to prper lines/columns in @@ -80,7 +81,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests m_resolveEventHandler = new ResolveEventHandler(AssemblyResolver.OnAssemblyResolve); System.AppDomain.CurrentDomain.AssemblyResolve += m_resolveEventHandler; - + m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll")); m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll")); m_compilerParameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenMetaverseTypes.dll")); @@ -111,7 +112,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests CSCodeGenerator cg = new CSCodeGenerator(); string output = cg.Convert(input); - output = Compiler.CreateCSCompilerScript(output, "script1", typeof(ScriptBaseClass).FullName, null); + output = Compiler.CreateCSCompilerScript(output, "script1", typeof(ScriptBaseClass).FullName, null); // System.Console.WriteLine(output); positionMap = cg.PositionMap; @@ -132,7 +133,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests return compilerResults; } - +/* test too depedent on counting lines and columns maping code generation changes +erros position is better tested on viewers /// /// Test that line number errors are resolved as expected when preceding code contains a jump. /// @@ -152,13 +154,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests @l; i = 1; } -}", out positionMap); +}", out positionMap); Assert.AreEqual( new KeyValuePair(7, 9), positionMap[new KeyValuePair(compilerResults.Errors[0].Line, compilerResults.Errors[0].Column)]); } + /// /// Test the C# compiler error message can be mapped to the correct /// line/column in the LSL source when an undeclared variable is used. @@ -183,7 +186,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools.Tests new KeyValuePair(5, 21), positionMap[new KeyValuePair(compilerResults.Errors[0].Line, compilerResults.Errors[0].Column)]); } - +*/ /// /// Test that a string can be cast to string and another string /// concatenated. diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs index 67ce10a..220ec72 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/LSL_EventTests.cs @@ -150,7 +150,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // TestHelpers.EnableLogging(); TestIntArgEvent("changed"); - } + } [Test] public void TestCollisionEvent() @@ -159,7 +159,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // TestHelpers.EnableLogging(); TestIntArgEvent("collision"); - } + } [Test] public void TestCollisionStartEvent() @@ -168,7 +168,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // TestHelpers.EnableLogging(); TestIntArgEvent("collision_start"); - } + } [Test] public void TestCollisionEndEvent() @@ -177,7 +177,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // TestHelpers.EnableLogging(); TestIntArgEvent("collision_end"); - } + } [Test] public void TestOnRezEvent() @@ -186,7 +186,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // TestHelpers.EnableLogging(); TestIntArgEvent("on_rez"); - } + } [Test] public void TestRunTimePermissionsEvent() @@ -195,7 +195,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // TestHelpers.EnableLogging(); TestIntArgEvent("run_time_permissions"); - } + } [Test] public void TestSensorEvent() @@ -204,7 +204,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // TestHelpers.EnableLogging(); TestIntArgEvent("sensor"); - } + } [Test] public void TestTouchEvent() @@ -213,7 +213,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // TestHelpers.EnableLogging(); TestIntArgEvent("touch"); - } + } [Test] public void TestTouchStartEvent() @@ -222,7 +222,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // TestHelpers.EnableLogging(); TestIntArgEvent("touch_start"); - } + } [Test] public void TestTouchEndEvent() @@ -231,7 +231,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests // TestHelpers.EnableLogging(); TestIntArgEvent("touch_end"); - } + } [Test] public void TestLandCollisionEvent() @@ -351,8 +351,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests } Assert.That( - gotException, - Is.EqualTo(expectException), + gotException, + Is.EqualTo(expectException), "Failed on {0}, exception {1}", script, ge != null ? ge.ToString() : "n/a"); } } diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs index f87f446..66210b7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs @@ -379,7 +379,7 @@ public override int yynum { get { return 96; }} public FLOAT_CONSTANT(Lexer yyl):base(yyl) {}} //%|LSLTokens public class yyLSLTokens : YyLexer { - public yyLSLTokens(ErrorHandler eh):base(eh) { arr = new int[] { + public yyLSLTokens(ErrorHandler eh):base(eh) { arr = new int[] { 101,4,6,52,0, 46,0,53,0,6, 102,4,16,117,0, @@ -19717,13 +19717,13 @@ public override TOKEN OldAction(Lexer yym,ref string yytext,int action, ref bool break; case 1063: ; break; - case 1076: ; + case 1076: ; break; case 1032: { yym.yy_begin("YYINITIAL"); ((LSLTokens)yym).yytext = ((LSLTokens)yym).str; ((LSLTokens)yym).str = String.Empty; return new STRING_CONSTANT(yym); } break; case 1067: ; break; - case 1072: ; + case 1072: ; break; case 1003: { ((LSLTokens)yym).str += "\\\""; } break; diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.parser.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.parser.cs index 5fef83c..e4b5891 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.parser.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.parser.cs @@ -886,1493 +886,1493 @@ public IncrementDecrementExpression(Parser yyp):base(yyp){}} public class LSLProgramRoot_1 : LSLProgramRoot { public LSLProgramRoot_1(Parser yyq):base(yyq, - ((GlobalDefinitions)(yyq.StackAt(1).m_value)) - , - ((States)(yyq.StackAt(0).m_value)) - ){}} + ((GlobalDefinitions)(yyq.StackAt(1).m_value)) + , + ((States)(yyq.StackAt(0).m_value)) + ){}} public class LSLProgramRoot_2 : LSLProgramRoot { public LSLProgramRoot_2(Parser yyq):base(yyq, - ((States)(yyq.StackAt(0).m_value)) - ){}} + ((States)(yyq.StackAt(0).m_value)) + ){}} public class GlobalDefinitions_1 : GlobalDefinitions { public GlobalDefinitions_1(Parser yyq):base(yyq, - ((GlobalVariableDeclaration)(yyq.StackAt(0).m_value)) - ){}} + ((GlobalVariableDeclaration)(yyq.StackAt(0).m_value)) + ){}} public class GlobalDefinitions_2 : GlobalDefinitions { public GlobalDefinitions_2(Parser yyq):base(yyq, - ((GlobalDefinitions)(yyq.StackAt(1).m_value)) - , - ((GlobalVariableDeclaration)(yyq.StackAt(0).m_value)) - ){}} + ((GlobalDefinitions)(yyq.StackAt(1).m_value)) + , + ((GlobalVariableDeclaration)(yyq.StackAt(0).m_value)) + ){}} public class GlobalDefinitions_3 : GlobalDefinitions { public GlobalDefinitions_3(Parser yyq):base(yyq, - ((GlobalFunctionDefinition)(yyq.StackAt(0).m_value)) - ){}} + ((GlobalFunctionDefinition)(yyq.StackAt(0).m_value)) + ){}} public class GlobalDefinitions_4 : GlobalDefinitions { public GlobalDefinitions_4(Parser yyq):base(yyq, - ((GlobalDefinitions)(yyq.StackAt(1).m_value)) - , - ((GlobalFunctionDefinition)(yyq.StackAt(0).m_value)) - ){}} + ((GlobalDefinitions)(yyq.StackAt(1).m_value)) + , + ((GlobalFunctionDefinition)(yyq.StackAt(0).m_value)) + ){}} public class GlobalVariableDeclaration_1 : GlobalVariableDeclaration { public GlobalVariableDeclaration_1(Parser yyq):base(yyq, - ((Declaration)(yyq.StackAt(1).m_value)) - ){}} + ((Declaration)(yyq.StackAt(1).m_value)) + ){}} public class GlobalVariableDeclaration_2 : GlobalVariableDeclaration { public GlobalVariableDeclaration_2(Parser yyq):base(yyq,new Assignment(((LSLSyntax -)yyq), - ((Declaration)(yyq.StackAt(3).m_value)) - , - ((Expression)(yyq.StackAt(1).m_value)) - , - ((EQUALS)(yyq.StackAt(2).m_value)) - .yytext)){}} +)yyq), + ((Declaration)(yyq.StackAt(3).m_value)) + , + ((Expression)(yyq.StackAt(1).m_value)) + , + ((EQUALS)(yyq.StackAt(2).m_value)) + .yytext)){}} public class GlobalFunctionDefinition_1 : GlobalFunctionDefinition { - public GlobalFunctionDefinition_1(Parser yyq):base(yyq,"void", - ((IDENT)(yyq.StackAt(4).m_value)) - .yytext, - ((ArgumentDeclarationList)(yyq.StackAt(2).m_value)) - , - ((CompoundStatement)(yyq.StackAt(0).m_value)) - ){}} + public GlobalFunctionDefinition_1(Parser yyq):base(yyq,"void", + ((IDENT)(yyq.StackAt(4).m_value)) + .yytext, + ((ArgumentDeclarationList)(yyq.StackAt(2).m_value)) + , + ((CompoundStatement)(yyq.StackAt(0).m_value)) + ){}} public class GlobalFunctionDefinition_2 : GlobalFunctionDefinition { public GlobalFunctionDefinition_2(Parser yyq):base(yyq, - ((Typename)(yyq.StackAt(5).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(4).m_value)) - .yytext, - ((ArgumentDeclarationList)(yyq.StackAt(2).m_value)) - , - ((CompoundStatement)(yyq.StackAt(0).m_value)) - ){}} + ((Typename)(yyq.StackAt(5).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(4).m_value)) + .yytext, + ((ArgumentDeclarationList)(yyq.StackAt(2).m_value)) + , + ((CompoundStatement)(yyq.StackAt(0).m_value)) + ){}} public class States_1 : States { public States_1(Parser yyq):base(yyq, - ((State)(yyq.StackAt(0).m_value)) - ){}} + ((State)(yyq.StackAt(0).m_value)) + ){}} public class States_2 : States { public States_2(Parser yyq):base(yyq, - ((States)(yyq.StackAt(1).m_value)) - , - ((State)(yyq.StackAt(0).m_value)) - ){}} + ((States)(yyq.StackAt(1).m_value)) + , + ((State)(yyq.StackAt(0).m_value)) + ){}} public class State_1 : State { public State_1(Parser yyq):base(yyq, - ((DEFAULT_STATE)(yyq.StackAt(3).m_value)) - .yytext, - ((StateBody)(yyq.StackAt(1).m_value)) - ){}} + ((DEFAULT_STATE)(yyq.StackAt(3).m_value)) + .yytext, + ((StateBody)(yyq.StackAt(1).m_value)) + ){}} public class State_2 : State { public State_2(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(3).m_value)) - .yytext, - ((StateBody)(yyq.StackAt(1).m_value)) - ){}} + ((IDENT)(yyq.StackAt(3).m_value)) + .yytext, + ((StateBody)(yyq.StackAt(1).m_value)) + ){}} public class StateBody_1 : StateBody { public StateBody_1(Parser yyq):base(yyq, - ((StateEvent)(yyq.StackAt(0).m_value)) - ){}} + ((StateEvent)(yyq.StackAt(0).m_value)) + ){}} public class StateBody_2 : StateBody { public StateBody_2(Parser yyq):base(yyq, - ((StateBody)(yyq.StackAt(1).m_value)) - , - ((StateEvent)(yyq.StackAt(0).m_value)) - ){}} + ((StateBody)(yyq.StackAt(1).m_value)) + , + ((StateEvent)(yyq.StackAt(0).m_value)) + ){}} public class StateBody_3 : StateBody { public StateBody_3(Parser yyq):base(yyq, - ((VoidArgStateEvent)(yyq.StackAt(0).m_value)) - ){}} + ((VoidArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} public class StateBody_4 : StateBody { public StateBody_4(Parser yyq):base(yyq, - ((StateBody)(yyq.StackAt(1).m_value)) - , - ((VoidArgStateEvent)(yyq.StackAt(0).m_value)) - ){}} + ((StateBody)(yyq.StackAt(1).m_value)) + , + ((VoidArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} public class StateBody_5 : StateBody { public StateBody_5(Parser yyq):base(yyq, - ((KeyArgStateEvent)(yyq.StackAt(0).m_value)) - ){}} + ((KeyArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} public class StateBody_6 : StateBody { public StateBody_6(Parser yyq):base(yyq, - ((StateBody)(yyq.StackAt(1).m_value)) - , - ((KeyArgStateEvent)(yyq.StackAt(0).m_value)) - ){}} + ((StateBody)(yyq.StackAt(1).m_value)) + , + ((KeyArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} public class StateBody_7 : StateBody { public StateBody_7(Parser yyq):base(yyq, - ((IntArgStateEvent)(yyq.StackAt(0).m_value)) - ){}} + ((IntArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} public class StateBody_8 : StateBody { public StateBody_8(Parser yyq):base(yyq, - ((StateBody)(yyq.StackAt(1).m_value)) - , - ((IntArgStateEvent)(yyq.StackAt(0).m_value)) - ){}} + ((StateBody)(yyq.StackAt(1).m_value)) + , + ((IntArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} public class StateBody_9 : StateBody { public StateBody_9(Parser yyq):base(yyq, - ((VectorArgStateEvent)(yyq.StackAt(0).m_value)) - ){}} + ((VectorArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} public class StateBody_10 : StateBody { public StateBody_10(Parser yyq):base(yyq, - ((StateBody)(yyq.StackAt(1).m_value)) - , - ((VectorArgStateEvent)(yyq.StackAt(0).m_value)) - ){}} + ((StateBody)(yyq.StackAt(1).m_value)) + , + ((VectorArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} public class StateBody_11 : StateBody { public StateBody_11(Parser yyq):base(yyq, - ((IntRotRotArgStateEvent)(yyq.StackAt(0).m_value)) - ){}} + ((IntRotRotArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} public class StateBody_12 : StateBody { public StateBody_12(Parser yyq):base(yyq, - ((StateBody)(yyq.StackAt(1).m_value)) - , - ((IntRotRotArgStateEvent)(yyq.StackAt(0).m_value)) - ){}} + ((StateBody)(yyq.StackAt(1).m_value)) + , + ((IntRotRotArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} public class StateBody_13 : StateBody { public StateBody_13(Parser yyq):base(yyq, - ((IntVecVecArgStateEvent)(yyq.StackAt(0).m_value)) - ){}} + ((IntVecVecArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} public class StateBody_14 : StateBody { public StateBody_14(Parser yyq):base(yyq, - ((StateBody)(yyq.StackAt(1).m_value)) - , - ((IntVecVecArgStateEvent)(yyq.StackAt(0).m_value)) - ){}} + ((StateBody)(yyq.StackAt(1).m_value)) + , + ((IntVecVecArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} public class StateBody_15 : StateBody { public StateBody_15(Parser yyq):base(yyq, - ((KeyIntIntArgStateEvent)(yyq.StackAt(0).m_value)) - ){}} + ((KeyIntIntArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} public class StateBody_16 : StateBody { public StateBody_16(Parser yyq):base(yyq, - ((StateBody)(yyq.StackAt(1).m_value)) - , - ((KeyIntIntArgStateEvent)(yyq.StackAt(0).m_value)) - ){}} + ((StateBody)(yyq.StackAt(1).m_value)) + , + ((KeyIntIntArgStateEvent)(yyq.StackAt(0).m_value)) + ){}} public class StateEvent_1 : StateEvent { public StateEvent_1(Parser yyq):base(yyq, - ((Event)(yyq.StackAt(4).m_value)) - .yytext, - ((ArgumentDeclarationList)(yyq.StackAt(2).m_value)) - , - ((CompoundStatement)(yyq.StackAt(0).m_value)) - ){}} + ((Event)(yyq.StackAt(4).m_value)) + .yytext, + ((ArgumentDeclarationList)(yyq.StackAt(2).m_value)) + , + ((CompoundStatement)(yyq.StackAt(0).m_value)) + ){}} public class VoidArgStateEvent_1 : VoidArgStateEvent { public VoidArgStateEvent_1(Parser yyq):base(yyq, - ((VoidArgEvent)(yyq.StackAt(3).m_value)) - .yytext, - ((CompoundStatement)(yyq.StackAt(0).m_value)) - ){}} + ((VoidArgEvent)(yyq.StackAt(3).m_value)) + .yytext, + ((CompoundStatement)(yyq.StackAt(0).m_value)) + ){}} public class KeyArgStateEvent_1 : KeyArgStateEvent { public KeyArgStateEvent_1(Parser yyq):base(yyq, - ((KeyArgEvent)(yyq.StackAt(4).m_value)) - .yytext, - ((KeyArgumentDeclarationList)(yyq.StackAt(2).m_value)) - , - ((CompoundStatement)(yyq.StackAt(0).m_value)) - ){}} + ((KeyArgEvent)(yyq.StackAt(4).m_value)) + .yytext, + ((KeyArgumentDeclarationList)(yyq.StackAt(2).m_value)) + , + ((CompoundStatement)(yyq.StackAt(0).m_value)) + ){}} public class IntArgStateEvent_1 : IntArgStateEvent { public IntArgStateEvent_1(Parser yyq):base(yyq, - ((IntArgEvent)(yyq.StackAt(4).m_value)) - .yytext, - ((IntArgumentDeclarationList)(yyq.StackAt(2).m_value)) - , - ((CompoundStatement)(yyq.StackAt(0).m_value)) - ){}} + ((IntArgEvent)(yyq.StackAt(4).m_value)) + .yytext, + ((IntArgumentDeclarationList)(yyq.StackAt(2).m_value)) + , + ((CompoundStatement)(yyq.StackAt(0).m_value)) + ){}} public class VectorArgStateEvent_1 : VectorArgStateEvent { public VectorArgStateEvent_1(Parser yyq):base(yyq, - ((VectorArgEvent)(yyq.StackAt(4).m_value)) - .yytext, - ((VectorArgumentDeclarationList)(yyq.StackAt(2).m_value)) - , - ((CompoundStatement)(yyq.StackAt(0).m_value)) - ){}} + ((VectorArgEvent)(yyq.StackAt(4).m_value)) + .yytext, + ((VectorArgumentDeclarationList)(yyq.StackAt(2).m_value)) + , + ((CompoundStatement)(yyq.StackAt(0).m_value)) + ){}} public class IntRotRotArgStateEvent_1 : IntRotRotArgStateEvent { public IntRotRotArgStateEvent_1(Parser yyq):base(yyq, - ((IntRotRotArgEvent)(yyq.StackAt(4).m_value)) - .yytext, - ((IntRotRotArgumentDeclarationList)(yyq.StackAt(2).m_value)) - , - ((CompoundStatement)(yyq.StackAt(0).m_value)) - ){}} + ((IntRotRotArgEvent)(yyq.StackAt(4).m_value)) + .yytext, + ((IntRotRotArgumentDeclarationList)(yyq.StackAt(2).m_value)) + , + ((CompoundStatement)(yyq.StackAt(0).m_value)) + ){}} public class IntVecVecArgStateEvent_1 : IntVecVecArgStateEvent { public IntVecVecArgStateEvent_1(Parser yyq):base(yyq, - ((IntVecVecArgEvent)(yyq.StackAt(4).m_value)) - .yytext, - ((IntVecVecArgumentDeclarationList)(yyq.StackAt(2).m_value)) - , - ((CompoundStatement)(yyq.StackAt(0).m_value)) - ){}} + ((IntVecVecArgEvent)(yyq.StackAt(4).m_value)) + .yytext, + ((IntVecVecArgumentDeclarationList)(yyq.StackAt(2).m_value)) + , + ((CompoundStatement)(yyq.StackAt(0).m_value)) + ){}} public class KeyIntIntArgStateEvent_1 : KeyIntIntArgStateEvent { public KeyIntIntArgStateEvent_1(Parser yyq):base(yyq, - ((KeyIntIntArgEvent)(yyq.StackAt(4).m_value)) - .yytext, - ((KeyIntIntArgumentDeclarationList)(yyq.StackAt(2).m_value)) - , - ((CompoundStatement)(yyq.StackAt(0).m_value)) - ){}} + ((KeyIntIntArgEvent)(yyq.StackAt(4).m_value)) + .yytext, + ((KeyIntIntArgumentDeclarationList)(yyq.StackAt(2).m_value)) + , + ((CompoundStatement)(yyq.StackAt(0).m_value)) + ){}} public class ArgumentDeclarationList_1 : ArgumentDeclarationList { public ArgumentDeclarationList_1(Parser yyq):base(yyq, - ((Declaration)(yyq.StackAt(0).m_value)) - ){}} + ((Declaration)(yyq.StackAt(0).m_value)) + ){}} public class ArgumentDeclarationList_2 : ArgumentDeclarationList { public ArgumentDeclarationList_2(Parser yyq):base(yyq, - ((ArgumentDeclarationList)(yyq.StackAt(2).m_value)) - , - ((Declaration)(yyq.StackAt(0).m_value)) - ){}} + ((ArgumentDeclarationList)(yyq.StackAt(2).m_value)) + , + ((Declaration)(yyq.StackAt(0).m_value)) + ){}} public class KeyArgumentDeclarationList_1 : KeyArgumentDeclarationList { public KeyArgumentDeclarationList_1(Parser yyq):base(yyq, - ((KeyDeclaration)(yyq.StackAt(0).m_value)) - ){}} + ((KeyDeclaration)(yyq.StackAt(0).m_value)) + ){}} public class IntArgumentDeclarationList_1 : IntArgumentDeclarationList { public IntArgumentDeclarationList_1(Parser yyq):base(yyq, - ((IntDeclaration)(yyq.StackAt(0).m_value)) - ){}} + ((IntDeclaration)(yyq.StackAt(0).m_value)) + ){}} public class VectorArgumentDeclarationList_1 : VectorArgumentDeclarationList { public VectorArgumentDeclarationList_1(Parser yyq):base(yyq, - ((VecDeclaration)(yyq.StackAt(0).m_value)) - ){}} + ((VecDeclaration)(yyq.StackAt(0).m_value)) + ){}} public class IntRotRotArgumentDeclarationList_1 : IntRotRotArgumentDeclarationList { public IntRotRotArgumentDeclarationList_1(Parser yyq):base(yyq, - ((IntDeclaration)(yyq.StackAt(4).m_value)) - , - ((RotDeclaration)(yyq.StackAt(2).m_value)) - , - ((RotDeclaration)(yyq.StackAt(0).m_value)) - ){}} + ((IntDeclaration)(yyq.StackAt(4).m_value)) + , + ((RotDeclaration)(yyq.StackAt(2).m_value)) + , + ((RotDeclaration)(yyq.StackAt(0).m_value)) + ){}} public class IntVecVecArgumentDeclarationList_1 : IntVecVecArgumentDeclarationList { public IntVecVecArgumentDeclarationList_1(Parser yyq):base(yyq, - ((IntDeclaration)(yyq.StackAt(4).m_value)) - , - ((VecDeclaration)(yyq.StackAt(2).m_value)) - , - ((VecDeclaration)(yyq.StackAt(0).m_value)) - ){}} + ((IntDeclaration)(yyq.StackAt(4).m_value)) + , + ((VecDeclaration)(yyq.StackAt(2).m_value)) + , + ((VecDeclaration)(yyq.StackAt(0).m_value)) + ){}} public class KeyIntIntArgumentDeclarationList_1 : KeyIntIntArgumentDeclarationList { public KeyIntIntArgumentDeclarationList_1(Parser yyq):base(yyq, - ((KeyDeclaration)(yyq.StackAt(4).m_value)) - , - ((IntDeclaration)(yyq.StackAt(2).m_value)) - , - ((IntDeclaration)(yyq.StackAt(0).m_value)) - ){}} + ((KeyDeclaration)(yyq.StackAt(4).m_value)) + , + ((IntDeclaration)(yyq.StackAt(2).m_value)) + , + ((IntDeclaration)(yyq.StackAt(0).m_value)) + ){}} public class Declaration_1 : Declaration { public Declaration_1(Parser yyq):base(yyq, - ((Typename)(yyq.StackAt(1).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((Typename)(yyq.StackAt(1).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class KeyDeclaration_1 : KeyDeclaration { public KeyDeclaration_1(Parser yyq):base(yyq, - ((KEY_TYPE)(yyq.StackAt(1).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((KEY_TYPE)(yyq.StackAt(1).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class IntDeclaration_1 : IntDeclaration { public IntDeclaration_1(Parser yyq):base(yyq, - ((INTEGER_TYPE)(yyq.StackAt(1).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((INTEGER_TYPE)(yyq.StackAt(1).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class VecDeclaration_1 : VecDeclaration { public VecDeclaration_1(Parser yyq):base(yyq, - ((VECTOR_TYPE)(yyq.StackAt(1).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((VECTOR_TYPE)(yyq.StackAt(1).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class RotDeclaration_1 : RotDeclaration { public RotDeclaration_1(Parser yyq):base(yyq, - ((ROTATION_TYPE)(yyq.StackAt(1).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((ROTATION_TYPE)(yyq.StackAt(1).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class CompoundStatement_1 : CompoundStatement { public CompoundStatement_1(Parser yyq):base(yyq){}} public class CompoundStatement_2 : CompoundStatement { public CompoundStatement_2(Parser yyq):base(yyq, - ((StatementList)(yyq.StackAt(1).m_value)) - ){}} + ((StatementList)(yyq.StackAt(1).m_value)) + ){}} public class StatementList_1 : StatementList { public StatementList_1(Parser yyq):base(yyq, - ((Statement)(yyq.StackAt(0).m_value)) - ){}} + ((Statement)(yyq.StackAt(0).m_value)) + ){}} public class StatementList_2 : StatementList { public StatementList_2(Parser yyq):base(yyq, - ((StatementList)(yyq.StackAt(1).m_value)) - , - ((Statement)(yyq.StackAt(0).m_value)) - ){}} + ((StatementList)(yyq.StackAt(1).m_value)) + , + ((Statement)(yyq.StackAt(0).m_value)) + ){}} public class EmptyStatement_1 : EmptyStatement { public EmptyStatement_1(Parser yyq):base(yyq){}} public class Statement_1 : Statement { public Statement_1(Parser yyq):base(yyq, - ((EmptyStatement)(yyq.StackAt(1).m_value)) - ){}} + ((EmptyStatement)(yyq.StackAt(1).m_value)) + ){}} public class Statement_2 : Statement { public Statement_2(Parser yyq):base(yyq, - ((Declaration)(yyq.StackAt(1).m_value)) - ){}} + ((Declaration)(yyq.StackAt(1).m_value)) + ){}} public class Statement_3 : Statement { public Statement_3(Parser yyq):base(yyq, - ((Assignment)(yyq.StackAt(1).m_value)) - ){}} + ((Assignment)(yyq.StackAt(1).m_value)) + ){}} public class Statement_4 : Statement { public Statement_4(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(1).m_value)) - ){}} + ((Expression)(yyq.StackAt(1).m_value)) + ){}} public class Statement_5 : Statement { public Statement_5(Parser yyq):base(yyq, - ((ReturnStatement)(yyq.StackAt(1).m_value)) - ){}} + ((ReturnStatement)(yyq.StackAt(1).m_value)) + ){}} public class Statement_6 : Statement { public Statement_6(Parser yyq):base(yyq, - ((JumpLabel)(yyq.StackAt(1).m_value)) - ){}} + ((JumpLabel)(yyq.StackAt(1).m_value)) + ){}} public class Statement_7 : Statement { public Statement_7(Parser yyq):base(yyq, - ((JumpStatement)(yyq.StackAt(1).m_value)) - ){}} + ((JumpStatement)(yyq.StackAt(1).m_value)) + ){}} public class Statement_8 : Statement { public Statement_8(Parser yyq):base(yyq, - ((StateChange)(yyq.StackAt(1).m_value)) - ){}} + ((StateChange)(yyq.StackAt(1).m_value)) + ){}} public class Statement_9 : Statement { public Statement_9(Parser yyq):base(yyq, - ((IfStatement)(yyq.StackAt(0).m_value)) - ){}} + ((IfStatement)(yyq.StackAt(0).m_value)) + ){}} public class Statement_10 : Statement { public Statement_10(Parser yyq):base(yyq, - ((WhileStatement)(yyq.StackAt(0).m_value)) - ){}} + ((WhileStatement)(yyq.StackAt(0).m_value)) + ){}} public class Statement_11 : Statement { public Statement_11(Parser yyq):base(yyq, - ((DoWhileStatement)(yyq.StackAt(0).m_value)) - ){}} + ((DoWhileStatement)(yyq.StackAt(0).m_value)) + ){}} public class Statement_12 : Statement { public Statement_12(Parser yyq):base(yyq, - ((ForLoop)(yyq.StackAt(0).m_value)) - ){}} + ((ForLoop)(yyq.StackAt(0).m_value)) + ){}} public class Statement_13 : Statement { public Statement_13(Parser yyq):base(yyq, - ((CompoundStatement)(yyq.StackAt(0).m_value)) - ){}} + ((CompoundStatement)(yyq.StackAt(0).m_value)) + ){}} public class JumpLabel_1 : JumpLabel { public JumpLabel_1(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class JumpStatement_1 : JumpStatement { public JumpStatement_1(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class StateChange_1 : StateChange { public StateChange_1(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class StateChange_2 : StateChange { public StateChange_2(Parser yyq):base(yyq, - ((DEFAULT_STATE)(yyq.StackAt(0).m_value)) - .yytext){}} + ((DEFAULT_STATE)(yyq.StackAt(0).m_value)) + .yytext){}} public class IfStatement_1 : IfStatement { public IfStatement_1(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Statement)(yyq.StackAt(0).m_value)) - ){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Statement)(yyq.StackAt(0).m_value)) + ){}} public class IfStatement_2 : IfStatement { public IfStatement_2(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(4).m_value)) - , - ((Statement)(yyq.StackAt(2).m_value)) - , - ((Statement)(yyq.StackAt(0).m_value)) - ){}} + ((Expression)(yyq.StackAt(4).m_value)) + , + ((Statement)(yyq.StackAt(2).m_value)) + , + ((Statement)(yyq.StackAt(0).m_value)) + ){}} public class IfStatement_3 : IfStatement { public IfStatement_3(Parser yyq):base(yyq, - ((SimpleAssignment)(yyq.StackAt(2).m_value)) - , - ((Statement)(yyq.StackAt(0).m_value)) - ){}} + ((SimpleAssignment)(yyq.StackAt(2).m_value)) + , + ((Statement)(yyq.StackAt(0).m_value)) + ){}} public class IfStatement_4 : IfStatement { public IfStatement_4(Parser yyq):base(yyq, - ((SimpleAssignment)(yyq.StackAt(4).m_value)) - , - ((Statement)(yyq.StackAt(2).m_value)) - , - ((Statement)(yyq.StackAt(0).m_value)) - ){}} + ((SimpleAssignment)(yyq.StackAt(4).m_value)) + , + ((Statement)(yyq.StackAt(2).m_value)) + , + ((Statement)(yyq.StackAt(0).m_value)) + ){}} public class WhileStatement_1 : WhileStatement { public WhileStatement_1(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Statement)(yyq.StackAt(0).m_value)) - ){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Statement)(yyq.StackAt(0).m_value)) + ){}} public class WhileStatement_2 : WhileStatement { public WhileStatement_2(Parser yyq):base(yyq, - ((SimpleAssignment)(yyq.StackAt(2).m_value)) - , - ((Statement)(yyq.StackAt(0).m_value)) - ){}} + ((SimpleAssignment)(yyq.StackAt(2).m_value)) + , + ((Statement)(yyq.StackAt(0).m_value)) + ){}} public class DoWhileStatement_1 : DoWhileStatement { public DoWhileStatement_1(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Statement)(yyq.StackAt(5).m_value)) - ){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Statement)(yyq.StackAt(5).m_value)) + ){}} public class DoWhileStatement_2 : DoWhileStatement { public DoWhileStatement_2(Parser yyq):base(yyq, - ((SimpleAssignment)(yyq.StackAt(2).m_value)) - , - ((Statement)(yyq.StackAt(5).m_value)) - ){}} + ((SimpleAssignment)(yyq.StackAt(2).m_value)) + , + ((Statement)(yyq.StackAt(5).m_value)) + ){}} public class ForLoop_1 : ForLoop { public ForLoop_1(Parser yyq):base(yyq, - ((ForLoopStatement)(yyq.StackAt(6).m_value)) - , - ((Expression)(yyq.StackAt(4).m_value)) - , - ((ForLoopStatement)(yyq.StackAt(2).m_value)) - , - ((Statement)(yyq.StackAt(0).m_value)) - ){}} + ((ForLoopStatement)(yyq.StackAt(6).m_value)) + , + ((Expression)(yyq.StackAt(4).m_value)) + , + ((ForLoopStatement)(yyq.StackAt(2).m_value)) + , + ((Statement)(yyq.StackAt(0).m_value)) + ){}} public class ForLoop_2 : ForLoop { - public ForLoop_2(Parser yyq):base(yyq,null, - ((Expression)(yyq.StackAt(4).m_value)) - , - ((ForLoopStatement)(yyq.StackAt(2).m_value)) - , - ((Statement)(yyq.StackAt(0).m_value)) - ){}} + public ForLoop_2(Parser yyq):base(yyq,null, + ((Expression)(yyq.StackAt(4).m_value)) + , + ((ForLoopStatement)(yyq.StackAt(2).m_value)) + , + ((Statement)(yyq.StackAt(0).m_value)) + ){}} public class ForLoopStatement_1 : ForLoopStatement { public ForLoopStatement_1(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(0).m_value)) - ){}} + ((Expression)(yyq.StackAt(0).m_value)) + ){}} public class ForLoopStatement_2 : ForLoopStatement { public ForLoopStatement_2(Parser yyq):base(yyq, - ((SimpleAssignment)(yyq.StackAt(0).m_value)) - ){}} + ((SimpleAssignment)(yyq.StackAt(0).m_value)) + ){}} public class ForLoopStatement_3 : ForLoopStatement { public ForLoopStatement_3(Parser yyq):base(yyq, - ((ForLoopStatement)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - ){}} + ((ForLoopStatement)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + ){}} public class ForLoopStatement_4 : ForLoopStatement { public ForLoopStatement_4(Parser yyq):base(yyq, - ((ForLoopStatement)(yyq.StackAt(2).m_value)) - , - ((SimpleAssignment)(yyq.StackAt(0).m_value)) - ){}} + ((ForLoopStatement)(yyq.StackAt(2).m_value)) + , + ((SimpleAssignment)(yyq.StackAt(0).m_value)) + ){}} public class Assignment_1 : Assignment { public Assignment_1(Parser yyq):base(yyq, - ((Declaration)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Declaration)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class Assignment_2 : Assignment { public Assignment_2(Parser yyq):base(yyq, - ((SimpleAssignment)(yyq.StackAt(0).m_value)) - ){}} + ((SimpleAssignment)(yyq.StackAt(0).m_value)) + ){}} public class SimpleAssignment_1 : SimpleAssignment { public SimpleAssignment_1(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((IDENT)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_2 : SimpleAssignment { public SimpleAssignment_2(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((PLUS_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((IDENT)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((PLUS_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_3 : SimpleAssignment { public SimpleAssignment_3(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((MINUS_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((IDENT)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((MINUS_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_4 : SimpleAssignment { public SimpleAssignment_4(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((STAR_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((IDENT)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((STAR_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_5 : SimpleAssignment { public SimpleAssignment_5(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((SLASH_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((IDENT)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((SLASH_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_6 : SimpleAssignment { public SimpleAssignment_6(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((PERCENT_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((IDENT)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((PERCENT_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_7 : SimpleAssignment { public SimpleAssignment_7(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(4).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(2).m_value)) - .yytext), - ((Expression)(yyq.StackAt(0).m_value)) - , - ((EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} +)yyq), + ((IDENT)(yyq.StackAt(4).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(2).m_value)) + .yytext), + ((Expression)(yyq.StackAt(0).m_value)) + , + ((EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_8 : SimpleAssignment { public SimpleAssignment_8(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(4).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(2).m_value)) - .yytext), - ((Expression)(yyq.StackAt(0).m_value)) - , - ((PLUS_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} +)yyq), + ((IDENT)(yyq.StackAt(4).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(2).m_value)) + .yytext), + ((Expression)(yyq.StackAt(0).m_value)) + , + ((PLUS_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_9 : SimpleAssignment { public SimpleAssignment_9(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(4).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(2).m_value)) - .yytext), - ((Expression)(yyq.StackAt(0).m_value)) - , - ((MINUS_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} +)yyq), + ((IDENT)(yyq.StackAt(4).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(2).m_value)) + .yytext), + ((Expression)(yyq.StackAt(0).m_value)) + , + ((MINUS_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_10 : SimpleAssignment { public SimpleAssignment_10(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(4).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(2).m_value)) - .yytext), - ((Expression)(yyq.StackAt(0).m_value)) - , - ((STAR_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} +)yyq), + ((IDENT)(yyq.StackAt(4).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(2).m_value)) + .yytext), + ((Expression)(yyq.StackAt(0).m_value)) + , + ((STAR_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_11 : SimpleAssignment { public SimpleAssignment_11(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(4).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(2).m_value)) - .yytext), - ((Expression)(yyq.StackAt(0).m_value)) - , - ((SLASH_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} +)yyq), + ((IDENT)(yyq.StackAt(4).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(2).m_value)) + .yytext), + ((Expression)(yyq.StackAt(0).m_value)) + , + ((SLASH_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_12 : SimpleAssignment { public SimpleAssignment_12(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(4).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(2).m_value)) - .yytext), - ((Expression)(yyq.StackAt(0).m_value)) - , - ((PERCENT_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} +)yyq), + ((IDENT)(yyq.StackAt(4).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(2).m_value)) + .yytext), + ((Expression)(yyq.StackAt(0).m_value)) + , + ((PERCENT_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_13 : SimpleAssignment { public SimpleAssignment_13(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(2).m_value)) - , - ((SimpleAssignment)(yyq.StackAt(0).m_value)) - , - ((EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((IDENT)(yyq.StackAt(2).m_value)) + , + ((SimpleAssignment)(yyq.StackAt(0).m_value)) + , + ((EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_14 : SimpleAssignment { public SimpleAssignment_14(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(2).m_value)) - , - ((SimpleAssignment)(yyq.StackAt(0).m_value)) - , - ((PLUS_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((IDENT)(yyq.StackAt(2).m_value)) + , + ((SimpleAssignment)(yyq.StackAt(0).m_value)) + , + ((PLUS_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_15 : SimpleAssignment { public SimpleAssignment_15(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(2).m_value)) - , - ((SimpleAssignment)(yyq.StackAt(0).m_value)) - , - ((MINUS_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((IDENT)(yyq.StackAt(2).m_value)) + , + ((SimpleAssignment)(yyq.StackAt(0).m_value)) + , + ((MINUS_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_16 : SimpleAssignment { public SimpleAssignment_16(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(2).m_value)) - , - ((SimpleAssignment)(yyq.StackAt(0).m_value)) - , - ((STAR_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((IDENT)(yyq.StackAt(2).m_value)) + , + ((SimpleAssignment)(yyq.StackAt(0).m_value)) + , + ((STAR_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_17 : SimpleAssignment { public SimpleAssignment_17(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(2).m_value)) - , - ((SimpleAssignment)(yyq.StackAt(0).m_value)) - , - ((SLASH_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((IDENT)(yyq.StackAt(2).m_value)) + , + ((SimpleAssignment)(yyq.StackAt(0).m_value)) + , + ((SLASH_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_18 : SimpleAssignment { public SimpleAssignment_18(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(2).m_value)) - , - ((SimpleAssignment)(yyq.StackAt(0).m_value)) - , - ((PERCENT_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((IDENT)(yyq.StackAt(2).m_value)) + , + ((SimpleAssignment)(yyq.StackAt(0).m_value)) + , + ((PERCENT_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_19 : SimpleAssignment { public SimpleAssignment_19(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(4).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(2).m_value)) - .yytext), - ((SimpleAssignment)(yyq.StackAt(0).m_value)) - , - ((EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} +)yyq), + ((IDENT)(yyq.StackAt(4).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(2).m_value)) + .yytext), + ((SimpleAssignment)(yyq.StackAt(0).m_value)) + , + ((EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_20 : SimpleAssignment { public SimpleAssignment_20(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(4).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(2).m_value)) - .yytext), - ((SimpleAssignment)(yyq.StackAt(0).m_value)) - , - ((PLUS_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} +)yyq), + ((IDENT)(yyq.StackAt(4).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(2).m_value)) + .yytext), + ((SimpleAssignment)(yyq.StackAt(0).m_value)) + , + ((PLUS_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_21 : SimpleAssignment { public SimpleAssignment_21(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(4).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(2).m_value)) - .yytext), - ((SimpleAssignment)(yyq.StackAt(0).m_value)) - , - ((MINUS_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} +)yyq), + ((IDENT)(yyq.StackAt(4).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(2).m_value)) + .yytext), + ((SimpleAssignment)(yyq.StackAt(0).m_value)) + , + ((MINUS_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_22 : SimpleAssignment { public SimpleAssignment_22(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(4).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(2).m_value)) - .yytext), - ((SimpleAssignment)(yyq.StackAt(0).m_value)) - , - ((STAR_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} +)yyq), + ((IDENT)(yyq.StackAt(4).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(2).m_value)) + .yytext), + ((SimpleAssignment)(yyq.StackAt(0).m_value)) + , + ((STAR_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_23 : SimpleAssignment { public SimpleAssignment_23(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(4).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(2).m_value)) - .yytext), - ((SimpleAssignment)(yyq.StackAt(0).m_value)) - , - ((SLASH_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} +)yyq), + ((IDENT)(yyq.StackAt(4).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(2).m_value)) + .yytext), + ((SimpleAssignment)(yyq.StackAt(0).m_value)) + , + ((SLASH_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class SimpleAssignment_24 : SimpleAssignment { public SimpleAssignment_24(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(4).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(2).m_value)) - .yytext), - ((SimpleAssignment)(yyq.StackAt(0).m_value)) - , - ((PERCENT_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} +)yyq), + ((IDENT)(yyq.StackAt(4).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(2).m_value)) + .yytext), + ((SimpleAssignment)(yyq.StackAt(0).m_value)) + , + ((PERCENT_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class ReturnStatement_1 : ReturnStatement { public ReturnStatement_1(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(0).m_value)) - ){}} + ((Expression)(yyq.StackAt(0).m_value)) + ){}} public class ReturnStatement_2 : ReturnStatement { public ReturnStatement_2(Parser yyq):base(yyq){}} public class Constant_1 : Constant { - public Constant_1(Parser yyq):base(yyq,"integer", - ((INTEGER_CONSTANT)(yyq.StackAt(0).m_value)) - .yytext){}} + public Constant_1(Parser yyq):base(yyq,"integer", + ((INTEGER_CONSTANT)(yyq.StackAt(0).m_value)) + .yytext){}} public class Constant_2 : Constant { - public Constant_2(Parser yyq):base(yyq,"integer", - ((HEX_INTEGER_CONSTANT)(yyq.StackAt(0).m_value)) - .yytext){}} + public Constant_2(Parser yyq):base(yyq,"integer", + ((HEX_INTEGER_CONSTANT)(yyq.StackAt(0).m_value)) + .yytext){}} public class Constant_3 : Constant { - public Constant_3(Parser yyq):base(yyq,"float", - ((FLOAT_CONSTANT)(yyq.StackAt(0).m_value)) - .yytext){}} + public Constant_3(Parser yyq):base(yyq,"float", + ((FLOAT_CONSTANT)(yyq.StackAt(0).m_value)) + .yytext){}} public class Constant_4 : Constant { - public Constant_4(Parser yyq):base(yyq,"string", - ((STRING_CONSTANT)(yyq.StackAt(0).m_value)) - .yytext){}} + public Constant_4(Parser yyq):base(yyq,"string", + ((STRING_CONSTANT)(yyq.StackAt(0).m_value)) + .yytext){}} public class ListConstant_1 : ListConstant { public ListConstant_1(Parser yyq):base(yyq, - ((ArgumentList)(yyq.StackAt(1).m_value)) - ){}} + ((ArgumentList)(yyq.StackAt(1).m_value)) + ){}} public class VectorConstant_1 : VectorConstant { public VectorConstant_1(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(5).m_value)) - , - ((Expression)(yyq.StackAt(3).m_value)) - , - ((Expression)(yyq.StackAt(1).m_value)) - ){}} + ((Expression)(yyq.StackAt(5).m_value)) + , + ((Expression)(yyq.StackAt(3).m_value)) + , + ((Expression)(yyq.StackAt(1).m_value)) + ){}} public class RotationConstant_1 : RotationConstant { public RotationConstant_1(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(7).m_value)) - , - ((Expression)(yyq.StackAt(5).m_value)) - , - ((Expression)(yyq.StackAt(3).m_value)) - , - ((Expression)(yyq.StackAt(1).m_value)) - ){}} + ((Expression)(yyq.StackAt(7).m_value)) + , + ((Expression)(yyq.StackAt(5).m_value)) + , + ((Expression)(yyq.StackAt(3).m_value)) + , + ((Expression)(yyq.StackAt(1).m_value)) + ){}} public class ConstantExpression_1 : ConstantExpression { public ConstantExpression_1(Parser yyq):base(yyq, - ((Constant)(yyq.StackAt(0).m_value)) - ){}} + ((Constant)(yyq.StackAt(0).m_value)) + ){}} public class IdentExpression_1 : IdentExpression { public IdentExpression_1(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class IdentDotExpression_1 : IdentDotExpression { public IdentDotExpression_1(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(2).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((IDENT)(yyq.StackAt(2).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class IncrementDecrementExpression_1 : IncrementDecrementExpression { public IncrementDecrementExpression_1(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(1).m_value)) - .yytext, - ((INCREMENT)(yyq.StackAt(0).m_value)) - .yytext, true){}} + ((IDENT)(yyq.StackAt(1).m_value)) + .yytext, + ((INCREMENT)(yyq.StackAt(0).m_value)) + .yytext, true){}} public class IncrementDecrementExpression_2 : IncrementDecrementExpression { public IncrementDecrementExpression_2(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(1).m_value)) - .yytext, - ((DECREMENT)(yyq.StackAt(0).m_value)) - .yytext, true){}} + ((IDENT)(yyq.StackAt(1).m_value)) + .yytext, + ((DECREMENT)(yyq.StackAt(0).m_value)) + .yytext, true){}} public class IncrementDecrementExpression_3 : IncrementDecrementExpression { public IncrementDecrementExpression_3(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(3).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(1).m_value)) - .yytext), - ((INCREMENT)(yyq.StackAt(0).m_value)) - .yytext, true){}} +)yyq), + ((IDENT)(yyq.StackAt(3).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(1).m_value)) + .yytext), + ((INCREMENT)(yyq.StackAt(0).m_value)) + .yytext, true){}} public class IncrementDecrementExpression_4 : IncrementDecrementExpression { public IncrementDecrementExpression_4(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(3).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(1).m_value)) - .yytext), - ((DECREMENT)(yyq.StackAt(0).m_value)) - .yytext, true){}} +)yyq), + ((IDENT)(yyq.StackAt(3).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(1).m_value)) + .yytext), + ((DECREMENT)(yyq.StackAt(0).m_value)) + .yytext, true){}} public class IncrementDecrementExpression_5 : IncrementDecrementExpression { public IncrementDecrementExpression_5(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(0).m_value)) - .yytext, - ((INCREMENT)(yyq.StackAt(1).m_value)) - .yytext, false){}} + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext, + ((INCREMENT)(yyq.StackAt(1).m_value)) + .yytext, false){}} public class IncrementDecrementExpression_6 : IncrementDecrementExpression { public IncrementDecrementExpression_6(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(0).m_value)) - .yytext, - ((DECREMENT)(yyq.StackAt(1).m_value)) - .yytext, false){}} + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext, + ((DECREMENT)(yyq.StackAt(1).m_value)) + .yytext, false){}} public class IncrementDecrementExpression_7 : IncrementDecrementExpression { public IncrementDecrementExpression_7(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(2).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(0).m_value)) - .yytext), - ((INCREMENT)(yyq.StackAt(3).m_value)) - .yytext, false){}} +)yyq), + ((IDENT)(yyq.StackAt(2).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext), + ((INCREMENT)(yyq.StackAt(3).m_value)) + .yytext, false){}} public class IncrementDecrementExpression_8 : IncrementDecrementExpression { public IncrementDecrementExpression_8(Parser yyq):base(yyq,new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(2).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(0).m_value)) - .yytext), - ((DECREMENT)(yyq.StackAt(3).m_value)) - .yytext, false){}} +)yyq), + ((IDENT)(yyq.StackAt(2).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext), + ((DECREMENT)(yyq.StackAt(3).m_value)) + .yytext, false){}} public class FunctionCallExpression_1 : FunctionCallExpression { public FunctionCallExpression_1(Parser yyq):base(yyq, - ((FunctionCall)(yyq.StackAt(0).m_value)) - ){}} + ((FunctionCall)(yyq.StackAt(0).m_value)) + ){}} public class BinaryExpression_1 : BinaryExpression { public BinaryExpression_1(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((PLUS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((PLUS)(yyq.StackAt(1).m_value)) + .yytext){}} public class BinaryExpression_2 : BinaryExpression { public BinaryExpression_2(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((MINUS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((MINUS)(yyq.StackAt(1).m_value)) + .yytext){}} public class BinaryExpression_3 : BinaryExpression { public BinaryExpression_3(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((STAR)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((STAR)(yyq.StackAt(1).m_value)) + .yytext){}} public class BinaryExpression_4 : BinaryExpression { public BinaryExpression_4(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((SLASH)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((SLASH)(yyq.StackAt(1).m_value)) + .yytext){}} public class BinaryExpression_5 : BinaryExpression { public BinaryExpression_5(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((PERCENT)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((PERCENT)(yyq.StackAt(1).m_value)) + .yytext){}} public class BinaryExpression_6 : BinaryExpression { public BinaryExpression_6(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((AMP)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((AMP)(yyq.StackAt(1).m_value)) + .yytext){}} public class BinaryExpression_7 : BinaryExpression { public BinaryExpression_7(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((STROKE)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((STROKE)(yyq.StackAt(1).m_value)) + .yytext){}} public class BinaryExpression_8 : BinaryExpression { public BinaryExpression_8(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((CARET)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((CARET)(yyq.StackAt(1).m_value)) + .yytext){}} public class BinaryExpression_9 : BinaryExpression { public BinaryExpression_9(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((RIGHT_ANGLE)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((RIGHT_ANGLE)(yyq.StackAt(1).m_value)) + .yytext){}} public class BinaryExpression_10 : BinaryExpression { public BinaryExpression_10(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((LEFT_ANGLE)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((LEFT_ANGLE)(yyq.StackAt(1).m_value)) + .yytext){}} public class BinaryExpression_11 : BinaryExpression { public BinaryExpression_11(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((EQUALS_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((EQUALS_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class BinaryExpression_12 : BinaryExpression { public BinaryExpression_12(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((EXCLAMATION_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((EXCLAMATION_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class BinaryExpression_13 : BinaryExpression { public BinaryExpression_13(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((LESS_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((LESS_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class BinaryExpression_14 : BinaryExpression { public BinaryExpression_14(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((GREATER_EQUALS)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((GREATER_EQUALS)(yyq.StackAt(1).m_value)) + .yytext){}} public class BinaryExpression_15 : BinaryExpression { public BinaryExpression_15(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((AMP_AMP)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((AMP_AMP)(yyq.StackAt(1).m_value)) + .yytext){}} public class BinaryExpression_16 : BinaryExpression { public BinaryExpression_16(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((STROKE_STROKE)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((STROKE_STROKE)(yyq.StackAt(1).m_value)) + .yytext){}} public class BinaryExpression_17 : BinaryExpression { public BinaryExpression_17(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((LEFT_SHIFT)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((LEFT_SHIFT)(yyq.StackAt(1).m_value)) + .yytext){}} public class BinaryExpression_18 : BinaryExpression { public BinaryExpression_18(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(2).m_value)) - , - ((Expression)(yyq.StackAt(0).m_value)) - , - ((RIGHT_SHIFT)(yyq.StackAt(1).m_value)) - .yytext){}} + ((Expression)(yyq.StackAt(2).m_value)) + , + ((Expression)(yyq.StackAt(0).m_value)) + , + ((RIGHT_SHIFT)(yyq.StackAt(1).m_value)) + .yytext){}} public class UnaryExpression_1 : UnaryExpression { public UnaryExpression_1(Parser yyq):base(yyq, - ((EXCLAMATION)(yyq.StackAt(1).m_value)) - .yytext, - ((Expression)(yyq.StackAt(0).m_value)) - ){}} + ((EXCLAMATION)(yyq.StackAt(1).m_value)) + .yytext, + ((Expression)(yyq.StackAt(0).m_value)) + ){}} public class UnaryExpression_2 : UnaryExpression { public UnaryExpression_2(Parser yyq):base(yyq, - ((MINUS)(yyq.StackAt(1).m_value)) - .yytext, - ((Expression)(yyq.StackAt(0).m_value)) - ){}} + ((MINUS)(yyq.StackAt(1).m_value)) + .yytext, + ((Expression)(yyq.StackAt(0).m_value)) + ){}} public class UnaryExpression_3 : UnaryExpression { public UnaryExpression_3(Parser yyq):base(yyq, - ((TILDE)(yyq.StackAt(1).m_value)) - .yytext, - ((Expression)(yyq.StackAt(0).m_value)) - ){}} + ((TILDE)(yyq.StackAt(1).m_value)) + .yytext, + ((Expression)(yyq.StackAt(0).m_value)) + ){}} public class ParenthesisExpression_1 : ParenthesisExpression { public ParenthesisExpression_1(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(1).m_value)) - ){}} + ((Expression)(yyq.StackAt(1).m_value)) + ){}} public class ParenthesisExpression_2 : ParenthesisExpression { public ParenthesisExpression_2(Parser yyq):base(yyq, - ((SimpleAssignment)(yyq.StackAt(1).m_value)) - ){}} + ((SimpleAssignment)(yyq.StackAt(1).m_value)) + ){}} public class TypecastExpression_1 : TypecastExpression { public TypecastExpression_1(Parser yyq):base(yyq, - ((Typename)(yyq.StackAt(2).m_value)) - .yytext, - ((Constant)(yyq.StackAt(0).m_value)) - ){}} + ((Typename)(yyq.StackAt(2).m_value)) + .yytext, + ((Constant)(yyq.StackAt(0).m_value)) + ){}} public class TypecastExpression_2 : TypecastExpression { public TypecastExpression_2(Parser yyq):base(yyq, - ((Typename)(yyq.StackAt(2).m_value)) - .yytext, new IdentExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(0).m_value)) - .yytext)){}} + ((Typename)(yyq.StackAt(2).m_value)) + .yytext, new IdentExpression(((LSLSyntax +)yyq), + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext)){}} public class TypecastExpression_3 : TypecastExpression { public TypecastExpression_3(Parser yyq):base(yyq, - ((Typename)(yyq.StackAt(4).m_value)) - .yytext, new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(2).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(0).m_value)) - .yytext)){}} + ((Typename)(yyq.StackAt(4).m_value)) + .yytext, new IdentDotExpression(((LSLSyntax +)yyq), + ((IDENT)(yyq.StackAt(2).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(0).m_value)) + .yytext)){}} public class TypecastExpression_4 : TypecastExpression { public TypecastExpression_4(Parser yyq):base(yyq, - ((Typename)(yyq.StackAt(3).m_value)) - .yytext, new IncrementDecrementExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(1).m_value)) - .yytext, - ((INCREMENT)(yyq.StackAt(0).m_value)) - .yytext, true)){}} + ((Typename)(yyq.StackAt(3).m_value)) + .yytext, new IncrementDecrementExpression(((LSLSyntax +)yyq), + ((IDENT)(yyq.StackAt(1).m_value)) + .yytext, + ((INCREMENT)(yyq.StackAt(0).m_value)) + .yytext, true)){}} public class TypecastExpression_5 : TypecastExpression { public TypecastExpression_5(Parser yyq):base(yyq, - ((Typename)(yyq.StackAt(5).m_value)) - .yytext, new IncrementDecrementExpression(((LSLSyntax + ((Typename)(yyq.StackAt(5).m_value)) + .yytext, new IncrementDecrementExpression(((LSLSyntax )yyq), new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(3).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(1).m_value)) - .yytext), - ((INCREMENT)(yyq.StackAt(0).m_value)) - .yytext, true)){}} +)yyq), + ((IDENT)(yyq.StackAt(3).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(1).m_value)) + .yytext), + ((INCREMENT)(yyq.StackAt(0).m_value)) + .yytext, true)){}} public class TypecastExpression_6 : TypecastExpression { public TypecastExpression_6(Parser yyq):base(yyq, - ((Typename)(yyq.StackAt(3).m_value)) - .yytext, new IncrementDecrementExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(1).m_value)) - .yytext, - ((DECREMENT)(yyq.StackAt(0).m_value)) - .yytext, true)){}} + ((Typename)(yyq.StackAt(3).m_value)) + .yytext, new IncrementDecrementExpression(((LSLSyntax +)yyq), + ((IDENT)(yyq.StackAt(1).m_value)) + .yytext, + ((DECREMENT)(yyq.StackAt(0).m_value)) + .yytext, true)){}} public class TypecastExpression_7 : TypecastExpression { public TypecastExpression_7(Parser yyq):base(yyq, - ((Typename)(yyq.StackAt(5).m_value)) - .yytext, new IncrementDecrementExpression(((LSLSyntax + ((Typename)(yyq.StackAt(5).m_value)) + .yytext, new IncrementDecrementExpression(((LSLSyntax )yyq), new IdentDotExpression(((LSLSyntax -)yyq), - ((IDENT)(yyq.StackAt(3).m_value)) - .yytext, - ((IDENT)(yyq.StackAt(1).m_value)) - .yytext), - ((DECREMENT)(yyq.StackAt(0).m_value)) - .yytext, true)){}} +)yyq), + ((IDENT)(yyq.StackAt(3).m_value)) + .yytext, + ((IDENT)(yyq.StackAt(1).m_value)) + .yytext), + ((DECREMENT)(yyq.StackAt(0).m_value)) + .yytext, true)){}} public class TypecastExpression_8 : TypecastExpression { public TypecastExpression_8(Parser yyq):base(yyq, - ((Typename)(yyq.StackAt(2).m_value)) - .yytext, - ((FunctionCall)(yyq.StackAt(0).m_value)) - ){}} + ((Typename)(yyq.StackAt(2).m_value)) + .yytext, + ((FunctionCall)(yyq.StackAt(0).m_value)) + ){}} public class TypecastExpression_9 : TypecastExpression { public TypecastExpression_9(Parser yyq):base(yyq, - ((Typename)(yyq.StackAt(4).m_value)) - .yytext, - ((Expression)(yyq.StackAt(1).m_value)) - ){}} + ((Typename)(yyq.StackAt(4).m_value)) + .yytext, + ((Expression)(yyq.StackAt(1).m_value)) + ){}} public class FunctionCall_1 : FunctionCall { public FunctionCall_1(Parser yyq):base(yyq, - ((IDENT)(yyq.StackAt(3).m_value)) - .yytext, - ((ArgumentList)(yyq.StackAt(1).m_value)) - ){}} + ((IDENT)(yyq.StackAt(3).m_value)) + .yytext, + ((ArgumentList)(yyq.StackAt(1).m_value)) + ){}} public class ArgumentList_1 : ArgumentList { public ArgumentList_1(Parser yyq):base(yyq, - ((Argument)(yyq.StackAt(0).m_value)) - ){}} + ((Argument)(yyq.StackAt(0).m_value)) + ){}} public class ArgumentList_2 : ArgumentList { public ArgumentList_2(Parser yyq):base(yyq, - ((ArgumentList)(yyq.StackAt(2).m_value)) - , - ((Argument)(yyq.StackAt(0).m_value)) - ){}} + ((ArgumentList)(yyq.StackAt(2).m_value)) + , + ((Argument)(yyq.StackAt(0).m_value)) + ){}} public class ExpressionArgument_1 : ExpressionArgument { public ExpressionArgument_1(Parser yyq):base(yyq, - ((Expression)(yyq.StackAt(0).m_value)) - ){}} + ((Expression)(yyq.StackAt(0).m_value)) + ){}} public class Typename_1 : Typename { public Typename_1(Parser yyq):base(yyq, - ((INTEGER_TYPE)(yyq.StackAt(0).m_value)) - .yytext){}} + ((INTEGER_TYPE)(yyq.StackAt(0).m_value)) + .yytext){}} public class Typename_2 : Typename { public Typename_2(Parser yyq):base(yyq, - ((FLOAT_TYPE)(yyq.StackAt(0).m_value)) - .yytext){}} + ((FLOAT_TYPE)(yyq.StackAt(0).m_value)) + .yytext){}} public class Typename_3 : Typename { public Typename_3(Parser yyq):base(yyq, - ((STRING_TYPE)(yyq.StackAt(0).m_value)) - .yytext){}} + ((STRING_TYPE)(yyq.StackAt(0).m_value)) + .yytext){}} public class Typename_4 : Typename { public Typename_4(Parser yyq):base(yyq, - ((KEY_TYPE)(yyq.StackAt(0).m_value)) - .yytext){}} + ((KEY_TYPE)(yyq.StackAt(0).m_value)) + .yytext){}} public class Typename_5 : Typename { public Typename_5(Parser yyq):base(yyq, - ((VECTOR_TYPE)(yyq.StackAt(0).m_value)) - .yytext){}} + ((VECTOR_TYPE)(yyq.StackAt(0).m_value)) + .yytext){}} public class Typename_6 : Typename { public Typename_6(Parser yyq):base(yyq, - ((ROTATION_TYPE)(yyq.StackAt(0).m_value)) - .yytext){}} + ((ROTATION_TYPE)(yyq.StackAt(0).m_value)) + .yytext){}} public class Typename_7 : Typename { public Typename_7(Parser yyq):base(yyq, - ((LIST_TYPE)(yyq.StackAt(0).m_value)) - .yytext){}} + ((LIST_TYPE)(yyq.StackAt(0).m_value)) + .yytext){}} public class Event_1 : Event { public Event_1(Parser yyq):base(yyq, - ((DATASERVER_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((DATASERVER_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class Event_2 : Event { public Event_2(Parser yyq):base(yyq, - ((EMAIL_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((EMAIL_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class Event_3 : Event { public Event_3(Parser yyq):base(yyq, - ((HTTP_RESPONSE_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((HTTP_RESPONSE_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class Event_4 : Event { public Event_4(Parser yyq):base(yyq, - ((LINK_MESSAGE_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((LINK_MESSAGE_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class Event_5 : Event { public Event_5(Parser yyq):base(yyq, - ((LISTEN_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((LISTEN_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class Event_6 : Event { public Event_6(Parser yyq):base(yyq, - ((MONEY_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((MONEY_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class Event_7 : Event { public Event_7(Parser yyq):base(yyq, - ((REMOTE_DATA_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((REMOTE_DATA_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class Event_8 : Event { public Event_8(Parser yyq):base(yyq, - ((HTTP_REQUEST_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((HTTP_REQUEST_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class Event_9 : Event { public Event_9(Parser yyq):base(yyq, - ((TRANSACTION_RESULT_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((TRANSACTION_RESULT_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class VoidArgEvent_1 : VoidArgEvent { public VoidArgEvent_1(Parser yyq):base(yyq, - ((STATE_ENTRY_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((STATE_ENTRY_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class VoidArgEvent_2 : VoidArgEvent { public VoidArgEvent_2(Parser yyq):base(yyq, - ((STATE_EXIT_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((STATE_EXIT_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class VoidArgEvent_3 : VoidArgEvent { public VoidArgEvent_3(Parser yyq):base(yyq, - ((MOVING_END_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((MOVING_END_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class VoidArgEvent_4 : VoidArgEvent { public VoidArgEvent_4(Parser yyq):base(yyq, - ((MOVING_START_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((MOVING_START_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class VoidArgEvent_5 : VoidArgEvent { public VoidArgEvent_5(Parser yyq):base(yyq, - ((NO_SENSOR_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((NO_SENSOR_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class VoidArgEvent_6 : VoidArgEvent { public VoidArgEvent_6(Parser yyq):base(yyq, - ((NOT_AT_ROT_TARGET_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((NOT_AT_ROT_TARGET_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class VoidArgEvent_7 : VoidArgEvent { public VoidArgEvent_7(Parser yyq):base(yyq, - ((NOT_AT_TARGET_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((NOT_AT_TARGET_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class VoidArgEvent_8 : VoidArgEvent { public VoidArgEvent_8(Parser yyq):base(yyq, - ((TIMER_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((TIMER_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class KeyArgEvent_1 : KeyArgEvent { public KeyArgEvent_1(Parser yyq):base(yyq, - ((ATTACH_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((ATTACH_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class KeyArgEvent_2 : KeyArgEvent { public KeyArgEvent_2(Parser yyq):base(yyq, - ((OBJECT_REZ_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((OBJECT_REZ_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class IntArgEvent_1 : IntArgEvent { public IntArgEvent_1(Parser yyq):base(yyq, - ((CHANGED_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((CHANGED_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class IntArgEvent_2 : IntArgEvent { public IntArgEvent_2(Parser yyq):base(yyq, - ((COLLISION_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((COLLISION_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class IntArgEvent_3 : IntArgEvent { public IntArgEvent_3(Parser yyq):base(yyq, - ((COLLISION_END_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((COLLISION_END_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class IntArgEvent_4 : IntArgEvent { public IntArgEvent_4(Parser yyq):base(yyq, - ((COLLISION_START_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((COLLISION_START_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class IntArgEvent_5 : IntArgEvent { public IntArgEvent_5(Parser yyq):base(yyq, - ((ON_REZ_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((ON_REZ_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class IntArgEvent_6 : IntArgEvent { public IntArgEvent_6(Parser yyq):base(yyq, - ((RUN_TIME_PERMISSIONS_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((RUN_TIME_PERMISSIONS_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class IntArgEvent_7 : IntArgEvent { public IntArgEvent_7(Parser yyq):base(yyq, - ((SENSOR_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((SENSOR_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class IntArgEvent_8 : IntArgEvent { public IntArgEvent_8(Parser yyq):base(yyq, - ((TOUCH_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((TOUCH_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class IntArgEvent_9 : IntArgEvent { public IntArgEvent_9(Parser yyq):base(yyq, - ((TOUCH_END_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((TOUCH_END_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class IntArgEvent_10 : IntArgEvent { public IntArgEvent_10(Parser yyq):base(yyq, - ((TOUCH_START_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((TOUCH_START_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class VectorArgEvent_1 : VectorArgEvent { public VectorArgEvent_1(Parser yyq):base(yyq, - ((LAND_COLLISION_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((LAND_COLLISION_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class VectorArgEvent_2 : VectorArgEvent { public VectorArgEvent_2(Parser yyq):base(yyq, - ((LAND_COLLISION_END_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((LAND_COLLISION_END_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class VectorArgEvent_3 : VectorArgEvent { public VectorArgEvent_3(Parser yyq):base(yyq, - ((LAND_COLLISION_START_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((LAND_COLLISION_START_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class IntRotRotArgEvent_1 : IntRotRotArgEvent { public IntRotRotArgEvent_1(Parser yyq):base(yyq, - ((AT_ROT_TARGET_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((AT_ROT_TARGET_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class IntVecVecArgEvent_1 : IntVecVecArgEvent { public IntVecVecArgEvent_1(Parser yyq):base(yyq, - ((AT_TARGET_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((AT_TARGET_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class KeyIntIntArgEvent_1 : KeyIntIntArgEvent { public KeyIntIntArgEvent_1(Parser yyq):base(yyq, - ((CONTROL_EVENT)(yyq.StackAt(0).m_value)) - .yytext){}} + ((CONTROL_EVENT)(yyq.StackAt(0).m_value)) + .yytext){}} public class yyLSLSyntax : YyParser { public override object Action(Parser yyq,SYMBOL yysym, int yyact) { switch(yyact) { - case -1: break; //// keep compiler happy + case -1: break; //// keep compiler happy } return null; } public class ArgumentDeclarationList_3 : ArgumentDeclarationList { @@ -2390,7 +2390,7 @@ public class ArgumentDeclarationList_4 : ArgumentDeclarationList { public class ArgumentDeclarationList_5 : ArgumentDeclarationList { public ArgumentDeclarationList_5(Parser yyq):base(yyq){}} public yyLSLSyntax -():base() { arr = new int[] { +():base() { arr = new int[] { 101,4,6,52,0, 46,0,53,0,102, 20,103,4,28,76, -- cgit v1.1 From cdb1851f438349a8721c0d9cef54837d0b302189 Mon Sep 17 00:00:00 2001 From: onefang Date: Tue, 4 Jun 2019 00:50:59 +1000 Subject: Warnings-- --- OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools') diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs index 66210b7..9dc8d05 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/lsl.lexer.cs @@ -19720,7 +19720,7 @@ public override TOKEN OldAction(Lexer yym,ref string yytext,int action, ref bool case 1076: ; break; case 1032: { yym.yy_begin("YYINITIAL"); ((LSLTokens)yym).yytext = ((LSLTokens)yym).str; ((LSLTokens)yym).str = String.Empty; return new STRING_CONSTANT(yym); } - break; +// break; case 1067: ; break; case 1072: ; -- cgit v1.1