38 #ifndef YY_ELTLYY_POSITION_HH_INCLUDED
39 # define YY_ELTLYY_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)
109 operator+= (
position& res,
const int width)
116 inline const position
117 operator+ (
const position& begin,
const int width)
119 position res = begin;
125 operator-= (position& res,
const int width)
127 return res += -width;
131 inline const position
132 operator- (
const position& begin,
const int width)
134 return begin + -width;
139 operator== (
const position& pos1,
const position& pos2)
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)));
150 operator!= (
const position& pos1,
const position& pos2)
152 return !(pos1 == pos2);
159 template <
typename YYChar>
160 inline std::basic_ostream<YYChar>&
161 operator<< (std::basic_ostream<YYChar>& ostr,
const position& pos)
164 ostr << *pos.filename <<
':';
165 return ostr << pos.line <<
'.' << pos.column;
171 #line 172 "position.hh"