]> git.saurik.com Git - bison.git/blobdiff - data/lalr1.cc
c++: compute the header guards.
[bison.git] / data / lalr1.cc
index 0fe3aeed40eb35751e25b8bf779922f565850650..4f0b268880d01b16ffa14eca65dcb3b839616993 100644 (file)
@@ -37,7 +37,6 @@ b4_defines_if(
 [@output(b4_spec_defines_file@)@
 b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++],
              [2002-2012])
-dnl FIXME: This is wrong, we want computed header guards.
 [
 /**
  ** \file ]b4_spec_defines_file[
@@ -46,8 +45,7 @@ dnl FIXME: This is wrong, we want computed header guards.
 
 /* C++ LALR(1) parser skeleton written by Akim Demaille.  */
 
-#ifndef PARSER_HEADER_H
-# define PARSER_HEADER_H
+]b4_cpp_guard_open([b4_spec_defines_file])[
 
 ]b4_percent_code_get([[requires]])[
 
@@ -283,10 +281,9 @@ b4_user_stype
  /* Redirection for backward compatibility.  */
 # define YYSTYPE b4_namespace_ref::b4_parser_class_name::semantic_type
 #endif
-])
-b4_percent_code_get([[provides]])[]dnl
-
-[#endif /* ! defined PARSER_HEADER_H */]
+])[
+]b4_percent_code_get([[provides]])[
+]b4_cpp_guard_close([b4_spec_defines_file])
 ])dnl
 @output(b4_parser_file_name@)@
 b4_copyright([Skeleton implementation for Bison LALR(1) parsers in C++],