38 #ifndef YY_YY_POSITION_HH_INCLUDED 39 # define YY_YY_POSITION_HH_INCLUDED 46 # if defined __cplusplus && 201103L <= __cplusplus 47 # define YY_NULL nullptr 56 #line 57 "position.hh" 85 void lines (
int count = 1)
127 return res += -width;
134 return begin + -width;
141 return (pos1.line == pos2.line
142 && pos1.column == pos2.column
143 && (pos1.filename == pos2.filename
144 || (pos1.filename && pos2.filename
145 && *pos1.filename == *pos2.filename)));
152 return !(pos1 == pos2);
159 template <
typename YYChar>
160 inline std::basic_ostream<YYChar>&
161 operator<< (std::basic_ostream<YYChar>& ostr,
const position& pos)
165 return ostr << pos.line <<
'.' << pos.column;
171 #line 172 "position.hh"
void initialize(std::string *fn=YY_NULL, unsigned int l=1u, unsigned int c=1u)
Initialization.
position(std::string *f=YY_NULL, unsigned int l=1u, unsigned int c=1u)
Construct a position.
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.
unsigned int line
Current line number.
std::string * filename
File name to which this position refers.