C# Class Scorpio.Compiler.ScriptParser

显示文件 Open project: qingfeng346/Scorpio-CSharp Class Usage Examples

Public Methods

Method Description
BeginExecutable ( Executable_Block block ) : void
EndExecutable ( ) : void
Parse ( ) : ScriptExecutable
ScriptParser ( Script script, List listTokens, string strBreviary ) : System

Protected Methods

Method Description
HasMoreTokens ( ) : bool

是否还有更多需要解析的语法

PeekToken ( ) : Token

返回第一个Token

ReadCatch ( ) : void

读取catch

ReadColon ( ) : void

读取:

ReadComma ( ) : void

读取,

ReadIdentifier ( ) : String

读取 未知字符

ReadIn ( ) : void

读取in

ReadLeftBrace ( ) : void

读取{

ReadLeftBracket ( ) : void

读取[

ReadLeftParenthesis ( ) : void

读取(

ReadRightBrace ( ) : void

读取}

ReadRightBracket ( ) : void

读取]

ReadRightParenthesis ( ) : void

读取)

ReadSemiColon ( ) : void

读取;

ReadToken ( ) : Token

获得第一个Token

UndoToken ( ) : void

回滚Token

Private Methods

Method Description
GetArray ( ) : CodeArray
GetEval ( ) : CodeEval
GetFunction ( CodeObject member ) : CodeCallFunction
GetObject ( ) : CodeObject
GetOneDefine ( ) : DefineObject
GetOneObject ( ) : CodeObject
GetSourceLine ( ) : int
GetTable ( ) : CodeTable
GetVariable ( CodeObject parent ) : CodeObject
IsDefine ( ) : bool
IsDefine_impl ( DefineObject define ) : bool
OperatorDefine ( Stack operateStack, Stack objectStack ) : bool
P_Operator ( Stack operateStack, Stack objectStack ) : bool
ParseBlock ( ) : void
ParseCase ( List allow ) : void
ParseCondition ( bool condition, Executable_Block block ) : TempCondition
ParseExpression ( ) : void
ParseFor ( ) : void
ParseFor_Simple ( string Identifier, CodeObject obj ) : void
ParseFor_impl ( ) : void
ParseForeach ( ) : void
ParseFunction ( ) : void
ParseFunctionDeclaration ( bool needName ) : ScriptScriptFunction
ParseIf ( ) : void
ParseReturn ( ) : void
ParseSharp ( ) : void
ParseStatement ( ) : void
ParseStatementBlock ( Executable_Block block ) : ScriptExecutable
ParseStatementBlock ( Executable_Block block, bool readLeftBrace, TokenType finished ) : ScriptExecutable
ParseSwtich ( ) : void
ParseThrow ( ) : void
ParseTry ( ) : void
ParseVar ( ) : void
ParseWhile ( ) : void
PopSharp ( ) : void
ReadDefine ( ) : DefineObject

Method Details

BeginExecutable() public method

public BeginExecutable ( Executable_Block block ) : void
block Executable_Block
return void

EndExecutable() public method

public EndExecutable ( ) : void
return void

HasMoreTokens() protected method

是否还有更多需要解析的语法
protected HasMoreTokens ( ) : bool
return bool

Parse() public method

public Parse ( ) : ScriptExecutable
return Scorpio.Runtime.ScriptExecutable

PeekToken() protected method

返回第一个Token
protected PeekToken ( ) : Token
return Token

ReadCatch() protected method

读取catch
protected ReadCatch ( ) : void
return void

ReadColon() protected method

读取:
protected ReadColon ( ) : void
return void

ReadComma() protected method

读取,
protected ReadComma ( ) : void
return void

ReadIdentifier() protected method

读取 未知字符
protected ReadIdentifier ( ) : String
return String

ReadIn() protected method

读取in
protected ReadIn ( ) : void
return void

ReadLeftBrace() protected method

读取{
protected ReadLeftBrace ( ) : void
return void

ReadLeftBracket() protected method

读取[
protected ReadLeftBracket ( ) : void
return void

ReadLeftParenthesis() protected method

读取(
protected ReadLeftParenthesis ( ) : void
return void

ReadRightBrace() protected method

读取}
protected ReadRightBrace ( ) : void
return void

ReadRightBracket() protected method

读取]
protected ReadRightBracket ( ) : void
return void

ReadRightParenthesis() protected method

读取)
protected ReadRightParenthesis ( ) : void
return void

ReadSemiColon() protected method

读取;
protected ReadSemiColon ( ) : void
return void

ReadToken() protected method

获得第一个Token
protected ReadToken ( ) : Token
return Token

ScriptParser() public method

public ScriptParser ( Script script, List listTokens, string strBreviary ) : System
script Script
listTokens List
strBreviary string
return System

UndoToken() protected method

回滚Token
protected UndoToken ( ) : void
return void