38 #ifndef YY_YY_USERS_AKIM_SRC_LRDE_2_LIB_VCSN_RAT_LOCATION_HH_INCLUDED
39 # define YY_YY_USERS_AKIM_SRC_LRDE_2_LIB_VCSN_RAT_LOCATION_HH_INCLUDED
43 #line 11 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // location.cc:296
44 namespace vcsn {
namespace rat {
45 #line 46 "/Users/akim/src/lrde/2/lib/vcsn/rat/location.hh" // location.cc:296
143 return res += -width;
156 return loc1.begin == loc2.begin && loc1.end == loc2.end;
163 return !(loc1 == loc2);
172 template <
typename YYChar>
173 inline std::basic_ostream<YYChar>&
174 operator<< (std::basic_ostream<YYChar>& ostr,
const location& loc)
176 unsigned int end_col = 0 < loc.
end.
column ? loc.end.column - 1 : 0;
179 && (!loc.begin.filename
180 || *loc.begin.filename != *loc.end.filename))
181 ostr <<
'-' << loc.end.filename <<
':' << loc.end.line <<
'.' << end_col;
182 else if (loc.begin.line < loc.end.line)
183 ostr <<
'-' << loc.end.line <<
'.' << end_col;
184 else if (loc.begin.column < end_col)
185 ostr <<
'-' << end_col;
189 #line 11 "/Users/akim/src/lrde/2/lib/vcsn/rat/parse.yy" // location.cc:296
191 #line 192 "/Users/akim/src/lrde/2/lib/vcsn/rat/location.hh" // location.cc:296
192 #endif // !YY_YY_USERS_AKIM_SRC_LRDE_2_LIB_VCSN_RAT_LOCATION_HH_INCLUDED
position end
End of the located region.
void lines(int count=1)
(line related) Advance to the COUNT next lines.
position begin
Beginning of the located region.
bool operator==(const location &loc1, const location &loc2)
Compare two location objects.
void initialize(std::string *fn=0, unsigned int l=1u, unsigned int c=1u)
Initialization.
void step()
Reset initial location to final location.
mutable_automaton< Context > u(const Context &ctx, unsigned n)
The Brzozowski universal witness.
location & operator-=(location &res, int width)
Subtract width columns to the end position, in place.
vcsn::rat::location location
location operator+(location res, const location &end)
Join two locations.
bool operator!=(const location &loc1, const location &loc2)
Compare two location objects.
void initialize(std::string *f=0, unsigned int l=1u, unsigned int c=1u)
Initialization.
Provide a variadic mul on top of a binary mul(), and one().
location & operator+=(location &res, const location &end)
Join two locations, in place.
location(const position &b, const position &e)
Construct a location from b to e.
Define the vcsn::rat::position class.
void columns(int count=1)
Extend the current location to the COUNT next columns.
void lines(int count=1)
Extend the current location to the COUNT next lines.
location(std::string *f, unsigned int l=1u, unsigned int c=1u)
Construct a 0-width location in f, l, c.
location(const position &p=position())
Construct a 0-width location in p.
unsigned int column
Current column number.
location operator-(location res, int width)
Subtract width columns to the end position.