antlraux package
v0.2.1

antlraux.util
Class CommonLexInfo

java.lang.Object
  |
  +--antlraux.util.CommonLexInfo

public class CommonLexInfo
extends java.lang.Object

This is a class that completely implements interface LexInfo. Use it as a base class to implement LexInfo directly.

Author:
Enrique José García Cota

Field Summary
protected  int column
          column information
protected  java.lang.String filename
          filename information
protected  int line
          line information
 
Constructor Summary
CommonLexInfo()
           
CommonLexInfo(LexInfo other)
           
CommonLexInfo(java.lang.String filename, int line, int column)
           
 
Method Summary
 void copyLexInfo(LexInfo from)
          Copies the lexical information from other LexInfo
 int getColumn()
          Get the column for this node
 java.lang.String getFilename()
          Get the file name for this node
 java.lang.String getLexInfoString()
          Returns true if all the information (Filename:line:column) is valid; false otherwise.
 int getLine()
          Get the line for this node
 void setColumn(int column)
          Set the column for this node
 void setFilename(java.lang.String fn)
          Sets the file name for this node.
 void setLine(int line)
          Set the line for this node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

line

protected int line
line information


column

protected int column
column information


filename

protected java.lang.String filename
filename information

Constructor Detail

CommonLexInfo

public CommonLexInfo()

CommonLexInfo

public CommonLexInfo(java.lang.String filename,
                     int line,
                     int column)

CommonLexInfo

public CommonLexInfo(LexInfo other)
Method Detail

getFilename

public java.lang.String getFilename()
Get the file name for this node


getColumn

public int getColumn()
Get the column for this node


getLine

public int getLine()
Get the line for this node


setFilename

public void setFilename(java.lang.String fn)
Sets the file name for this node.


setColumn

public void setColumn(int column)
Set the column for this node


setLine

public void setLine(int line)
Set the line for this node


copyLexInfo

public void copyLexInfo(LexInfo from)
Copies the lexical information from other LexInfo


getLexInfoString

public java.lang.String getLexInfoString()
Returns true if all the information (Filename:line:column) is valid; false otherwise. It will usually be implemented around a FileLineFormatter, which authomatically deals with incompleteness in the information.


antlraux package
v0.2.1

Created by Enrique José García Cota