cat > tparse.y << 'END'
%{
-void yyerror (char *s) {}
+void yyerror (const char *s) {}
%}
%token EOF
%%
cat > foo6.y <<'EOF'
%{
extern int yylex (void);
-void yyerror (char *s) {}
+void yyerror (const char *s) {}
%}
%token EOF
%%
cat > parse.y <<'EOF'
%{
-void yyerror (char *s) { return; }
+void yyerror (const char *s) {}
int yylex (void) { return 0; }
int main (void) { return 0; }
%}
cat > foo.y <<'EOF'
%{
-void yyerror (char *s) { return; }
+void yyerror (const char *s) {}
int yylex (void) { return 0; }
int main (void) { return 0; }
%}
cat > lib/foo.y << 'END'
%{
int yylex (void) { return 0; }
-void yyerror (char *s) {}
+void yyerror (const char *s) {}
%}
%%
foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
:; { echo '/* autogenerated */' \
&& echo '%{' \
&& echo 'int yylex () {return 0;}' \
- && echo 'void yyerror (char *s) {}' \
+ && echo 'void yyerror (const char *s) {}' \
&& echo '%}' \
&& echo '%%' \
&& echo "foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};" \
#include <stdio.h>
#include <stdlib.h>
int yylex () { return getchar (); }
-void yyerror (char *s) {}
+void yyerror (const char *s) {}
%}
%%
a : 'a' { exit(0); };
foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
%%
int yylex () { return 0; }
-void yyerror (const char *s) { return; }
+void yyerror (const char *s) {}
END
cat > foo.c << 'END'
#include <cstdio>
// "std::" qualification required by Sun C++ 5.9.
int yylex (void) { return std::getchar (); }
-void yyerror (const char *s) { return; }
+void yyerror (const char *s) {}
%}
%%
x : 'x' { };
cat > sub1/parse.y << 'END'
%{
int yylex () { return (getchar ()); }
-void yyerror (char *s) {}
+void yyerror (const char *s) {}
%}
%%
x : 'x' { };
#include <cstdlib>
// "std::" qualification required by Sun C++ 5.9.
int yylex (void) { return std::getchar (); }
-void yyerror (const char *s) { return; }
+void yyerror (const char *s) {}
%}
%%
a : 'a' { exit(0); };
%{
#include "parse.h"
int yylex () { return 0; }
-void yyerror (char *s) {}
+void yyerror (const char *s) {}
%}
%%
x : 'x' {};
cat > parse.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) {}
+void yyerror (const char *s) {}
%}
%token FOOBAR
%%
cat > ../parse.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) {}
+void yyerror (const char *s) {}
%}
%token FUBAR
%%
cat > ../parse.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) {}
+void yyerror (const char *s) {}
%}
%token MAUDE
%%
%{
#include "parse1.h"
int yylex () { return 0; }
-void yyerror (char *s) { return; }
+void yyerror (const char *s) {}
%}
%token ZARDOZ
%%
cat > parse4.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) { return; }
+void yyerror (const char *s) {}
%}
%%
x : 'x' {};
cat > foo.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) { return; }
+void yyerror (const char *s) {}
%}
%token TOKEN
%%
cat > foo.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) { return; }
+void yyerror (const char *s) {}
%}
%token TOKEN
%%
cat > sub/parse.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) { return; }
+void yyerror (const char *s) {}
%}
%%
x : 'x' {};
cat > parse.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) {}
+void yyerror (const char *s) {}
%}
%%
foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
cat > parse.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) {}
+void yyerror (const char *s) {}
%}
%%
foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
cat > zardoz.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) { return; }
+void yyerror (const char *s) {}
%}
%%
x : 'x' {};
cat > parse.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) {}
+void yyerror (const char *s) {}
%}
%%
foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
cat > bar.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) {}
+void yyerror (const char *s) {}
%}
%%
fubar : 'f' 'o' 'o' 'b' 'a' 'r' {};
cat > p.y <<'END'
%{
int yylex (void) { int new = 0; return new; }
-void yyerror (char *s) { return; }
+void yyerror (const char *s) {}
%}
%token ZARDOZ
%%
#include <cstdlib>
#include "parse.hh"
int yylex (void) { return 0; }
-void yyerror (const char *s) { return; }
+void yyerror (const char *s) {}
%}
%token FOOBAR
%%
%{
#include <cstdlib>
int yylex (void) { return 0; }
-void yyerror (const char *s) { return; }
+void yyerror (const char *s) {}
%}
%%
x : 'x' {};
:; { : \
&& echo "%{" \
&& echo "int yylex () { return 0; }" \
- && echo "void yyerror (char *s) {}" \
+ && echo "void yyerror (const char *s) {}" \
&& echo "%}" \
&& echo "%%" \
&& echo "maude : 'm' 'a' 'u' 'd' 'e' {}"; \
cat > parse.y << 'END'
%{
int yylex () {return 0;}
-void yyerror (char *s) {}
+void yyerror (const char *s) {}
%}
%%
maude : 'm' 'a' 'u' 'd' 'e' {};
cat > foo/parse.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) {}
+void yyerror (const char *s) {}
%}
%%
foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
cat > parse.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) {}
+void yyerror (const char *s) {}
%}
%%
foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
cat > ../parse.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) {}
+void yyerror (const char *s) {}
%}
%%
fubar : 'f' 'o' 'o' 'b' 'a' 'r' {};
cat > ../parse.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) {}
+void yyerror (const char *s) {}
%}
%%
maude : 'm' 'a' 'u' 'd' 'e' {};
cat > foo.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) { return; }
+void yyerror (const char *s) {}
int main () { return 0; }
%}
%%
cat > foo.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) { return; }
+void yyerror (const char *s) {}
int main () { return 0; }
%}
%%