modesteditor.core.antlrparser
Class ASTWithOffsetInfos

java.lang.Object
  extended by antlr.BaseAST
      extended by antlr.CommonAST
          extended by modesteditor.core.antlrparser.ASTWithOffsetInfos
All Implemented Interfaces:
antlr.collections.AST, java.io.Serializable

public class ASTWithOffsetInfos
extends antlr.CommonAST

This is the AST class that will be used in the AST such that the TreeWalker has access to line and column information. CommonAST(default) from Antlr does not store line information. So we extend it, so use setASTNodeClass() to set it up in parser.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class antlr.BaseAST
down, right
 
Constructor Summary
ASTWithOffsetInfos()
           
 
Method Summary
 int getColumn()
           
 int getLine()
           
 void initialize(antlr.collections.AST ast)
           
 void initialize(antlr.Token tok)
           
 
Methods inherited from class antlr.CommonAST
getText, getType, initialize, setText, setType
 
Methods inherited from class antlr.BaseAST
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toString, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ASTWithOffsetInfos

public ASTWithOffsetInfos()
Method Detail

initialize

public void initialize(antlr.Token tok)
Specified by:
initialize in interface antlr.collections.AST
Overrides:
initialize in class antlr.CommonAST

initialize

public void initialize(antlr.collections.AST ast)
Specified by:
initialize in interface antlr.collections.AST
Overrides:
initialize in class antlr.CommonAST

getLine

public int getLine()
Specified by:
getLine in interface antlr.collections.AST
Overrides:
getLine in class antlr.BaseAST

getColumn

public int getColumn()
Specified by:
getColumn in interface antlr.collections.AST
Overrides:
getColumn in class antlr.BaseAST