cakoose.util.parser
Class FSourcePos

java.lang.Object
  extended by cakoose.util.parser.FSourcePos

public final class FSourcePos
extends Object


Field Summary
 int column
           
 String fileName
           
 int line
           
 
Constructor Summary
FSourcePos(String fileName, int line, int column)
           
 
Method Summary
 String toString()
           
 void toString(StringBuilder builder)
           
 String toStringRelative(FSourcePos other)
          Shows this location relative to another location.
 void toStringRelative(StringBuilder builder, FSourcePos other)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fileName

public final String fileName

line

public final int line

column

public final int column
Constructor Detail

FSourcePos

public FSourcePos(String fileName,
                  int line,
                  int column)
Method Detail

toString

public void toString(StringBuilder builder)

toString

public String toString()
Overrides:
toString in class Object

toStringRelative

public String toStringRelative(FSourcePos other)
Shows this location relative to another location. If the two locations are on different lines, this function behaves the same as toString() does. Otherwise, only the column number is shown.


toStringRelative

public void toStringRelative(StringBuilder builder,
                             FSourcePos other)