[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tests: run the printer/destructor test on glr.cc
From: |
Akim Demaille |
Subject: |
tests: run the printer/destructor test on glr.cc |
Date: |
Sat, 26 Jan 2019 11:29:11 +0100 |
commit 53d379b905bce85877ad392bc6122b51fa3f1565
Author: Akim Demaille <address@hidden>
Date: Sat Jan 26 07:23:51 2019 +0100
tests: run the printer/destructor test on glr.cc
* tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust for
glr.cc, and use it.
diff --git a/tests/actions.at b/tests/actions.at
index aa1eb3aa..ffc0faf3 100644
--- a/tests/actions.at
+++ b/tests/actions.at
@@ -543,7 +543,7 @@ AT_DATA_GRAMMAR([[input.y]],
#define YYINITDEPTH 10
#define YYMAXDEPTH 10
-#define RANGE(Location) ]AT_LALR1_CC_IF([(Location).begin.line,
(Location).end.line],
+#define RANGE(Location) ]AT_CXX_IF([(Location).begin.line,
(Location).end.line],
[(Location).first_line, (Location).last_line])[
#define USE(SYM)
@@ -572,8 +572,8 @@ AT_LALR1_CC_IF([typedef yy::location YYLTYPE;])[
/* FIXME: This %printer isn't actually tested. */
%printer
{
- ]AT_LALR1_CC_IF([yyo << $$;],
- [fprintf (yyo, "%d", $$)])[;
+ ]AT_CXX_IF([yyo << $$;],
+ [fprintf (yyo, "%d", $$)])[;
}
'(' 'x' 'y' ')' ';' thing line input '!' raise check-spontaneous-errors END
@@ -734,9 +734,8 @@ static
fprintf (stderr, " (address@hidden)\n", c, RANGE (]AT_LOC[));
return source[c];
}
-]AT_LALR1_CC_IF(
-[static bool yydebug;
-int
+]AT_LALR1_CC_IF([static bool yydebug;])[
+]AT_CXX_IF([int
yyparse ()
{
yy::parser parser;
@@ -999,11 +998,14 @@ AT_CLEANUP
AT_CHECK_PRINTER_AND_DESTRUCTOR([])
AT_CHECK_PRINTER_AND_DESTRUCTOR([], [ with union])
+AT_CHECK_PRINTER_AND_DESTRUCTOR([%glr-parser])
+AT_CHECK_PRINTER_AND_DESTRUCTOR([%glr-parser], [ with union])
+
AT_CHECK_PRINTER_AND_DESTRUCTOR([%defines %skeleton "lalr1.cc"])
AT_CHECK_PRINTER_AND_DESTRUCTOR([%defines %skeleton "lalr1.cc"], [ with union])
-AT_CHECK_PRINTER_AND_DESTRUCTOR([%glr-parser])
-AT_CHECK_PRINTER_AND_DESTRUCTOR([%glr-parser], [ with union])
+AT_CHECK_PRINTER_AND_DESTRUCTOR([%defines %skeleton "glr.cc"])
+AT_CHECK_PRINTER_AND_DESTRUCTOR([%defines %skeleton "glr.cc"], [ with union])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- tests: run the printer/destructor test on glr.cc,
Akim Demaille <=