Package java_cup.runtime
Class ComplexSymbolFactory.Location
java.lang.Object
java_cup.runtime.ComplexSymbolFactory.Location
- Enclosing class:
ComplexSymbolFactory
-
Constructor Summary
ConstructorsConstructorDescriptionLocation
(int line, int column) Location Object stores line and columnLocation
(int line, int column, int offset) Location Object stores line, column and offset to the file startCopy Constructor for other ComplexSymbolFactory based LocationsLocation Object stores compilation unit, line and columnLocation Object stores compilation unit, line, column and offset to the file start -
Method Summary
Modifier and TypeMethodDescriptionCloning factory methodint
getColumnint
getLine()
getLineint
getOffsetgetUnit()
getUnitvoid
move
(int linediff, int coldiff, int offsetdiff) move moves this Location by the given differences.toString()
getLinevoid
toXML
(XMLStreamWriter writer, String orientation) Writes the location information directly into an XML document
-
Constructor Details
-
Location
Copy Constructor for other ComplexSymbolFactory based Locations- Parameters:
other
-
-
Location
Location Object stores compilation unit, line, column and offset to the file start- Parameters:
unit
- compilation unit, e.g. file nameline
- line numbercolumn
- column numberoffset
- offset from file start
-
Location
Location Object stores compilation unit, line and column- Parameters:
unit
- compilation unit, e.g. file nameline
- line numbercolumn
- column number
-
Location
public Location(int line, int column, int offset) Location Object stores line, column and offset to the file start- Parameters:
line
- line numbercolumn
- column numberoffset
- offset from file start
-
Location
public Location(int line, int column) Location Object stores line and column- Parameters:
line
- line numbercolumn
- column number
-
-
Method Details
-
getColumn
public int getColumn()getColumn -
getLine
public int getLine()getLine -
move
public void move(int linediff, int coldiff, int offsetdiff) move moves this Location by the given differences.- Parameters:
linediff
-coldiff
-offsetdiff
-
-
clone
Cloning factory method- Parameters:
other
-- Returns:
- new cloned Location
-
getUnit
getUnit -
toString
getLine -
toXML
Writes the location information directly into an XML document- Parameters:
writer
- the destination XML Documentorientation
- adds details about the orientation of this location as an attribute; often used with the strings "left" or "right"- Throws:
XMLStreamException
-
getOffset
public int getOffset()getOffset
-