dk.brics.xsugar.xml
Class LocationMap

java.lang.Object
  extended by dk.brics.xsugar.xml.LocationMap

public class LocationMap
extends Object

Location map for keeping track of locations before/after input normalization.


Constructor Summary
LocationMap()
          Constructs a new empty location map.
 
Method Summary
 Location lookup(Location loc)
          Find real location corresponding to the given index.
 void put(int index, int real_line, int real_col)
          Puts a new entry into the map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocationMap

public LocationMap()
Constructs a new empty location map.

Method Detail

lookup

public Location lookup(Location loc)
Find real location corresponding to the given index.

Parameters:
loc - original location
Returns:
real location

put

public void put(int index,
                int real_line,
                int real_col)
Puts a new entry into the map. Entries must be added in index order.

Parameters:
index - index in normalized string
real_line - line number in original string
real_col - column in original string


Copyright © 2004-2007 Anders Møller & Claus Brabrand.