X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/ea0a767697594d2eda37daf5ecbf2fdaf60d2189..9874f80b2e813a8ad8e5562dbbaa30ecafd5e7d8:/data/glr.c?ds=inline diff --git a/data/glr.c b/data/glr.c index 8240d390..17eff387 100644 --- a/data/glr.c +++ b/data/glr.c @@ -2,7 +2,7 @@ # GLR skeleton for Bison -# Copyright (C) 2002-2011 Free Software Foundation, Inc. +# Copyright (C) 2002-2012 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 @@ -35,8 +35,8 @@ m4_define_default([b4_stack_depth_init], [200]) ## ------------------------ ## b4_define_flag_if([pure]) -# If glr.cc is including this file and thus has already set b4_pure_flag, don't -# change the value of b4_pure_flag, and don't record a use of api.pure. +# If glr.cc is including this file and thus has already set b4_pure_flag, +# do not change the value of b4_pure_flag, and do not record a use of api.pure. m4_ifndef([b4_pure_flag], [b4_percent_define_default([[api.pure]], [[false]]) m4_define([b4_pure_flag], @@ -1802,7 +1802,7 @@ yyreportAmbiguity (yySemanticOption* yyx0, yyerror (]b4_yyerror_args[YY_("syntax is ambiguous")); return yyabort; -} +}]b4_locations_if([[ /** Starting at and including state S1, resolve the location for each of the * previous N1 states that is unresolved. The first semantic option of a state @@ -1860,7 +1860,7 @@ yyresolveLocations (yyGLRState* yys1, int yyn1, yylloc = yylloc_current; } } -} +}]])[ /** Resolve the ambiguity represented in state S, perform the indicated * actions, and set the semantic value of S. If result != yyok, the chain of @@ -1894,8 +1894,8 @@ yyresolveValue (yyGLRState* yys, yyGLRStack* yystackp]b4_user_formals[) { switch (yypreference (yybest, yyp)) { - case 0: - yyresolveLocations (yys, 1, yystackp]b4_user_args[); + case 0:]b4_locations_if([[ + yyresolveLocations (yys, 1, yystackp]b4_user_args[);]])[ return yyreportAmbiguity (yybest, yyp]b4_pure_args[); break; case 1: