38 #ifndef YY_YY_USERS_AKIM_SRC_LRDE_2_LIB_VCSN_RAT_POSITION_HH_INCLUDED
39 # define YY_YY_USERS_AKIM_SRC_LRDE_2_LIB_VCSN_RAT_POSITION_HH_INCLUDED
46 # if defined __cplusplus && 201103L <= __cplusplus
47 # define YY_NULLPTR nullptr
53 #line 11 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // location.cc:296
54 namespace vcsn {
namespace rat {
55 #line 56 "/Users/akim/src/lrde/2/lib/vcsn/rat/position.hh" // location.cc:296
83 void lines (
int count = 1)
109 static unsigned int add_ (
unsigned int lhs,
int rhs,
unsigned int min)
111 return (0 < rhs || -static_cast<unsigned int>(rhs) < lhs
136 return res += -width;
150 return (pos1.line == pos2.line
151 && pos1.column == pos2.column
152 && (pos1.filename == pos2.filename
153 || (pos1.filename && pos2.filename
154 && *pos1.filename == *pos2.filename)));
161 return !(pos1 == pos2);
168 template <
typename YYChar>
169 inline std::basic_ostream<YYChar>&
170 operator<< (std::basic_ostream<YYChar>& ostr,
const position& pos)
174 return ostr << pos.line <<
'.' << pos.column;
177 #line 11 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // location.cc:296
179 #line 180 "/Users/akim/src/lrde/2/lib/vcsn/rat/position.hh" // location.cc:296
180 #endif // !YY_YY_USERS_AKIM_SRC_LRDE_2_LIB_VCSN_RAT_POSITION_HH_INCLUDED
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.
location & operator-=(location &res, int width)
Subtract width columns to the end position, in place.
mutable_automaton< Context > u(const Context &ctx, unsigned n)
The Brzozowski universal witness.
location operator+(location res, const location &end)
Join two locations.
location operator-(location res, int width)
Subtract width columns to the end position.
location & operator+=(location &res, const location &end)
Join two locations, in place.
unsigned int column
Current column number.
std::string * filename
File name to which this position refers.
bool operator==(const location &loc1, const location &loc2)
Compare two location objects.
static unsigned int add_(unsigned int lhs, int rhs, unsigned int min)
Compute max(min, lhs+rhs) (provided min <= lhs).
void initialize(std::string *fn=0, unsigned int l=1u, unsigned int c=1u)
Initialization.
unsigned int line
Current line number.
position(std::string *f=0, unsigned int l=1u, unsigned int c=1u)
Construct a position.
bool operator!=(const location &loc1, const location &loc2)
Compare two location objects.