org.codehaus.groovy.antlr
Class GroovySourceAST

java.lang.Object
  extended by antlr.BaseAST
      extended by antlr.CommonAST
          extended by org.codehaus.groovy.antlr.GroovySourceAST
All Implemented Interfaces:
antlr.collections.AST, Serializable, Comparable

public class GroovySourceAST
extends antlr.CommonAST
implements Comparable

We have an AST subclass so we can track source information. Very odd that ANTLR doesn't do this by default.

Author:
Mike Spille, Jeremy Rayner
See Also:
Serialized Form

Field Summary
 
Fields inherited from class antlr.BaseAST
down, right
 
Constructor Summary
GroovySourceAST()
           
GroovySourceAST(antlr.Token t)
           
 
Method Summary
 GroovySourceAST childAt(int position)
           
 GroovySourceAST childOfType(int type)
           
 int compareTo(Object object)
           
 int getColumn()
           
 int getColumnLast()
           
 int getLine()
           
 int getLineLast()
           
 String getSnippet()
           
 void initialize(antlr.collections.AST ast)
           
 void initialize(antlr.Token t)
           
 void setColumn(int column)
           
 void setColumnLast(int colLast)
           
 void setLast(antlr.Token last)
           
 void setLine(int line)
           
 void setLineLast(int lineLast)
           
 void setSnippet(String snippet)
           
 
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

GroovySourceAST

public GroovySourceAST()

GroovySourceAST

public GroovySourceAST(antlr.Token t)
Method Detail

initialize

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

initialize

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

setLast

public void setLast(antlr.Token last)

getLineLast

public int getLineLast()

setLineLast

public void setLineLast(int lineLast)

getColumnLast

public int getColumnLast()

setColumnLast

public void setColumnLast(int colLast)

setLine

public void setLine(int line)

getLine

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

setColumn

public void setColumn(int column)

getColumn

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

setSnippet

public void setSnippet(String snippet)

getSnippet

public String getSnippet()

compareTo

public int compareTo(Object object)
Specified by:
compareTo in interface Comparable

childAt

public GroovySourceAST childAt(int position)

childOfType

public GroovySourceAST childOfType(int type)


Copyright © 2003-2009 The Codehaus. All Rights Reserved.