39 #ifndef BISON_LOCATION_HH
40 # define BISON_LOCATION_HH
49 namespace torc {
namespace generic {
52 #line 53 "location.hh"
83 inline void columns (
unsigned int count = 1)
89 inline void lines (
unsigned int count = 1)
137 return !(loc1 == loc2);
155 ostr <<
'-' << last.
line <<
'.' << last.column;
157 ostr <<
'-' << last.column;
167 #line 168 "location.hh"
169 #endif // not BISON_LOCATION_HH
position begin
Beginning of the located region.
location()
Construct a location.
position begin
Beginning of the located region.
void initialize(std::string *fn)
Initialization.
position end
End of the located region.
void step()
Reset initial location to final location.
unsigned int line
Current line number.
location & operator+=(location &res, unsigned int width)
Add and assign a location.
void columns(unsigned int count=1)
Extend the current location to the COUNT next columns.
const location operator+(const location &begin, const location &end)
Join two location objects to create a location.
bool operator!=(const location &loc1, const location &loc2)
Compare two location objects.
std::ostream & operator<<(std::ostream &ostr, const location &loc)
Intercept output stream redirection.
std::string * filename
File name to which this position refers.
void lines(unsigned int count=1)
Extend the current location to the COUNT next lines.
bool operator==(const location &loc1, const location &loc2)
Compare two location objects.
void columns(unsigned int count=1)
Extend the current location to the COUNT next columns.
unsigned int column
Current column number.
position end
End of the located region.
void lines(int count=1)
(line related) Advance to the COUNT next lines.
void initialize(std::string *fn)
Initialization.