When the directive %locations
is used, the Java parser
supports location tracking, see Locations Overview.
An auxiliary user-defined class defines a position, a single point
in a file; Bison itself defines a class representing a location,
a range composed of a pair of positions (possibly spanning several
files). The location class is an inner class of the parser; the name
is Location
by default, and may also be renamed using
%define location_type "
class-name"
.
The location class treats the position as a completely opaque value.
By default, the class name is Position
, but this can be changed
with %define position_type "
class-name"
. This class must
be supplied by the user.
The first, inclusive, position of the range, and the first beyond.
Create a
Location
denoting an empty range located at a given point.