| Modifier and Type | Field and Description |
|---|---|
| pack-priv CharStream |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | create(Token token)
Overrides org. Implements org. |
| public Object | create(int tokenType, String text)
Overrides org. Implements org. |
| public Object | dupNode(Object t)
Overrides org. Implements org. |
| public Object | errorNode(TokenStream input, Token start, Token stop, RecognitionException e)
Overrides org. Implements org. |
| input | back to summary |
|---|---|
| pack-priv CharStream input | |
| GrammarASTAdaptor | back to summary |
|---|---|
| public GrammarASTAdaptor() | |
| GrammarASTAdaptor | back to summary |
|---|---|
| public GrammarASTAdaptor(CharStream input) | |
| create | back to summary |
|---|---|
| public Object create(Token token) Overrides org. Implements org. Doc from org. Create a tree node from Token object; for CommonTree type trees, then the token just becomes the payload. This is the most common create call. Override if you want another kind of node to be built.
| |
| create | back to summary |
|---|---|
| public Object create(int tokenType, String text) Overrides org. Implements org. Doc from org. Create a new node derived from a token, with a new token type. This is invoked from an imaginary node ref on right side of a rewrite rule as IMAG["IMAG"]. This should invoke createToken(int,String).
| |
| dupNode | back to summary |
|---|---|
| public Object dupNode(Object t) Overrides org. Implements org. Doc from org. Duplicate a node. This is part of the factory; override if you want another kind of node to be built. I could use reflection to prevent having to override this but reflection is slow.
| |
| errorNode | back to summary |
|---|---|
| public Object errorNode(TokenStream input, Token start, Token stop, RecognitionException e) Overrides org. Implements org. Doc from org. create tree node that holds the start and stop tokens associated with an error. If you specify your own kind of tree nodes, you will likely have to override this method. CommonTree returns Token.INVALID_TOKEN_TYPE if no token payload but you might have to set token type for diff node type. You don't have to subclass CommonErrorNode; you will likely need to subclass your own tree node class to avoid class cast exception.
| |