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
location(const position &p=position())
Construct a 0-width location in p.
void lines(int count=1)
(line related) Advance 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.
void lines(int count=1)
Extend the current location 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(const position &b, const position &e)
Construct a location from b to e.
location operator-(location res, int width)
Subtract width columns to the end position.
position begin
Beginning of the located region.
location & operator+=(location &res, const location &end)
Join two locations, in place.
unsigned int column
Current column number.
position end
End of the located region.
Provide a variadic mul on top of a binary mul(), and one().
void step()
Reset initial location to final location.
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.
Define the vcsn::rat::position class.
void columns(int count=1)
Extend the current location to the COUNT next columns.
void initialize(std::string *f=0, unsigned int l=1u, unsigned int c=1u)
Initialization.
vcsn::rat::location location
bool operator!=(const location &loc1, const location &loc2)
Compare two location objects.