38 #ifndef YY_YY_LOCATION_HH_INCLUDED
39 # define YY_YY_LOCATION_HH_INCLUDED
44 #line 4 "evalexpr_parser.yy"
47 #line 48 "location.hh"
151 return !(loc1 == loc2);
160 template <
typename YYChar>
161 inline std::basic_ostream<YYChar>&
162 operator<< (std::basic_ostream<YYChar>& ostr,
const location& loc)
167 && (!loc.begin.filename
168 || *loc.begin.filename != *last.
filename))
170 else if (loc.begin.line != last.
line)
171 ostr <<
'-' << last.
line <<
'.' << last.
column;
172 else if (loc.begin.column != last.
column)
173 ostr <<
'-' << last.
column;
178 #line 4 "evalexpr_parser.yy"
181 #line 182 "location.hh"
bool operator!=(const location &loc1, const location &loc2)
Compare two location objects.
void initialize(std::string *fn=YY_NULL, unsigned int l=1u, unsigned int c=1u)
Initialization.
void columns(unsigned int count=1)
Extend the current location to the COUNT next columns.
const location operator+(const location &begin, const location &end)
Join two location objects to create a location.
unsigned int column
Current column number.
location & operator+=(location &res, unsigned int width)
Add and assign a location.
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.
position begin
Beginning of the located region.
position end
End of the located region.
void lines(unsigned int count=1)
Extend the current location to the COUNT next lines.
void step()
Reset initial location to final location.
location(const position &p=position())
Construct a 0-width location in p.
location(const position &b, const position &e)
Construct a location from b to e.
void initialize(std::string *f=YY_NULL, unsigned int l=1u, unsigned int c=1u)
Initialization.
bool operator==(const location &loc1, const location &loc2)
Compare two location objects.
unsigned int line
Current line number.
std::string * filename
File name to which this position refers.