Hans Åberg wrote: > > position.hh is also generated from location.cc (a bit confusing > > perhaps; not my choice). If you remove all generated files and start > > from scratch, does it work for you with the above patch? > > It is malformed, perhaps mangled by the mailing system: they > should be posted as files, I think. Better you fix it. When I > compiled it, I kept the name of position.hh, only changing > location.cc.
Seems not mangled to me, perhaps locally mangled on your end. Anyway, try this attachment. Regards, Frank
--- stack.hh +++ stack.hh @@ -130,15 +130,15 @@ ]]) b4_defines_if( -[b4_output_begin([b4_dir_prefix[]stack.hh]) +[b4_output_begin([b4_dir_prefix[]b4_percent_define_get([[extra_header_prefix]])stack.hh]) b4_copyright([Stack handling for Bison parsers in C++])[ /** - ** \file ]b4_dir_prefix[stack.hh + ** \file ]b4_dir_prefix[]b4_percent_define_get([[extra_header_prefix]])[stack.hh ** Define the ]b4_namespace_ref[::stack class. */ -]b4_cpp_guard_open([b4_dir_prefix[]stack.hh])[ +]b4_cpp_guard_open([b4_dir_prefix[]b4_percent_define_get([[extra_header_prefix]])stack.hh])[ # include <vector> @@ -146,7 +146,7 @@ ]b4_stack_define[ ]b4_namespace_close[ -]b4_cpp_guard_close([b4_dir_prefix[]stack.hh]) +]b4_cpp_guard_close([b4_dir_prefix[]b4_percent_define_get([[extra_header_prefix]])stack.hh]) b4_output_end() ]) --- location.cc +++ location.cc @@ -294,15 +294,15 @@ b4_defines_if([ -b4_output_begin([b4_dir_prefix[]position.hh]) +b4_output_begin([b4_dir_prefix[]b4_percent_define_get([[extra_header_prefix]])position.hh]) b4_copyright([Positions for Bison parsers in C++])[ /** - ** \file ]b4_dir_prefix[position.hh + ** \file ]b4_dir_prefix[]b4_percent_define_get([[extra_header_prefix]])[position.hh ** Define the ]b4_namespace_ref[::position class. */ -]b4_cpp_guard_open([b4_dir_prefix[]position.hh])[ +]b4_cpp_guard_open([b4_dir_prefix[]b4_percent_define_get([[extra_header_prefix]])position.hh])[ # include <algorithm> // std::max # include <iostream> @@ -313,26 +313,26 @@ ]b4_namespace_open[ ]b4_position_define[ ]b4_namespace_close[ -]b4_cpp_guard_close([b4_dir_prefix[]position.hh]) +]b4_cpp_guard_close([b4_dir_prefix[]b4_percent_define_get([[extra_header_prefix]])position.hh]) b4_output_end() -b4_output_begin([b4_dir_prefix[]location.hh]) +b4_output_begin([b4_dir_prefix[]b4_percent_define_get([[extra_header_prefix]])location.hh]) b4_copyright([Locations for Bison parsers in C++])[ /** - ** \file ]b4_dir_prefix[location.hh + ** \file ]b4_dir_prefix[]b4_percent_define_get([[extra_header_prefix]])[location.hh ** Define the ]b4_namespace_ref[::location class. */ -]b4_cpp_guard_open([b4_dir_prefix[]location.hh])[ +]b4_cpp_guard_open([b4_dir_prefix[]b4_percent_define_get([[extra_header_prefix]])location.hh])[ -# include "position.hh" +# include "]b4_percent_define_get([[extra_header_prefix]])[position.hh" ]b4_namespace_open[ ]b4_location_define[ ]b4_namespace_close[ -]b4_cpp_guard_close([b4_dir_prefix[]location.hh]) +]b4_cpp_guard_close([b4_dir_prefix[]b4_percent_define_get([[extra_header_prefix]])location.hh]) b4_output_end() ]) --- lalr1.cc +++ lalr1.cc @@ -154,8 +154,8 @@ # include <stdexcept> # include <string> # include <vector>]b4_defines_if([[ -# include "stack.hh" -]b4_bison_locations_if([[# include "location.hh"]])])[ +# include "]b4_percent_define_get([[extra_header_prefix]])[stack.hh" +]b4_bison_locations_if([[# include "]b4_percent_define_get([[extra_header_prefix]])[location.hh"]])])[ ]b4_variant_if([b4_variant_includes])[ ]b4_attribute_define[