From 0f4005f0838abb58e77a5a352225efebdb28464c Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sun, 10 Apr 2011 11:13:54 +0200 Subject: [PATCH] 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. --- ChangeLog | 19 +++++++++++++++++++ tests/yacc-basic.test | 2 +- tests/yacc-cxx.test | 6 +++--- tests/yacc-d-cxx.test | 4 ++-- tests/yacc-d-vpath.test | 6 +++--- tests/yacc8.test | 2 +- tests/yaccdry.test | 2 +- tests/yaccvpath.test | 6 +++--- 8 files changed, 33 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index ecc0e1f90..daba1c3f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,22 @@ +2011-04-10 Stefano Lattarini + + 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 yacc: update NEWS and docs about yacc-generated headers extensions diff --git a/tests/yacc-basic.test b/tests/yacc-basic.test index 845a8619a..96625ccf4 100755 --- a/tests/yacc-basic.test +++ b/tests/yacc-basic.test @@ -45,7 +45,7 @@ cat > parse.y << 'END' %{ #include #include -int yylex () { return (getchar ()); } +int yylex () { return getchar (); } void yyerror (char *s) {} %} %% diff --git a/tests/yacc-cxx.test b/tests/yacc-cxx.test index 86693d6a8..a6682e50b 100755 --- a/tests/yacc-cxx.test +++ b/tests/yacc-cxx.test @@ -45,10 +45,10 @@ END cat > parse1.yy << 'END' %{ -// Valid as C++, but deliberatly invalid as C. +// Valid C++, but deliberately invalid C. #include #include -int yylex (void) { return (getchar ()); } +int yylex (void) { return getchar (); } void yyerror (const char *s) { return; } %} %% @@ -59,7 +59,7 @@ cp parse1.yy parse3.yxx 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) { diff --git a/tests/yacc-d-cxx.test b/tests/yacc-d-cxx.test index b94b14d55..a8de6b370 100755 --- a/tests/yacc-d-cxx.test +++ b/tests/yacc-d-cxx.test @@ -31,7 +31,7 @@ write_parse () header=$1 sed 's/^ *//' < #include "$header" int yylex (void) { return 0; } @@ -47,7 +47,7 @@ write_main () { header=$1 sed 's/^ *//' < #include "$header" int main (int argc, char **argv) diff --git a/tests/yacc-d-vpath.test b/tests/yacc-d-vpath.test index bb099904a..0efa61e89 100755 --- a/tests/yacc-d-vpath.test +++ b/tests/yacc-d-vpath.test @@ -44,7 +44,7 @@ END # Original parser, with `foobar' cat > parse.y << 'END' %{ -int yylex () {return 0;} +int yylex () { return 0; } void yyerror (char *s) {} %} %token FOOBAR @@ -77,7 +77,7 @@ $sleep # New parser, with `fubar' cat > ../parse.y << 'END' %{ -int yylex () {return 0;} +int yylex () { return 0; } void yyerror (char *s) {} %} %token FUBAR @@ -97,7 +97,7 @@ $sleep # New parser, with `maude' cat > ../parse.y << 'END' %{ -int yylex () {return 0;} +int yylex () { return 0; } void yyerror (char *s) {} %} %token MAUDE diff --git a/tests/yacc8.test b/tests/yacc8.test index a683c8d0e..ca1ac686c 100755 --- a/tests/yacc8.test +++ b/tests/yacc8.test @@ -52,7 +52,7 @@ mkdir foo cat > foo/parse.y << 'END' %{ -int yylex () {return 0;} +int yylex () { return 0; } void yyerror (char *s) {} %} %% diff --git a/tests/yaccdry.test b/tests/yaccdry.test index d30fb802e..3ad4f7530 100755 --- a/tests/yaccdry.test +++ b/tests/yaccdry.test @@ -39,7 +39,7 @@ END cat > parse.y << 'END' %{ -int yylex () {return 0;} +int yylex () { return 0; } void yyerror (char *s) {} %} %% diff --git a/tests/yaccvpath.test b/tests/yaccvpath.test index 52092fa2b..77df917dc 100755 --- a/tests/yaccvpath.test +++ b/tests/yaccvpath.test @@ -44,7 +44,7 @@ END # Original parser, with `foobar' cat > parse.y << 'END' %{ -int yylex () {return 0;} +int yylex () { return 0; } void yyerror (char *s) {} %} %% @@ -71,7 +71,7 @@ $sleep # New parser, with `fubar' cat > ../parse.y << 'END' %{ -int yylex () {return 0;} +int yylex () { return 0; } void yyerror (char *s) {} %} %% @@ -89,7 +89,7 @@ $sleep # New parser, with `maude' cat > ../parse.y << 'END' %{ -int yylex () {return 0;} +int yylex () { return 0; } void yyerror (char *s) {} %} %% -- 2.47.2