X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/7ecec4ddf9e1640c7133e0be0788b1d30ece20ec..75ad86eebd3f49dff81976eb83036eb7b7793e68:/data/lalr1.cc diff --git a/data/lalr1.cc b/data/lalr1.cc index 6682378d..63712265 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -1,6 +1,7 @@ # C++ skeleton for Bison -# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 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 @@ -20,9 +21,9 @@ m4_include(b4_pkgdatadir/[c++.m4]) m4_define([b4_parser_class_name], - [b4_get_percent_define([[parser_class_name]])]) + [b4_percent_define_get([[parser_class_name]])]) m4_define([b4_namespace], - [b4_get_percent_define([[namespace]])]) + [b4_percent_define_get([[namespace]])]) # The header is mandatory. b4_defines_if([], @@ -46,7 +47,7 @@ dnl FIXME: This is wrong, we want computed header guards. #ifndef PARSER_HEADER_H # define PARSER_HEADER_H -]b4_get_percent_code([[requires]])[ +]b4_percent_code_get([[requires]])[ #include #include @@ -118,7 +119,7 @@ b4_user_stype typedef YYSTYPE semantic_type; #endif /// Symbol locations. - typedef ]b4_get_percent_define([[location_type]])[ location_type; + typedef ]b4_percent_define_get([[location_type]])[ location_type; /// Tokens. struct token { @@ -289,7 +290,7 @@ b4_error_verbose_if([, int tok])[); }; } -]m4_ifval(b4_get_percent_define([[global_tokens_and_yystype]]), +]b4_percent_define_flag_if([[global_tokens_and_yystype]], [b4_token_defines(b4_tokens) #ifndef YYSTYPE @@ -297,14 +298,14 @@ b4_error_verbose_if([, int tok])[); # define YYSTYPE b4_namespace::b4_parser_class_name::semantic_type #endif ]) -b4_get_percent_code([[provides]])[]dnl +b4_percent_code_get([[provides]])[]dnl [#endif /* ! defined PARSER_HEADER_H */] ])dnl @output(b4_parser_file_name@) b4_copyright([Skeleton implementation for Bison LALR(1) parsers in C++], [2002, 2003, 2004, 2005, 2006]) -b4_get_percent_code([[top]])[]dnl +b4_percent_code_get([[top]])[]dnl m4_if(b4_prefix, [yy], [], [ // Take the name prefix into account. @@ -318,7 +319,7 @@ b4_defines_if([[ /* User implementation prologue. */ ]b4_user_post_prologue -b4_get_percent_code[]dnl +b4_percent_code_get[]dnl [#ifndef YY_ # if YYENABLE_NLS @@ -1012,7 +1013,7 @@ b4_error_verbose_if([, int tok])[) int yynrhs = yyr2_[yyrule]; /* Print the symbols being reduced, and their result. */ *yycdebug_ << "Reducing stack by rule " << yyrule - 1 - << " (line " << yylno << "), "; + << " (line " << yylno << "):" << std::endl; /* The symbols being reduced. */ for (int yyi = 0; yyi < yynrhs; yyi++) YY_SYMBOL_PRINT (" $" << yyi + 1 << " =",