Свойство | Type | Description | |
---|---|---|---|
defaultASTNodeTypeObject_ | Type | ||
defaultCreator_ | ASTNodeCreator | ||
heteroList_ | FactoryEntry[] | ||
typename2creator_ | Hashtable |
Méthode | Description | |
---|---|---|
ASTFactory ( ) : System |
Constructs an
|
|
ASTFactory ( |
Constructs an
|
|
ASTFactory ( string nodeTypeName ) : System |
Constructs an
|
|
addASTChild ( |
Add a child to the current AST
|
|
create ( ) : Spring.Expressions.Parser.antlr.collections.AST |
Creates a new uninitialized AST node. Since a specific AST Node Type wasn't indicated, the new AST node is created using the current default AST Node type - defaultASTNodeTypeObject_
|
|
create ( IToken tok ) : Spring.Expressions.Parser.antlr.collections.AST |
Creates and initializes a new AST node using the specified Token instance. The System.Type used for creating this new AST node is determined by the following:
|
|
create ( IToken tok, string ASTNodeTypeName ) : Spring.Expressions.Parser.antlr.collections.AST |
Creates a new AST node using the specified AST Node Type name. Once created, the new AST node is initialized with the specified Token instance. The System.Type used for creating this new AST node is determined solely by The AST Node type must have a default/parameterless constructor. |
|
create ( Spring.Expressions.Parser.antlr.collections.AST aNode ) : Spring.Expressions.Parser.antlr.collections.AST |
Creates and initializes a new AST node using the specified AST Node instance. the new AST node is initialized with the specified Token type ID and string. The System.Type used for creating this new AST node is determined solely by
|
|
create ( int type ) : Spring.Expressions.Parser.antlr.collections.AST |
Creates and initializes a new AST node using the specified Token Type ID. The System.Type used for creating this new AST node is determined by the following:
|
|
create ( int type, string txt ) : Spring.Expressions.Parser.antlr.collections.AST |
Creates and initializes a new AST node using the specified Token Type ID. The System.Type used for creating this new AST node is determined by the following:
|
|
create ( int type, string txt, string ASTNodeTypeName ) : Spring.Expressions.Parser.antlr.collections.AST |
Creates a new AST node using the specified AST Node Type name. Once created, the new AST node is initialized with the specified Token type ID and string. The System.Type used for creating this new AST node is determined solely by
|
|
dup ( Spring.Expressions.Parser.antlr.collections.AST t ) : Spring.Expressions.Parser.antlr.collections.AST |
Returns a copy of the specified AST Node instance. The copy is obtained by using the ICloneable method Clone().
|
|
dupList ( Spring.Expressions.Parser.antlr.collections.AST t ) : Spring.Expressions.Parser.antlr.collections.AST |
Duplicate AST Node tree rooted at specified AST node and all of it's siblings.
|
|
dupTree ( Spring.Expressions.Parser.antlr.collections.AST t ) : Spring.Expressions.Parser.antlr.collections.AST |
Duplicate AST Node tree rooted at specified AST node. Ignore it's siblings.
|
|
error ( string e ) : void |
To change where error messages go, can subclass/override this method and then setASTFactory in Parser and TreeParser. This method removes a prior dependency on class antlr.Tool.
|
|
make ( ) : Spring.Expressions.Parser.antlr.collections.AST |
Make a tree from a list of nodes. The first element in the array is the root. If the root is null, then the tree is a simple list not a tree. Handles null children nodes correctly. For example, build(a, b, null, c) yields tree (a b c). build(null,a,b) yields tree (nil a b).
|
|
make ( Spring.Expressions.Parser.antlr.collections.impl.ASTArray nodes ) : Spring.Expressions.Parser.antlr.collections.AST |
Make a tree from a list of nodes, where the nodes are contained in an ASTArray object.
|
|
makeASTRoot ( ASTPair ¤tAST, Spring.Expressions.Parser.antlr.collections.AST root ) : void |
Make an AST the root of current AST.
|
|
setASTNodeCreator ( ASTNodeCreator creator ) : void |
Register an ASTNodeCreator to be used for creating node by default.
|
|
setASTNodeType ( string t ) : void |
Sets the global default AST Node Type for this ASTFactory instance. This method also attempts to load the System.Type instance for the specified typename.
|
|
setMaxNodeType ( int NodeType ) : void |
Pre-expands the internal list of TokenTypeID-to-ASTNodeType mappings to the specified size. This is primarily a convenience method that can be used to prevent unnecessary and costly re-org of the mappings list.
|
|
setTokenTypeASTNodeCreator ( int NodeType, ASTNodeCreator creator ) : void |
Register an ASTNodeCreator for a given Token type ID.
|
|
setTokenTypeASTNodeType ( int tokenType, string NodeTypeName ) : void |
Specify an "override" for the AST type created for the specified Token type. This method is useful for situations that ANTLR cannot oridinarily deal with (i.e., when you create a token based upon a nonliteral token symbol like #[LT(1)]. This is a runtime value and ANTLR cannot determine the token type (and hence the AST) statically. |
Méthode | Description | |
---|---|---|
createFromAST ( Spring.Expressions.Parser.antlr.collections.AST node ) : Spring.Expressions.Parser.antlr.collections.AST | ||
createFromNodeName ( string nodeTypeName ) : Spring.Expressions.Parser.antlr.collections.AST | ||
createFromNodeType ( int nodeTypeIndex ) : Spring.Expressions.Parser.antlr.collections.AST | ||
createFromNodeTypeObject ( Type nodeTypeObject ) : Spring.Expressions.Parser.antlr.collections.AST | ||
loadNodeTypeObject ( string nodeTypeName ) : Type | ||
registerFactory ( int NodeType, string NodeTypeName ) : void |
public ASTFactory ( |
||
nodeType | /// MetaType of default AST node type for this factory. /// | |
Résultat | System |
public ASTFactory ( string nodeTypeName ) : System | ||
nodeTypeName | string | /// Name of default AST node type for this factory. /// |
Résultat | System |
public addASTChild ( |
||
currentAST | The AST to add a child to | |
child | Spring.Expressions.Parser.antlr.collections.AST | The child AST to be added |
Résultat | void |
public create ( ) : Spring.Expressions.Parser.antlr.collections.AST | ||
Résultat | Spring.Expressions.Parser.antlr.collections.AST |
public create ( IToken tok ) : Spring.Expressions.Parser.antlr.collections.AST | ||
tok | IToken | Token instance to be used to create new AST Node. |
Résultat | Spring.Expressions.Parser.antlr.collections.AST |
public create ( IToken tok, string ASTNodeTypeName ) : Spring.Expressions.Parser.antlr.collections.AST | ||
tok | IToken | Token instance to be used to initialize the new AST Node. |
ASTNodeTypeName | string | /// Fully qualified name of the Type to be used for creating the new AST Node. /// |
Résultat | Spring.Expressions.Parser.antlr.collections.AST |
public create ( Spring.Expressions.Parser.antlr.collections.AST aNode ) : Spring.Expressions.Parser.antlr.collections.AST | ||
aNode | Spring.Expressions.Parser.antlr.collections.AST | AST Node instance to be used for creating the new AST Node. |
Résultat | Spring.Expressions.Parser.antlr.collections.AST |
public create ( int type ) : Spring.Expressions.Parser.antlr.collections.AST | ||
type | int | Token type ID to be used to create new AST Node. |
Résultat | Spring.Expressions.Parser.antlr.collections.AST |
public create ( int type, string txt ) : Spring.Expressions.Parser.antlr.collections.AST | ||
type | int | Token type ID to be used to create new AST Node. |
txt | string | Text for initializing the new AST Node. |
Résultat | Spring.Expressions.Parser.antlr.collections.AST |
public create ( int type, string txt, string ASTNodeTypeName ) : Spring.Expressions.Parser.antlr.collections.AST | ||
type | int | Token type ID to be used to create new AST Node. |
txt | string | Text for initializing the new AST Node. |
ASTNodeTypeName | string | Fully qualified name of the Type to be used for creating the new AST Node. |
Résultat | Spring.Expressions.Parser.antlr.collections.AST |
public dup ( Spring.Expressions.Parser.antlr.collections.AST t ) : Spring.Expressions.Parser.antlr.collections.AST | ||
t | Spring.Expressions.Parser.antlr.collections.AST | AST Node to copy. |
Résultat | Spring.Expressions.Parser.antlr.collections.AST |
public dupList ( Spring.Expressions.Parser.antlr.collections.AST t ) : Spring.Expressions.Parser.antlr.collections.AST | ||
t | Spring.Expressions.Parser.antlr.collections.AST | Root of AST Node tree. |
Résultat | Spring.Expressions.Parser.antlr.collections.AST |
public dupTree ( Spring.Expressions.Parser.antlr.collections.AST t ) : Spring.Expressions.Parser.antlr.collections.AST | ||
t | Spring.Expressions.Parser.antlr.collections.AST | Root of AST Node tree. |
Résultat | Spring.Expressions.Parser.antlr.collections.AST |
public make ( ) : Spring.Expressions.Parser.antlr.collections.AST | ||
Résultat | Spring.Expressions.Parser.antlr.collections.AST |
public make ( Spring.Expressions.Parser.antlr.collections.impl.ASTArray nodes ) : Spring.Expressions.Parser.antlr.collections.AST | ||
nodes | Spring.Expressions.Parser.antlr.collections.impl.ASTArray | List of Nodes. |
Résultat | Spring.Expressions.Parser.antlr.collections.AST |
public makeASTRoot ( ASTPair ¤tAST, Spring.Expressions.Parser.antlr.collections.AST root ) : void | ||
currentAST | ASTPair | |
root | Spring.Expressions.Parser.antlr.collections.AST | |
Résultat | void |
public setASTNodeCreator ( ASTNodeCreator creator ) : void | ||
creator | ASTNodeCreator | The ASTNodeCreator. |
Résultat | void |
public setASTNodeType ( string t ) : void | ||
t | string | Fully qualified AST Node Type name. |
Résultat | void |
public setMaxNodeType ( int NodeType ) : void | ||
NodeType | int | Maximum Token Type ID. |
Résultat | void |
public setTokenTypeASTNodeCreator ( int NodeType, ASTNodeCreator creator ) : void | ||
NodeType | int | The Token type ID. |
creator | ASTNodeCreator | The creater to register. |
Résultat | void |
public setTokenTypeASTNodeType ( int tokenType, string NodeTypeName ) : void | ||
tokenType | int | Token type to override. |
NodeTypeName | string | /// Fully qualified AST typename (or null to specify /// the factory's default AST type). /// |
Résultat | void |
protected Type defaultASTNodeTypeObject_ | ||
Résultat | Type |
protected ASTNodeCreator defaultCreator_ | ||
Résultat | ASTNodeCreator |