QJson home page
Go to the documentation of this file.
38 #ifndef YY_YY_LOCATION_HH_INCLUDED
39 # define YY_YY_LOCATION_HH_INCLUDED
46 #line 47 "location.hh"
150 return !(loc1 == loc2);
159 template <
typename YYChar>
160 inline std::basic_ostream<YYChar>&
161 operator<< (std::basic_ostream<YYChar>& ostr,
const location& loc)
163 position last = loc.end - 1;
166 && (!loc.begin.filename
167 || *loc.begin.filename != *last.filename))
169 else if (loc.begin.line != last.line)
170 ostr <<
'-' << last.
line <<
'.' << last.column;
171 else if (loc.begin.column != last.column)
172 ostr <<
'-' << last.column;
179 #line 180 "location.hh"
void initialize(std::string *f=YY_NULL, unsigned int l=1u, unsigned int c=1u)
Initialization.
unsigned int line
Current line number.
location(std::string *f, unsigned int l=1u, unsigned int c=1u)
Construct a 0-width location in f, l, c.
location(const position &b, const position &e)
Construct a location from b to e.
void lines(unsigned int count=1)
Extend the current location to the COUNT next lines.
void initialize(std::string *fn=YY_NULL, unsigned int l=1u, unsigned int c=1u)
Initialization.
position begin
Beginning of the located region.
void step()
Reset initial location to final location.
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.
void columns(unsigned int count=1)
Extend the current location to the COUNT next columns.
position end
End of the located region.