X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/cf98343c1df980ad140fd71aa3d66dea3db8913c..77373efad24be4ed77391c9e8ab2f85285810311:/data/lalr1.cc diff --git a/data/lalr1.cc b/data/lalr1.cc index 9d108c4a..3a15012a 100644 --- a/data/lalr1.cc +++ b/data/lalr1.cc @@ -1,6 +1,6 @@ # C++ skeleton for Bison -# Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# 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 @@ -33,9 +33,9 @@ m4_include(b4_pkgdatadir/[location.cc]) m4_changecom() m4_divert_push(0)dnl b4_defines_if( -[@output(b4_spec_defines_file@) +[@output(b4_spec_defines_file@)@ b4_copyright([Skeleton interface for Bison LALR(1) parsers in C++], - [2002, 2003, 2004, 2005, 2006, 2007, 2008]) + [2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]) dnl FIXME: This is wrong, we want computed header guards. [ /* C++ LALR(1) parser skeleton written by Akim Demaille. */ @@ -130,6 +130,7 @@ b4_user_stype /// \returns 0 iff parsing succeeded. virtual int parse (); +#if YYDEBUG /// The current debugging stream. std::ostream& debug_stream () const; /// Set the current debugging stream. @@ -141,6 +142,7 @@ b4_user_stype debug_level_type debug_level () const; /// Set the current debugging level. void set_debug_level (debug_level_type l); +#endif private: /// Report a syntax error. @@ -195,7 +197,7 @@ b4_error_verbose_if([, int tok])[); static const ]b4_int_type_for([b4_pact])[ yypact_[]; static const ]b4_int_type(b4_pact_ninf, b4_pact_ninf)[ yypact_ninf_; - /// For a state, default rule to reduce. + /// For a state, default reduction number. /// Unless\a yytable_ specifies something else to do. /// Zero means the default is an error. static const ]b4_int_type_for([b4_defact])[ yydefact_[]; @@ -296,9 +298,9 @@ b4_percent_code_get([[provides]])[]dnl [#endif /* ! defined PARSER_HEADER_H */] ])dnl -@output(b4_parser_file_name@) +@output(b4_parser_file_name@)@ b4_copyright([Skeleton implementation for Bison LALR(1) parsers in C++], - [2002, 2003, 2004, 2005, 2006, 2007, 2008]) + [2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009]) b4_percent_code_get([[top]])[]dnl m4_if(b4_prefix, [yy], [], [ @@ -793,7 +795,7 @@ b4_error_verbose_if([, yytoken])[)); /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos_[yyn], - &yysemantic_stack_[0], &yylocation_stack_[0]); + &yysemantic_stack_[0], &yylocation_stack_[0]); yystate = yyn; goto yynewstate; @@ -839,7 +841,8 @@ b4_error_verbose_if([, int tok])[) if (yypact_ninf_ < yyn && yyn <= yylast_) { /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ + YYCHECK. In other words, skip the first -YYN actions for this + state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ @@ -887,9 +890,9 @@ b4_error_verbose_if([, int tok])[) ]b4_pact[ }; - /* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE - doesn't specify something else to do. Zero means the default is an - error. */ + /* YYDEFACT[S] -- default reduction number in state S. Performed when + YYTABLE doesn't specify something else to do. Zero means the + default is an error. */ const ]b4_int_type_for([b4_defact])[ ]b4_parser_class_name[::yydefact_[] = { @@ -1053,9 +1056,9 @@ b4_error_verbose_if([, int tok])[) ]b4_epilogue dnl -@output(b4_dir_prefix[]stack.hh@) +@output(b4_dir_prefix[]stack.hh@)@ b4_copyright([Stack handling for Bison parsers in C++], - [2002, 2003, 2004, 2005, 2006, 2007, 2008])[ + [2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009])[ #ifndef BISON_STACK_HH # define BISON_STACK_HH