40 #ifndef BISON_POSITION_HH
41 # define BISON_POSITION_HH
72 inline void lines (
int count = 1)
83 if (leftmost <= current + count)
108 inline const position
116 inline const position&
119 return res += -width;
123 inline const position
126 return begin + -width;
142 #endif // not BISON_POSITION_HH
const position operator-(const position &begin, const int width)
Add two position objects.
position()
Construct a position.
std::ostream & operator<<(std::ostream &ostr, const location &loc)
Intercept output stream redirection.
unsigned int line
Current line number.
location & operator+=(location &res, unsigned int width)
Add and assign a location.
std::string * filename
File name to which this position refers.
unsigned int column
Current column number.
const location operator+(const location &begin, const location &end)
Join two location objects to create a location.
const position & operator-=(position &res, const int width)
Add and assign a position.
void lines(int count=1)
(line related) Advance to the COUNT next lines.
void columns(int count=1)
(column related) Advance to the COUNT next columns.
void initialize(std::string *fn)
Initialization.