X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/b9e4eb5b7288c5cdf35f26d74786a3aacf56e137..cf499cff31eabd04e37107484647bdd453137d1d:/data/glr.cc?ds=sidebyside diff --git a/data/glr.cc b/data/glr.cc index 5cad0b16..0d9e0496 100644 --- a/data/glr.cc +++ b/data/glr.cc @@ -1,6 +1,6 @@ # C++ GLR skeleton for Bison -# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, -# Inc. +# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# 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 @@ -44,7 +44,7 @@ # filename member). # We require a pure interface using locations. -m4_define([b4_locations_flag], [1]) +m4_define([b4_percent_define(locations)], []) m4_define([b4_pure_flag], [1]) # The header is mandatory. @@ -215,7 +215,7 @@ m4_popdef([b4_parse_param]) m4_divert_push(0) @output(b4_spec_defines_file@)@ b4_copyright([Skeleton interface for Bison GLR parsers in C++], - [2002, 2003, 2004, 2005, 2006])[ + [2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009])[ /* C++ GLR parser skeleton written by Akim Demaille. */ @@ -228,7 +228,7 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C++], #include /* Using locations. */ -#define YYLSP_NEEDED ]b4_locations_flag[ +#define YYLSP_NEEDED ]b4_locations_if([1], [0])[ ]b4_namespace_open[ class position; @@ -239,7 +239,7 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C++], /* Enabling traces. */ #ifndef YYDEBUG -# define YYDEBUG ]b4_debug_flag[ +# define YYDEBUG ]b4_parse_trace_if([1], [0])[ #endif /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. @@ -266,20 +266,7 @@ b4_copyright([Skeleton interface for Bison GLR parsers in C++], class ]b4_parser_class_name[ { public: -#ifndef YYSTYPE -]b4_semantic_type_declare[ -#else - typedef YYSTYPE semantic_type; -#endif - /// Symbol locations. - typedef ]b4_percent_define_get([[location_type]])[ location_type; - /// Tokens. - struct token - { - ]b4_token_enums(b4_tokens)[ - }; - /// Token type. - typedef token::yytokentype token_type; +]b4_public_types_declare[ /// Build a parser object. ]b4_parser_class_name[ (]b4_parse_param_decl[);