40 #ifndef BISON_LOCATION_HH
41 # define BISON_LOCATION_HH
79 inline void columns (
unsigned int count = 1)
85 inline void lines (
unsigned int count = 1)
137 ostr <<
'-' << last.
line <<
'.' << last.column;
139 ostr <<
'-' << last.column;
145 #endif // not BISON_LOCATION_HH
position begin
Beginning of the located region.
std::ostream & operator<<(std::ostream &ostr, const location &loc)
Intercept output stream redirection.
unsigned int line
Current line number.
void columns(unsigned int count=1)
Extend the current location to the COUNT next columns.
void lines(unsigned int count=1)
Extend the current location to the COUNT next lines.
location & operator+=(location &res, unsigned int width)
Add and assign a location.
void step()
Reset initial location to final location.
std::string * filename
File name to which this position refers.
location()
Construct a location.
void initialize(std::string *fn)
Initialization.
unsigned int column
Current column number.
const location operator+(const location &begin, const location &end)
Join two location objects to create a location.
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.