X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/49976d5c45048312c97c4eec4b607660444642a9..cb3f7f335aa69ba3e6478fea8d4591f4f6d43bc5:/tests/calc.at diff --git a/tests/calc.at b/tests/calc.at index 08ccbe41..285b6349 100644 --- a/tests/calc.at +++ b/tests/calc.at @@ -1,6 +1,7 @@ # Simple calculator. -*- Autotest -*- -# Copyright (C) 2000-2010 Free Software Foundation, Inc. +# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +# 2009, 2010 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 @@ -171,17 +172,17 @@ AT_SKEL_CC_IF( }; # define YYLLOC_DEFAULT(Current, Rhs, N) \ -do { \ - if (N) \ - { \ - (Current).first = (Rhs)[1].location.first; \ - (Current).last = (Rhs)[N].location.last; \ - } \ - else \ - { \ - (Current).first = (Current).last = (Rhs)[0].location.last; \ - } \ -} while (false) + do \ + if (N) \ + { \ + (Current).first = YYRHSLOC (Rhs, 1).first; \ + (Current).last = YYRHSLOC (Rhs, N).last; \ + } \ + else \ + { \ + (Current).first = (Current).last = YYRHSLOC (Rhs, 0).last; \ + } \ + while (false) ]])[ /* Exercise pre-prologue dependency to %union. */ @@ -716,6 +717,7 @@ m4_define([AT_CHECK_CALC_GLR_CC], [AT_CHECK_CALC([%language "C++" %glr-parser %defines %locations] $@)]) AT_CHECK_CALC_GLR_CC([]) +AT_CHECK_CALC_GLR_CC([%define location_type Span]) AT_CHECK_CALC_GLR_CC([%define parse.error verbose %name-prefix "calc" %verbose %yacc]) AT_CHECK_CALC_GLR_CC([%debug])