38 #ifndef YY_YY_LIB_VCSN_RAT_LOCATION_HH_INCLUDED
39 # define YY_YY_LIB_VCSN_RAT_LOCATION_HH_INCLUDED
43 #line 11 "lib/vcsn/rat/parse.yy" // location.cc:291
44 namespace vcsn {
namespace rat {
45 #line 46 "./lib/vcsn/rat/location.hh" // location.cc:291
137 return res += -width;
143 return begin + -width;
150 return loc1.begin == loc2.begin && loc1.end == loc2.end;
157 return !(loc1 == loc2);
166 template <
typename YYChar>
167 inline std::basic_ostream<YYChar>&
168 operator<< (std::basic_ostream<YYChar>& ostr,
const location& loc)
170 unsigned int end_col = 0 < loc.
end.
column ? loc.end.column - 1 : 0;
174 && (!loc.begin.filename
175 || *loc.begin.filename != *loc.end.filename))
176 ostr <<
'-' << loc.end.filename <<
':' << loc.end.line <<
'.' << end_col;
177 else if (loc.begin.line < loc.end.line)
178 ostr <<
'-' << loc.end.line <<
'.' << end_col;
179 else if (loc.begin.column < end_col)
180 ostr <<
'-' << end_col;
184 #line 11 "lib/vcsn/rat/parse.yy" // location.cc:291
186 #line 187 "./lib/vcsn/rat/location.hh" // location.cc:291
187 #endif // !YY_YY_LIB_VCSN_RAT_LOCATION_HH_INCLUDED
position end
End of the located region.
location & operator+=(location &res, int width)
Change end position in place.
unsigned int column
Current column number.
position begin
Beginning of the located region.
void step()
Reset initial location to final location.
void lines(int count=1)
(line related) Advance to the COUNT next lines.
location(const position &b, const position &e)
Construct a location from b to e.
void columns(int count=1)
Extend the current location to the COUNT next columns.
void initialize(std::string *fn=0, unsigned int l=1u, unsigned int c=1u)
Initialization.
mutable_automaton< Context > u(const Context &ctx, unsigned n)
The Brzozowski universal witness.
Provide a variadic mul on top of a binary mul(), and one().
location(const position &p=position())
Construct a 0-width location in p.
Define the vcsn::rat::position class.
location(std::string *f, unsigned int l=1u, unsigned int c=1u)
Construct a 0-width location in f, l, c.
location operator-(const location &begin, int width)
Change end position.
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.
location & operator-=(location &res, int width)
Change end position in place.
void lines(int count=1)
Extend the current location to the COUNT next lines.
location operator+(location res, const location &end)
Join two location objects to create a location.
bool operator==(const location &loc1, const location &loc2)
Compare two location objects.
vcsn::rat::location location