C# Class idTech4.Text.idScriptParser

显示文件 Open project: iainmckay/idtech4.net Class Usage Examples

Public Methods

Method Description
CheckTokenString ( string str ) : bool

Returns true if the next token equals the given string and removes the token from the source.

Error ( string format ) : void
ExpectAnyToken ( ) : idToken
ExpectTokenString ( string str ) : bool
ExpectTokenType ( TokenType type, TokenSubType subType ) : idToken
LoadFile ( string fileName, bool osPath ) : bool

Load the given source.

LoadMemory ( string content, string name ) : bool

Load the given source.

ParseBool ( ) : bool
ParseFloat ( ) : float
ParseInteger ( ) : int
ReadToken ( ) : idToken
SetMarker ( ) : void
UnreadToken ( idToken token ) : void
Warning ( string format ) : void
idScriptParser ( LexerOptions options ) : System

Private Methods

Method Description
AddDefineToHash ( ScriptDefinition define, ScriptDefinition>.Dictionary dict ) : void
AddGlobalDefinesToSource ( ) : void
CopyDefine ( ScriptDefinition define ) : ScriptDefinition
Directive_Define ( ) : bool
Directive_Else ( ) : bool
Directive_ElseIf ( ) : bool
Directive_EndIf ( ) : bool
Directive_Error ( ) : bool
Directive_Eval ( ) : bool
Directive_EvalFloat ( ) : bool
Directive_If ( ) : bool
Directive_IfDefined ( ) : bool
Directive_IfDefinedActual ( IndentType type ) : bool
Directive_IfNotDefined ( ) : bool
Directive_Include ( ) : bool
Directive_Line ( ) : bool
Directive_Pragma ( ) : bool
Directive_UnDefine ( ) : bool
Directive_Warning ( ) : bool
DollarDirective_EvalFloat ( ) : bool
DollarDirective_EvalInt ( ) : bool
DollarEvaluate ( long &intValue, double &floatValue, bool integer ) : bool
Evaluate ( long &intValue, double &floatValue, bool integer ) : bool
FindDefineParameter ( ScriptDefinition define, string name ) : int
PopIndent ( IndentType &type, int &skip ) : void
PushIndent ( IndentType type, int skip ) : void
PushScript ( idLexer script ) : void
ReadDirective ( ) : bool
ReadDollarDirective ( ) : bool
ReadLine ( ) : idToken

Reads a token from the current line, continues reading on the next line only if a backslash '\' is found.

ReadSourceToken ( ) : idToken
UnreadSignToken ( ) : void
UnreadSourceToken ( idToken token ) : void

Method Details

CheckTokenString() public method

Returns true if the next token equals the given string and removes the token from the source.
public CheckTokenString ( string str ) : bool
str string
return bool

Error() public method

public Error ( string format ) : void
format string
return void

ExpectAnyToken() public method

public ExpectAnyToken ( ) : idToken
return idToken

ExpectTokenString() public method

public ExpectTokenString ( string str ) : bool
str string
return bool

ExpectTokenType() public method

public ExpectTokenType ( TokenType type, TokenSubType subType ) : idToken
type TokenType
subType TokenSubType
return idToken

LoadFile() public method

Load the given source.
public LoadFile ( string fileName, bool osPath ) : bool
fileName string
osPath bool
return bool

LoadMemory() public method

Load the given source.
public LoadMemory ( string content, string name ) : bool
content string
name string
return bool

ParseBool() public method

public ParseBool ( ) : bool
return bool

ParseFloat() public method

public ParseFloat ( ) : float
return float

ParseInteger() public method

public ParseInteger ( ) : int
return int

ReadToken() public method

public ReadToken ( ) : idToken
return idToken

SetMarker() public method

public SetMarker ( ) : void
return void

UnreadToken() public method

public UnreadToken ( idToken token ) : void
token idToken
return void

Warning() public method

public Warning ( string format ) : void
format string
return void

idScriptParser() public method

public idScriptParser ( LexerOptions options ) : System
options LexerOptions
return System