com.octagroup.foregej.antlr
Class DynASTFactory

java.lang.Object
  |
  +--antlr.ASTFactory
        |
        +--com.octagroup.foregej.antlr.DynASTFactory
Direct Known Subclasses:
JavaDocASTFactory, JavaASTFactory

public abstract class DynASTFactory
extends antlr.ASTFactory


Field Summary
protected  antlr.ASTPair lastASTPair_
           
protected  DynTypeFactory typeFactory_
           
 
Fields inherited from class antlr.ASTFactory
theASTNodeType, theASTNodeTypeClass, tokenTypeToASTClassMap
 
Constructor Summary
protected DynASTFactory(java.lang.Class types, java.lang.String[] packages)
          Constructor creates a new DynASTFactory object.
protected DynASTFactory(DynASTFactory template)
          Constructor creates a new DynASTFactory object.
 
Method Summary
 void addASTChild(antlr.ASTPair currentAST, antlr.collections.AST child)
          DOCUMENT ME!
 antlr.collections.AST create(antlr.Token token)
          As ASTs are created from tokens we need to signal that an ast actually has been created for that token.
 java.lang.Class getASTNodeType(int type)
          DOCUMENT ME!
protected abstract  java.lang.Class getDefaultASTType()
           
 antlr.collections.AST make(antlr.collections.impl.ASTArray arr)
          Must override this method to make user that all the asts in an array are of the correct type.
 void makeASTRoot(antlr.ASTPair currentAST, antlr.collections.AST root)
          DOCUMENT ME!
 void typeAltered(BaseAST oldAST)
          Signals that an AST has altered its type.
 
Methods inherited from class antlr.ASTFactory
create, create, create, create, create, create, create, create, createUsingCtor, dup, dupList, dupTree, error, getTokenTypeToASTClassMap, make, setASTNodeClass, setASTNodeType, setTokenTypeASTNodeType, setTokenTypeToASTClassMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

typeFactory_

protected DynTypeFactory typeFactory_

lastASTPair_

protected antlr.ASTPair lastASTPair_
Constructor Detail

DynASTFactory

protected DynASTFactory(java.lang.Class types,
                        java.lang.String[] packages)
Constructor creates a new DynASTFactory object.

DynASTFactory

protected DynASTFactory(DynASTFactory template)
Constructor creates a new DynASTFactory object.

This method uses the type factory from the template to speed up construction.

Method Detail

getASTNodeType

public java.lang.Class getASTNodeType(int type)
DOCUMENT ME!
Overrides:
getASTNodeType in class antlr.ASTFactory
Parameters:
type - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
java.lang.RuntimeException - DOCUMENT ME!

addASTChild

public void addASTChild(antlr.ASTPair currentAST,
                        antlr.collections.AST child)
DOCUMENT ME!
Overrides:
addASTChild in class antlr.ASTFactory
Parameters:
currentAST - DOCUMENT ME!
child - DOCUMENT ME!

makeASTRoot

public void makeASTRoot(antlr.ASTPair currentAST,
                        antlr.collections.AST root)
DOCUMENT ME!
Overrides:
makeASTRoot in class antlr.ASTFactory
Parameters:
currentAST - DOCUMENT ME!
root - DOCUMENT ME!

make

public antlr.collections.AST make(antlr.collections.impl.ASTArray arr)
Must override this method to make user that all the asts in an array are of the correct type.
Overrides:
make in class antlr.ASTFactory
Parameters:
arr - the array to check
Returns:
The new root

create

public antlr.collections.AST create(antlr.Token token)
As ASTs are created from tokens we need to signal that an ast actually has been created for that token.
Overrides:
create in class antlr.ASTFactory
Parameters:
token -  
Returns:
 

getDefaultASTType

protected abstract java.lang.Class getDefaultASTType()
Returns:
 

typeAltered

public void typeAltered(BaseAST oldAST)
Signals that an AST has altered its type.

This metod is invoked from the BaseAST

Parameters:
oldAST - the altered ast.


Copyright © 2003 El Icognito des Noboby. All Rights Reserved.