  | 
  
    ztsdb
    
   | 
 
 
 
 
Go to the documentation of this file.
   44 #ifndef YY_YY_LOCATION_HH_INCLUDED 
   45 # define YY_YY_LOCATION_HH_INCLUDED 
   74     explicit location (
const std::string& filename_p,
 
   77                        std::shared_ptr<const std::string> s_p = 
 
   78                          std::make_shared<const std::string>())
 
   79       : 
begin(filename_p, l, c, s_p)
 
   80       , 
end(filename_p, l, c, s_p)
 
   88                     std::shared_ptr<const std::string> s_p)
 
  147     return res += -width;
 
  153     return begin + -width;
 
  167     return !(loc1 == loc2);
 
  176   template <
typename YYChar>
 
  177   inline std::basic_ostream<YYChar>&
 
  178   operator<< (std::basic_ostream<YYChar>& ostr, 
const location& loc)
 
  188       ostr << 
'-' << loc.
end.
line << 
'.' << end_col;
 
  190       ostr << 
'-' << end_col;
 
  197     return location(
"", 0, 0, std::make_shared<const std::string>());
 
  199   inline location span_loc(
const location& b, 
const location& e) {
 
  200     return location(b.begin, e.end);
 
  203 #endif // !YY_YY_LOCATION_HH_INCLUDED 
  
void columns(int count=1)
Extend the current location to the COUNT next columns.
Definition: location.hpp:104
 
unsigned int line
Current line number.
Definition: position.hpp:113
 
location(const position &b, const position &e)
Construct a location from b to e.
Definition: location.hpp:59
 
location(const std::string &filename_p, unsigned int l=1u, unsigned int c=1u, std::shared_ptr< const std::string > s_p=std::make_shared< const std::string >())
Construct a 0-width location in f, l, c.
Definition: location.hpp:74
 
Abstract a location.
Definition: location.hpp:54
 
location missing_loc()
Definition: location.hpp:196
 
void lines(int count=1)
Extend the current location to the COUNT next lines.
Definition: location.hpp:110
 
Abstract a position.
Definition: position.hpp:62
 
std::string filename
File name to which this location refers.
Definition: position.hpp:111
 
unsigned int column
Current column number.
Definition: position.hpp:115
 
position begin
Beginning of the located region.
Definition: location.hpp:119
 
void step()
Reset initial location to final location.
Definition: location.hpp:98
 
location(const position &p=position())
Construct a 0-width location in p.
Definition: location.hpp:67
 
void lines(int count=1)
(line related) Advance to the COUNT next lines.
Definition: position.hpp:94
 
void initialize(const std::string &filename_p, unsigned int l, unsigned int c, std::shared_ptr< const std::string > s_p)
Initialization.
Definition: location.hpp:85
 
void initialize(const std::string &filename_p, unsigned int l, unsigned int c, std::shared_ptr< const std::string > s_p)
Initialization.
Definition: position.hpp:80
 
position end
End of the located region.
Definition: location.hpp:121