C# Class CSLE.CLS_Expression_Compiler

Inheritance: ICLS_Expression_Compiler
Show file Open project: lightszero/cslightcore Class Usage Examples

Public Methods

Method Description
CLS_Expression_Compiler ( ICLS_Logger logger ) : System
Compile ( IList tlist, ICLS_Environment content ) : ICLS_Expression
Compile_NoBlock ( IList tlist, ICLS_Environment content ) : ICLS_Expression
Compiler_Expression ( IList tlist, ICLS_Environment content, int pos, int posend, ICLS_Expression &value ) : bool
Compiler_Expression_Block ( IList tlist, ICLS_Environment content, int pos, int posend, ICLS_Expression &value ) : bool
Compiler_Expression_Function ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
Compiler_Expression_FunctionNew ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
Compiler_Expression_FunctionStatic ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
Compiler_Expression_FunctionThrow ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
Compiler_Expression_FunctionTrace ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
Compiler_Expression_IndexFind ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
Compiler_Expression_Loop_Break ( IList tlist, int pos ) : ICLS_Expression
Compiler_Expression_Loop_Continue ( IList tlist, int pos ) : ICLS_Expression
Compiler_Expression_Loop_Dowhile ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
Compiler_Expression_Loop_For ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
Compiler_Expression_Loop_ForEach ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
Compiler_Expression_Loop_If ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
Compiler_Expression_Loop_Return ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
Compiler_Expression_Loop_Try ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
Compiler_Expression_Loop_While ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
Compiler_Expression_Math ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
Compiler_Expression_MathSelf ( IList tlist, int pos, int posend ) : ICLS_Expression
Compiler_Expression_NegativeLogic ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
Compiler_Expression_NegativeValue ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
Compiler_Expression_SubValue ( Token value ) : ICLS_Expression
Compiler_Expression_Value ( Token value, int pos ) : ICLS_Expression
FileCompile ( ICLS_Environment env, string filename, IList tlist, bool embDebugToken ) : IList
FilePreCompile ( ICLS_Environment env, string filename, IList tlist ) : IList
LogError ( IList tlist, string text, int pos, int posend ) : void
Optimize ( ICLS_Expression value, ICLS_Environment env ) : ICLS_Expression

Private Methods

Method Description
Compiler_Class ( ICLS_Environment env, string classname, bool bInterface, IList basetype, string filename, IList tokens, int ibegin, int iend, bool EmbDebugToken, bool onlyGotType, IList usinglist ) : ICLS_Type
Compiler_Using ( IList tokens, ICLS_Environment env, int pos, int posend ) : List
FindBlock ( ICLS_Environment env, IList tokens, int start ) : int
FindCodeAny ( IList tokens, int &pos, int &depstyle ) : int
FindCodeAnyInFunc ( IList tokens, int &pos, int &depstyle ) : int
FindCodeAnyWithoutKeyword ( IList tokens, int &pos, int &depstyle ) : int
FindCodeBlock ( IList tokens, int pos ) : int
FindCodeInBlock ( IList tokens, int &pos, int &depstyle ) : int
FindCodeKeyWord_Dowhile ( IList tokens, int pos ) : int
FindCodeKeyWord_For ( IList tokens, int pos ) : int
FindCodeKeyWord_ForEach ( IList tokens, int pos ) : int
FindCodeKeyWord_If ( IList tokens, int pos ) : int
FindCodeKeyWord_New ( IList tokens, int pos ) : int
FindCodeKeyWord_Return ( IList tokens, int pos ) : int
FindCodeKeyWord_While ( IList tokens, int pos ) : int
FindFullExpression ( IList tokens, int pos, bool &bdepstart ) : int
GetExpressionOp ( IList tokens, int pos, int posend ) : int
GetLongName ( IList tokens, int pos ) : int
GetLongType ( IList tokens, int pos ) : int
GetLowestMathOp ( IList tokens, IList list ) : int
OptimizeDepth ( ICLS_Expression expr, CLS_Content content ) : ICLS_Expression
OptimizeSingle ( ICLS_Expression expr, CLS_Content content ) : ICLS_Expression
SplitExpressionWithOp ( IList tokens, int pos, int posend ) : IList
_FileCompiler ( string filename, IList tokens, bool embDeubgToken, ICLS_Environment env, bool onlyGotType ) : IList

Method Details

CLS_Expression_Compiler() public method

public CLS_Expression_Compiler ( ICLS_Logger logger ) : System
logger ICLS_Logger
return System

Compile() public method

public Compile ( IList tlist, ICLS_Environment content ) : ICLS_Expression
tlist IList
content ICLS_Environment
return ICLS_Expression

Compile_NoBlock() public method

public Compile_NoBlock ( IList tlist, ICLS_Environment content ) : ICLS_Expression
tlist IList
content ICLS_Environment
return ICLS_Expression

Compiler_Expression() public method

public Compiler_Expression ( IList tlist, ICLS_Environment content, int pos, int posend, ICLS_Expression &value ) : bool
tlist IList
content ICLS_Environment
pos int
posend int
value ICLS_Expression
return bool

