Свойство | Тип | Описание | |
---|---|---|---|
activeContexts | uint | ||
charPos | int | ||
constants | Axiom.Core.FloatList | ||
currentLine | int | ||
endOfSource | int | ||
rootRulePath | Axiom.RenderSystems.OpenGL.ATI.TokenRule[] | ||
rulePathLibCount | int | ||
source | string | ||
symbolTypeLib | Axiom.RenderSystems.OpenGL.ATI.SymbolDef[] | ||
symbolTypeLibCount | int | ||
tokenInstructions | Axiom.RenderSystems.OpenGL.ATI.TokenInstructionList | ||
valueID | Symbol |
Метод | Описание | |
---|---|---|
Compile ( string source ) : bool |
Compile the source - performs 2 passes: First pass is to tokinize, check semantics and context. Second pass is performed by subclass and converts tokens to application specific instructions.
|
|
Compiler2Pass ( ) : System |
Default constructor.
|
Метод | Описание | |
---|---|---|
DoPass1 ( ) : bool |
perform pass 1 of compile process Scans source for symbols that can be tokenized and then performs general semantic and context verification on each symbol before it is tokenized. A tokenized instruction list is built to be used by Pass 2. |
|
DoPass2 ( ) : bool |
Abstract method that must be set up by subclass to perform Pass 2 of compile process
|
|
FindEndOfLine ( ) : void | ||
GetTypeDefText ( Symbol symbol ) : string |
Get the text symbol for this token. Mainly used for debugging and in test routines. |
|
InitSymbolTypeLib ( ) : void |
Initialize the type library with matching symbol text found in symbol text library. Find a default text for all Symbol Types in library. Scan through all the rules and initialize TypeLib with index to text and index to rules for non-terminal tokens. Must be called by subclass after libraries and rule database setup.
|
|
IsFloatValue ( float &val, int &length ) : bool |
Check to see if the text at the present position in the source is a numerical constant.
|
|
IsSymbol ( string symbol, int &symbolSize ) : bool |
Check to see if the text is in the symbol text library.
|
|
PositionToNextSymbol ( ) : bool |
Position to the next possible valid symbol.
|
|
ProcessRulePath ( int rulePathIdx ) : bool |
Process input source text using rulepath to determine allowed tokens. The method is reentrant and recursive. if a non-terminal token is encountered in the current rule path then the method is called using the new rule path referenced by the non-terminal token Tokens can have the following operation states which effects the flow path of the rule |
|
SetActiveContexts ( uint contexts ) : void |
Setup ActiveContexts - should be called by subclass to setup initial language contexts.
|
|
SkipComments ( ) : void |
Skips all comment specifiers.
|
|
SkipEndOfLine ( ) : void |
Find the end of line marker and move past it.
|
|
SkipWhitespace ( ) : void |
Skip all the whitespace which includes spaces and tabs.
|
|
ValidateToken ( int rulePathIdx, Symbol activeRuleID ) : bool |
Check if current position in source has the symbol text equivalent to the TokenID.
|
public Compile ( string source ) : bool | ||
source | string | Source to be compiled. |
Результат | bool |
protected GetTypeDefText ( Symbol symbol ) : string | ||
symbol | Symbol | Token ID. |
Результат | string |
protected IsFloatValue ( float &val, int &length ) : bool | ||
val | float | Receives the float value that is in the source. |
length | int | Receives number of characters that make of the value in the source. |
Результат | bool |
protected IsSymbol ( string symbol, int &symbolSize ) : bool | ||
symbol | string | |
symbolSize | int | |
Результат | bool |
protected ProcessRulePath ( int rulePathIdx ) : bool | ||
rulePathIdx | int | Index into to array of Token Rules that define a rule path to be processed. |
Результат | bool |
protected SetActiveContexts ( uint contexts ) : void | ||
contexts | uint | |
Результат | void |
protected ValidateToken ( int rulePathIdx, Symbol activeRuleID ) : bool | ||
rulePathIdx | int | Index into rule path database of token to validate. |
activeRuleID | Symbol | Index of non-terminal rule that generated the token. |
Результат | bool |
protected FloatList,Axiom.Core constants | ||
Результат | Axiom.Core.FloatList |
protected TokenRule[],Axiom.RenderSystems.OpenGL.ATI rootRulePath | ||
Результат | Axiom.RenderSystems.OpenGL.ATI.TokenRule[] |
protected SymbolDef[],Axiom.RenderSystems.OpenGL.ATI symbolTypeLib | ||
Результат | Axiom.RenderSystems.OpenGL.ATI.SymbolDef[] |
protected TokenInstructionList,Axiom.RenderSystems.OpenGL.ATI tokenInstructions | ||
Результат | Axiom.RenderSystems.OpenGL.ATI.TokenInstructionList |