diff options
author | Tomek Mrugalski <tomasz@isc.org> | 2016-02-02 23:17:46 +0100 |
---|---|---|
committer | Tomek Mrugalski <tomasz@isc.org> | 2016-02-02 23:17:46 +0100 |
commit | d1c2e8ed0a540551275371033757df3fc7ef10be (patch) | |
tree | 908397e7374ccd24c60cb1f08b0640df9d25f00a /src/lib/eval/location.hh | |
parent | [4264] relay[123].hex token implemented. (diff) | |
download | kea-d1c2e8ed0a540551275371033757df3fc7ef10be.tar.xz kea-d1c2e8ed0a540551275371033757df3fc7ef10be.zip |
[4264] Parser regenerated.
Diffstat (limited to 'src/lib/eval/location.hh')
-rw-r--r-- | src/lib/eval/location.hh | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/src/lib/eval/location.hh b/src/lib/eval/location.hh index ce1f953704..c01735e7bd 100644 --- a/src/lib/eval/location.hh +++ b/src/lib/eval/location.hh @@ -1,9 +1,8 @@ -// Generated 20151216 -// A Bison parser, made by GNU Bison 3.0.4. +// A Bison parser, made by GNU Bison 3.0.2. // Locations for Bison parsers in C++ -// Copyright (C) 2002-2015 Free Software Foundation, Inc. +// Copyright (C) 2002-2013 Free Software Foundation, Inc. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -41,9 +40,9 @@ # include "position.hh" -#line 13 "parser.yy" // location.cc:337 +#line 13 "parser.yy" // location.cc:291 namespace isc { namespace eval { -#line 46 "location.hh" // location.cc:337 +#line 46 "location.hh" // location.cc:291 /// Abstract a location. class location { @@ -112,42 +111,36 @@ namespace isc { namespace eval { position end; }; - /// Join two locations, in place. - inline location& operator+= (location& res, const location& end) + /// Join two location objects to create a location. + inline location operator+ (location res, const location& end) { res.end = end.end; return res; } - /// Join two locations. - inline location operator+ (location res, const location& end) - { - return res += end; - } - - /// Add \a width columns to the end position, in place. + /// Change end position in place. inline location& operator+= (location& res, int width) { res.columns (width); return res; } - /// Add \a width columns to the end position. + /// Change end position. inline location operator+ (location res, int width) { return res += width; } - /// Subtract \a width columns to the end position, in place. + /// Change end position in place. inline location& operator-= (location& res, int width) { return res += -width; } - /// Subtract \a width columns to the end position. - inline location operator- (location res, int width) + /// Change end position. + inline location operator- (const location& begin, int width) { - return res -= width; + return begin + -width; } /// Compare two location objects. @@ -175,7 +168,8 @@ namespace isc { namespace eval { operator<< (std::basic_ostream<YYChar>& ostr, const location& loc) { unsigned int end_col = 0 < loc.end.column ? loc.end.column - 1 : 0; - ostr << loc.begin; + ostr << loc.begin// << "(" << loc.end << ") " +; if (loc.end.filename && (!loc.begin.filename || *loc.begin.filename != *loc.end.filename)) @@ -187,7 +181,7 @@ namespace isc { namespace eval { return ostr; } -#line 13 "parser.yy" // location.cc:337 +#line 13 "parser.yy" // location.cc:291 } } // isc::eval -#line 192 "location.hh" // location.cc:337 +#line 187 "location.hh" // location.cc:291 #endif // !YY_YY_LOCATION_HH_INCLUDED |