]> git.saurik.com Git - bison.git/commitdiff
Merge remote-tracking branch 'origin/maint'
authorAkim Demaille <akim@lrde.epita.fr>
Mon, 12 Nov 2012 08:45:30 +0000 (09:45 +0100)
committerAkim Demaille <akim@lrde.epita.fr>
Mon, 12 Nov 2012 08:45:30 +0000 (09:45 +0100)
* origin/maint:
  maint: address syntax-check errors.
  tests: use valgrind where appropriate
  tests: use valgrind where appropriate
  tests: don't expect $EGREP to support -w
  tests: more possible error compiler messages for "#error"

Conflicts:
cfg.mk
tests/headers.at

1  2 
THANKS
cfg.mk
doc/bison.texi
src/print_graph.c
tests/c++.at
tests/glr-regression.at
tests/headers.at
tests/local.at
tests/regression.at

diff --cc THANKS
Simple merge
diff --cc cfg.mk
index 8e5a8e1031868fbf15f05df784f9df0ea960169a,3f244aabee421092b060a23a82199d29e224615c..1aa1c1ab8ef0b68f4fb30e6a496a77720ee724ff
--- 1/cfg.mk
--- 2/cfg.mk
+++ b/cfg.mk
@@@ -67,8 -85,8 +79,8 @@@ $(call exclude,                                                               
    prohibit_defined_have_decl_tests=?|^lib/timevar.c$$                 \
    prohibit_magic_number_exit=^doc/bison.texi$$                                \
    prohibit_magic_number_exit+=?|^tests/(conflicts|regression).at$$    \
 +  prohibit_strcmp=^doc/bison\.texi$$                                  \
    require_config_h_first=^(lib/yyerror|data/(glr|yacc))\.c$$          \
    space_tab=^tests/(input|c\+\+)\.at$$                                        \
-   unmarked_diagnostics=^(djgpp/|doc/bison.texi$$)                     \
 -  trailing_blank=^src/parse-gram.[ch]$$                                       \
+   unmarked_diagnostics=^(djgpp/|doc/bison.texi$$|tests/c\+\+\.at$$)   \
  )
diff --cc doc/bison.texi
Simple merge
Simple merge
diff --cc tests/c++.at
Simple merge
index 80248aa4e661a6232f5841ca9473d1688c1dca43,7df17b62597bce2c2efa974a456571ee563d0fca..ab6e14378ae77b5b9a1301b939bf8dd533d56f10
@@@ -93,10 -88,10 +88,10 @@@ yylex (void
  AT_BISON_OPTION_POPDEFS
  
  AT_BISON_CHECK([[-o glr-regr1.c glr-regr1.y]], 0, [],
 -[glr-regr1.y: conflicts: 1 shift/reduce
 -])
 +[[glr-regr1.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
 +]])
  AT_COMPILE([glr-regr1])
- AT_PARSER_CHECK([[echo BPBPB | ./glr-regr1]], 0,
+ AT_PARSER_CHECK([[./glr-regr1 BPBPB]], 0,
  [[E -> 'B'
  E -> 'B'
  E -> E 'P' E
@@@ -208,14 -203,21 +203,21 @@@ main (int argc, char **argv
  AT_BISON_OPTION_POPDEFS
  
  AT_BISON_CHECK([[-o glr-regr2a.c glr-regr2a.y]], 0, [],
 -[glr-regr2a.y: conflicts: 2 shift/reduce
 -])
 +[[glr-regr2a.y: warning: 2 shift/reduce conflicts [-Wconflicts-sr]
 +]])
  AT_COMPILE([glr-regr2a])
  
- AT_PARSER_CHECK([[echo s VARIABLE_1 t v x q | ./glr-regr2a]], 0,
+ AT_DATA([input1.txt],
+ [[s VARIABLE_1 t v x q
+ ]])
+ AT_PARSER_CHECK([[./glr-regr2a input1.txt]], 0,
  [[Variable: 'VARIABLE_1'
- ]], [])
- AT_PARSER_CHECK([[echo s VARIABLE_1 , ANOTHER_VARIABLE_2 t e | ./glr-regr2a]],
+ ]])
+ AT_DATA([input2.txt],
+ [[s VARIABLE_1 , ANOTHER_VARIABLE_2 t e
+ ]])
+ AT_PARSER_CHECK([[./glr-regr2a input2.txt]],
  0,
  [[Varlist: 'VARIABLE_1,ANOTHER_VARIABLE_2'
  ]])
@@@ -325,15 -331,17 +331,18 @@@ main(int argc, char* argv[]
  AT_BISON_OPTION_POPDEFS
  
  AT_BISON_CHECK([[-o glr-regr3.c glr-regr3.y]], 0, [],
 -[glr-regr3.y: conflicts: 1 shift/reduce, 1 reduce/reduce
 -])
 +[[glr-regr3.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
 +glr-regr3.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
 +]])
  AT_COMPILE([glr-regr3])
  
- AT_PARSER_CHECK([[echo p1 t4 o2 p1 p1 t1 o1 t2 p2 o1 t3 p2 p2 | ./glr-regr3]],
+ AT_DATA([input.txt],
+ [[p1 t4 o2 p1 p1 t1 o1 t2 p2 o1 t3 p2 p2
+ ]])
+ AT_PARSER_CHECK([[./glr-regr3 input.txt]],
  0,
  [[Result: 1c04
- ]], [])
+ ]])
  
  AT_CLEANUP
  
index 509a413df82a1478d8517fcee4570875e9997bd2,dcf09a728296d307e54029c6faa28f47b62e2546..c21fa3593a49cdfd1903f543d0c7c317742ec1ce
@@@ -241,6 -225,36 +225,35 @@@ AT_TEST([x7], [%define api.push-pull bo
  AT_TEST([x8], [%define api.pure %define api.push-pull both])
  #AT_TEST([x5], [%locations %language "c++" %glr-parser])
  
 -# Ignore comments, YYPARSE_PARAM (obsolete), YYPUSH_MORE(_DEFINED)?
 -# (constant definition), YY_\w+_INCLUDED (header guards).
+ # Check there is no 'yy' left.
+ # C++ output relies on namespaces and still uses yy a lot.
+ #
+ # Check there is no 'YY' left.
 -  s{\b(YYPARSE_PARAM
 -      |YYPUSH_MORE(_DEFINED)?
++# Ignore comments, YYPUSH_MORE(_DEFINED)?  (constant definition),
++# YY_\w+_INCLUDED (header guards).
+ #
+ # YYDEBUG (not renamed) can be read, but not changed.
+ AT_CHECK([[$PERL -n -0777 -e '
+   s{/\*.*?\*/}{}gs;
+   s{//.*}{}g;
++  s{\b(YYPUSH_MORE(_DEFINED)?
+       |YY_\w+_INCLUDED
+       |YY_NULL
+       |(defined|if)\ YYDEBUG
+       )\b}{}gx;
+   while (/^(.*YY.*)$/gm)
+   {
+     print "$ARGV: $1\n";
+   }
+   if ($ARGV =~ /\.h$/)
+   {
+     while (/^(.*yy.*)$/gm)
+     {
+       print "$ARGV: $1\n";
+     }
+   }
+ ' -- *.hh *.h]])
  # Check that the headers are self-contained, and protected against
  # multiple inclusions.  While at it, check they are sane for C++.
  for h in *.h *.hh
diff --cc tests/local.at
Simple merge
Simple merge