Compiler_Expression_Block() public method

public Compiler_Expression_Block ( IList tlist, ICLS_Environment content, int pos, int posend, ICLS_Expression &value ) : bool
tlist IList
content ICLS_Environment
pos int
posend int
value ICLS_Expression
return bool

Compiler_Expression_Function() public method

public Compiler_Expression_Function ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
tlist IList
content ICLS_Environment
pos int
posend int
return ICLS_Expression

Compiler_Expression_FunctionNew() public method

public Compiler_Expression_FunctionNew ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
tlist IList
content ICLS_Environment
pos int
posend int
return ICLS_Expression

Compiler_Expression_FunctionStatic() public method

public Compiler_Expression_FunctionStatic ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
tlist IList
content ICLS_Environment
pos int
posend int
return ICLS_Expression

Compiler_Expression_FunctionThrow() public method

public Compiler_Expression_FunctionThrow ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
tlist IList
content ICLS_Environment
pos int
posend int
return ICLS_Expression

Compiler_Expression_FunctionTrace() public method

public Compiler_Expression_FunctionTrace ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
tlist IList
content ICLS_Environment
pos int
posend int
return ICLS_Expression

Compiler_Expression_IndexFind() public method

public Compiler_Expression_IndexFind ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
tlist IList
content ICLS_Environment
pos int
posend int
return ICLS_Expression

Compiler_Expression_Loop_Break() public method

public Compiler_Expression_Loop_Break ( IList tlist, int pos ) : ICLS_Expression
tlist IList
pos int
return ICLS_Expression

Compiler_Expression_Loop_Continue() public method

public Compiler_Expression_Loop_Continue ( IList tlist, int pos ) : ICLS_Expression
tlist IList
pos int
return ICLS_Expression

Compiler_Expression_Loop_Dowhile() public method

public Compiler_Expression_Loop_Dowhile ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
tlist IList
content ICLS_Environment
pos int
posend int
return ICLS_Expression

Compiler_Expression_Loop_For() public method

public Compiler_Expression_Loop_For ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
tlist IList
content ICLS_Environment
pos int
posend int
return ICLS_Expression

Compiler_Expression_Loop_ForEach() public method

public Compiler_Expression_Loop_ForEach ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
tlist IList
content ICLS_Environment
pos int
posend int
return ICLS_Expression

Compiler_Expression_Loop_If() public method

public Compiler_Expression_Loop_If ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
tlist IList
content ICLS_Environment
pos int
posend int
return ICLS_Expression

Compiler_Expression_Loop_Return() public method

public Compiler_Expression_Loop_Return ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
tlist IList
content ICLS_Environment
pos int
posend int
return ICLS_Expression

Compiler_Expression_Loop_Try() public method

public Compiler_Expression_Loop_Try ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
tlist IList
content ICLS_Environment
pos int
posend int
return ICLS_Expression

Compiler_Expression_Loop_While() public method

public Compiler_Expression_Loop_While ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
tlist IList
content ICLS_Environment
pos int
posend int
return ICLS_Expression

Compiler_Expression_Math() public method

public Compiler_Expression_Math ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
tlist IList
content ICLS_Environment
pos int
posend int
return ICLS_Expression

Compiler_Expression_MathSelf() public method

public Compiler_Expression_MathSelf ( IList tlist, int pos, int posend ) : ICLS_Expression
tlist IList
pos int
posend int
return ICLS_Expression

Compiler_Expression_NegativeLogic() public method

public Compiler_Expression_NegativeLogic ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
tlist IList
content ICLS_Environment
pos int
posend int
return ICLS_Expression

Compiler_Expression_NegativeValue() public method

public Compiler_Expression_NegativeValue ( IList tlist, ICLS_Environment content, int pos, int posend ) : ICLS_Expression
tlist IList
content ICLS_Environment
pos int
posend int
return ICLS_Expression

Compiler_Expression_SubValue() public method

public Compiler_Expression_SubValue ( Token value ) : ICLS_Expression
value Token
return ICLS_Expression

Compiler_Expression_Value() public method

public Compiler_Expression_Value ( Token value, int pos ) : ICLS_Expression
value Token
pos int
return ICLS_Expression

FileCompile() public method

public FileCompile ( ICLS_Environment env, string filename, IList tlist, bool embDebugToken ) : IList
env ICLS_Environment
filename string
tlist IList
embDebugToken bool
return IList

FilePreCompile() public method

public FilePreCompile ( ICLS_Environment env, string filename, IList tlist ) : IList
env ICLS_Environment
filename string
tlist IList
return IList

LogError() public method

public LogError ( IList tlist, string text, int pos, int posend ) : void
tlist IList
text string
pos int
posend int
return void

Optimize() public method

public Optimize ( ICLS_Expression value, ICLS_Environment env ) : ICLS_Expression
value ICLS_Expression
env ICLS_Environment
return ICLS_Expression