39 #ifndef BISON_LOCATION_HH 40 # define BISON_LOCATION_HH 48 #line 1 "[Bison:b4_percent_define_default]" 53 #line 54 "location.hh" 84 inline void columns (
unsigned int count = 1)
90 inline void lines (
unsigned int count = 1)
138 return !(loc1 == loc2);
156 ostr <<
'-' << last.
line <<
'.' << last.column;
158 ostr <<
'-' << last.column;
164 #line 1 "[Bison:b4_percent_define_default]" 169 #line 170 "location.hh" 171 #endif // not BISON_LOCATION_HH bool operator!=(const location &loc1, const location &loc2)
Compare two location objects.
position begin
Beginning of the located region.
void lines(int count=1)
(line related) Advance to the COUNT next lines.
void columns(unsigned int count=1)
Extend the current location to the COUNT next columns.
std::string * filename
File name to which this position refers.
location()
Construct a location.
const location operator+(const location &begin, const location &end)
Join two location objects to create a location.
std::ostream & operator<<(std::ostream &ostr, const location &loc)
Intercept output stream redirection.
void initialize(std::string *fn)
Initialization.
location & operator+=(location &res, unsigned int width)
Add and assign a location.
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 initialize(std::string *fn)
Initialization.
position end
End of the located region.
unsigned int line
Current line number.
unsigned int column
Current column number.
void step()
Reset initial location to final location.