lalr1.cc: location.hh and position.hh are not generated without %defines

* data/location.cc (b4_position_define, b4_location_define): New.
(location.hh, position.hh): Generate only if %defines.
* data/lalr1.cc: therefore, define these classes when locations are
needed, but headers are not generated.
* tests/output.at: Check that these files are not generated.
* NEWS: Document.
This commit is contained in:
Akim Demaille
2012-07-30 16:37:02 +02:00
parent 85f0b29e6d
commit 93549bcd43
5 changed files with 76 additions and 50 deletions

5
NEWS
View File

@@ -84,6 +84,11 @@ GNU Bison NEWS
** C++ skeletons improvements
*** parser header (%defines) is no longer mandatory (lalr1.cc)
In which case, if needed, the support classes are defined in the generated
parser, instead of additional files such as position.hh and location.hh.
*** locations are no longer mandatory (lalr1.cc, glr.cc)
Both lalr1.cc and glr.cc no longer require %location.