+2011-04-10 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ cosmetics: fix typos and wording in some yacc tests
+ * tests/yacc-cxx.test (foo.cc): Clarify comment about the content
+ of this file being valid C++ but invalid C.
+ (parse1.yy): Likewise. Also, remove redundant parentheses in a
+ `return' statement.
+ * tests/yacc-d-cxx.test (write_parse): Clarify comment about the
+ content of the generated files being valid C++ but invalid C.
+ (write_main): Likewise.
+ * tests/yacc-basic.test: Remove redundant parentheses in a
+ `return' statement.
+ * tests/yacc-d-vpath.test: Adjust spacing around curly brackets.
+ * tests/yaccvpath.test: Likewise.
+ * tests/yaccdry.test: Likewise.
+ * tests/yacc8.test: Likewise.
+ * tests/yacc4.test: Likewise.
+ Suggested by Ralf Wildenhues.
+
2011-04-10 Stefano Lattarini <stefano.lattarini@gmail.com>
yacc: update NEWS and docs about yacc-generated headers extensions
%{
#include <stdio.h>
#include <stdlib.h>
-int yylex () { return (getchar ()); }
+int yylex () { return getchar (); }
void yyerror (char *s) {}
%}
%%
cat > parse1.yy << 'END'
%{
-// Valid as C++, but deliberatly invalid as C.
+// Valid C++, but deliberately invalid C.
#include <cstdio>
#include <cstdlib>
-int yylex (void) { return (getchar ()); }
+int yylex (void) { return getchar (); }
void yyerror (const char *s) { return; }
%}
%%
cp parse1.yy parse4.ypp
cat > foo.cc << 'END'
-// Valid as C++, but deliberatly invalid as C.
+// Valid C++, but deliberately invalid C.
using namespace std;
int main (int argc, char **argv)
{
header=$1
sed 's/^ *//' <<END
%{
- // Valid as C++, but deliberatly invalid as C.
+ // Valid C++, but deliberately invalid C.
#include <cstdlib>
#include "$header"
int yylex (void) { return 0; }
{
header=$1
sed 's/^ *//' <<END
- // Valid as C++, but deliberatly invalid as C.
+ // Valid C++, but deliberately invalid C.
#include <cstdio>
#include "$header"
int main (int argc, char **argv)
# Original parser, with `foobar'
cat > parse.y << 'END'
%{
-int yylex () {return 0;}
+int yylex () { return 0; }
void yyerror (char *s) {}
%}
%token FOOBAR
# New parser, with `fubar'
cat > ../parse.y << 'END'
%{
-int yylex () {return 0;}
+int yylex () { return 0; }
void yyerror (char *s) {}
%}
%token FUBAR
# New parser, with `maude'
cat > ../parse.y << 'END'
%{
-int yylex () {return 0;}
+int yylex () { return 0; }
void yyerror (char *s) {}
%}
%token MAUDE
cat > foo/parse.y << 'END'
%{
-int yylex () {return 0;}
+int yylex () { return 0; }
void yyerror (char *s) {}
%}
%%
cat > parse.y << 'END'
%{
-int yylex () {return 0;}
+int yylex () { return 0; }
void yyerror (char *s) {}
%}
%%
# Original parser, with `foobar'
cat > parse.y << 'END'
%{
-int yylex () {return 0;}
+int yylex () { return 0; }
void yyerror (char *s) {}
%}
%%
# New parser, with `fubar'
cat > ../parse.y << 'END'
%{
-int yylex () {return 0;}
+int yylex () { return 0; }
void yyerror (char *s) {}
%}
%%
# New parser, with `maude'
cat > ../parse.y << 'END'
%{
-int yylex () {return 0;}
+int yylex () { return 0; }
void yyerror (char *s) {}
%}
%%