]> git.saurik.com Git - bison.git/blobdiff - data/yacc.c
The single-stack C++ parser is now the standard one.
[bison.git] / data / yacc.c
index 19f77a5fbf8480588beac69d4a1a768f397c75d5..12ce13874cb96b4a848e0f9cab38baeccf7892a8 100644 (file)
@@ -1,10 +1,12 @@
                                                              -*- C -*-
-
 # Yacc compatible skeleton for Bison
 
 # Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
 # 2007, 2008 Free Software Foundation, Inc.
 
+m4_pushdef([b4_copyright_years],
+[1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008])
+
 # 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
 # the Free Software Foundation, either version 3 of the License, or
@@ -114,7 +116,7 @@ m4_define([b4_int_type],
 # --------------------
 # Expansion of $<TYPE>$.
 m4_define([b4_lhs_value],
-[(yyval[]m4_ifval([$1], [.$1]))])
+[b4_symbol_value(yyval, [$1])])
 
 
 # b4_rhs_value(RULE-LENGTH, NUM, [TYPE])
@@ -122,7 +124,7 @@ m4_define([b4_lhs_value],
 # Expansion of $<TYPE>NUM, where the current rule has RULE-LENGTH
 # symbols on RHS.
 m4_define([b4_rhs_value],
-[(yyvsp@{($2) - ($1)@}m4_ifval([$3], [.$3]))])
+[b4_symbol_value([yyvsp@{($2) - ($1)@}], [$3])])
 
 
 
@@ -153,9 +155,9 @@ m4_define([b4_rhs_location],
 # We do want M4 expansion after # for CPP macros.
 m4_changecom()
 m4_divert_push(0)dnl
-@output(b4_parser_file_name@)
-b4_copyright([Skeleton implementation for Bison's Yacc-like parsers in C],dnl '
-  [1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])[
+@output(b4_parser_file_name@)@
+b4_copyright([Implementation for Bison's Yacc-like parsers in C])dnl'
+[
 
 /* C LALR(1) parser skeleton written by Richard Stallman, by
    simplifying the original so-called "semantic" parser.  */
@@ -1674,9 +1676,8 @@ yypushreturn:
 
 ]b4_epilogue
 b4_defines_if(
-[@output(b4_spec_defines_file@)
-b4_copyright([Skeleton interface for Bison's Yacc-like parsers in C],dnl '
-  [1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006])
+[@output(b4_spec_defines_file@)@
+b4_copyright([Interface for Bison's Yacc-like parsers in C])dnl'
 
 b4_percent_code_get([[requires]])[]dnl
 
@@ -1739,3 +1740,4 @@ b4_c_function_decl([b4_prefix[pstate_delete]], [[void]],
 b4_percent_code_get([[provides]])[]dnl
 ])dnl b4_defines_if
 m4_divert_pop(0)
+m4_popdef([b4_copyright_years])