X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/df222dfaf4da6becae8665d344669eefc705d7f7..c826013fb38c98861ef0fc5d4dc3fb3fb4f555be:/data/yacc.c?ds=sidebyside diff --git a/data/yacc.c b/data/yacc.c index 462b8526..5efef5f8 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -1,12 +1,11 @@ -*- C -*- # Yacc compatible skeleton for Bison -# Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 1984, 1989-1990, 2000-2010 Free Software Foundation, +# Inc. m4_pushdef([b4_copyright_years], - [1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2007, 2008, 2009]) + [1984, 1989-1990, 2000-2010]) # 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 @@ -206,7 +205,7 @@ m4_define([b4_declare_parser_state_variables], [b4_pure_if([[ YYLTYPE *yylsp; /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[2];]])[ + YYLTYPE yyerror_range[3];]])[ YYSIZE_T yystacksize;]]) @@ -1503,7 +1502,7 @@ yyerrlab: #endif } -]b4_locations_if([[ yyerror_range[0] = yylloc;]])[ +]b4_locations_if([[ yyerror_range[1] = yylloc;]])[ if (yyerrstatus == 3) { @@ -1540,7 +1539,7 @@ yyerrorlab: if (/*CONSTCOND*/ 0) goto yyerrorlab; -]b4_locations_if([[ yyerror_range[0] = yylsp[1-yylen]; +]b4_locations_if([[ yyerror_range[1] = yylsp[1-yylen]; ]])[ /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); @@ -1574,7 +1573,7 @@ yyerrlab1: if (yyssp == yyss) YYABORT; -]b4_locations_if([[ yyerror_range[0] = *yylsp;]])[ +]b4_locations_if([[ yyerror_range[1] = *yylsp;]])[ yydestruct ("Error: popping", yystos[yystate], yyvsp]b4_locations_if([, yylsp])[]b4_user_args[); YYPOPSTACK (1); @@ -1584,10 +1583,10 @@ yyerrlab1: *++yyvsp = yylval; ]b4_locations_if([[ - yyerror_range[1] = yylloc; + yyerror_range[2] = yylloc; /* Using YYLLOC is tempting, but would change the location of the lookahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2); + YYLLOC_DEFAULT (yyloc, yyerror_range, 2); *++yylsp = yyloc;]])[ /* Shift the error token. */