Bridge++  Version 1.5.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
yy::location Class Reference

Abstract a location. More...

#include <location.hh>

Public Member Functions

 location (const position &b, const position &e)
 Construct a location from b to e. More...
 
 location (const position &p=position())
 Construct a 0-width location in p. More...
 
 location (std::string *f, unsigned int l=1u, unsigned int c=1u)
 Construct a 0-width location in f, l, c. More...
 
void initialize (std::string *f=YY_NULL, unsigned int l=1u, unsigned int c=1u)
 Initialization. More...
 
Line and Column related manipulators
void step ()
 Reset initial location to final location. More...
 
void columns (unsigned int count=1)
 Extend the current location to the COUNT next columns. More...
 
void lines (unsigned int count=1)
 Extend the current location to the COUNT next lines. More...
 

Public Attributes

position begin
 Beginning of the located region. More...
 
position end
 End of the located region. More...
 

Detailed Description

Abstract a location.

Definition at line 50 of file location.hh.

Constructor & Destructor Documentation

yy::location::location ( const position b,
const position e 
)
inline

Construct a location from b to e.

Definition at line 55 of file location.hh.

yy::location::location ( const position p = position ())
inlineexplicit

Construct a 0-width location in p.

Definition at line 62 of file location.hh.

yy::location::location ( std::string *  f,
unsigned int  l = 1u,
unsigned int  c = 1u 
)
inlineexplicit

Construct a 0-width location in f, l, c.

Definition at line 69 of file location.hh.

Member Function Documentation

void yy::location::columns ( unsigned int  count = 1)
inline

Extend the current location to the COUNT next columns.

Definition at line 97 of file location.hh.

void yy::location::initialize ( std::string *  f = YY_NULL,
unsigned int  l = 1u,
unsigned int  c = 1u 
)
inline

Initialization.

Definition at line 79 of file location.hh.

void yy::location::lines ( unsigned int  count = 1)
inline

Extend the current location to the COUNT next lines.

Definition at line 103 of file location.hh.

void yy::location::step ( )
inline

Reset initial location to final location.

Definition at line 91 of file location.hh.

Member Data Documentation

position yy::location::begin

Beginning of the located region.

Definition at line 112 of file location.hh.

position yy::location::end

End of the located region.

Definition at line 114 of file location.hh.


The documentation for this class was generated from the following file: