mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
tests: add missing includes
* tests/actions.at, tests/c++.at, tests/headers.at, * tests/regression.at: here.
This commit is contained in:
@@ -425,6 +425,7 @@ AT_DATA_GRAMMAR([[input.y]],
|
||||
]$3[
|
||||
%code
|
||||
{
|
||||
#include <stdio.h> /* putchar. */
|
||||
]AT_YYERROR_DECLARE[
|
||||
]AT_YYLEX_DECLARE[
|
||||
}
|
||||
@@ -1728,6 +1729,7 @@ AT_DATA_GRAMMAR([[input.y]],
|
||||
# define YYSTYPE sem_type
|
||||
|
||||
]AT_CXX_IF([[
|
||||
# include <cstdio> // EOF.
|
||||
# include <iostream>
|
||||
namespace
|
||||
{
|
||||
|
||||
@@ -988,7 +988,8 @@ yy::parser::error (const std::string &m)
|
||||
|
||||
# Another file to check syntax_error's linkage.
|
||||
AT_DATA_SOURCE([scan.cc],
|
||||
[[#include "input.hh"
|
||||
[[#include <cstdio> // getchar
|
||||
#include "input.hh"
|
||||
|
||||
// 'a': valid item, 's': syntax error, 'l': lexical error.
|
||||
int
|
||||
|
||||
@@ -127,6 +127,7 @@ AT_DATA_GRAMMAR([input.y],
|
||||
%define parse.error verbose
|
||||
]AT_VARIANT_IF([%token <int> 'x'], [%union {int integer;}])[
|
||||
%code {
|
||||
#include <stdio.h> /* printf. */
|
||||
]AT_PUSH_IF([[
|
||||
#if defined __GNUC__ && 7 == __GNUC__
|
||||
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
@@ -212,6 +213,7 @@ $2
|
||||
int integer;
|
||||
}
|
||||
%{
|
||||
#include <stdio.h> /* printf. */
|
||||
]AT_PUSH_IF([[
|
||||
#if defined __GNUC__ && 7 == __GNUC__
|
||||
# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
|
||||
|
||||
@@ -1309,6 +1309,7 @@ AT_BISON_OPTION_PUSHDEFS([%debug $1])
|
||||
|
||||
AT_DATA_GRAMMAR([input.y],
|
||||
[[%code {
|
||||
#include <stdio.h> /* printf */
|
||||
]AT_YYERROR_DECLARE[
|
||||
]AT_YYLEX_DECLARE[
|
||||
}
|
||||
@@ -1480,12 +1481,13 @@ AT_DATA_GRAMMAR([input.y],
|
||||
}
|
||||
|
||||
%{
|
||||
#include <stdio.h> /* printf. */
|
||||
]AT_YYERROR_DECLARE[
|
||||
]AT_YYLEX_DECLARE[
|
||||
%}
|
||||
|
||||
%%
|
||||
exp: 'a' { fprintf (stdout, "x: %d, y: %d\n", x, y); };
|
||||
exp: 'a' { printf ("x: %d, y: %d\n", x, y); };
|
||||
%%
|
||||
]AT_YYERROR_DEFINE[
|
||||
]AT_YYLEX_DEFINE(["a"])[
|
||||
|
||||
Reference in New Issue
Block a user