40 #ifndef BISON_POSITION_HH
41 # define BISON_POSITION_HH
72 inline void lines (
int count = 1)
83 if (leftmost <= current + count)
101 operator+= (
position& res,
const int width)
108 inline const position
109 operator+ (
const position& begin,
const int width)
111 position res = begin;
116 inline const position&
117 operator-= (position& res,
const int width)
119 return res += -width;
123 inline const position
124 operator- (
const position& begin,
const int width)
126 return begin + -width;
134 operator<< (std::ostream& ostr,
const position& pos)
138 return ostr << pos.line <<
'.' << pos.column;
142 #endif // not BISON_POSITION_HH
unsigned int column
Current column number.
void columns(int count=1)
(column related) Advance to the COUNT next columns.
void lines(int count=1)
(line related) Advance to the COUNT next lines.
void initialize(std::string *fn)
Initialization.
position()
Construct a position.
unsigned int line
Current line number.
std::string * filename
File name to which this position refers.