40 #ifndef BISON_LOCATION_HH
41 # define BISON_LOCATION_HH
79 inline void columns (
unsigned int count = 1)
85 inline void lines (
unsigned int count = 1)
108 inline const location operator+ (
const location& begin,
unsigned int width)
110 location res = begin;
116 inline location& operator+= (location& res,
unsigned int width)
128 inline std::ostream& operator<< (std::ostream& ostr,
const location& loc)
130 position last = loc.end - 1;
133 && (!loc.begin.filename
134 || *loc.begin.filename != *last.filename))
136 else if (loc.begin.line != last.line)
137 ostr <<
'-' << last.line <<
'.' << last.column;
138 else if (loc.begin.column != last.column)
139 ostr <<
'-' << last.column;
145 #endif // not BISON_LOCATION_HH