# 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
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([],
#ifndef PARSER_HEADER_H
# define PARSER_HEADER_H
-]b4_get_percent_code([[requires]])[
+]b4_percent_code_get([[requires]])[
#include <string>
#include <iostream>
#ifndef YYSTYPE
]m4_ifdef([b4_stype],
[ union semantic_type
+ {
b4_user_stype
- ;],
+ };],
[m4_if(b4_tag_seen_flag, 0,
[[ typedef int semantic_type;]],
[[ typedef YYSTYPE semantic_type;]])])[
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
{
};
}
-]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
# 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.
/* User implementation prologue. */
]b4_user_post_prologue
-b4_get_percent_code[]dnl
+b4_percent_code_get[]dnl
[#ifndef YY_
# if YYENABLE_NLS
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 << " =",