From c8e966e27200a9aef47e4e758de18bb199560e15 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sun, 9 Dec 2012 15:41:50 +0100 Subject: [PATCH 1/1] tests: be robust to C being compiled with a C++11 compiler * tests/glr-regression.at: Use YY_NULL instead of NULL. Comment changes. --- tests/glr-regression.at | 96 ++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 48 deletions(-) diff --git a/tests/glr-regression.at b/tests/glr-regression.at index 6ca021f9..088ad86a 100644 --- a/tests/glr-regression.at +++ b/tests/glr-regression.at @@ -18,9 +18,9 @@ AT_BANNER([[GLR Regression Tests]]) -## --------------------------- ## -## Badly Collapsed GLR States. ## -## --------------------------- ## +## ---------------------------- ## +## Badly Collapsed GLR States. ## +## ---------------------------- ## AT_SETUP([Badly Collapsed GLR States]) @@ -67,7 +67,7 @@ static YYSTYPE exprMerge (YYSTYPE x0, YYSTYPE x1) return 0; } -const char *input = NULL; +const char *input = YY_NULL; int main (int argc, const char* argv[]) @@ -105,9 +105,9 @@ E -> E 'P' E AT_CLEANUP -## ------------------------------------------------------------ ## -## Improper handling of embedded actions and $-N in GLR parsers ## -## ------------------------------------------------------------ ## +## -------------------------------------------------------------- ## +## Improper handling of embedded actions and $-N in GLR parsers. ## +## -------------------------------------------------------------- ## AT_SETUP([Improper handling of embedded actions and dollar(-N) in GLR parsers]) @@ -236,9 +236,9 @@ AT_PARSER_CHECK([[./glr-regr2a input3.txt]], 0, AT_CLEANUP -## ------------------------------------------------------------ ## -## Improper merging of GLR delayed action sets ## -## ------------------------------------------------------------ ## +## --------------------------------------------- ## +## Improper merging of GLR delayed action sets. ## +## --------------------------------------------- ## AT_SETUP([Improper merging of GLR delayed action sets]) @@ -354,10 +354,10 @@ AT_PARSER_CHECK([[./glr-regr3 input.txt]], AT_CLEANUP -## ------------------------------------------------------------------------- ## -## Duplicate representation of merged trees. See ## -## . ## -## ------------------------------------------------------------------------- ## +## ---------------------------------------------------------------------- ## +## Duplicate representation of merged trees. See ## +## . ## +## ---------------------------------------------------------------------- ## AT_SETUP([Duplicate representation of merged trees]) @@ -445,10 +445,10 @@ AT_PARSER_CHECK([[./glr-regr4]], 0, AT_CLEANUP -## -------------------------------------------------------------------------- ## -## User destructor for unresolved GLR semantic value. See ## -## . ## -## -------------------------------------------------------------------------- ## +## ------------------------------------------------------------------------- ## +## User destructor for unresolved GLR semantic value. See ## +## . ## +## ------------------------------------------------------------------------- ## AT_SETUP([User destructor for unresolved GLR semantic value]) @@ -505,10 +505,10 @@ AT_PARSER_CHECK([[./glr-regr5]], 0, [], AT_CLEANUP -## -------------------------------------------------------------------------- ## -## User destructor after an error during a split parse. See ## -## . ## -## -------------------------------------------------------------------------- ## +## ------------------------------------------------------------------------- ## +## User destructor after an error during a split parse. See ## +## . ## +## ------------------------------------------------------------------------- ## AT_SETUP([User destructor after an error during a split parse]) @@ -560,7 +560,7 @@ AT_CLEANUP ## ------------------------------------------------------------------------- ## -## Duplicated user destructor for lookahead. See ## +## Duplicated user destructor for lookahead. See ## ## . ## ## ------------------------------------------------------------------------- ## @@ -743,7 +743,7 @@ AT_CLEANUP ## ------------------------------------------------------------------------- ## -## No users destructors if stack 0 deleted. See ## +## No users destructors if stack 0 deleted. See ## ## . ## ## ------------------------------------------------------------------------- ## @@ -820,9 +820,9 @@ AT_PARSER_CHECK([[./glr-regr9]], 0, [], AT_CLEANUP -## ------------------------------------------------------------------------- ## -## Corrupted semantic options if user action cuts parse. ## -## ------------------------------------------------------------------------- ## +## ------------------------------------------------------ ## +## Corrupted semantic options if user action cuts parse. ## +## ------------------------------------------------------ ## AT_SETUP([Corrupted semantic options if user action cuts parse]) @@ -874,9 +874,9 @@ AT_PARSER_CHECK([[./glr-regr10]], 0, [], []) AT_CLEANUP -## ------------------------------------------------------------------------- ## -## Undesirable destructors if user action cuts parse. ## -## ------------------------------------------------------------------------- ## +## --------------------------------------------------- ## +## Undesirable destructors if user action cuts parse. ## +## --------------------------------------------------- ## AT_SETUP([Undesirable destructors if user action cuts parse]) @@ -932,9 +932,9 @@ AT_PARSER_CHECK([[./glr-regr11]], 0, [], []) AT_CLEANUP -## ------------------------------------------------------------------------- ## -## Leaked semantic values if user action cuts parse. ## -## ------------------------------------------------------------------------- ## +## -------------------------------------------------- ## +## Leaked semantic values if user action cuts parse. ## +## -------------------------------------------------- ## AT_SETUP([Leaked semantic values if user action cuts parse]) @@ -1179,9 +1179,9 @@ start <- defstate_init defstate_shift 'b': AT_CLEANUP -## ------------------------------------------------------------------------- ## -## Incorrect lookahead during nondeterministic GLR. ## -## ------------------------------------------------------------------------- ## +## ------------------------------------------------- ## +## Incorrect lookahead during nondeterministic GLR. ## +## ------------------------------------------------- ## AT_SETUP([Incorrect lookahead during nondeterministic GLR]) @@ -1396,9 +1396,9 @@ start <- merge 'c' stack_explosion: AT_CLEANUP -## ------------------------------------------------------------------------- ## -## Leaked semantic values when reporting ambiguity. ## -## ------------------------------------------------------------------------- ## +## ------------------------------------------------- ## +## Leaked semantic values when reporting ambiguity. ## +## ------------------------------------------------- ## AT_SETUP([Leaked semantic values when reporting ambiguity]) @@ -1478,9 +1478,9 @@ AT_PARSER_CHECK([[./glr-regr15]], 0, [], AT_CLEANUP -## ------------------------------------------------------------------------- ## -## Leaked lookahead after nondeterministic parse syntax error. ## -## ------------------------------------------------------------------------- ## +## ------------------------------------------------------------ ## +## Leaked lookahead after nondeterministic parse syntax error. ## +## ------------------------------------------------------------ ## AT_SETUP([Leaked lookahead after nondeterministic parse syntax error]) @@ -1538,9 +1538,9 @@ AT_PARSER_CHECK([[./glr-regr16]], 0, [], AT_CLEANUP -## ------------------------------------------------------------------------- ## -## Uninitialized location when reporting ambiguity. ## -## ------------------------------------------------------------------------- ## +## ------------------------------------------------- ## +## Uninitialized location when reporting ambiguity. ## +## ------------------------------------------------- ## AT_SETUP([Uninitialized location when reporting ambiguity]) @@ -1616,9 +1616,9 @@ AT_PARSER_CHECK([[./glr-regr17]], 0, [], AT_CLEANUP -## -------------------------------------------------------------## -## Missed %merge type warnings when LHS type is declared later. ## -## -------------------------------------------------------------## +## ------------------------------------------------------------- ## +## Missed %merge type warnings when LHS type is declared later. ## +## ------------------------------------------------------------- ## AT_SETUP([Missed %merge type warnings when LHS type is declared later]) -- 2.45.2