Go to the documentation of this file.
38 #ifndef YY_YY_ROSTLAB_BLAST_PARSER_LOCATION_H_INCLUDED
39 # define YY_YY_ROSTLAB_BLAST_PARSER_LOCATION_H_INCLUDED
45 # if defined __cplusplus
46 # if 201103L <= __cplusplus
47 # define YY_NULLPTR nullptr
52 # define YY_NULLPTR ((void*)0)
56 #line 22 "blast-parser-parser.ypp"
57 namespace rostlab {
namespace blast {
58 #line 59 "rostlab/blast-parser-location.h"
117 return lhs + rhs < min ? min : lhs + rhs;
140 return res += -width;
165 return !(pos1 == pos2);
172 template <
typename YYChar>
173 std::basic_ostream<YYChar>&
282 return res += -width;
303 return !(loc1 == loc2);
312 template <
typename YYChar>
313 std::basic_ostream<YYChar>&
324 ostr <<
'-' << loc.
end.
line <<
'.' << end_col;
326 ostr <<
'-' << end_col;
330 #line 22 "blast-parser-parser.ypp"
332 #line 333 "rostlab/blast-parser-location.h"
334 #endif // !YY_YY_ROSTLAB_BLAST_PARSER_LOCATION_H_INCLUDED
counter_type line
Current line number.
void columns(counter_type count=1)
Extend the current location to the COUNT next columns.
bool operator!=(const position &pos1, const position &pos2)
Compare two position objects.
A point in a source file.
position end
End of the located region.
void columns(counter_type count=1)
(column related) Advance to the COUNT next columns.
location(std::string *f, counter_type l=1, counter_type c=1)
Construct a 0-width location in f, l, c.
position & operator+=(position &res, position::counter_type width)
Add width columns, in place.
location(const position &b, const position &e)
Construct a location from b to e.
Two points in a source file.
int counter_type
Type for line and column numbers.
void lines(counter_type count=1)
(line related) Advance to the COUNT next lines.
position operator-(position res, position::counter_type width)
Subtract width columns.
void lines(counter_type count=1)
Extend the current location to the COUNT next lines.
position & operator-=(position &res, position::counter_type width)
Subtract width columns, in place.
location(const position &p=position())
Construct a 0-width location in p.
std::string * filename
File name to which this position refers.
std::basic_ostream< YYChar > & operator<<(std::basic_ostream< YYChar > &ostr, const position &pos)
Intercept output stream redirection.
void initialize(std::string *f=YY_NULLPTR, counter_type l=1, counter_type c=1)
Initialization.
void step()
Reset initial location to final location.
position(std::string *f=YY_NULLPTR, counter_type l=1, counter_type c=1)
Construct a position.
void initialize(std::string *fn=YY_NULLPTR, counter_type l=1, counter_type c=1)
Initialization.
position operator+(position res, position::counter_type width)
Add width columns.
bool operator==(const position &pos1, const position &pos2)
Compare two position objects.
counter_type column
Current column number.
position begin
Beginning of the located region.
position::counter_type counter_type
Type for line and column numbers.