[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 7/8] tests: remove useless location initializations
From: |
Akim Demaille |
Subject: |
[PATCH 7/8] tests: remove useless location initializations |
Date: |
Tue, 6 Nov 2012 17:47:16 +0100 |
* tests/actions.at, tests/calc.at: here.
---
tests/actions.at | 17 +----------------
tests/calc.at | 11 -----------
2 files changed, 1 insertion(+), 27 deletions(-)
diff --git a/tests/actions.at b/tests/actions.at
index 0e02239..01e3e57 100644
--- a/tests/actions.at
+++ b/tests/actions.at
@@ -894,10 +894,6 @@ AT_DATA_GRAMMAR([[input]]$1[[.y]],
[[%error-verbose
%debug
%locations
-%initial-action {
- @$.first_line = @$.last_line = 1;
- @$.first_column = @$.last_column = 1;
-}
%{
# include <stdio.h>
@@ -964,7 +960,7 @@ AT_PARSER_CHECK([./input$1], 0,
]],
[[Starting parse
Entering state 0
-Reducing stack by rule 1 (line 46):
+Reducing stack by rule 1 (line 42):
-> $$ = nterm start (1.1: <]]kind[[> for 'S' @ 1)
Stack now 0
Entering state 1
@@ -1360,17 +1356,6 @@ AT_DATA_GRAMMAR([[input.y]],
%printer { report (yyo, $<ival>$, $$ ); } <fval>;
%printer { report (yyo, $<ival>$, $<fval>$); } <>;
-]AT_SKEL_CC_IF([[
-/* The lalr1.cc skeleton, for backward compatibility, defines
- a constructor for position that initializes the filename. The
- glr.cc skeleton does not (and in fact cannot: location/position
- are stored in a union, from which objects with constructors are
- excluded in C++). */
-%initial-action {
- @$.initialize ();
-}
-]])[
-
%initial-action
{
$<ival>$ = 42;
diff --git a/tests/calc.at b/tests/calc.at
index 2581a5b..d912832 100644
--- a/tests/calc.at
+++ b/tests/calc.at
@@ -284,17 +284,6 @@ static int power (int base, int exponent);
]AT_YYLEX_DECLARE_EXTERN[
}
-]AT_SKEL_CC_IF([AT_LOCATION_TYPE_IF([], [[
-/* The lalr1.cc skeleton, for backward compatibility, defines
- a constructor for position that initializes the filename. The
- glr.cc skeleton does not (and in fact cannot: location/position
- are stored in a union, from which objects with constructors are
- excluded in C++). */
-%initial-action {
- @$.initialize ();
-}
-]])])[
-
/* Bison Declarations */
%token CALC_EOF 0 "end of input"
%token <ival> NUM "number"
--
1.8.0
- [PATCH 0/8] {branch-2.6} more fixes for -Wuninitialized warnings, Akim Demaille, 2012/11/06
- [PATCH 3/8] glr.cc, yacc.c: initialize yylloc properly, Akim Demaille, 2012/11/06
- [PATCH 4/8] yacc.c: also disable -Wuninitialized., Akim Demaille, 2012/11/06
- [PATCH 6/8] lalr1.cc: always initialize yylval., Akim Demaille, 2012/11/06
- [PATCH 2/8] yacc.c, glr.c: a better YY_LOCATION_PRINT, Akim Demaille, 2012/11/06
- [PATCH 8/8] tests: calc: modernize the use of locations, Akim Demaille, 2012/11/06
- [PATCH 1/8] yacc.c: simplify initialization, Akim Demaille, 2012/11/06
- [PATCH 5/8] tests: check that C and C++ objects can be linked together., Akim Demaille, 2012/11/06
- [PATCH 7/8] tests: remove useless location initializations,
Akim Demaille <=